PEAR Date class?

Status
Not open for further replies.

engineman

New Member
Messages
19
Reaction score
0
Points
0
Can someone please tell me whether the PEAR Date class for PHP is installed.

http://pear.php.net/manual/en/package.datetime.date.php

I would like to use it to convert easily between timezones for some Paypal integration scripts that I am working on.

I am on the absolut server -- engineman.exofire.net

I get the following error when I try to include Date.php
Code:
Warning:  require_once(Date.php) [function.require-once]: failed to open stream: No such file or directory in /home/enginema/public_html/<path to my PHP script> on line 44
If the package isn't installed, would you please install it on my server. If it is installed could you tell me how to modify my require statement to include it properly. I am currently using the following:

Code:
 require_once 'Date.php'
Thanks,
engineman
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
I'll install it for you in just a moment.


Edit: Alright, I installed the Date PEAR class on Absolut.
 
Last edited:

engineman

New Member
Messages
19
Reaction score
0
Points
0
:biggrin: Thanks!
Edit:
Well Bryon I tried to use the PEAR class today and apparently the convertTZByID function calls a PHP putenv() which apparently (probably for good reason) is disallowed (at least in the version 2 of PHP).

Code:
Warning:  putenv() has been disabled for security reasons in /x10hosting/php2/lib/php/Date/TimeZone.php on line 308
So, now my question is if I switch to version 3 will that fix the problem (i.e. is putenv enabled in version 3) or would I be better off to just figure out a different way to do the timezone conversion. I'm thinking that I might be better off figuring out a different way, since this should be doable without a putenv() call and that would be the only reason (right now ;)) for moving to version 3.

Thanks,
engineman
Edit:
bump
Edit:
I fixed my code so that I don't need the Date class. Feel free to uninstall it if you want.
 
Last edited:
Status
Not open for further replies.
Top