Unable to initialize mrc module after PHP upgrade to 5.2.10
Added by Brian Gibbons over 13 years ago
When I upgraded PHP from version 5.1.x.x to 5.2.10 (so that I could use phpMyAdmin which now requires PHP 5.2.x.x or higher), images were no longer viewable on the myamiweb webserver (they just say "empty") and the mrc module disappeared from the http://localhost/phpinfo.php webpage. I have tried re-installing/re-compiling php_mrc as well as all of leginon 2.0.
PHP version check gives this error:
[root]# php -v
PHP Warning: PHP Startup: mrc: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
list of PHP packages:
[root]# rpm -qa |grep php
php-pdo-5.2.10-1.el5.centos
php-devel-5.2.10-1.el5.centos
php-5.2.10-1.el5.centos
php-common-5.2.10-1.el5.centos
php-gd-5.2.10-1.el5.centos
php-mysql-5.2.10-1.el5.centos
php-cli-5.2.10-1.el5.centos
Please advise.
Thanks!
Replies (4)
RE: Unable to initialize mrc module after PHP upgrade to 5.2.10 - Added by Jim Pulokas over 13 years ago
I thought I tested php 5.2 a few months ago and got it to work, but I'll have to try it again. I'll let you know what I figure out.
I am curious how you got the latest phpMyAdmin and php 5.2. I usually stick to the standard CentOS and EPEL repositories, which currently are up to php 5.1 and phpMyAdmin 2.11. Are you using some other 3rd party repositories?
jim
RE: Unable to initialize mrc module after PHP upgrade to 5.2.10 - Added by Brian Gibbons over 13 years ago
Thanks for your help, Jim.
When I first installed phpMyAdmin using yum, it installed 2.11.11.3. When I tried to go to http://localhost/phpmyadmin, it said that phpMyAdmin required php 5.2 or higher.
I checked the leginon documentation, and it said php 5.2 is ok, so I went ahead and installed php 5.2 using yum. I don't think I have any unusual repositories.
Then I couldn't see images on the webserver, so I checked http://localhost/myamiweb/info.php and the mrc module was missing, so I did php -v and saw the above error message.
I then tried to undo all of this (uninstalled php 5.2 and phpMyAdmin 2.11), and tried to go back to php 5.1, but couldn't get it to install properly for some reason.
So, I asked for your help.
Per your advice, I added the EPEL repositories, then reinstalled php 5.1 (it still wouldn't let me install php-mysql for some reason) followed by phpMyAdmin 2.11. For some reason installation of phpMyAdmin called for the php 5.2 files as dependencies, so I clicked ok, and I ended up with php 5.2 installed again. The mrc module is still not on info.php page, and I now get this different error:
[root]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mrc.so' - /usr/lib64/php/modules/mrc.so: undefined symbol: php_gd_gdImageColorAllocate in Unknown on line 0
PHP 5.2.10 (cli) (built: Nov 13 2009 11:44:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Do I need a different version of mrc.so? Please let me know what other information I should provide to help resolve this issue. I really appreciate your help.
Cheers,
Brian
RE: Unable to initialize mrc module after PHP upgrade to 5.2.10 - Added by Anchi Cheng over 13 years ago
Brian,
I don't know what causes you not being able to install php_mrc with php 5.2. But phpMyAdmin site still maintains versions that are compatible to php 5.1.x You just have to download 2.x version rather than 3.x phpMyAdmin does not need to be compiled so the installation is pretty easy from source.
RE: Unable to initialize mrc module after PHP upgrade to 5.2.10 - Added by Brian Gibbons over 13 years ago
Thanks Anchi!
You are correct. I was eventually able to fix everything by reverting back to php 5.1 and then installing phpMyAdmin 2.11.11.3.
Note: I had some trouble going back to php 5.1, so I thought I'd include my solutions in case others have similar problems in the future.
After uninstalling php 5.2, package manager did not work for php 5.1 install, but kept giving me dependency errors. I had to download the old php 5.1.6 from the php website:
And then unzip and install manually:
gunzip php-5.1.6.tar.gz
tar -xvf php-5.1.6.tar
cd /root/php-5.1.6
./configure
make
make install
Then, php-mysql-5.1.x would also not install due to dependency error; it said that it needed php-common-5.1.x, despite the fact that this was already installed. So, I tried repeatedly to install the modules individually, and this finally worked when I installed php-mysql after the other modules.
phpMyAdmin also gave me a lot of grief until I had installed everything else. It kept wanting to re-install php 5.2.
http://www.phpmyadmin.net/home_page/downloads.php
Then, after everything was installed correctly and there were no error messages, I still had no images on the webserver even though the mrc module was now showing on the info.php webpage. I then recompiled and reinstalled php_mrc, but that didn't fix it. I eventually realized that this time I had forgotten to install php-gd.
Modules installed:
[root]# rpm -qa |grep php
php-cli-5.1.6-27.el5_5.3
php-mysql-5.1.6-27.el5_5.3
php-mcrypt-5.1.6-5.el5
php-pdo-5.1.6-27.el5_5.3
phpMyAdmin-2.11.11.3-1.el5
php-common-5.1.6-27.el5_5.3
php-mbstring-5.1.6-27.el5_5.3
php-devel-5.1.6-27.el5_5.3
php-5.1.6-27.el5_5.3
php-gd-5.1.6-27.el5_5.3
Cheers!
Brian