| | |
Defining a PHP INI variable for entire directory
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2004
Posts: 13
Reputation:
Solved Threads: 0
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.
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.
Create an .htaccess file in the directory you want to affect (and all subdirectories in it.)
The contents of .htaccess will be:
Done.
The contents of .htaccess will be:
PHP Syntax (Toggle Plain Text)
php_value session.save_handler files
Done.
![]() |
Similar Threads
- php.ini file not being read (PHP)
- Apache on linux OS, running PHP scripts (Linux Servers and Apache)
Other Threads in the PHP Forum
- Previous Thread: creating Contact form to email and txt file
- Next Thread: vBulletin Email notifications not working
Views: 2577 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax alexa apache api array beginner beneath binary broadband broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion redirect regex remote script search select server sessions sms smtp soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube






