Author |
Message |
dschulze
Client
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 31, 2005
Posts: 25
|
Posted:
Mon Dec 29, 2008 11:43 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Dec 30, 2008 2:30 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dschulze
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 30, 2008 11:49 am |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 30, 2008 12:02 pm |
|
That is odd. Have you made sure that you are using the latest C libs? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Dec 31, 2008 7:03 am |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
dschulze
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Dec 31, 2008 8:31 am |
|
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. |
Thank you...I will give that a try. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|