OpenCSW Bug Tracker


Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004910 [php5] upgrade crash always 2012-02-27 23:23 2012-03-25 04:52
Reporter hudesd View Status public  
Assigned To bwalton
Priority normal Resolution fixed  
Status closed  
Summary 0004910: upgrade to 5.3.10,REV=2012.02.10 breaks installed libraries
Description After upgrade to CSWphp5 5.3.10,REV=2012.02.10 and CSWphp5-mysql 5.3.10,REV=2012.02.10, Mantis no longer can reach the database (the database is up and running just fine: I use command-line mysql client and query mysql just fine).

I am investigating to find the configuration file that got smacked.
Additional Information
Tags No tags attached.
Attached Files ? file icon php.ini [^] (48,457 bytes) 2012-02-28 02:46

- Relationships

-  Notes
(0009675)
hudesd (reporter)
2012-02-28 01:40

The php.ini file was changed by the installation of the upgrade. The modified php.ini file , now in /etc/opt/csw/php5 , had all the mysql.so entries commented out. Enabling the 'classic' mysql.so got the database connection open (apparently), enough to get to the next problem. Note that even though the pdp_mysql5 package is installed on my system if I enabled the pdomysql5.so in php.ini I get an error in the apache error log: "PHP Warning: Cannot load module 'pdo_mysql' because required module 'pdo' is not loaded in Unknown on line 0"
(0009677)
bwalton (administrator)
2012-02-28 01:56

Do you have php5_pdomysql installed? This is a separate package/module too.

Which version of php5 did you upgrade from? The migration of the config file shouldn't have left you with changes like this...bugs are possible of course, but it's worked well during my testing.

Thanks
-Ben
(0009680)
hudesd (reporter)
2012-02-28 02:03

thanks again for your prompt attention!
Yes, php5_pdomysql is installed:
pkginfo -il CSWphp5-pdomysql
   PKGINST: CSWphp5-pdomysql
      NAME: php5_pdomysql - The pdomysql extention for PHP5
  CATEGORY: application
      ARCH: sparc
   VERSION: 5.3.10,REV=2012.02.10
   BASEDIR: /
    VENDOR: http://www.php.net/ [^] packaged for CSW by Ben Walton
    PSTAMP: bwalton@unstable10s-20120210172810
  INSTDATE: Feb 27 2012 14:37
   HOTLINE: http://www.opencsw.org/bugtrack/ [^]
     EMAIL: bwalton@opencsw.org
    STATUS: completely installed
     FILES: 10 installed pathnames
                   6 shared pathnames
                   7 directories
                   1 executables
                 180 blocks used (approx)

I had to comment it out to get php to load properly. I haven't gone through every line of php.ini in detail nor do I know what may be missing; I grep for stuff that is related and if it is commented out un-comment it. If it is broken / problematic, I try commenting it to see if that moves things to the next issue.
(0009682)
bwalton (administrator)
2012-02-28 02:07

Try running with both mysql.so and pdo_mysql.so enabled?

Thanks
-Ben
(0009683)
hudesd (reporter)
2012-02-28 02:15

Thanks for your continued attention. As stated in original report, enabling both mysql.so and pdomysql.so results in the error "PHP Warning: Cannot load module 'pdo_mysql' because required module 'pdo' is not loaded in Unknown on line 0"
(0009684)
hudesd (reporter)
2012-02-28 02:25

I found the php.ini file saved in /opt/csw/etc/migration-archive/php.ini and copied into /etc/opt/csw/php.ini myself. Why it was missing IDK but now I'm back to where I was. Still broken though now I have the session in there and in this one pdo is indeed commented out.

Mantis now reports
"Database connection failed. Error received from database was #0: PHP Support for database is not enabled."

Nothing further in the apache logs now.
(0009685)
bwalton (administrator)
2012-02-28 02:28

Sorry, my mistake....long day. Do you have php5_pdo installed? That would be required for pdo_mysql5. It should have been pulled in by pkgutil when php5_pdomysql was installed.

Thanks
-Ben
(0009686)
hudesd (reporter)
2012-02-28 02:34

Yes, php5_pdo is installed. I took that as a clue that perhaps I need -that- extension enabled as well so I uncommented it in php.ini as well.
Not good:
HP Warning: PHP Startup: Unable to load dynamic library '/opt/csw/php5/lib/php/extensions/./mysqli.so' - ld.so.1: httpd.p refork: fatal: /opt/csw/php5/lib/php/extensions/./mysqli.so: open failed: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/csw/php5/lib/php/extensions/./pdo.so' - ld.so.1: httpd.pref ork: fatal: /opt/csw/php5/lib/php/extensions/./pdo.so: open failed: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/csw/php5/lib/php/extensions/./pdo_mysql.so' - ld.so.1: http d.prefork: fatal: /opt/csw/php5/lib/php/extensions/./pdo_mysql.so: open failed: No such file or directory in Unknown on lin e 0


Interesting the contents of the directory in question:
ls -l /opt/csw/php5/lib/php/extensions/
total 17
lrwxrwxrwx 1 root root 34 Jun 9 2010 ctype.so -> no-debug-non-zts-20060613/ctype.so
lrwxrwxrwx 1 root root 31 Jun 9 2010 gd.so -> no-debug-non-zts-20060613/gd.so
lrwxrwxrwx 1 root root 37 Jun 9 2010 mbstring.so -> no-debug-non-zts-20060613/mbstring.so
lrwxrwxrwx 1 root root 35 Jun 9 2010 mcrypt.so -> no-debug-non-zts-20060613/mcrypt.so
lrwxrwxrwx 1 root root 34 Jun 7 2010 mysql.so -> no-debug-non-zts-20060613/mysql.so
lrwxrwxrwx 1 root root 35 Jun 9 2010 mysqli.so -> no-debug-non-zts-20060613/mysqli.so
drwxr-xr-x 2 root bin 15 Feb 27 14:38 no-debug-non-zts-20090626
lrwxrwxrwx 1 root root 36 Jun 16 2010 openssl.so -> no-debug-non-zts-20060613/openssl.so
lrwxrwxrwx 1 root root 32 Jun 16 2010 pdo.so -> no-debug-non-zts-20060613/pdo.so
lrwxrwxrwx 1 root root 38 Jun 16 2010 pdo_mysql.so -> no-debug-non-zts-20060613/pdo_mysql.so
lrwxrwxrwx 1 root root 36 Jun 7 2010 session.so -> no-debug-non-zts-20060613/session.so
lrwxrwxrwx 1 root root 33 Jun 16 2010 soap.so -> no-debug-non-zts-20060613/soap.so
lrwxrwxrwx 1 root root 32 Jun 9 2010 zip.so -> no-debug-non-zts-20060613/zip.so
(0009687)
bwalton (administrator)
2012-02-28 02:39

Ok, something is really wonky here. The reference to 20060613 would be legacy from the 5.2.9 series of packages and don't exist in the new ones at all. Can you provide the output of something like this (bash) snippet:

for p in $(cd /var/sadm/pkg; ls -1d CSW*php5*); do
  echo -n "$p: ";
  pkgparam $p VERSION;
done

It's feeling as though the full upgrade didn't complete properly here...
(0009688)
hudesd (reporter)
2012-02-28 02:45

CSWap2-modphp5: 5.3.10,REV=2012.02.10
CSWap2modphp5: 5.3.10,REV=2012.02.10
CSWphp5: 5.3.10,REV=2012.02.10
CSWphp5-ctype: 5.3.10,REV=2012.02.10
CSWphp5-gd: 5.3.10,REV=2012.02.10
CSWphp5-mbstring: 5.3.10,REV=2012.02.10
CSWphp5-mcrypt: 5.3.10,REV=2012.02.10
CSWphp5-mysql: 5.3.10,REV=2012.02.10
CSWphp5-mysqli: 5.3.10,REV=2012.02.10
CSWphp5-openssl: 5.3.10,REV=2012.02.10
CSWphp5-pdo: 5.3.10,REV=2012.02.10
CSWphp5-pdomysql: 5.3.10,REV=2012.02.10
CSWphp5-session: 5.3.10,REV=2012.02.10
CSWphp5-soap: 5.3.10,REV=2012.02.10
CSWphp5-zip: 5.3.10,REV=2012.02.10
CSWphp5ctype: 5.3.10,REV=2012.02.10
CSWphp5gd: 5.3.10,REV=2012.02.10
CSWphp5mbstring: 5.3.10,REV=2012.02.10
CSWphp5mcrypt: 5.3.10,REV=2012.02.10
CSWphp5mysql: 5.3.10,REV=2012.02.10
CSWphp5mysqli: 5.3.10,REV=2012.02.10
CSWphp5openssl: 5.3.10,REV=2012.02.10
CSWphp5pdo: 5.3.10,REV=2012.02.10
CSWphp5pdomysql: 5.3.10,REV=2012.02.10
CSWphp5session: 5.3.10,REV=2012.02.10
CSWphp5soap: 5.3.10,REV=2012.02.10
CSWphp5zip: 5.3.10,REV=2012.02.10
(0009689)
hudesd (reporter)
2012-02-28 02:47

current php.ini now attached to this ticket.
(0009690)
bwalton (administrator)
2012-02-28 02:52

In the old packages, there was a bug where the module path wasn't properly set (the no-zts... bit) which caused problems for people. I wonder if those symlinks were created as the workaround to that.

Can you see if the links are actually owned by a package? Can you remove the links and see if that helps?
(0009691)
hudesd (reporter)
2012-02-28 03:00

I copied all the files from no-debug-non-zts-20090626 to the extensions directory, rpelacing the symbolic links, and tried again but no joy.


will you be around tomorrow to continue? it is 9PM Eastern and I must go home.
(0009692)
bwalton (administrator)
2012-02-28 03:12

The files should live in the no-debug-non-zts-20090626 directory...copying is a good way to ensure the bad links weren't interfering but it shouldn't be a long term fix for you.

I'm in your time zone. :) Chat with you tomorrow.

Thanks
-Ben
(0009693)
hudesd (reporter)
2012-02-28 21:42

I'm setting up a clean PHP/MySQL (client) install in another zone. Meanwhile, googling the error message found this interesting statement from the official PHP5 documentation (http://php.net/manual/en/migration51.databases.php): [^]
--
Changes in MySQL support

In PHP 4, MySQL 3 support was built-in. With the release of PHP 5.0 there were two MySQL extensions, named 'mysql' and 'mysqli', which were designed to support MySQL < 4.1 and MySQL 4.1 and up, respectively. With the introduction of PDO, which provides a very fast interface to all the database APIs supported by PHP, the PDO_MYSQL driver can support any of the current versions (MySQL 3, 4 or 5) in PHP code written for PDO, depending on the MySQL library version used during compilation. The older MySQL extensions remain in place for reasons of back compatibility, but are not enabled by default.
--

the bit at the end about 'not enabled by default' caught my eye. I need to check Mantis and see whether it uses PDO. I would think, not.

You asked what PHP I upgraded from. I previously used the previous CSW release. 5.1 I believe.
(0009694)
hudesd (reporter)
2012-02-29 02:31

could this be a MySQL version issue? The mysql library is 5.0.95,REV=2012.02.14.
I'm NOT using the CSW mysql server because the stable version is only 5.0.95. I'm running the MySQL community edition (from mysql.com) 5.1.47, which has not changed.
The server was happily talking to PHP5 mysql library before, I don't believe that 5.1.47 refuses to talk to 5.0.95. I'm trying to get phpmyadmin to talk to the database as a test to see if the problem is specific to mantis. So far, it not working.
(0009695)
hudesd (reporter)
2012-02-29 18:08

trying to revert back but you've pushed the php5.3 packages to 'testing' as well as 'unstable' and 'current'. 'stable' is 'current'.
The php5.3 packages are BROKEN. I am continuing to test to understand the nature of the failure.
Now I have the embarrassing and difficult task of trying to restore from backup tape.
(0009696)
bwalton (administrator)
2012-02-29 18:17

Until this is sorted out, you should be able to revert the packages using the files available here: http://mirror.opencsw.org/opencsw/allpkgs/ [^]

I'll get this sorted out as quickly as I can.
(0009726)
bwalton (administrator)
2012-03-15 01:29

What's your current status with the upgrade? Were you able to sort things out?

I have some test packages that address (hopefully) a few issues but if you've got a working upgrade they may not benefit you.
(0009727)
bwalton (administrator)
2012-03-15 01:30

The test packages will be available from the 'bdw' catalog here: http://buildfarm.opencsw.org/experimental.html [^]
(0009729)
hudesd (reporter)
2012-03-15 01:34

all my php issues were addressed by uninstalling everything CSW (except Perl) and re-installing mantis which picked up dependencies. The clue for this was that a fresh install of Mantis on a test machine global zone worked properly.
 I did have to futz with the php.conf file.

My Mantis installation is online. Thanks for the followup.
(0009763)
bwalton (administrator)
2012-03-25 04:52

Problem resolved as noted in comments.


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker