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

StackOverflow https://stackoverflow.com//questions/12650464

  •  11-12-2019
  •  | 
  •  

質問

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top