php doesnt work after apache upgraded to ver 2

mehrdad abed

Well-Known Member
Mar 18, 2006
128
0
166
I've upgraded the apache to ver "2" using easyapache, but now my php files aren't run anymore and it just prompts me to download the php source file,anyhow I think the problem should be relied on file httpd.conf cause i don't find any php module includes there,

I've rebuilt apache ver 2 along with different versions of php (4.4.6, 4.4.2, 5.1.4) several times but the problem persists,

please help.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
I've upgraded the apache to ver "2" using easyapache, but now my php files aren't run anymore and it just prompts me to download the php source file,anyhow I think the problem should be relied on file httpd.conf cause i don't find any php module includes there,

I've rebuilt apache ver 2 along with different versions of php (4.4.6, 4.4.2, 5.1.4) several times but the problem persists,

please help.
You need to look at your httpd.conf file and see how PHP has been setup ...

EasyApache often leaves the PHP module commented out when it shouldn't be
and vice versa and that can cause your server to not recognize PHP code and
try to download script files instead of executing them.

Another cause is when PHP fails to compile because of bad options, etc.
I've noticed many times in many installations where EasyApache failed to
compile PHP correctly but then didn't have enough sanity checks to realize
itself that the compile for PHP had failed leaving everything unfinished
after EasyApache was done running.

It is for this exact precise reason though that I generally recommend that
everyone manually compile PHP and install it yourself and leave
EasyApache to just deal with the Apache upgrade alone.

It saves a lot of headaches doing it that way ...

If you must use EasyApache to setup your PHP (don't know how, etc)
then I would recommend that you keep the PHP options selected in
EasyApache to an absolute minimum to what you really need and
also don't select the "versioning" option either.
 

eNetHosts

Well-Known Member
Apr 21, 2007
191
0
166
We had a similar problem as noted in the linked post.

Yesterday we tried the latest php upgrade build however apache didn't want to work with php.

Tried to build to 5.2.2 today and it works fine :)
 

eNetHosts

Well-Known Member
Apr 21, 2007
191
0
166
When you build, ensure it's building to 5.2.2 and not the default when you do upgrade Apache.