Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with directioryIndex

Status
Not open for further replies.

MikoLone

Technical User
Jul 27, 2004
5
Currently my apache is set up with

DirectoryIndex index.htm

I want to add to the directoryIndex index.php so I do.

DirectoryIndex index.htm index.php

when I restart apache and the log says.

[Wed Oct 12 11:36:40 2005] [notice] SIGHUP received. Attempting to restart
Syntax error on line 195 of /conf/httpd.conf:
Cannot load /usr/lib/apache/modules/libphp4.so into server: Can't open file

Line 195 of the httpd.conf file is.

LoadModule php4_module /usr/lib/apache/modules/libphp4.so

So I commented that line out and start apache and it started fine. Then I try to go to the index.php file and it doesn't know what to do with it because php module isn't loaded.

I tried to add just index.html and I am having the same problem.

What I'm I doing wrong??

 
Hi

Looks like Linux, but what distro ? And how you installed Apache and PHP ? From package or compiled your own ? The /usr/lib/apache/modules/libphp4.so file exist ?

Feherke.
 
What distro ?
it is actually openBSD.

How did you install Apache and PHP ?
It is bundled with the distro. I didn't compile it.


The /usr/lib/apache/modules/libphp4.so file exist?
I double checked and yes it does exist.

Thanks for the reply. I have no idea even where to begin with this. i gave all of the information that I have. If you need anything else to get me started let me know.

Thanks



 
Does the apache user (apache or nobody) have read permission to /usr/lib/apache/modules/libphp4.so ?
 
I get -rwxr-xr-x

so it looks like everything should be able to execute it.


I also tested out php and it does work on the server.

Thanks for the replies. I wish i had a clue about this stuff but this is soo odd I have no idea where to start.
 
Hi

Ok, the web server runs with an ordinary user's permissions, but is started as root. So the modules can be loaded anyway.
Code:
[blue]master #[/blue] grep "^User\|^Group" httpd.conf
User nobody
Group #-1

[blue]master #[/blue] ls -l libphp*.so
----------  1 root root 2299044 Aug 18  2003 libphp4.so
----------  1 root root 5259387 Jun 23 15:05 libphp5.so
My best tip for now is corrupted file. Is it possible ?

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top