Just wasted a couple of hours troubleshooting the PHP error: AH00052: child pid 2460 exit signal Segmentation fault (11). The browser (Google Chrome) just returned: ERR_EMPTY_RESPONSE. The /var/log/httpd/my_virtual_domain-error_log didn’t say anything. But the default /var/log/httpd/error_log printed this error [core:notice] [pid 1400] AH00052: child pid 2682 exit signal Segmentation fault (11) for every page request. The problem was actually a PHP recursive error, which …
Centos and Inodes
In progress… This post will be updated if I get any more information/fixes… I currently have a web-server (Centos6) hosted at a third-party. Today the Inodes usage was 100% for the second time in 3 months. It looks like it’s the PHP sessions that fills up. Last time I tried to edit the session-settings in php.ini, but didn’t seem to have any affect, …
Use PHP Composer with an existing project
I have been aware of what PHP Composer has been for a long time, but I never used it before these last days. My goal was to «install» Adldap2 and replace it with the first deprecated version. This wasn’t as straight forward as I thought, because of bad or not relevant documentation everywhere. Almost every documentation about PHP Composer shows what …
PHP snippet: Norwegian holidays
Here is a little function to find Norwegian holidays in PHP. The holidays are returned in array with Unix timestamp as key and name of the day as value.
Centos7 – Something filling up the disk space
When a webserver uses 100% of the diskspace, there is not enough space to create a session in PHP. In other words people cannot login to your web-application. I had some problems with the httpd logs (/var/log/httpd) over some time with one single webserver. The access log can take up to mulitple gigabytes. After deleting the logs, everything worked fine. After …
Linux Cockpit (Fedora 23 and CentOS 7)
Today I installed and tested Fedora Server 23. This version of Fedora comes with cockpit, which are a web-interface for server monitoring. I have mostly used CentOS up to now, but Fedora looks more interesting for the reasons I will mention below. To add my CentOS servers to the Cockpit monitoring, I need to install Cockpit on them as well. Setting up …
Buying, installing and testing ConiuGo GSM LAN Modem with Diafaan SMS Gateway
We decided to try the ConiuGo GSM LAN Modem (dead link – removed) at my workplace, as the USB-devices we use now, is a bit tricky running on virtual machines and the virtual COM-ports isn’t always stable. Diafaan has also written a review about this modem. This article is an expanded version of the Diafaan review, with all the details I struggled with. …
Backup-script for MySQL
Shell script for backing up MySQL database. I am running this on a Centos 7 DB-server with MariaDB, but should work on most OS and MySQL installations. This is only an example, and the script is without any warranty. Create a .sh file Edit the .sh file The basics Delete old backups in folder: Where +3 is number of days. …
Testing Netatmo Weather station and using PHP API
We just bought some Netatmo devices (Weather station components) at work, to monitor the air-quality in our office. After using it for 3 days, I am a bit stunned over how much you can use this devices for. The data itself are interesting enough, but when integrating this data in to a smarthome, you can actually «see» where the people …
Open garage-port with Telldus
If you want to control your garage doors with Telldus, you need a wireless receiver and connect it with your garagedoor-motor push-button input. I bought RX-multi from portspesialisten in Norway.