php5.2.6 segfaults due to pcre?

Support/Development for PHP
mswanson
Forum User
Forum User
Posts: 14
Joined: Thu Dec 01, 2005 11:51 pm
Location: Durham, NH

php5.2.6 segfaults due to pcre?

Unread post by mswanson »

Just upgraded to the ART php5 version via yum on my plesk 8.1 X86_64 CentOS 4.4 server.

I'm trying to transfer this domain for a customer that runs drupal and civicrm. The site that is currently hosting it is running php 5.2.0 and pcre 6.7 04-Jul-2006.

Before upgraded to php5 I got an error that indicated the code needed php5. No problem, updated to the ART version but now apache is segfaulting when I try to pull up the domain on my server. Doing some googling on the subject shows that when large strings are passed to pcre based function (preg_match , etc) it causes older pcre libraries to crash. Apparently pcre 6.x seems to fix the problem but the version on CentOS 4 only goes up to 4.x. I installed pcre7.X from the atomic-testing repo and am attempting to rebuild php5.2.6 to use it, but without changing anything in the php.spec from the atomic source rpm, this is what I get after an rpmbuild -ba (its during the testing phase that this occurs):



<snip> (lots more warnings like the one below, probably for every dll in php5..
.
.
.

Warning: PHP Startup: Unable to load dynamic library '/usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so' - /usr/src/redhat/BUILD/php-5.2.6/build-apache/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0

=====================================================================
PHP : /usr/src/redhat/BUILD/php-5.2.6/build-apache/sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 5.2.6
ZEND_VERSION: 2.2.0
PHP_OS : Linux - Linux ds5.mswanson.com 2.6.9-42.ELsmp #1 SMP Tue Aug 15 10:35:26 BST 2006 x86_64
INI actual : /usr/src/redhat/BUILD/php-5.2.6/build-apache/tmp-php.ini
More .INIs : /etc/php.d/dbase.ini,/etc/php.d/dom.ini,/etc/php.d/gd.ini,/etc/php.d/imap.ini,/etc/php.d/json.ini,/etc/php.d/ldap.ini,/etc/php.d/mbstring.ini,/etc/php.d/mysql.ini,/etc/php.d/mysqli.ini,/etc/php.d/pdo.ini,/etc/php.d/pdo_mysql.ini,/etc/php.d/pdo_pgsql.ini,/etc/php.d/pdo_sqlite.ini,/etc/php.d/pgsql.ini,/etc/php.d/xmlreader.ini,/etc/php.d/xmlwriter.ini,/etc/php.d/xsl.ini,/etc/php.d/zip.ini
CWD : /usr/src/redhat/BUILD/php-5.2.6
Extra dirs :
=====================================================================
TIME START 2008-06-13 20:09:24
=====================================================================
FAIL EXPECT [tests/run-test/test001.phpt]
FAIL EXPECTF [tests/run-test/test002.phpt]
FAIL EXPECTREGEX [tests/run-test/test003.phpt]
FAIL INI section allows '=' [tests/run-test/test004.phpt]
TEST 5/4268 [tests/run-test/test005.phpt]

and then it just hangs on that test5 until I kill it....
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 »

Thats a fun one, how did you build it, with mock?
mswanson
Forum User
Forum User
Posts: 14
Joined: Thu Dec 01, 2005 11:51 pm
Location: Durham, NH

Unread post by mswanson »

I actually found out this was a horrid bug in civicrm that caused this problem. Basically I was porting over a site from another hosting company and civicrm caches some executable information in the database and it just blindly tries to call core functions based on that db entry which was causing the segfault. I cleared the table and everything loaded fine.

Now onto my next quandry which I'll search first and post if I cant find an answer on: running php4 and php5 simultaneously.. specifically I want php4 to be the default and php5 to be something I can turn on at the vhost.conf level...
hostingguy
Forum Regular
Forum Regular
Posts: 661
Joined: Mon Oct 29, 2007 6:51 pm

Unread post by hostingguy »

Since php4 is being discontinued I would recomend doing it the other way arround - make 5 the default, and allow 4 to be used for compatibility where required.
Post Reply