Category Archives: PHP

Update to PHP 5.6 on CentOS 6 using remi repository

With CentOS being a conservative distribution, security patches are still applied to CentOS 6, but no new versions are available. When running some websites – like Virtualmin – on CentOS 6, the old PHP version 5.3.3 can cause problems. Updating to a newer … Continue reading

Posted in PHP, Web technologies | Tagged , , | Comments Off on Update to PHP 5.6 on CentOS 6 using remi repository

Using the Symfony Validator as a standalone component

It’s easy to think of Symfony as just being a huge full-stack PHP framework, that you either base your entire project around or ignore completely, but in fact, the individual Symfony components can be surprisingly easy to slot into an existing project. This … Continue reading

Posted in PHP | Tagged , , | Comments Off on Using the Symfony Validator as a standalone component

PHP Unable to load library module.so

If you see in the Apache error_log log-file an error like “Unable to load dynamic library /usr/lib/php/modules/module.so”, you probably have CentOS 6.4 which has a configuration issue in the mcrypt configuration file. Continue reading

Posted in Linux Administration, PHP | Tagged , | Comments Off on PHP Unable to load library module.so

WordPress performance tuning

While migrating from one server to a Amazon AWS i noticed a huge decrease in performance on the AWS instance. While the Wordpress blog took a second or so to load on the old server (dedicated server) the processing time went up to about 5-10 seconds for one page load. At first you might immediately think of the server as the bottle neck. But a slow server will just bring the problem to light. Continue reading

Posted in PHP, Wordpress | Tagged , , , , | Comments Off on WordPress performance tuning

Why is my Symfony 2 app crashing with an out of memory error?

I’ve recently run into an issue where a data-processing task in a Symfony app would crash with a PHP ‘Out of memory’ fatal error. The task in question was using Doctrine to retrieve some rows from the database, updating some … Continue reading

Posted in PHP | Tagged , | Comments Off on Why is my Symfony 2 app crashing with an out of memory error?

PHP “headers already sent”, but I didn’t do it!

I get the PHP Error “headers already sent” when calling a PHP script! My scripts appear to be outputting data to the browser before any function to manage the buffer such as ob_flush() or ob_get_contents() is even being called! What is going on!? Continue reading

Posted in PHP | Tagged , , , | Comments Off on PHP “headers already sent”, but I didn’t do it!

My HTML-form mysteriously stopped working, why?

Nobody changed it, why is it not working anymore? You can imagine the confusion after checking the version control and the files which where unchanged since the time the website was finished (lets say about 4 years). Continue reading

Posted in PHP, Web technologies | Tagged , , | Comments Off on My HTML-form mysteriously stopped working, why?