LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   httpd could not be started (https://www.linuxquestions.org/questions/slackware-14/httpd-could-not-be-started-530773/)

suna22 02-20-2007 12:32 PM

httpd could not be started
 
hi - i recently installed slackware 11, and had very little trouble getting the LAMP server to work. However, an app that we want to install needs php 5. Slack 11 comes with php 4.4.4. I used pkgtool, and removed php4.4.4. I then found a php5 "slack package" (ends in .tgz) I installed it, and when i typed php -v, it puked a whole bunch of stuff on the screen.

I figured it puked because apache had been complied with the old php (4.4.4) I then ran pkgtool again, and removed apache 1.3.37. I then downloaded apache and php (source), and went through the whole process to install both of them (unzip apachec tar to a location, thpe ./configure --prefix=/home/httpd --enable-module=so etc. I then did the make & make install.

I did the same thing for php 5.2. All of this went fine. However, when i go to the Konsloe and type
apachectl start
i get the following output

/usr/sbin/apachectl: line 87 /usr/sbin/apachectl No such file or directory.
/usr/sbin/apachectl start: httpd could not be started

I have looked high and low for the answer, but have not found it.

Would it be simpler to reinstall Slackware 11, and try and upgrade php4.4.4 to php 5?

If so - how does one upgrade php 4.4.4 to php 5? Can the slackware package manager do it?

Thanks.

yuchai 02-20-2007 01:07 PM

Hi - where did you find the php5 package that was used? I just wanted to make sure you're aware that there's an official php5 package out there for maximum compatibility:

http://packages.slackware.it/package...p-5.2.0-i486-1

Download the package, and simply execute

# upgradepkg php-5.2.0-i486-1.tgz

suna22 02-20-2007 01:31 PM

hi
 
hi - i did not use a package to insatll

i went to php.net and got the official php 5.2 tarball

i then typed tar -zxvf blah blah blah

i then did the

./configure --with -mysql yada yada yada yada yada

Could this be why my httpd will not start?

suna22 02-20-2007 01:32 PM

hi again
 
hi again - i found the php5 pacakge for slackware from

linuxpackages.net

yuchai 02-20-2007 02:05 PM

Hi - at this point what you can try is to uninstall your custom built version of php and then install the official version.

1. Go to your build directory and run "make uninstall".
2. "ls /var/log/packages |grep php" to see what the current installed copies of php is/if any
3. Download official php5 package from my previous post
3. If a version of php is found from step 2 then use "upgradepkg" on official php5 package, otherwise use "installpkg"

Hope this helps.

suna22 02-20-2007 02:06 PM

thanks so much!
 
Hi - thanks so much for pointing me to http://packages.slackware.it

I will be visiting that site very often in the future!

I downloaded the php package from the site, then simply typed.

installpkg (packagename).tgz

I then downloaded the apache package from the same location, and installed it the same way.

When i typed apachectl start, it puked with an error similar to the following.

cannot load /usr/libexec/apache/libphp4.so

I then went into /etc/apache/ and edited the mod_php.conf file

I simply changed the number 4 to the number 5 (in two places on the only line in the file)

Problem solved!

It turns out that apache was trying to start with the old php4, which is not in the system anymore.


All times are GMT -5. The time now is 04:10 PM.