PDA

View Full Version : Fairly major problems with Apache after trying (and failing..) to upgrade PHP



dunc
02-01-2012, 04:09 PM
Hi all,

Long (and hideously stupid) problem here.

I was running PHP 5.2.10. I wanted to upgrade to 5.3.9.

First off, I tried to upgrade PHP manually using the following steps:

Logged in as root
wget the latest PHP installation
tar zxvf php-.....gz
cd php-....
./configure
make
apachectl stop
make install
apachectl start
At this point "php -v" showed 5.3.9 but "phpinfo()" on the front-end showed 5.2.10.

It's worth noting at this point that I completely forgot I was using DirectAdmin :(

Upon suggestion of a friend I change the "yum.conf" to stop excluding php, mysql etc updates.

I then "yum update"d all.

I then individually "yum install php". Not long after, I "yum remove php-common" and "yum install mod_php".

Since then, my problems are as follows:


httpd wouldn't restart because of a "SSLEngine" error
changed httpd.conf to a new one, wouldn't start because of "Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration" error
used a differend httpd.conf to get httpd working, but now I can't access /phpmyadmin or /dev/ (my wordpress install which uses htaccess heavily)

After all of that, I remembered that I use DirectAdmin and that I've probably killed off a lot of the DA-specific PHP and Apache config.

So, I tried to use "custombuild" to update. It seemed to do everything correctly but it hasn't made any difference; probably because it hasn't overwritten the incorrect httpd.conf files.

All in all, I've f0rked up pretty badly :( Unfortunately I don't know anywhere near enough about Linux to fix it.

Do I simply need a DA-specific httpd.conf ? Does anyone have a copy of the default that I could try?

zEitEr
02-02-2012, 01:20 AM
Hello,

You should run


yum erase php -y

and remove other php libs installed with yum.

Of course remove any copy of PHP installed from sources. And re-install PHP with custombuild.

As soon as you finish with it, you'd better run


cd /usr/local/directadmin/custombuild
./build rewrite_confs

to re-write apache configs to directadmin specifics.

p.s. Some of us here are ready to give you the best commerce service as we can. So feel free to PM me or anybody else if you need a private help.

dunc
02-02-2012, 01:57 AM
What commands would you suggest to reinstall PHP with custombuild?

I'll give this a go this afternoon, but I might well need to hire your services - I'm well out of my depth here.

Could you PM me your e-mail address and offer a quote for fixing these issues?

Cheers

zEitEr
02-02-2012, 02:05 AM
It should be


./build php d