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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux