Search code examples
phpyiiphargoutte

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';

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.