Jump to content

Recommended Posts

I have my php.ini set to use /tmp for my php temp directory etc.

 

I also have the permissions on that directory set to 777.

 

Basically my problem is this:  php/apache can put files in there, such as if I create a session, I check my session cookie and it correspons to the session id file sess_xxxxx which gets created in the /tmp directory, and the information that is inside it is valid -- same with uploads from post forms, they show up there with the appropriate temp name and file.

 

Now here is the wierd part, I cannot access these files.  I get errors about the session file not existing, and it will error like this: "no file or directory, tmp/sess_xxxxxx" but I can see the damned file, and apache/php is creating it successfully IN that directory. Same problem with uploads.

 

 

Say for example, I set a session variable (for captcha ok),

 

$_SESSION['captcha_value'] = randomnumbersetc;

 

I see the session cookie in my browser (phpsessid) and if I check the random hash for that session (the value of the cookie), and go into /tmp/ then I see there is a file that is sess_(the value of that same cookie) which, if opened, shows that variable I set earlier

 

captcha_value|s:16:"randomnumbersetc";

 

But when I later want to check that session variable,

 

$captchaback = $_SESSION['captcha_value'];

 

I get the error message that the file etc/sess_xxxxxxxx doesn't exist, which is obviously total crap, because apache/php created the damn file there in the first place.  Again, the same thing occurs on uploaded files.

 

 

RRR, so if soembody could shed some light on this, it would help my cause greatly and a $5 epassporte donation would be in order :)

 

This is on a BSD box and I have full root.

Running php 5.20 on Apache/1.3.33 (Unix) and O/S is freeBSD 5.4

 

phpinfo session items:

 

Session Support  enabled  
Registered save handlers  files user sqlite  
Registered serializer handlers  php php_binary  

Directive Local Value Master Value 
session.auto_start Off Off 
session.bug_compat_42 On On 
session.bug_compat_warn On On 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_httponly Off Off 
session.cookie_lifetime 0 0 
session.cookie_path / / 
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_divisor 100 100 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.hash_bits_per_character 4 4 
session.hash_function 0 0 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path tmp /tmp 
session.serialize_handler php php 
session.use_cookies On On 
session.use_only_cookies On Off 
session.use_trans_sid 0 1 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.