Benjamin Eberlei wrote on 04/01/2015 13:00:
Files must be either in the PHP include path, or via absolute path, for example by putting them right next to the shared object (.so) files and using the extension_dir path inside the code, see the following for an example (a hacked approach): https://github.com/QafooLabs/php-profiler-extension/blob/master/qafooprofiler.c#L744
Beware that anything that looks in a configurable or environment-dependent list of include directories has the potential to open up security holes - anyone who can change that setting, or who has write access to a directory with higher priority, can inject code in a very broad context. It can also lead to surprising side effects if a file with the same name is coincidentally placed into more than one directory in the search path.
I think if the intention is for extensions to ship these files directly, the registration mechanism should create an absolute path based either on a single configured directory, which distributors will set based on their installation paths, or on the directory containing the .so file being loaded.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php