hi I am starting to learn PHP now, i installed everything- PHP, MYSQL AND APACHE but, i am not sure where shall i write the script? you'l say in the html file . o.k but should i chane the file extenstion to .php? or to .html? I've tried both. in the .php the computer doesn't recognize the extension and in .html it doesn't run the script. so this is the question: what do i have to do in order to make this thing works? after installing the whole package what do i need to do in order to make thing works please please help!! Progfrog
files need to be with .php extension. I assume you have set everything up properly. To run php, apache needs to be running, and you need to go to your browser and type in something like http://localhost to view your php file, so that your php scipt can be rendered. You cannot just open it from your folder directory.
maybe worth noting that apache has a specific directory from which it reads html and php files.. it's called "documentRoot", and is in your httpd.conf file in the apache directory.. good luck
Try first a normal HTML text on your site, than you can see if your server is working. Than open a notepad or an other program to write PHP. Start scripting and save it in your FTP with the extension .php greets
Alright are you trying to open it directly in firefox or Internet Explorer, or accessing it via localhost? if your trying to directly open the file, try opening it from localhost/yourfolder/yourphpfile.php because your browser reads the php files like a text file. AND make sure you have port forwarding properly configured so you can access it via localhost.
When I was getting started with PHP I don't think I could have handled installing AMP and configuring it properly. Best thing to do is probably get hosting, upload your index.php file and see it work from there.