Author |
|
sectorx4
Joined: 25 Oct 2006 Posts: 4 Location: Australia
|
Posted: Wed 25 Oct '06 12:34 Post subject: Apache loading PHP4 module instead of PHP5 |
|
|
I been having an issue with my FreeBSD server and after many many many hours of trying to fix it myself and many more hours looking at the apache and FreeBSD site haven't got far.
Basically im running Plesk (Yeah....bad idea) on FreeBSD 6.0 and the way plesk works is it runs 2 instances of apache. One serves the admin side (through SSL on 8443) and runs PHP 5, the other serves the user side (in port 80) and uses PHP4.
Now as far as I can tell I need to change the httpd.conf to load the PHP5 module and not the PHP4 one but I have had no luck, not only that Plesk completly screws with the filesystem and there are like 5 httpd.conf files. I believe I have the correct ones narrowed down after a process of elimination but haven't made much more progress then that.
I would reinstall the box but it would cost me $50USD and at the moment I want to try get PHP5 installed so I can setup a wiki. I could set it up on the admin side but its messy and my domains are only setup for the user side.
Any help is appreciated, weather it be directing me somewhere or helping me out with some possible solutions.
Thanks. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 25 Oct '06 13:26 Post subject: |
|
|
You have to find our which is the right httpd.conf
Can you start apache from the shell? Do you have shell access over ssh or something like that? |
|
Back to top |
|
sectorx4
Joined: 25 Oct 2006 Posts: 4 Location: Australia
|
Posted: Wed 25 Oct '06 15:02 Post subject: |
|
|
As I said im pretty sure I have the correct config.
Yes I can and yes I do have ssh access. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 25 Oct '06 15:17 Post subject: |
|
|
So you can start apache with the right httpd.conf file
Don't know how apache is named under your distro, but ist must be apache or httpd
than you can start it httpd -f /path/to/the/right/httpd.conf
In that httpd.conf you can also edit that apache will use the PHP version you want to.
Better you test the config before with
httpd -t -f /path/to/the/right/httpd.conf
If you realy don't get that running. Download a sources and compile new one and use that. |
|
Back to top |
|
sectorx4
Joined: 25 Oct 2006 Posts: 4 Location: Australia
|
Posted: Wed 25 Oct '06 17:13 Post subject: |
|
|
Quote: | So you can start apache with the right httpd.conf file |
If I start it with another httpd.conf it'll most likely cause plesk to freak out, suffice to say the httpd.conf is correct.
Quote: | Don't know how apache is named under your distro, but ist must be apache or httpd |
Plesk changes the name of the config, as I said im running FreeBSD so that itself does not change the name. Its plesk messing with the apache, etc for the purpose of what I think must be easy frontend administration.
Quote: | If you realy don't get that running. Download a sources and compile new one and use that. |
If I do that I think it would probably destroy the frontend.
What I personally see as the solution (and I may be wrong) is a way to re-write the existing config to force it to load PHP5, I have tried commenting out the PHP4 module in the config but it has not made any difference.
This is the phpinfo at the moment, not sure how much help it is though.
http://216.55.147.95/info.php |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 25 Oct '06 20:04 Post subject: |
|
|
if you commented out AND put put PHP 5 in, than you have to restart apache!
Your httpd.conf can be in /usr/local/psa/apache/conf I think.
Why do you use such a host with plesk, if you don't have that knowledge from freeDSB? |
|
Back to top |
|
sectorx4
Joined: 25 Oct 2006 Posts: 4 Location: Australia
|
Posted: Thu 26 Oct '06 16:18 Post subject: |
|
|
Quote: | if you commented out AND put put PHP 5 in, than you have to restart apache! |
Already done that, fyi I did not load the module the config includes load for both by default.
Quote: | Your httpd.conf can be in /usr/local/psa/apache/conf I think. |
correct, that directory contains all the httpd.conf files.
Quote: | Why do you use such a host with plesk, if you don't have that knowledge from freeDSB? |
To be able to hand over the host to someone at a later date that won't have the knowledge, well I have all the knowledge you've told me so far...
Anyway there is only one way to learn. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 26 Oct '06 17:21 Post subject: |
|
|
Quote: |
Already done that, fyi I did not load the module the config includes load for both by default.
|
if that is true! You only have to assiate the files
Because if both are loaded, one must be loaded as modul and the other as cgi. |
|
Back to top |
|