Skip to content

MySQL and a known bug since 2003 about the auto_increment value

We detected a bug that is known since 2003.

The value of an auto increment column is set back to zero when you are having an empty table and restarting the MySQL DBMS. We run into this issue by using the auto increment value as a history id into a second table.

How can you work around this issue?

The easiest way is to order by id descending on the second table or to setup a "start up" shell script that calculates and sets the auto increment value.

Translate to de es fr it pt ja

Debian 8 owncloud client signature verification NO_PUBKEY 4ABE1AC7557BEFF9

You have a Debian 8 installation and get an error like the following when you want to install or update the owncloud client?

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error:  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 4ABE1AC7557BEFF9

W: Failed to fetch  

W: Some index files failed to download. They have been ignored, or old ones used instead.

Execute the following command and try it again.

sudo apt-key adv --keyserver --recv-keys 4ABE1AC7557BEFF9
Translate to de es fr it pt ja

howto - php composer - File(/etc/pki/tls/certs) is not within the allowed path(s) - on arch linux

Since a few days (or weeks?), I discovered the following issue on one of my Arch Linux system.
Whenever I try to use PHP's composer, I got the following issue:

is_dir(): open_basedir restriction in effect. File(/etc/pki/tls/certs) is not within the allowed path(s): (/srv/http/ [...]

Well, it didn't hurt that much since I am using (like every cool webkiddy is doing) docker or vagrant for my development. But this time, I needed to solve it since it is a customer edge case - so I solved it.
The how to I will show you is not the perfect way. I had two things in mind, try to minimize the place I have to adapt the php.ini. And try to keep the system as normal as possible. Until now, I can not estimate the security holes I opened with this setting. I will let you know if this how to turns out to be a "don't try this at home" thing.

So, what have I done?
First of all, I asked curl to tell me where it is looking for certificates by executing:

curl-config --ca

output: /etc/ssl/certs/ca-certificates.crt

After that I had a look what this path is:

ls -halt /etc/ssl/certs/ca-certificates.crt

output: [...] /etc/ssl/certs/ca-certificates.crt -> ../../ca-certificates/extracted/tls-ca-bundle.pem

So, with that knowledge it turned out that the following steps are reflecting my requirements mention above.

sudo mkdir -p /etc/pki/tls/certs
sudo ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-certificates.crt
sudo vi /etc/php/php.ini

add following lines to "open_basedir" configuration section


And that is it, composer should now be back in business.

Translate to de es fr it pt ja

zend framework 2.4 "Zend\ServiceManager\Exception\ServiceNotFoundException: Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ApplicationConfig"

We had some controller tests in our test cases and the following error was thrown, after we updated to zend framework 2.4.

Zend\ServiceManager\Exception\ServiceNotFoundException: Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for ApplicationConfig

/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:555 /vendor/zendframework/zendframework/library/Zend/Mvc/Service/ModuleManagerFactory.php:41 /vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:939 /vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:1097 /vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:638 /vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:598 /vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:530 /vendor/zendframework/zendframework/library/Zend/Mvc/Application.php:253 /vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php:164 /vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php:73 //MyControllerTest.php:124

"MyControllerTest" extends "Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase". What we did to solve the problem was adding the following lines of code in our "setUp" method.

$applicationConfigurationPath = DIR . strrepeat('/..', ) . '/config/application.config.php';
if (!isfile($applicationConfigurationPath)) {
    $message = 'application configuration needed and not found in path "' . $applicationConfigurationPath . '"';


} $applicationConfiguration = require $applicationConfigurationPath; unset($applicationConfiguration['modulelisteneroptions']['configglobpaths']); $applicationConfiguration['modules'] = array();


Thats it, hope it helps.

Translate to de es fr it pt ja