PHP 8.5.0 Alpha 4 available for testing

Voting

: eight minus three?
(Example: nine)

The Note You're Voting On

QLeap
16 years ago
Storing SimpleXMLElement values in $_SESSION does not work. Saving the results as an object or individual elements of the object will result in the dreaded "Warning: session_start() [function.session-start]: Node no longer exists" error.

For example, this does not work:

$xml = new SimpleXMLElement($page);
$country = $xml->Response->Placemark->AddressDetails->Country->CountryNameCode;
$_SESSION['country'] = $country;

This will work:

$_SESSION['country'] = (string) $country;

<< Back to user notes page

To Top