Koozali.org: home of the SME Server

Problems with Mysql and php after updating to 8.0

Offline waldviertler

  • *
  • 111
  • +0/-0
Problems with Mysql and php after updating to 8.0
« on: January 21, 2013, 01:38:39 AM »
Hi

I have updated my 7.6 Server to 8.0 and now I got serveral errors with php and mysql.
In the /var/log/messages I got:
Code: [Select]
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/curl.so' - /usr/lib/php4/curl.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/dom.so' - /usr/lib/php4/dom.so: cannot open shared object file:
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/fileinfo.so' - /usr/lib/php4/fileinfo.so: cannot open shared obj
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object file: No
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/imap.so' - /usr/lib/php4/imap.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/json.so' - /usr/lib/php4/json.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/ldap.so' - /usr/lib/php4/ldap.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: cannot open shared obj
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mcrypt.so' - /usr/lib/php4/mcrypt.so: cannot open shared object
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: cannot open shared object fi
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysqli.so' - /usr/lib/php4/mysqli.so: cannot open shared object
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo.so' - /usr/lib/php4/pdo.so: cannot open shared object file:
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_mysql.so' - /usr/lib/php4/pdo_mysql.so: cannot open shared o
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_sqlite.so' - /usr/lib/php4/pdo_sqlite.so: cannot open shared
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/phar.so' - /usr/lib/php4/phar.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/wddx.so' - /usr/lib/php4/wddx.so: cannot open shared object file
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xmlreader.so' - /usr/lib/php4/xmlreader.so: cannot open shared o
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xmlwriter.so' - /usr/lib/php4/xmlwriter.so: cannot open shared o
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xsl.so' - /usr/lib/php4/xsl.so: cannot open shared object file:
Jan 21 01:06:49 www httpd: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/zip.so' - /usr/lib/php4/zip.so: cannot open shared object file:

This is because the /user/lib/php4 directory is now empty.

And if I call one of my websites, I get another error in the messages log:
Code: [Select]
httpd: PHP Fatal error:  Call to undefined function mysql_connect()
Can anybody help me please?

Best regards
Martin
« Last Edit: January 21, 2013, 01:43:25 AM by waldviertler »

Offline apmuthu

  • *
  • 244
  • +0/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #1 on: January 21, 2013, 07:39:57 AM »
locate the file php.ini and it's snippets in the php conf directory and change the extensions location to where the php extension so files are.
 
In a normal SME 8, the template fragments are in:
Code: [Select]
/etc/e-smith/templates/etc/php.ini/After editing them, expand the php.ini from the templates.
 
Sample contents of a php.ini fragment in SME 8
Code: [Select]
# cat /etc/e-smith/templates/etc/php.ini/50PathsDirectories
mysql.allow_persistent                 = On
include_path                           = ".:/usr/share/pear-addons:/usr/share/pear"
doc_root                               =
user_dir                               =
extension_dir                          = { return "/usr/lib64/php/modules" if -d "/usr/lib64/php/modules";
                                           return "/usr/lib/php/modules" if -d "/usr/lib/php/modules";
                                           return "/usr/lib64/php4" if -d "/usr/lib64/php4";
                                           return "/usr/lib/php4"; }
enable_dl                              = On
All the PHP5 extension libraries *.so are in /usr/lib/php/modules/ folder
Symlink them to be /usr/lib/php4 if needed.
 
Make sure that your working expanded /etc/php.ini has the following fragment:
Code: [Select]
mysql.allow_persistent                 = On
include_path                           = ".:/usr/share/pear-addons:/usr/share/pear"
doc_root                               =
user_dir                               =
extension_dir                          = /usr/lib/php/modules

 

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #2 on: January 21, 2013, 08:57:49 AM »
The question then becomes why a standard upgrade from 7.6 to 8 fails as you have found, when it normally does not, seems most others do not see this...
--
qui scribit bis legit

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #3 on: January 21, 2013, 09:10:37 AM »
I can't see any evidence of a bug in bugzilla

and I can't see the server history, if there were custom fragments and so on

waldviertler: please raise a bug in bugzilla and report here the reference, thank you

Offline TerryF

  • grumpy old man
  • *
  • 1,847
  • +6/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #4 on: January 21, 2013, 09:18:07 AM »
I can't see any evidence of a bug in bugzilla

and I can't see the server history, if there were custom fragments and so on

waldviertler: please raise a bug in bugzilla and report here the reference, thank you

Stefano, I was being a smart arse..:-)
--
qui scribit bis legit

Offline waldviertler

  • *
  • 111
  • +0/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #5 on: January 21, 2013, 01:41:58 PM »
Thanks alot!!!
It works now.

Maybe you can help me out with an other problem:
Now one of my mysql tables is not found anymore.
The files are still in the directory /var/lib/mysql/database
but they are *.ISD, *.ISM and that format seems not to be supported anymore.

My try to convert it fails:
Code: [Select]
mysql> ALTER TABLE heu_adressen TYPE = MYISAM;
ERROR 1046 (3D000): No database selected

Thank you very much in advice
Martin

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #6 on: January 21, 2013, 02:03:12 PM »
From my googling, .ISD and .ISM indicate an old "ISAM" database, no longer supported by default in mysql 5 (read more here:
http://dev.mysql.com/doc/refman/4.1/en/isam-storage-engine.html).

If you ran the pre-backup event (probably true if you used any standard upgrade technique), there will be a dumped version of your database in /home/e-smith/db/mysql/heu_adressen.dump

You can restore the dumped database using:
mysql heu_addressen < /home/e-smith/db/mysql/heu_adressen.dump

Offline waldviertler

  • *
  • 111
  • +0/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #7 on: January 21, 2013, 02:22:06 PM »
Thanks for reply.

Unfornately the directory /home/e-smith/db/mysql/
is empty.

Martin

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #8 on: January 21, 2013, 02:35:27 PM »
locate the file php.ini and it's snippets in the php conf directory and change the extensions location to where the php extension so files are.

This is bad advice. The first step should be idenfying the cause of the problem. Jumping straight in with a workaround skips that step, and probably results in ongoing and possibly escalating problems.

Offline mmccarn

  • *
  • 2,653
  • +10/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #9 on: January 21, 2013, 02:59:28 PM »
Again (from my googling) you need to find a mysql 3 or 4 server and dump the database there... then restore it on mysql 5.

You may be able to convert the table with mysql_convert_table_format - although that seems unlikely to work on the SME 8 server if the underlying mysql instance doesn't support the ISAM format.

Here is my concrete recommendation:
- Install a SME 7.x server (virtual or otherwise)
- Use it to convert or dump the database
- move the converted database or restore the dumped database on  your SME 8 server.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #10 on: January 21, 2013, 03:01:28 PM »
Again (from my googling) you need to find a mysql 3 or 4 server and dump the database there... then restore it on mysql 5.

I strongly disagree..

OP *must* open a bug asap (now)
we don't know anything about that server and how did OP upgrade it

please, @all: stop giving advices, the right place is bugzilla

Thank you

Offline waldviertler

  • *
  • 111
  • +0/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #11 on: January 21, 2013, 03:30:35 PM »
Hmm, Bugzilla - I have never done that before.
I think it would be better, to go back to my 7.6. backup image.

I think the reason is in the evolution of the server - updated it since I think SME 1.0.

Thank all for your help

Martin

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #12 on: January 21, 2013, 03:34:32 PM »
http://wiki.contribs.org/Bugzilla_Help

please raise a bug, thank you

Offline waldviertler

  • *
  • 111
  • +0/-0
Re: Problems with Mysql and php after updating to 8.0
« Reply #13 on: January 21, 2013, 03:46:48 PM »
I have raised a bug.

@Stefano would you help for a fee?
Can give you the server access.

best regards
Martin

Offline chris burnat

  • *****
  • 1,135
  • +2/-0
    • http://www.burnat.com
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.