I am including a phar file (goutte.phar) in my php application. When I try to hit the url I get Connection to the server was reset error
質問
Is there any specific settings in php.ini
that I need to change to allow the server to include the file?
require_once dirname(dirname(__FILE__)).'/unleashapi/protected/extensions/goutte.phar';
解決
You can set in php.ini
auto_prepend_file
:
auto_prepend_file="/custom/path/unleashapi/protected/extensions/goutte.phar"
make sure Apache has access to that file.
他のヒント
If you server is using suhosin (typically Debian and all Debian based distributions), you should add : suhosin.executor.include.whitelist="phar"
to your php.ini
所属していません StackOverflow