What's new

AC68 getting MySQL to work with PHP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

subzero44

New Around Here
Hello, I hope this is an appropriate forum for this question. Would welcome alternate suggestions if not.

I'm running dd-wrt build 28211 on an Asus RT-AC68U router. Works very well. I haven't considered other firmwares yet because it needs to interoperate with other dd-wrt routers so I figured dd-wrt would be easiest.

The problem I'm running into is that I can't get the PHP processor that's bundled with dd-wrt to work with the MySQL client that's part of Entware. I ran the following commands:

opkg install mysql-server
opkg install php5-mod-mysqli​

I created a small mysql database and checked that it worked. I created a PHP file and verified that it worked. Then I wanted to add mysqli calls from php. I issued the following commands to create a copy of dd-wrt's php.ini file to a writable directory and added the mysqli extension to it:

cp /etc/php.ini /opt/etc/php.ini
cat >> php.ini
extensions=mysqli
extension_dir="/opt/lib/php"​

Then I invoked dd-wrt's php against the new php.ini file and got the following:

php -c /opt/etc/php.ini
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lib/php/mysqli.so' - Error relocating /opt/lib/libmysqlclient.so.16: __isinf: symbol not found
I figured there must be a mismatch between the php and mysql versions:

php -v
PHP 5.5.26 (cli) (built: Nov 13 2015 20:33:09)

mysql -V
mysql Ver 14.14 Distrib 5.1.73, for openwrt-linux-gnu (arm) using readline 5.1​

So I figured I would simply install Entware's php and use that one instead of the dd-wrt one, but it wouldn't even install because it says it's already there so I figure I must be using compatible versions of mysql and php:

opkg install php5
Package php5 (5.6.16-1) installed in root is up to date
Any suggestions to get dd-wrt's php to work with entware's mysql?

Thanks,

Charles
Asus RT-AC68U dd-wrt 28211 entware-ng
 
Similar threads
Thread starter Title Forum Replies Date
K Moving files on AC68 on USB drive. ASUS AC Routers & Adapters (Wi-Fi 5) 3

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top