I have a developer server with CentOS 6.5 and PHP 5.5.11 (latest from REMI repos). Today I did:
yum --enablerepo=remi,remi-php55 update
That updated Apache and some other libraries like Mongo for PHP (PECL I thought). After the update, I restarted my
httpd service and noticed that it fails shutting down Apache. "Apparently" starting it again corrected that, but now I've found that the server isn't working - web pages are not served.
Checking the Apache logs shows this line:
PHP Fatal error: PHP Startup: To prevent data corruption, you are not allowed to turn on the mongo.native_long setting on 32-bit platforms in Unknown on line 0
Maybe I can fix this by disabling or uninstalling that extension, but since I'm using the extension in some places, that's not really an option.
Any advice on how to fix this issue, other than disabling the extension?
EDIT: Why if system is i686 and library is i686 I got that error
I did some research on YUM logs and see results:
tail /var/log/yum.log Apr 03 01:25:45 Updated: php-recode-5.5.11-1.el6.remi.i686 Apr 03 01:25:45 Updated: php-mbstring-5.5.11-1.el6.remi.i686 Apr 03 01:25:46 Updated: php-intl-5.5.11-1.el6.remi.i686 Apr 03 01:25:47 Updated: php-xml-5.5.11-1.el6.remi.i686 Apr 04 09:09:59 Updated: krb5-libs-1.10.3-15.el6_5.1.i686 Apr 04 09:10:00 Updated: httpd-tools-2.2.15-30.el6.centos.i686 Apr 04 09:10:07 Updated: php-pecl-mongo-1.5.0-1.el6.remi.5.5.i686 Apr 04 09:10:15 Updated: httpd-2.2.15-30.el6.centos.i686 Apr 04 09:10:16 Updated: krb5-workstation-1.10.3-15.el6_5.1.i686 Apr 04 09:10:21 Updated: krb5-devel-1.10.3-15.el6_5.1.i686
Why if the library is
php-pecl-mongo-1.5.0-1.el6.remi.5.5.i686 I was getting that error? What is wrong?
EDIT 2: downgrade the problematic extension
Since previous test didn't work I'm trying now to downgrade that library as follow:
yum downgrade php-pecl-mongo-1.5.0-1.el6.remi.5.5.i686 --enablerepo=remi,remi-php55 Loaded plugins: fastestmirror, security Setting up Downgrade Process Loading mirror speeds from cached hostfile * base: centos.secrel.com.br * epel: mirror.cedia.org.ec * extras: centos.secrel.com.br * remi: mirror.1000mbps.com * remi-php55: mirror.1000mbps.com * updates: mirrors.ucr.ac.cr Only Upgrade available on package: php-pecl-mongo-1.5.0-1.el6.remi.5.5.i686 Nothing to do
And I can't, so any help on this one too?
EDIT3: Looking for php.ini location
So since Ubuntu and CentOS has different configuration, I tough that Apache could be using another
php.ini file but it uses what I changed, see below:
locate php.ini /etc/php.ini /etc/php.ini.rpmnew /usr/share/doc/php-common-5.5.11/php.ini-development /usr/share/doc/php-common-5.5.11/php.ini-production /var/www/html/apps/portal_de_logistica/vendor/doctrine/cache/tests/travis/php.ini /var/www/html/apps/portal_ingenieros/vendor/doctrine/cache/tests/travis/php.ini /var/www/html/imaginamos/vendor/doctrine/cache/tests/travis/php.ini /var/www/html/kraken/vendor/doctrine/cache/tests/travis/php.ini
/etc/php.ini I have this at file end:
;Mongo [mongodb] mongo.native_long = 0 mongo.long_as_object = 1
Also I found any file that might cause the problem by doing a
ini_set() and nothing was found as can see below:
grep -R "mongo.native_long" /var/www/html/ grep: /var/www/html/apps/portal_de_logistica/web/bundles/acmedemo: No such file or directory
So, after some headaches I found the solution:
yum remove php-pecl-mongo-1.5.0-1.el6.remi.5.5.i686 yum --enablerepo=remi,remi-php55 install php-devel.i686 pecl install mongo
Add "extension=mongo.so" to
php.ini after that my Apache works again