PHP fatal libpng error: zlib error

While working with some image functions in PHP I changed the output image from JPEG to PNG (from the ImageJPEG to ImagePNG functions) and got the error message "gd-png: fatal libpng error: zlib error". This post looks at the cause of the error and the solution.

Categories PHP

Check if a PHP script is already running

If you have long running batch processes with PHP that are run by cron and you want to ensure there’s only ever one running copy of the script, you can use the functions getmypid() and posix_kill() to check to see if you already have a copy of the process running. This post has a PHP class for checking if the script is already running.

Categories PHP

PHP SoapClient “Unable to parse URL” error

While testing a web service I was creating in PHP using the PHP SoapClient and SoapServer classes I got the error "Unable to parse URL" from a WSDL file generated using Zend Studio. This post looks at the error and how to fix it.

Categories PHP

phpMyAdmin “Cannot start session without errors”

Sometimes phpMyAdmin is inaccessible and gives the error message "Cannot start session without errors". This can be due to either a client-sided issue with cookies, or a server-sided issue relating to permissions of the temporary directory where session files are stored.

Categories PHP

Hide the information schema in phpMyAdmin

When you log into phpMyAdmin you can only see the databases for which you have access rights, as well as the information_schema database. It is possible to hide this database if you want to. This post looks at how to hide the information_schema database in phpMyAdmin.