Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues
Author Message
dschulze
Client



Joined: Dec 31, 2005
Posts: 25

PostPosted: Mon Dec 29, 2008 11:43 am Reply with quote

Upgraded from rnv2.02.02 to 2.30.00 in my test environment, WIN XP AMP. My prod environment is LAMP.

Found an issue with Downloads wherein mktime() call bombs on param 1, which is getting a string rather than a long. Ultimately found that strftime %G and %T are not returning values. Replaced with %Y and %H:%M:%S to fix. Appears to be "Not all conversion specifiers may be supported by your C library" issue per PHP man for strftime. Although I have not yet tested, seems Linux lib is not an issue? I will be testing that soon in my prod env.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Dec 30, 2008 2:30 am Reply with quote

It's one of the few changes in PHP v5.x that is not compatible with prior versions of PHP. That coding will not work in PHP5 as you have found out. You have to have integers and not strings as parameters.

Try casting the vars in the mktime() function as all integers. In other words you have something like
mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

Try changing it to
mktime((int) "", (int) "", (int) "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

If it still errors out then try
mktime((int) "", (int) "", (int) "", (int) $Date_Array[0], (int) $Date_Array[1], (int) $Date_Array[2]);

If none of those work then place an '@' sign in front of the mktime() call, but try the other ones first.
mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);
to
@mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

The "@" solution only hides the error. It does not fix it.
 
View user's profile Send private message
dschulze







PostPosted: Tue Dec 30, 2008 11:49 am Reply with quote

Raven wrote:
It's one of the few changes in PHP v5.x that is not compatible with prior versions of PHP. That coding will not work in PHP5 as you have found out. You have to have integers and not strings as parameters.

Try casting the vars in the mktime() function as all integers. In other words you have something like
mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

Try changing it to
mktime((int) "", (int) "", (int) "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

If it still errors out then try
mktime((int) "", (int) "", (int) "", (int) $Date_Array[0], (int) $Date_Array[1], (int) $Date_Array[2]);

If none of those work then place an '@' sign in front of the mktime() call, but try the other ones first.
mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);
to
@mktime("", "", "", $Date_Array[0], $Date_Array[1], $Date_Array[2]);

The "@" solution only hides the error. It does not fix it.


Thanks Raven...but what I found was that %G and %T returned nada...and subsequently the '-' (hyphen) was being passed as the parameter. I isolated it via a test purely of strftime calls and those 2 format parameters, in my test environment, did not return any values. I found a PHP strftime reference that indicated that this may happen where specific C libs do not support those format parameters. My test environment is WinXP (since it is on my laptop which makes it easier for me to complete testing etc..."on the go") so I assume the Win C libs are not supporting...strange I think but seems to be the answer at this point. My prod environment, as you know, is Raven Host, and suffers not from Mr. Gates.
 
Raven







PostPosted: Tue Dec 30, 2008 12:02 pm Reply with quote

That is odd. Have you made sure that you are using the latest C libs?
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Wed Dec 31, 2008 7:03 am Reply with quote

dschulze, just a thought. If you are not using it already on your Windows platform, you may wish to switch to XAMPP for Windows. We suffered none of these types of issues while testing RavenNuke(tm) on this WAMP environment. Wink

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
dschulze







PostPosted: Wed Dec 31, 2008 8:31 am Reply with quote

montego wrote:
dschulze, just a thought. If you are not using it already on your Windows platform, you may wish to switch to XAMPP for Windows. We suffered none of these types of issues while testing RavenNuke(tm) on this WAMP environment. Wink


Thank you...I will give that a try.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.3 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©