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
  •  | 
  •  

Question

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';
Était-ce utile?

La solution

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.

Autres conseils

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top