totalufo

Well-Known Member
Jan 17, 2002
160
0
316
I found this script in another post about fixing PHP that has not been installed during the Apache build.

[code:1:c0d94f85da]
#!/bin/bash

cd /tmp
rm -rf php-4.0.6
echo &##############################################&
echo &# PHP 4.0.6 BUILDER #&
echo &##############################################&

echo &[GRABBING SOURCE CODE FROM PHP.NET]&
wget -q http://php.net/do_download.php?download_file=php-4.0.6.tar.gz&source_site=www.php.net
echo &--& got it&

echo &[DECOMPRESSING]&
tar -xzf php-4.0.6.tar.gz
echo &--& done&

cd php-4.0.6

echo &[CONFIGURING PHP]&

./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --enable-ftp --with-gd --with-zlib --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-xpm-dir=/usr/X11R6 --with-swf=/usr/local/flash --enable-magic-quotes --with-mysql --enable-safe-mode --enable-track-vars --with-ttf --enable-versioning --with-mcrypt --enable-sockets --enable-calendar --with-ming

echo &--& PHP Configured&

echo &[BUILDING BINARY]&
make
echo &--& Binary Built&

echo &If no errors have occured above, you can now run the command 'make install'.&
[/code:1:c0d94f85da]

Is this how to install php if it's missing on the server?

How do you execute this script??

I know there is a thread on this but I don't think it's being noticed. I see a lot of people having this problem and hope this is the solution.
 

sina

Active Member
Mar 7, 2002
38
0
306
sometimes on Cpanel installs you think PHP is not installed but it is ! what you gotta do is open up the /etc/httpd/conf/httpd.conf
and after the cpanel installation where all the application types are listed add the following lines:

AddType application/x-httpd-php .php .phtml .php4
AddType application/x-httpd-php-source .phps

LoadModule php4_module libexec/libphp4.so

AddModule mod_php4.c

you should be all set after !! remember to restart your apache

Sina Loghavi
 

totalufo

Well-Known Member
Jan 17, 2002
160
0
316
I managed to fix it buy rebuilding apache in the /tmp directory with the default settings. Fixed it without a hitch!
 

creighton

Registered
Aug 12, 2001
1
0
301
totalufo:

Can you give a description of how you accomplished this?

I add the appropriate lines in httpd.conf and stop/start Apache and it fails each time.
 

totalufo

Well-Known Member
Jan 17, 2002
160
0
316
you need to rebuild apache
http://support.cpanel.net/obb/read.php?TID=1816

read the 4th post down by shaun