PDA

View Full Version : session_start(); problem ...


HormonX
10-15-2002, 05:21 PM
this might be a very simple solution but ... unfortuantely i don't have the answer :( ... ok here it is ...

am running AbriaSoft ( Merlin Server )
Apache 1.3.19
MySQL 3.23.36
PHP 4.0.4pl1

am working on user authentication .. and it seems to work just fine but i get an error message when starting a session

here it is below...

-----------------------
Warning: open(/tmp\sess_c752d29027aeb01495c3bd116ec7fe0d, O_RDWR) failed: m (2) in c:/program files/abria merlin/apache/htdocs/admin/index.php on line 2
-----------------------
all i have in line 2 is session_start();

and that worked before.

Any sugestions ?

Thanx in advance

HormonX

whackaxe
10-15-2002, 06:00 PM
i had the same problem, i had installed PHP using the .EXE installer but had kept the .ini file from a previous version. what the problem is that there is a setting in the .ini file which says where the session data fiels are kept. mine was "c:\php\sessiondata\" but that folder was erased so irt crashed the next time i tried to use sessions

HormonX
10-15-2002, 06:58 PM
well ... since i posted i have fgured out the problem ... and like you said it was directory in my case it's a tem directory. In the php.ini file it relates to \tmp and since am running it under win2k there was no c:\tmp . as soon as i created the tmp folder everything started working just fine.

Am still having one problem. When the page loads it still says that there is an error on the page.

-----
Line: 12
Char: 1
Error: Object Expected.
Code: 0
http://localhost/admin/
-----

not sure why ... below i include the code ....


<?
session_start();

if ($login && $pass)
{
include ('sconnect.php');
$query = "SELECT * FROM sec_auth WHERE login='$login' and pass='$pass'";
$result = mysql_query( $query, $link );
if (mysql_num_rows($result) >0)
{
$valid_user = $login;
session_register("valid_user");
}
}
?>


would you have any sugestions why i would get this error.

HormonX

Nightfire
10-15-2002, 07:36 PM
That a javascript error report?

HormonX
10-15-2002, 10:48 PM
Nope .. there is no JavaScript on the page at all ... it seems like for some reason it doesn't like the second line and that is session_start();.

Everything works just fine so am not concerned but it's still i would like to know why it is there.

all figure it out sooner or later :) and if you might have any ideas why it is there .. let me know :)

thanx

HormonX

whackaxe
10-16-2002, 12:06 PM
strange, looks very much like ajavscript error. maybe its an error generated by some of your software?

HormonX
10-16-2002, 03:19 PM
well not ... because i tried like 5 differenet computers and i even moved the site to a different server and it still gives me the same error.

This is very strange ...

HormonX


------update------

you guys were partialy right ..

I forgot to remove onLoad() function after removing JavaScript and that was generating that error message.

damn am blind :)