jordanwb Posted February 1, 2008 Share Posted February 1, 2008 I have a class code "date_sys" (don't ask why it's called that I don't know), it has only two functions which are both marked as static so I call it like so "date_sys::". I didn't have this problem on Ubuntu which had Lamp installed but my XAMPP server in Windows XP doesn't want to work. I have added my php.ini file just in case. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/88963-class-date_sys-not-found/ Share on other sites More sharing options...
trq Posted February 1, 2008 Share Posted February 1, 2008 Are you incl;uding the class prior to trying to use any of its methods? Can wee see the code where you try and use this class? Quote Link to comment https://forums.phpfreaks.com/topic/88963-class-date_sys-not-found/#findComment-455684 Share on other sites More sharing options...
jordanwb Posted February 1, 2008 Author Share Posted February 1, 2008 Well how everything is included is kinda confusing. /index.php includes /core/session.php /core/session.php includes: /core/settings.php /core/core.php /core/date.php /core/sql.php /core/cookie.php /core/login.php /core/menu.php /core/usercp.php Now after /index.php includes /core/session.php, it runs $sql->import_plugins() $sql is the instance of sql_handler which is in /core/sql.php It reads all the rows in the Mysql table "scm_plugins" and includes each plugin. At this point assume the includes work. In the news class where the error occurs: $datestamp_broken = date_sys::breakdown_int_timestamp($oldest_news_item['integer_date_stamp']); The entire date_sys class: <?php class date_sys { static function breakdown_int_timestamp ($timestamp) { $datestamp[0] = substr ($timestamp, 0, 4); $datestamp[1] = substr ($timestamp, 4, 2); $datestamp[2] = substr ($timestamp, 6, 2); $datestamp[3] = substr ($timestamp, 8, 2); $datestamp[4] = substr ($timestamp, 10, 2); $datestamp[5] = substr ($timestamp, 12, 2); return $datestamp; } static function month_from_int ($int) { $int = (int) $int; $months = array ("", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); return $months[$int]; } } ?> [edit] It is also noteworthy mentionning is that in /core/session.php right after I include all those files I called "date_sys::month_from_int (5);" and it said it couldn't find the class either [/edit] Quote Link to comment https://forums.phpfreaks.com/topic/88963-class-date_sys-not-found/#findComment-455706 Share on other sites More sharing options...
trq Posted February 1, 2008 Share Posted February 1, 2008 At this point assume the includes work. You'd best rethink that. Quote Link to comment https://forums.phpfreaks.com/topic/88963-class-date_sys-not-found/#findComment-455719 Share on other sites More sharing options...
jordanwb Posted February 2, 2008 Author Share Posted February 2, 2008 But if the include paths were wrong why does it work on Ubuntu? Quote Link to comment https://forums.phpfreaks.com/topic/88963-class-date_sys-not-found/#findComment-455722 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.