Page 1 of 1
PHP 5.3
Posted:
Sat Oct 10, 2009 1:19 am
by andperry
I have tried Xataface with PHP 5.3 on my local host computer only to find that it outputs a large number of PHP warnings about deprecated functions (particularly ereg/eregi and the 'call by reference' construct). Tried suppressing these messages with the PHP error_reporting function but to no avail (I realise that this may be an issue with PHP itself). Fortunately my web hosting company is still running PHP 5.2.10, but I was just wondering what the future holds and whether Xataface should be able to run on PHP 5.3 upwards.
Regards,
Andrew.
Posted:
Wed Oct 14, 2009 11:57 am
by shannah
5.3.0 contains a bug in its implementation of parse_ini_file, which has been reported and fixed in the PHP source tree. I'm not sure which release contains this fix. Without the fix Xataface cannot run as it relies heavily on parse_ini_file()
Xataface will support 5.3.0. I'm surprised you weren't able to suppress these messages using error_reporting. What was the error_reporting command that you tried, and what were the exact messages you were receiving.
Posted:
Wed Nov 04, 2009 12:06 pm
by andperry
Thanks for the reply.
I tried putting error_reporting(0) into the script but to no avail. It is as if the error_reporting function is having no effect.
A very large number of messages are output a typical one being:-
Deprecated: Assigning the return value of new by reference is deprecated in E:\Users\Common\Data\WebSite\Sites\All Sites\public_html\xataface-1.2.1\Dataface\Application.php on line 380
The vast majority are to do with either pass-by-reference or the ereg/eregi functions.
Also, I'm confused about your comment regarding the bug fix in PHP 5.3. As far as I can see there had only been one release of PHP 5.3 (5.3.0) until 5.3.1 which was due out yesterday. Am I missing something?
Thanks,
Andrew.
Posted:
Wed Nov 04, 2009 12:26 pm
by shannah
The PHP 5.3 bug was reported fixed by the PHP people in their source repository, so it should have been included in any release after 5.3.0. I'm not aware of how many releases there have been since 5.3.0. If 5.3.1 came out yesterday, then 5.3.1 should be fine.
As far as the errors go. If you set error_reporting(0), and it is still showing errors, then there must be some other place. E.g. in dataface-public-api.php try commenting out line 44.
Most of these errors are due to PHP 4 code that needs to be switched. Since I have decided to drop PHP 4 support, I guess there's no harm removing the pass-by-reference calls (which were necessary in PHP 4 - and didn't use to cause harm in PHP 5).