sessions save path in php.ini

N

NoAgendas

Guest
phpsuexec enabled
centos 4 / php 5.1.4

I need to add a session save path a cleint's php.ini (for Joomla).

Where should I place the below in the php.ini file? Seems like I must have it wrong location.

session.save_path = "/tmp/www"

I made a test file that checks the sesion save path and register globals:
http://www.domain.org/mike.php

In the same folder the php.ini is in place to set the session save path to /tmp and turn register globals off:
http://www.domain.org/php.ini

When the mike.php file is run, it does not show the session save path and register globals is on, opposite of the settings in the php.ini file.

Went through the golden rules:
1) Files and folders are 755 or less
2) All files and folders are dtjones:nosmoking
3) Reuploaded files with ASCII and confirmed it in the log
4) No .htaccess in the public_html folder and created the php.ini file above.
5) Using a .php not a .html file

x-httpd-php is set for php in the control panel

I need to set the session save path. Thank you for your help
 

greetingsc

Well-Known Member
May 18, 2004
45
0
156
Unlike what you have read in the forums from the past about using php.ini files to change settings; a change was made in php / phpsuexec that no longer allows you to use php.ini files in user directories. They simply are ignored (or rather not looked for). I believe your only option is to put the directive directly in the script (using ini_set function) or to set them globablly for the server.
 

useradmin

Well-Known Member
Oct 8, 2004
107
0
166
INDIA
Session Save Path

if we set this path globally will server get any problem or security risk?
 

ianmarie

Well-Known Member
Mar 27, 2006
56
0
156
Unlike what you have read in the forums from the past about using php.ini files to change settings; a change was made in php / phpsuexec that no longer allows you to use php.ini files in user directories. They simply are ignored (or rather not looked for). I believe your only option is to put the directive directly in the script (using ini_set function) or to set them globablly for the server.
Is this documented anywhere; I am finding that none of the settings that I place in .htaccess (server misconfig 500); or php.ini in a user directory; nor in httpd.conf have any affect.
Changes made in php.ini (server wide) do have an affect; there must be some way of generating php config options for the individual user?
 

greetingsc

Well-Known Member
May 18, 2004
45
0
156
ianmarie,

As far as I know, not with PHP 5.2.x or greater and phpsuexec enabled. If your building a php app you can use ini_set() to set the variables inside your app, but otherwise I'm not sure your left with any options.

Michael