Page 1 of 1

php/mysql login page.

Posted: Sun Mar 26, 2006 11:53 pm
by vickriz
good day to all.
i found a php/mysql code at hotscript ["SF-User V1.0"] and try using it. I have followed the direction how to configure it for my needs on database connection. but then i have encountered an error at first launch on my local server. this is the error:
Warning: open(/tmp\sess_7257e7515a0a4e88a9b268a169e074d0, O_RDWR) failed: No such file or directory (2) in c:\phpdev5\www\login\functions.php on line 2
Hello Guest!
Main | Login | Log Out | Register | Members

Powered by SF-Users V1.0
Warning: open(/tmp\sess_7257e7515a0a4e88a9b268a169e074d0, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
What doest this mean? please help, any suggestion or advice will appreciate it very much..

PS: i know there's no problem with the code it self but i post it anyway to make more easy.

Code: Select all

<?php
session_start(); //

##################################
# EDIT BELOW BUT ONLY BETWEEN '' #

$DBHost = 'localhost'; //Your host, usually localhost
$DBUser = 'admin'; //Your database username
$DBPass = 'administrator'; //Your database password
$DBName = 'members'; //The database name you want/have the user system on

# EDIT ABOVE BUT ONLY BETWEEN '' #
##################################

mysql_connect("$DBHost", "$DBUser", "$DBPass")or die(mysql_error()); 
mysql_select_db("$DBName")or die(mysql_error()); 
?>

Posted: Mon Mar 27, 2006 12:01 am
by feyd
You haven't set the path for sessions to a valid temporary directory.

Open your php.ini and set it. Remember to restart your web server software.

Posted: Mon Mar 27, 2006 1:10 am
by vickriz
feyd wrote:You haven't set the path for sessions to a valid temporary directory.

Open your php.ini and set it. Remember to restart your web server software.
what text im going to add inside my php.ini for sessions of temporary directory?

Posted: Mon Mar 27, 2006 1:30 am
by feyd
the session.save_path directive, it's in the file already, just set to /tmp

Posted: Mon Mar 27, 2006 1:45 am
by vickriz
hi again thanks for rapid response.

the argument for my sessions in php.ini was there..
[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1


; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php
how can i set this session /tmp in windows? can i assign other folder like "C:\phpdev\tmp"?

i have running phpdev5 as my apache web server.

Posted: Mon Mar 27, 2006 1:51 am
by feyd
vickriz wrote:can i assign other folder like "C:\phpdev\tmp"?
yes, I answered that in my first post.