identical arrays created in different ways behave different

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
If I define an array "by hand" in the following manner, everything works  
fine in my script:
$selb = array (

If I fill the same array with the following function, I get error messages:

function test(){
    $suche="SELECT * FROM tabelle";
    $erg=mysql_query($suche)  or die(ERR_ABFRAGE);
        do {
                $array[] = $all["bla"];
    return $array;

Not Supported File Warning: Unknown(): The session id contains invalid  
characters, valid characters are only az, AZ and 0-9 in Unknown on line 0

Warning: Unknown(): Failed to write session data (files). Please verify  
that the current setting of session.save_path is correct (/tmp/session)  
in Unknown on line 0

When I print those arrays, they look identical. The Output is WML.

Does anyone have a hint for me?
Thanks a lot!


Re: identical arrays created in different ways behave different

degol wrote:

Quoted text here. Click to load it

Hi Degol,

You have a session problem, not an arrayproblem.
Try to debug THAT part and leave the array.
I suggest you start with a simple page without any DB access that only  
stores a var in a session, and try to retrieve from the next page.

Go to and look up session to learn how to use them and possible  
problems concerning sessions.

In this case I expect /tmp/session is NOT writable for PHP-user (often  
apache or nobody or www-data under *nix)

Erwin Moller

Site Timeline