On 08/21/2014 01:13 PM, Cristian Rodríguez wrote:
El 21/08/14 a las #4, David C. Rankin escribió: m/dl/bugs/openSuSE/131/classes.php.txt
The latest autoload function was:
function __autoload($class_name) { if (file_exists(AVFX_LIB_DIR.$class_name.'.php')) require_once $class_name.'.php'; }
The problem was first noted on update of php 5.4.4-1 -> 5.4.5-1.
So, the autoloader changed behaviour in a minor version update ? hrmm..that smells bad..the original __autoload is :
function __autoload($class_name) {
if (file_exists($class_name.'.php')) require_once $class_name . '.php'; }
Well..that's some very fishy code there ;-)
Hrmm.. what's the current working directory value at the time __autoload is executed .. ? ( getcwd() )
hint: that's some unspecified behaviour :-)
It might have changed to the CWD of the file actually requesting the class to be autoloaded instead of the CWD of the file itself.. or it is SERVER_ROOT like in __destruct() ..
Christian, The directory layout for avantfax is: /srv/http/avantfax index.php <snip> /admin /ajax /css /images /includes /includes/langs /includes/Smarty /includes/templates /js /tools The primary directories relevant to login and application framework are: /srv/http/avantfax index.php <snip> /admin /includes The very first call in index.php is: require_once 'includes/classes.php'; So I suspect the cwd is /srv/http/avantfax when autoload is called. Where/what would I look for to see if there was a further change of the working directory between the http call to index.php and the first call to classes.php in index.php? (if anywhere). If you don't already have a copy of avantfax, you can get it at: http://www.avantfax.com/download.php It is a small 700k download. I will have more time this weekend to find all my notes and get a fresh set of logs. I'll also need to update another box to current php 5.5.14 to make sure I'm not missing any errors that are waiting in the new version. Thanks for looking at this. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org