Defining a PHP INI variable for entire directory

Reply

Join Date: Oct 2004
Posts: 13
Reputation: BoogaBooga is an unknown quantity at this point 
Solved Threads: 0
BoogaBooga BoogaBooga is offline Offline
Newbie Poster

Defining a PHP INI variable for entire directory

 
0
  #1
Mar 30th, 2005
Hi!

I have a PHP application with alot of files, and I really needed an easy way out of this.

Most of the files call the session_start(); function. However, my /tmp space is too small, and so it keeps returning me errors.

I found out a work-around, by adding ini_set('session.save_handler','files'); before session_start();.

I really don't want to modify everything manually, so I needed some way of defining the session.save_handler variable for an entire directory.

Is it possible?


Thanks.
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Defining a PHP INI variable for entire directory

 
0
  #2
Apr 10th, 2005
Create an .htaccess file in the directory you want to affect (and all subdirectories in it.)

The contents of .htaccess will be:

  1. php_value session.save_handler files

Done.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 13
Reputation: BoogaBooga is an unknown quantity at this point 
Solved Threads: 0
BoogaBooga BoogaBooga is offline Offline
Newbie Poster

Re: Defining a PHP INI variable for entire directory

 
0
  #3
Apr 10th, 2005
Thanks, will try

Knew it had something to do with htaccess
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum


Views: 2577 | Replies: 2
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC