You are here: Re: identical arrays created in different ways behave different « PHP Programming Language « IT news, forums, messages
Re: identical arrays created in different ways behave different

Posted by Erwin Moller on 08/30/06 14:51

degol wrote:

> If I define an array "by hand" in the following manner, everything works
> fine in my script:
> $selb = array (
> "/var/www/tmp/image.jpg","/var/www/tmp/image2.jpg");
>
> 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);
> $all=mysql_fetch_array($erg);
> do {
> $array[] = $all["bla"];
>
> }while($all=mysql_fetch_array($erg));
>
> mysql_free_result($erg);
> 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
> und
>
> 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!
>
> Degol


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 www.php.net 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)

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация