PHP installations with Suhosin extension and exotic ini settings

Introduction

Suhosin is a PHP extension to secure your PHP installation. I use this extension in my company for devices in which we run PHP and we let developers to inject code in these devices.

We use Suhosin to build 2 worlds : the user land and the system land. Both lands are distinct virtual hosts.

Our code lives in the system land and the third party developers code lives in the user land.

You can have the same installation in CPanel for example where your PHP code lives in a user land with :

So if your configuration denies execution of mandatory functions, Pimp My Log will not be able to run normally.

If you deny access to PHP to directories where logs are, Pimp My Log will not be able to read them.

Pseudo-solution

Try to create a file named SAFE_MODE in the root directory of Pimp My Log and relaunch Pimp My Log.

This directory is next to index.php for git or archive installations.

This directory is next to composer.son or vendor for composer installations.

Troubleshooting

If you see a Unexpected end of file message in Pimp My Log, you should check your PHP configuration, important functions are disabled with Suhosin.

If you see a JSON.parse: unexpected character at line 1 column 1 of the JSON data message in Pimp My Log, you should check your PHP configuration, important functions are disabled in PHP.ini.

If you see in your error log file Unknown: open_basedir restriction in effect., you should check the open_basedir parameter in the php.ini file or in your web server configuration file.