You are not logged in.

#1 2011-05-25 11:26:08

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

[Solved] LAMP doesn't work

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

#2 2011-05-25 15:21:34

chr0nik
Member
From: Michigan, USA
Registered: 2011-03-13
Posts: 31

Re: [Solved] LAMP doesn't work

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

#3 2011-05-25 16:07:29

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: [Solved] LAMP doesn't work

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

#4 2011-05-25 16:09:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [Solved] LAMP doesn't work

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

Board footer

Powered by FluxBB