Suhosin PHP Module Mismatch

PHP Warning: PHP Startup: suhosin: Unable to initialize module

Yesterday I got a problem with suhosin after downgrading php in cpanel, actually it’s so simple to fix suhosin problem in cpanel but I’m so tired and had a lot off issue since yesterday. After waiting arround 7 hours I didn’t get solutions from cpanel customer support, finally I’ve to fix it by my self. I know that the problem caused by suhosin module doesn’t match with API in PHP, so I just need to recompile and reinstall suhosin from source. Continue reading “PHP Warning: PHP Startup: suhosin: Unable to initialize module” »


How to php get the real ip address behind the proxy

Beberapa hari yang lalu saya iseng ingin mengutak atik script php di salah satu backend aplikasi karena setelah menggunakan front end nginx sebagai reverse proxy untuk beberapa backend aplikasi, IP yang terdeteksi adalah IP front end (IP Proxy) dan bukan real IP dari visitor. Setelah membaca manual php di php.net akhirnya saya menemukan parameter yang harus diubah agar script php mengenali real ip address dari visitor. Continue reading “How to php get the real ip address behind the proxy” »


error_fpm

PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)

This article referring to another article that not published yet, I had some issue with session.save_path in php-fpm setup. For security improvements  I want to make PHP execute under individual user accounts insted of a system user like nginx (default www user and group). In apache environments I can use suPHP or suExec and in Nginx I can use php-fpm with custom “pool” each web server and that makes PHP scripts executed by owner and groups that describe in each pool. Continue reading “PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)” »