FC4->FC5 upgrade PHP issues.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi folks.

I've just done a FC5 clean build + yum update and then moved my web sites 
across from a FC4 system and now I'm getting lots of 'PHP Strict' warnings 
that I would like help with. 

I know I can get rid of them by telling PHP not to log them, but I'd rather 
fix the faults than hide the messages.

Firstly, it complained about timezone not being set, so in php.ini I set the 
date.timezone value to 'GMT0', 'UTC' (which is what it was saying it was 
defaulting to) and 'Europe/London' (Taken from Appendix H).  

None of these values made any effect as I still got the error message about it 
not being set. The only way I got the error messages to stop was to add

date_default_timezone_set('Europe/London');

to the top of my sql.inc 

Can anyone suggest why changing the php.ini file didn't work. I did of course 
restart httpd after every edit of the file.

Secondly, I'm getting lots of :-

PHP Strict Standards:  Only variables should be passed by reference in ... on 
line ...

One such line is :-

$r_dets=array_shift(loadhash3("select r_id as key, * from requests where r_id 
= $dets[o_r_id]",0));

where loadhash3 returns a hash of records with the format 'key' -> hash of 
fields. In this instance it only returns 1 row from the database, and the 
hash of fields I want into $r_dets ($r_dets['r_id'], $r_dets['r_regno'], 
etc).

Without the array_shift I don't get the error message, but have to refer to 
fields as $r_dets[$dets['o_id']]['r_regno'] which obviously isn't as nice.

Can anyone tell me why this is not the right way to do things, and how I 
should change the code to improve it.

Thanks

Gary
-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux