Urgent help needed (Fatal Error)

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

bamba21
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Sep 25, 2012 10:27 am

Urgent help needed (Fatal Error)

Postby bamba21 » Tue Sep 25, 2012 10:30 am

Hi,

My site has is down, I'm getting the following error:
Fatal error: Cannot create references to/from string offsets nor overloaded objects in public_html/includes/classes/class.xml2array.php

The line is this one: (In bold, the third one)
if(!is_array($current) or (!in_array($tag, array_keys($current)))) { //Insert New tag
$current[$tag] = $result;
$current = &$current[$tag];

Each time I use a backup of the site it works and goes down again for the same issue after a few hours.
Any idea? Any help would be great.

Thanks

User avatar
fady10
New php-forum User
New php-forum User
Posts: 10
Joined: Mon Sep 24, 2012 6:58 pm
Contact:

Re: Urgent help needed (Fatal Error)

Postby fady10 » Tue Sep 25, 2012 7:59 pm

It's a PHP famous bug, Making reference on string offsets crashes PHP

If you're using PHP 5.3.0 so upgrade it to a newer version or rollback it to 5.2.0

Regards,
Fady Joseph
iFunny; The funniest blog ever ! funny comics and pictures

bamba21
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Sep 25, 2012 10:27 am

Re: Urgent help needed (Fatal Error)

Postby bamba21 » Wed Sep 26, 2012 8:24 am

Thanks Fady, but the version of the PHP on that server is PHP 5.2
How can prevent the problem in the code? What does it mean?

User avatar
fady10
New php-forum User
New php-forum User
Posts: 10
Joined: Mon Sep 24, 2012 6:58 pm
Contact:

Re: Urgent help needed (Fatal Error)

Postby fady10 » Thu Sep 27, 2012 9:18 pm

I think you can not stop this problem with the code, It's a PHP related problem not a problem in your code.
You can read about this bug from this Link
Try to upgrade your php version :) Good luck


Regards,
Fady Joseph
iFunny; The funniest blog ever ! funny comics and pictures


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest