with
echo realpath('.').'<br>';
echo dirname(__FILE__).'<br>';
echo realpath(dirname(__FILE__)).'<br>';
echo $_SERVER[PHP_SELF].'<br>';
echo getcwd();
I get always
/services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public
but in phpinfo DOCUMENT_ROOT is
/services/webpages/l/i/mydomain.com/public
because of that I'm having hard times with .htaccess in conjunction with Zend Framework.
On my local I'm able to make it work. But on the provider host I could not grasp the magic yet.
EDT: I put $_SERVER['DOCUMENT_ROOT'] = realpath($_SERVER['DOCUMENT_ROOT']);
on the index file but got this.
Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file(/services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/application/configs/appkeys.ini) [function.parse-ini-file]: failed to open stream: No such file or directory parse_ini_file(/services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/application/configs/appkeys.ini) [function.parse-ini-file]: failed to open stream: No such file or directory' in /services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/library/Zend/Config/Ini.php:181 Stack trace: #0 /services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/library/Zend/Config/Ini.php(201): Zend_Config_Ini->_parseIniFile('/services2/webp...') #1 /services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/library/Zend/Config/Ini.php(125): Zend_Config_ in /services2/webpages/util/i/g/gg8375620.provider.com.br/mydomain.com/public/v0.2b/library/Zend/Config/Ini.php on line 181
EDT: thats the one:
$appkeys = new Zend_Config_Ini(APPLICATION_PATH . '/configs/appkeys.ini');
and APPLICATION_PATH is defined by
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));