Qnap [ Qapache + PHP 7.2.26 ] [ 2.4.39 ] Apache WebServer + PHP + Extensions

FIXXED! :D :D :D

The problem was that by settings the 127.0.0.1 for the connection the mysql server was not listening on. I changed the settings of mysql server under the qnap web interface, I enabled the checkbox "Enable TCP/IP networking". Now works fine!

Thanks to all

Andrea
 
Updated

Code:
php updated to 5.6.10
Sqlite updated to 3.10.8
nmap added
Go added (experimental)
OpenSSL updated to 1.0.2c
 
In order to get the MySQL-Server working, I need to change the MYSQL_SOCKET path on my QNAP TS-269L from /tmp/mysql/mysql.sock to /tmp/mysql.sock. I therefore edited the php.ini file and restarted the Apache web server. But the changes won´t take any effect. PHP-Info still says that the Socket-Path is under /tmp/mysql/mysql.sock. I then tried to set a symlink to the file. This worked but the /tmp-folder is not persistent on QNAP which means that after every restart of the NAS, the database won´t work anymore.

Do you have any idea how to fix this? It seems like that the MYSQL_SOCKET path isn´t read from php.ini but was hard-compiled with a flag?

Thank you very much for your answers and best regards
Ben
 
BenS a dit:
In order to get the MySQL-Server working, I need to change the MYSQL_SOCKET path on my QNAP TS-269L from /tmp/mysql/mysql.sock to /tmp/mysql.sock. I therefore edited the php.ini file and restarted the Apache web server. But the changes won´t take any effect. PHP-Info still says that the Socket-Path is under /tmp/mysql/mysql.sock. I then tried to set a symlink to the file. This worked but the /tmp-folder is not persistent on QNAP which means that after every restart of the NAS, the database won´t work anymore.

Do you have any idea how to fix this? It seems like that the MYSQL_SOCKET path isn´t read from php.ini but was hard-compiled with a flag?

Thank you very much for your answers and best regards
Ben

Try this:

uschti a dit:
FIXXED! :D :D :D

The problem was that by settings the 127.0.0.1 for the connection the mysql server was not listening on. I changed the settings of mysql server under the qnap web interface, I enabled the checkbox "Enable TCP/IP networking". Now works fine!

Thanks to all

Andrea

Hope help ;) ;)
 
Thanks for your reply. The SQL-Server works very well with the build-in PHP. TCP/IP networking is enabled. The problem is indeed the MYSQL_SOCKET path. On my TS-269L, mysql.sock is located at /tmp/mysql.sock. With the Qapache 2.4 module, the PHP-info says that the path is under /tmp/mysql/mysql.sock. Even if I change the mysql.default_socket path, is takes no effect. Only a symlink does the trick. But this symlink disappears after a restart since /tmp is not persistent.

I just saw here: http://www.positiv-it.fr/QNAP/PAGE/php569.htm that the socket was manually set in the config-command:

Configure Command
Code:
./configure --with-mysql-sock=/tmp/mysql/mysql.sock

Does that mean that the path is hardcoded and not changeable?
 
Hi,

yes path is hard code in the configure...

simply edit /etc/iinit.d./Qapache

in start () section add

Code:
export MYSQL_SOCKET=your-location

or create the symlink

it should do the trick and make it persistent

please also note this application will not be compatible with the last firmware 4.2 (after some test it did some conflict)

;)
 
Thanks for this hint. Setting the symlink worked fine. I noticed that Zend Opcache is disabled. How can I activate it?
 
I tried this but without success. I saw that you use

Code:
./configure --enable-opcache

But nevertheless, Zend Opcache is disabled. I tried to set

Code:
opcache.enable=1

in php.ini, but this did not work.
 
yes opcache is well compiled in PHP, but i have not enough knownedge to use it

when 4.2 will be out i will have to renew it, and probably swap it to 64bit
 
The interesting question is why Opcache is disabled even though you compiled PHP with --enable-opcache. In addition, you can enable Opcache by setting opcache.enable=1. But for some reason, entries in php.ini are ignored in your QPKG...

Opcache is very important for bigger web applications such as ownCloud and others. Do you have another idea how I could enable Opcache in your QPKG?

Thanks for your answers and best rgards
Ben
 
BenS a dit:
The interesting question is why Opcache is disabled even though you compiled PHP with --enable-opcache. In addition, you can enable Opcache by setting opcache.enable=1. But for some reason, entries in php.ini are ignored in your QPKG...

Opcache is very important for bigger web applications such as ownCloud and others. Do you have another idea how I could enable Opcache in your QPKG?

Thanks for your answers and best rgards
Ben

Hi ben

OpCache is compiled by default on PHP5.5+. However it is disabled by default. In order to start using OpCache in PHP5.5+ you will first have to enable it. To do this you would have to do the following.

i added the following in php.ini

Code:
zend_extension=/share/CACHEDEV1_DATA/.qpkg/Qapache/lib/extensions/no-debug-zts-20131226/opcache.so

restart Qapache

and now it display well :

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies


;)
 
Erratum : since QTS 4.2 update Qapache is working again

just see a new Apache 2.4.16 and PHP 5.6.12 update will follow

I will include the opcache Zend command in new version
 
Thanks a lot! Works great =) I'm looking forward to seeing the new version for QTS 4.2 =) You did great work with this QPKG :D