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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

installed php and now can't start server?

Status
Not open for further replies.

bigtimehelp

Programmer
Aug 29, 2001
7
US
Hi,

I installed php and then rebooted the server (Linux 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown).

I can telnet and ftp in but I can't view any pages from the browser. What should I do next?

Thanks in advance.
 
It's probably a conflict with apache.

To test your configuration do this :
Code:
apachectl configtest
(under root account)

Next copy the error messages here and we can help you.

 
Hi,

Here is what I got:

[root@www init.d]# apachectl configtest
bash: apachectl: command not found

I also tried this and here is the response I got:

[root@www drj]# /etc/rc.d/init.d/httpd status
bash: /etc/rc.d/init.d/httpd: No such file or directory

Here are the contents of /etc/rc.d/init.d

anacron autofs halt kdcrotate lpd nfs pppoe rstatd sendmail strongholdctl xfs ypserv
apmd crond identd keytable mysql.server nfslock random rusersd single syslog xinetd
arpwatch functions ipchains killall netfs nscd rawdevices rwalld snmpd tux ypbind
atd gpm iptables kudzu network portmap rhnsd rwhod sshd webmin yppasswdd

Here are some other tidbits about the server...There are a bunch of httpd.conf files on the server. How can I tell which is the active one?

[root@www sbin]# pwd
/usr/sbin
[root@www sbin]# ./httpd restart
Syntax error on line 33 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/modules/mod_env.so into server: /usr/modules/mod_env.so: cannot open shared object file: No such file or directory


#all the locations of httpd are below:

[root@www /]# find . -name httpd -print
./var/log/httpd
./var/cache/httpd
./var/./etc/httpd
./etc/etc/httpd
./etc/httpsd/bin/httpd
./etc/httpsd/.binaries/httpd
./usr/sbin/httpd
./usr/sbin/bin/httpd
./usr/sbin/.binaries/httpd
./home/httpd
./home/httpd/warpaint/httpd
./root/etc/httpd

#httpd.conf files are below:

[root@www /]# find . -name httpd.conf -print
./var/./etc/httpd/conf/httpd.conf
./etc/etc/httpd/conf/httpd.conf
./etc/httpsd/.configure/httpd.conf
./etc/httpsd/conf/httpd.conf
./usr/sbin/.configure/httpd.conf
./usr/sbin/conf/httpd.conf
./home/httpd/warpaint/conf/httpd.conf
./root/etc/httpd/conf/httpd.conf

The server is going standard red hat 7.0 with default directories set to:
/var/ or /var/


Thanks for the help
 
Hi,

Redhat's apache rpm doesn't have apachectl - its' functionality is mostly in the sysv init script, i.e /etc/rc.d/init.d/httpd .

You can syntax test httpd.conf by doing '/usr/sbin/httpd -T' . By default on Redhat its /etc/httpd/conf/httpd.conf .

Module mod_env.so should be in /usr/lib/apache/mod_env.so
by default (i.e. as packaged by Redhat).

Seems at least some of your apache installation is missing (init script !) so I can only suggest that you reinstall the apache rpm.

Rgds
 
Hi,

[root@www drj]# /usr/sbin/httpd -T
Syntax error on line 33 of /etc/httpd/conf/httpd.conf:
Cannot load /usr/modules/mod_env.so into server: /usr/modules/mod_env.so: cannot open shared object file: No such file or directory


mod_env.so is where you said it should be.../usr/lib/apache/

/etc/httpd/conf/httpd.conf is also there.

Is there a path somewhere I should change to point to the right module directory? Is a reinstallation of apache still necessary?

Thanks
 
Hi,





Well the ServerRoot variable indicates the top level directory, i.e. :





ServerRoot "/etc/httpd"





In Redhat, that directory has a file which is a symbolic link to where the modules are actually stored from the rpm ...





/etc/httpd/modules -> /usr/lib/apache





So, when in httpd.conf it says :



modules/mod_env.so





that means /etc/httpd/modules/mod_env.so which translates to :





/usr/lib/apache/mod_env.so





So, check you have the following two lines in /etc/httpd/conf/httpd.conf :





ServerRoot "/etc/httpd"


modules/mod_env.so





Rgds


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top