Where I find the PHP.INI file

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Where I find the PHP.INI file

Post 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
jeffery
Forum Contributor
Posts: 105
Joined: Mon Apr 03, 2006 3:13 am
Location: Melbourne, Australia
Contact:

Post 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.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

ya by using phpinfo()
I find the path but I can't edit that php.ini file
jeffery
Forum Contributor
Posts: 105
Joined: Mon Apr 03, 2006 3:13 am
Location: Melbourne, Australia
Contact:

Post 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.
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post by vinoth »

so what can I Do?

Any alternative way to DO?
jeffery
Forum Contributor
Posts: 105
Joined: Mon Apr 03, 2006 3:13 am
Location: Melbourne, Australia
Contact:

Post by jeffery »

you can write your own custom session handler. http://php.net/manual/en/function.sessi ... andler.php
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post 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
vinoth
Forum Contributor
Posts: 113
Joined: Thu Aug 02, 2007 3:08 am
Location: India
Contact:

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Those values and more are explained on the manual's ini pages...

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