You are not logged in.
Hi!
I installed and configured LAMP following these instructions: https://wiki.archlinux.org/index.php/LAMP
But whatever page I try to load with PHP from NetBeans, it gives me:
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
The only page that works is http://localhost/ , pages like http://localhost/test.php don't work. How to fix it?
Last edited by Mr. Alex (2011-05-25 16:24:22)
Offline
Your choice of IDE really has nothing to do with whether or not your LAMP stack is setup correctly. For a minimal test, create a file like test.php in /srv/http with this body
<?php phpinfo(); ?>
then point your browser to http://localhost/test.php
Afaik NetBeans will deploy your project via ftp/sftp but I'm not sure if it will copy your php files to apache's docroot locally. You might want to spend some time reviewing the NetBeans PHP documentation. I generally just run a build script that does a copy or a checkout from svn and then chowns the files in /srv/http/myphpproject back to the http user and group.
Offline
Found the problem - it was in
DocumentRoot "/srv/http"
and
<Directory "/srv/http">
lines in httpd config file. Changed the path to NetBeans'es default for projects plus reset umask (was 007). Now it works. Thanks.
Offline
Please edit your original post, edit the subject, and add [SOLVED].
Thanks
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline