I'm running Ubuntu and have just installed PHP5, Apache2, and MySQL. I created a PHP Project in Netbeans and trying to echo "Hello World." When I run it, I just get a 404 Not Found error with this "The requested URL /PhpProject1/index.php was not found on this server." Any ideas on what to do?

I'm running Ubuntu and have just installed PHP5, Apache2, and MySQL. I created a PHP Project in Netbeans and trying to echo "Hello World." When I run it, I just get a 404 Not Found error with this "The requested URL /PhpProject1/index.php was not found on this server." Any ideas on what to do?

Ok, I think I fixed that problem. Now when I try to open the PHP file, it just opens Firefox and asks me if I want to Open or Save the file. What do I do?

Member Avatar

diafol

Is it running on localhost?
Have you stored the file under the localhost directory?
E.g. if you used XAMPP, your default localhost directory will be something like:

c:\xampp\htdocs\

Also check to see if Apache etc are running.

Thanks ardav, but I think I just figured it out. I just stored my PHP file in the /var/www folder and directed Firefox to there and it worked!