Serious EasyApache issue, would not upgrade php to 5.2.8

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
We tried compiling apache/php three times to get this right, but all three failed. So we had to fix three items manually to get php working again.

After running EasyApache (via shell):
1 -- WHM ---> Configure PHP and SuExec had none selected as php5 handler.
2 -- The file /usr/local/apache/conf/php.conf was without any parameters.
3 -- The /usr/local/lib/php.ini file contained two sets of ionCube loader lines, i.e. ionCube was being loaded twice.

AND, even though php v5.2.8 was selected in EasyApache we still only got php v5.2.6

UPDATE: our tech at ThePlanet found the issue:

"I think there might be something screwy with how easyapache is saving options when "compile latest minor revision" is enabled. I'm turning that off, and selecting the latest version manually and see if that helps."

And indeed it did. Everything compiled and php upgraded correctly when the above was accomplished.
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
724
15
243
#1 an #2 are because you need to configure PHP like it says at the end of the build. Perhaps that could be made a little smarter though, we'll discuss it tomorrow at our dev meeting.

> even though php v5.2.8 was selected in EasyApache we still only got php v5.2.6

If you have a preference set regarding the minor revision it overrides what the profile has explicitly set. That's the point behind those preferences.

We'll look into #3 tomorrow first thing, thanks
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
#1 an #2 are because you need to configure PHP like it says at the end of the build. Perhaps that could be made a little smarter though, we'll discuss it tomorrow at our dev meeting....
Yup. Thanks, but if so, it is just too easy to fall into this hole. This is the way we've always done it (upgraded PHP) in the past. And for it NOT to work the same way this time effectively had all the PHP scripts on the server, with any included passwords, etc., downloading as text files for anyone visiting with their browsers during the time we were scrambling for a fix.

Yes, please make this "smarter".
 

Infopro

Well-Known Member
May 20, 2003
17,075
524
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
And for it NOT to work the same way this time effectively had all the PHP scripts on the server, with any included passwords, etc., downloading as text files for anyone visiting with their browsers
You would think. But how much traffic does a configuration script get? An index.php may, or index.html, but does a configuration script get visited?
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
724
15
243
Hello,

3 -- The /usr/local/lib/php.ini file contained two sets of ionCube loader lines, i.e. ionCube was being loaded twice.
I am unable to reproduce, if I build several times in a row this is all that is ever in php.ini regarding ioncube:

zend_extension="/usr/local/IonCube/ioncube_loader_lin_5.2.so"
zend_extension_ts="/usr/local/IonCube/ioncube_loader_lin_5.2_ts.so"

Perhaps I am missing a critical step in reproducing it?
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
724
15
243
Here's the skinny on the non-configured PHP issue:

PHP being "un-configured" should only happen if:
- PHP has already been explicitly disabled
- there is no valid configuration for what exists on the server

That second one can happen when there are php.ini problems (or other PHP problems)

Perhaps the duplicate ioncube entries you spoke of resulted in a bad php.ini so that no configuration could be found?

Whatever the case, after easyapache is run php.conf is either what it was before if it is still valid or a basic default if something has changed.
 

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
i have a somewhat similar problem, i have rebuilded apache thrice already but when i check the config for php, php4 was defaulted by cPanel (before the first build php5 was the default) and no handler was installed on both php4 and php5 despite the fact that i made sure suphp is checked. after the second rebuild using the same build options, suphp was already installed but the other handlers were not installed, and no php5 too

i am rebuilding again., i am running out of idea as to why this is happening
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
724
15
243
i have a somewhat similar problem, i have rebuilded apache thrice already but when i check the config for php, php4 was defaulted by cPanel (before the first build php5 was the default) and no handler was installed on both php4 and php5 despite the fact that i made sure suphp is checked. after the second rebuild using the same build options, suphp was already installed but the other handlers were not installed, and no php5 too

i am rebuilding again., i am running out of idea as to why this is happening
Rebuilding over and over will not help: it's already built it just needs configured. Just go in and configure PHP and you're done.

Yes, during the build it will check your PHP configuration to see if it works and leave it alone if it does and change it (i.e. best guess but maybe not what you want) if it doesn't.

To get exactly what you want simply go to the PHP configuration screen and configure it :)
 

jols

Well-Known Member
Mar 13, 2004
1,107
3
168
i have a somewhat similar problem, i have rebuilded apache thrice already but when i check the config for php, php4 was defaulted by cPanel (before the first build php5 was the default) and no handler was installed on both php4 and php5 despite the fact that i made sure suphp is checked. after the second rebuild using the same build options, suphp was already installed but the other handlers were not installed, and no php5 too

i am rebuilding again., i am running out of idea as to why this is happening
In my situation this was very easily solved by UN-selecting the Easy Apache option to automatically install the newest PHP build. Just DE-select this feature and then select the version of PHP you want to install manually.