Page 1 of 1

Where I find the PHP.INI file

Posted: Fri Oct 12, 2007 4:31 am
by vinoth
While working with sessions I want to increase the session lifetime on server.
But I cannot got the configuration file.

Is anybody know where I can go and find the file on server.

Thanks in advance

Posted: Fri Oct 12, 2007 4:57 am
by jeffery
make a script, call it info.php with the following contents:

Code: Select all

<?php phpinfo();?>
Load that page in your browser through the webserver. you should see your PHP configuration as the output. Look for the location of php.ini in that page output.

Posted: Fri Oct 12, 2007 5:07 am
by vinoth
ya by using phpinfo()
I find the path but I can't edit that php.ini file

Posted: Fri Oct 12, 2007 5:21 am
by jeffery
vinoth wrote:ya by using phpinfo()
I find the path but I can't edit that php.ini file
are you on a shared hosting server ? If, then I am afraid you will not be able to edit it.

Posted: Fri Oct 12, 2007 5:39 am
by vinoth
so what can I Do?

Any alternative way to DO?

Posted: Fri Oct 12, 2007 5:54 am
by jeffery
you can write your own custom session handler. http://php.net/manual/en/function.sessi ... andler.php

Posted: Fri Oct 12, 2007 9:34 am
by Zoxive
vinoth wrote:so what can I Do?

Any alternative way to DO?
.htaccess

Code: Select all

php_value name value
ex.

Code: Select all

php_value register_globals 0
php_value magic_quotes_gpc 0

Posted: Sat Oct 13, 2007 1:06 am
by vinoth

Code: Select all

php_value register_globals 0
php_value magic_quotes_gpc 0
Please explain what it exactly Do and how to solve my problem?

It extends the session timeout?

Posted: Sat Oct 13, 2007 1:17 am
by feyd
Those values and more are explained on the manual's ini pages...

http://php.net/ini.core for starters.