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
Domanda
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';
Soluzione
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.
Altri suggerimenti
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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow