944,133 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2862
  • PHP RSS
Mar 30th, 2005
0

Defining a PHP INI variable for entire directory

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
BoogaBooga is offline Offline
13 posts
since Oct 2004
Apr 10th, 2005
0

Re: Defining a PHP INI variable for entire directory

Create an .htaccess file in the directory you want to affect (and all subdirectories in it.)

The contents of .htaccess will be:

PHP Syntax (Toggle Plain Text)
  1. php_value session.save_handler files

Done.
Team Colleague
Reputation Points: 53
Solved Threads: 5
PHP/vBulletin Guru
Gary King is offline Offline
360 posts
since Nov 2003
Apr 10th, 2005
0

Re: Defining a PHP INI variable for entire directory

Thanks, will try

Knew it had something to do with htaccess
Reputation Points: 10
Solved Threads: 0
Newbie Poster
BoogaBooga is offline Offline
13 posts
since Oct 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: creating Contact form to email and txt file
Next Thread in PHP Forum Timeline: vBulletin Email notifications not working





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC