sasori Posted August 31, 2008 Share Posted August 31, 2008 first i installed pear in wamp and was able to do so. then i installed the Date package then i tried to configure my php.ini then i tried to run my simple test script to get the classes available include('TimeZone.php'); $foo = new DateTime(); echo "the classes are ".get_class($foo)."<br/>"; and then error appears on my browser what you think guys is the problem? i need help..im just doing self study so i need guides in here. :?: Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/ Share on other sites More sharing options...
HeaDmiLe Posted August 31, 2008 Share Posted August 31, 2008 These errors means only file is missing. Do you have file DateTime.php into folder wher your script is placed? Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630289 Share on other sites More sharing options...
sasori Posted August 31, 2008 Author Share Posted August 31, 2008 These errors means only file is missing. Do you have file DateTime.php into folder wher your script is placed? ill change my question sir, i browse the documentation of the Date Package from pear website and it says and so I run another test script in order to output a class include('TimeZone.php'); $foo = new Date(); echo "the classes are ".get_class($foo)."<br/>"; and it says Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630291 Share on other sites More sharing options...
HeaDmiLe Posted August 31, 2008 Share Posted August 31, 2008 Try this example <?php require_once 'Date.php'; //without parameter == now $now = new Date(); //pass a string in ISO format $longAgo = new Date('1813-02-23T05:34:23'); //create a Date object from a PHP unix timestamp $timestamp = time(); $nearlyNow = new Date($timestamp); //make a copy of an existing Date object $copyDate = new Date($longAgo); ?> I gave you this example because you're trying to includeTimeZone.php instead of Date.php. I have not experience with installing pear packages on windows, but I saw no TimeZone.php, only Date.php even though you need TimeZone functionallities. Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630313 Share on other sites More sharing options...
sasori Posted September 1, 2008 Author Share Posted September 1, 2008 but sir, there's a TimeZone.php inside the Date package of pear Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630660 Share on other sites More sharing options...
HeaDmiLe Posted September 1, 2008 Share Posted September 1, 2008 Look at the adress bar, you don't have the right url in php.ini, correct this first. Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630728 Share on other sites More sharing options...
sasori Posted September 1, 2008 Author Share Posted September 1, 2008 i have a script running now..but still it has a few errors <?php include('Date/TimeZone.php'); $foo = new DateTime(); echo "the class is/are ". nl2br(print_r(get_class($foo),true)); echo "<br/>"; echo "the methods are ". nl2br(print_r(get_class_methods($foo),true)); ?> what should i do now? Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-630739 Share on other sites More sharing options...
HeaDmiLe Posted September 1, 2008 Share Posted September 1, 2008 Class is istanced... weird problem, some guys tells you should use require for it, but i'm not sure, require results fatal error also. I think here are many of people that is more competentive to solve your problem Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-631014 Share on other sites More sharing options...
sasori Posted September 1, 2008 Author Share Posted September 1, 2008 i figured out the error now... daemn!, am so dumb, it took me 2 days to figure this out. it was with the include path of my php.ini here's the correct path include_path = ".;c:\wamp\bin\php\php5.2.5\PEAR" i didn't notice the "\php" between \bin and \php5.2.5 in the firstplace Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-631063 Share on other sites More sharing options...
HeaDmiLe Posted September 1, 2008 Share Posted September 1, 2008 I told you that sth in the include paths isn't ok Quote Link to comment https://forums.phpfreaks.com/topic/122083-solved-pear-help/#findComment-631067 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.