Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6

1


Threaded Mode | Print  

 PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6, Php cannot find libmysqlclient.18.dylib via Apache, but OK from command line (16 Replies, Read 37574 times)
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
I have spent several hours trying to figure out why Phpmyadmin doesn't work with a PHP version other than 5.3. I tried on two Macs with the same result.

The error I get when I enable PHP 5.4, 5.5 or 5.6 when going to PhpMyAdmin is: "The mysqli|mysql extension is missing. Please check your PHP configuration. See our documentation for more information." The help link refers me to /phpmyadmin/doc/html/faq.html#faqmysql but this isn't helpful because the packages are enabled, it just cannot find libmysqlclient.18.dylib. When I go to /cgi-bin/phpinfo.cgi at the bottom of this "PHP Info" page I get:

Quote

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.6/lib/extensions/ext/mysqli.so' - dlopen(/Applications/AMPPS/php-5.6/lib/extensions/ext/mysqli.so, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/ext/mysqli.so Reason: image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so' - dlopen(/Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so Reason: image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.6/lib/extensions/ext/mysql.so' - dlopen(/Applications/AMPPS/php-5.6/lib/extensions/ext/mysql.so, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/ext/mysql.so Reason: image not found in Unknown on line 0


However, when I run these commands via the command line to see if mysql loads OK it does!

PHP Code

 ➜  AMPPS  pwd
/Applications/AMPPS
➜  AMPPS  php
-5.6/bin/php -'if (extension_loaded("mysqli")) { print_r("loaded"); }'
loaded



I suspect this is a problem with Apache and it's not running PHP with the right arguments or something or using a totally different PHP than the one in AMPPS.

How can I troubleshoot this further?
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
Forgot to mention, I am using a Macbook Pro OS X 10.9.5 and AMPPS 3.0
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
drome22
Group: Member
Post Group: Newbie
Posts: 3
Status:
I am having the same issue with a clean installation of AMPPS 3.0 on a brand new iMac 5K Retina running OS X 10.10.2 Yosemite. I've tried setup with all available versions of PHP (5.3, 5.4, 5.5, 5.6). For each PHP version, the mysqli.so extension is selected in the UI and is un-commented in the appropriate php.ini file.

I have tried disabling and enabling all of the other extensions and restoring the default configurations for PHP, MySQL and Apache to no avail.

I have used AMPPS in the past with no issues (up to v2.4 on a old MacBook Pro both under Mavericks and Yosemite). Please help!
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
drome22, are you getting the same output as me with "libmysqlclient.18.dylib" ? If not probably best to start a new thread because PHP 5.3 works for me. Please don't hijack this thread.
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
drome22
Group: Member
Post Group: Newbie
Posts: 3
Status:
mikenj,

My error in the previous post. Yes, PHP version 5.3 is working for me too.

I am also receiving the same 'libmysqlclient.18.dylib' error messages output at the bottom of the PHP Info ('cgi-bin/phpinfo.cgi') when running each PHP version 5.4, 5.5 & 5.6.

I had spent a couple of hours last night trying to figure this out and I am back at it again tonight. I am just looking for an answer, and since you appear to be experiencing the same exact issue I did not see a reason to start a new thread.


IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
Quote From : drome22 March 3, 2015, 2:10 am
mikenj,

My error in the previous post. Yes, PHP version 5.3 is working for me too.

I am also receiving the same 'libmysqlclient.18.dylib' error messages output at the bottom of the PHP Info ('cgi-bin/phpinfo.cgi') when running each PHP version 5.4, 5.5 & 5.6.

I had spent a couple of hours last night trying to figure this out and I am back at it again tonight. I am just looking for an answer, and since you appear to be experiencing the same exact issue I did not see a reason to start a new thread.




drome22, ok cool I saw you said you tried 5.3 and thought maybe it didn't work in 5.3 also! I spent some more time on this tonight with no luck, yet. I tried using dtruss to trace the system calls when starting an Apache request and/or starting AMPPS in hopes I can see dynamic loading behavior. What I can say is make sure you have no other MySQL-related apps installed that are installing their own libmysqlclient.18.dylib. If you get "image not found" nothing is getting picked up.

I also figured this was a DYLD_LIBRARY_PATH or LD_LIBRARY_PATH issue and tried forcing that in httpd.conf using PassEnv.

The problem is between Apache and PHP; I suspect php5_module/mod_php is the problem. My next step is to read the source for mod_php to figure out wtf is going on.

Oh, make sure you have enable_dl enabled for your version of PHP! That enables dynamic loading; sounds like you may already have it on but check in your php.ini.

IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
I found a workaround; it appears AMPSS (or PHP how it's compiled) doesn't look in /Applications/AMPSS/mysql/lib directory for libmysqlclient.18.dylib even though that's where the path is configured. However, it you symlink libmysqlclient.18.dylib to /usr/local/lib it works. So do this:

Code

# cd /usr/local/lib
# ln -s /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib .   


Then restart Apache/MySQL.

I'm going to report this as a bug.

IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Hi mikenj,

Sorry for the inconvenience caused.
We will fix this bug in next version.

The solution you mention will work.


Thank you
Rishikesh Patil
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
drome22
Group: Member
Post Group: Newbie
Posts: 3
Status:
mikenj,

Thank you so much for figuring this out and posting the symlink workaround. It worked liked a charm. I don't think I would have found it as quickly.

I am also glad the AMPPS team has quickly acknowledged and is preparing to fix the reported bug in the next version. Thanks Rishikesh Pati!


IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
mikenj
Group: Member
Post Group: Newbie
Posts: 6
Status:
drome22, happy it helped you also!


            Rishi_P, drome22 and I have a deep inner curiosity as to what the issues was having spent hours on this. Were these PHP versions hardcoded to look in /usr/local/lib?

Looking forward to the next update!


IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
carlituxman
Group: Member
Post Group: Newbie
Posts: 2
Status:
it not solved for me. After the mikenj solution here the error:

Warning: PHP Startup: Unable to load dynamic library '/Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so' - dlopen(/Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so, 9): Library not loaded: libmysqlclient.18.dylib
  Referenced from: /Applications/AMPPS/php-5.6/lib/extensions/ext/pdo_mysql.so
  Reason: no suitable image found.  Did find:
    libmysqlclient.18.dylib: mach-o, but wrong architecture
    /usr/local/lib/libmysqlclient.18.dylib: mach-o, but wrong architecture in Unknown on line 0
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
Rishi_P
Group: Member
Post Group: Elite Member
Posts: 317
Status:
Hi carlituxman,

Please open support ticket.
https://www.softaculous.com/support/
IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
jdn120
Group: Member
Post Group: Newbie
Posts: 3
Status:
Quote From : mikenj March 3, 2015, 3:43 am
I found a workaround; it appears AMPSS (or PHP how it's compiled) doesn't look in /Applications/AMPSS/mysql/lib directory for libmysqlclient.18.dylib even though that's where the path is configured. However, it you symlink libmysqlclient.18.dylib to /usr/local/lib it works. So do this:

Code

# cd /usr/local/lib
# ln -s /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib .   


Then restart Apache/MySQL.

I'm going to report this as a bug.

IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
jdn120
Group: Member
Post Group: Newbie
Posts: 3
Status:
Quote From : mikenj March 3, 2015, 3:43 am
I found a workaround; it appears AMPSS (or PHP how it's compiled) doesn't look in /Applications/AMPSS/mysql/lib directory for libmysqlclient.18.dylib even though that's where the path is configured. However, it you symlink libmysqlclient.18.dylib to /usr/local/lib it works. So do this:

Code

# cd /usr/local/lib
# ln -s /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib .   


Then restart Apache/MySQL.

I'm going to report this as a bug.

IP: --   

PhpMyAdmin doesn't work with PHP 5.4, 5.5 or 5.6
jdn120
Group: Member
Post Group: Newbie
Posts: 3
Status:
Quote From : mikenj March 3, 2015, 3:43 am
I found a workaround; it appears AMPSS (or PHP how it's compiled) doesn't look in /Applications/AMPSS/mysql/lib directory for libmysqlclient.18.dylib even though that's where the path is configured. However, it you symlink libmysqlclient.18.dylib to /usr/local/lib it works. So do this:

Code

# cd /usr/local/lib
# ln -s /Applications/AMPPS/mysql/lib/libmysqlclient.18.dylib .   


Then restart Apache/MySQL.

I'm going to report this as a bug.



I am so sorry for multiple nonsense post above.  Obviously a newbie here.
Mike, or anyone, how do I use the code above to fix the problem?
Is that some sort of a Unix command line?  Sorry for my ignorance.




IP: --   

« Previous    Next »

Threaded Mode | Print  

1


Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 19, 2024, 10:34 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.023