I have a Tiny Core 8.2.1 installation running Apache 2.4. I decided to add a Wordpress based website and so needed php and MariaDB installed as well.
The steps:
1) Install MariaDB
2) Configure Apache for a new virtual host and check it worked.
3) Install php.
I was a little slow here as the app browser shows
apache2-mod-php5.tcz but nothing for
apache 2.4. Eventually the penny dropped and I installed
php7-mod.tcz and
php-ext.tcz.
4) Back to Apache conf file to get the php module loaded and the php handler installed.
5) Install Wordpress (latest.zip off their website)
6) Fire up the browser.....
To cut a long story short:
The Wordpress site returned:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I discovered in the sample ini file for PHP7 the line:
extension_dir = "/usr/local/lib/php/extensions/no-debug-zts-20151012"The actual extension directory is: "
/usr/local/lib/php/extensions/no-debug-zts-20160303"
Having corrected that it didn't get me much further forward.
The Apache error_log file included many lines like:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-zts-20160303/curl.so' - libcurl.so.4: cannot open shared object file: No such file or directory in Unknown on line 0and for: gd.so, gmp.so, intl.so, ldap.so, mysqli.so, pdo_mysql.so.....and so on.
The PHP warning wording above is a bit confusing. Reading left to right the error is:
- a dynamic library can't be loaded
- the file on the left requires the one on the right.
i.e.
/usr/.../..zts-20160303/curl.so is unable to load
libcurl.so.4I knew the mysql library was there. After a little more thought I added the line:
/usr/local/mysql/libto the file
/etc/ld.so.confand then ran
sudo ldconfig -vI then restarted apache and wordpress burst into life.
So:
- the php sample ini file has an error in the extensions path.
- Should I need to set the library load path for
mysql or should that have been set as part of the build and/or app installation?
David