PHP 5.2.5 woes

Support/Development for PHP
AndraX2000
Forum User
Forum User
Posts: 15
Joined: Thu Dec 20, 2007 7:17 pm

Unread post by AndraX2000 »

breun wrote:You could also just upgrade to Plesk 8.3.0.
I did. It fixes webmail, but it doesn't fix the underlying problem.

php_admin_value include_path in the zz010 file prevents you from successfully using set_include_path() or ini_set() on include_path in all php applications in all VirtualHosts. (The problem appears only after a user visits a webmail.* domain.)

This breaks some CMSs and anything written using CakePHP.
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

Yeah thats actually intentional, since you could use ini_set to change something set by php_admin_value (like register_globals for example)
sparkybarkalot
Forum User
Forum User
Posts: 6
Joined: Wed Jan 16, 2008 2:33 am

Unread post by sparkybarkalot »

@AndraX2000, I can add "Domain status updated" to your list of Event Manager events that cause /etc/httpd/conf.d/zz010_psa_httpd.conf to be rewritten. I learned this the hard way tonight ;)

I've implemented breun's suggestion of how to deal with it using the Event Manager, but is this something that SWSOFT would fix in the next release so that zz010_psa_httpd.conf gets written with php_value instead of php_admin_value or...? I'm not stoked about the idea of having to regularly edit a file I'm not supposed to edit. I'm guessing SWSOFT just didn't see this change in how php_admin_value is handled coming down the pike and they'll respond to it appropriately now that it's implemented. Is that the way these things work?
AndraX2000
Forum User
Forum User
Posts: 15
Joined: Thu Dec 20, 2007 7:17 pm

Unread post by AndraX2000 »

@sparkybarkalot and scott

It's starting to seem like the behavior of php_admin_value we see here is not the expected behavior. The PHP devs fixed a bug where php_admin_value didn't work and unveiled a new bug where it mangles values outside of its scope. There's a few related bugs on bugs.php.net and it seems like someone has already made a patch to fix it, so hopefully we'll see a fix to this behavior in the next version of PHP.

In other words, the way SW-Soft is using php_admin_values is correct. They are using it to prevent overwriting those values for the webmail.* accounts, but the value is messing with other VirtualHosts. This a PHP bug.

See http://bugs.php.net/bug.php?id=43677 and vote on it. See manuel's comment on that bug report for the technical reason this is happening.

Until then... I set up a cron job that searches for and replaces those values. It runs every 5 minutes and only restarts apache if it found the php_admin_values. It was a bit easier than using the Event Manager.
tema
Forum User
Forum User
Posts: 18
Joined: Thu Jan 17, 2008 5:40 am
Location: London

Unread post by tema »

Thanks Andra. It's got my vote!
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

Scott already built PHP packages with this patch included. They currently sit in atomic-testing. I tried them on one box and they seem to fix the include_path problem.
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

I'll merge 5.2.5-3 into atomic today.
Oriol
New Forum User
New Forum User
Posts: 2
Joined: Fri Jan 18, 2008 7:17 am

Unread post by Oriol »

Hi,

I've already done the php_admin_value trick but I still have some problems. When a user logs into horde, sidebar.php is sent as a downloadable file instead of loading as usual. In fact, except the help and http://webmail.example.com/horde/services/portal/, when you click on a link it tries to download the file itself. Anyone has a clue on this?

Thanks,

Oriol.

PD: After monitoring the log, whenever I load sidebar.php or others, I get these errors:
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.0.so: undefined symbol: empty_string
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
Failed loading /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: /opt/php51/lib/php5/extensions/php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
zend_mm_heap corrupted


Is ioncube needed by horde? If not, could someone tell me how to disabled it?

I've tried commenting /etc/php.d/ioncube-loader.ini, but the error is still there.
Oriol
New Forum User
New Forum User
Posts: 2
Joined: Fri Jan 18, 2008 7:17 am

Unread post by Oriol »

I finally gave up and upgraded to Plesk 8.3. It went all OK, except that Horde couldn't connect to database (Fatal error). I got this solution from SWSoft Forum:

This is related to the mismatch of horde password stored in the /etc/psa/.webmail.shadow file and in MySQL database. To fix this issue you can:
- run "cat /etc/psa/.webmail.shadow" to see expected webmail password;

- run mysql shell:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql

- run mysql statement to change passwd for horde user:
update user set Password=PASSWORD("HORDE_PASS") where User = "horde";

where HORDE_PASS needs to be replaced with the result of previously executed cat /etc/psa/.webmail.shadow command.

- run mysql statement to reload grant tables:
flush privileges;
rspurlock
Forum User
Forum User
Posts: 9
Joined: Sat May 21, 2005 4:05 pm
Location: TN

pear and php woes still

Unread post by rspurlock »

Hi All,

I've been reading the thread and I'm having major issues with this php 5.2.5. We're running php 5.2.5 AND Plesk 8.3.0 and I still have the problems mentioned. Horde works fine, no issue there...but all other sites have this weird problem. They mostly work but we have one in particular with Joomla and CiviCRM installed. The CiviCRM throws 500 errors all over the place and there is no rhyme or reason. Here is a snippet of the log file:

[Mon Jan 21 17:19:54 2008] [error] [client 208.82.180.9] PHP Warning: require_once(PEAR.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/administrator/components/com_civicrm/admin.civicrm.php on line 25
[Mon Jan 21 17:19:54 2008] [error] [client 208.82.180.9] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'PEAR.php' (include_path='.:.:') in /var/www/vhosts/domain.com/httpdocs/administrator/components/com_civicrm/admin.civicrm.php on line 25

Here's what we have in the vhost.conf file (this is Plesk btw):
<Directory "/var/www/vhosts/domain.com/httpdocs">
php_admin_flag safe_mode off
</Directory>
<Directory "/var/www/vhosts/domain.com/httpdocs">
php_admin_flag register_globals off
</Directory>
<Directory "/var/www/vhosts/domain.com/httpdocs">
php_admin_flag magic_quotes_gpc on
</Directory>
<Directory "/var/www/vhosts/domain.com/httpdocs">
php_value open_basedir none
</Directory>

Am I missing something here? I thought Plesk 8.3 was supposed to fix the problem with PHP 5.2.5?

TIA
Rob
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

The problem *is* PHP 5.2.5. It has a bug with setting the include_path. See http://bugs.php.net/bug.php?id=43677 for more info. Someone proposed a patch and Scott applied it in 5.2.5-3, but took it out for 5.2.5-4 because it caused problems with ioncube and Zend.
Lemonbit Internet Dedicated Server Management
rspurlock
Forum User
Forum User
Posts: 9
Joined: Sat May 21, 2005 4:05 pm
Location: TN

I See

Unread post by rspurlock »

I see. Since we're running the latest version from Scott, we're back to not working properly. Is there anything I add in anywhere to get rid of the error?

I guess the only option is to wait and see if a fix comes out that will take care of site and everything else on the server.

Thanks for the response.

Rob
AndraX2000
Forum User
Forum User
Posts: 15
Joined: Thu Dec 20, 2007 7:17 pm

Re: I See

Unread post by AndraX2000 »

rspurlock wrote:I see. Since we're running the latest version from Scott, we're back to not working properly. Is there anything I add in anywhere to get rid of the error?
Rob,
The answer is a few posts above:

Edit /etc/httpd/conf.d/zz010_psa_httpd.conf and change every instance of php_admin_value to php_value. Then restart httpd.

This file gets overwritten by Plesk in certain cases, so you may want to use the event manager or a cron job to do it for you.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Unread post by breun »

No, that's just a fix for Horde. If you have any other PHP scripts that set the include_path then you might run into that PHP 5.2.5 bug. We're not running PHP 5.2.5 because of this bug.
Lemonbit Internet Dedicated Server Management
jas8522
Forum User
Forum User
Posts: 52
Joined: Mon Jan 09, 2006 4:02 pm

Updated Patch

Unread post by jas8522 »

I see someone has posted another patch that does not hurt ioncube or zend extensions... any chance of that being applied to a build in the ART repos?

We updated from 5.1 to 5.2.5 directly so we don't have the 5.2.4 RPM's ... anyone know of a simple way to roll back to 5.2.4? Must I rpm -e all php RPM's then download all of the 5.2.4 ones individually and install them?

Perhaps 5.2.5 should be removed from the stable repo if that new patch isn't good...

Thanks

Jordan
Post Reply