470,815 Members | 1,158 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

php.ini problem

i am using win2k and my php.ini is located in winnt folder but i don't
want php.ini file at that place due to security reasons.
please tell me how do i change the php.ini path.

Oct 20 '05 #1
2 1186
ni****@gmail.com wrote:
i am using win2k and my php.ini is located in winnt folder but i don't
want php.ini file at that place due to security reasons.
please tell me how do i change the php.ini path.


Hi,

Just move it to your php directory.

read the following comment from php.net

from http://nl2.php.net/windows
******************************************
donald at netriver dot net
04-May-2005 10:21
On the Windows 2003 & IIS6 platform, you can run different websites on
different versions & copies of PHP. This is useful in at least two cases:

1. You want one website on your box to have register_globals on, but since
you're running IIS, you cannot specify that in an .htaccess file. And you
definately don't want register_globals on for the rest of the websites.
2. You want to run different versions of PHP for different websites, or
even just different extensions. Say you wanted one site to use 4.0.5 and a
different site to use 4.1.11.

Its simple, just:
1. Move your php.ini file from your c:\windows\ directory directly to your
php directory (by default that would be c:\php\)
2. Make sure you don't have a php.ini file in any other location that
would supercede the c:\php\php.ini file. Using phpinfo(); is useful here.
3. Have your alternate version of php (either a different version or a
different php.ini) have its own install directory, like c:\php4RG\ or
c:\php405\.
4. In the Home Directory Configuration for your website, specify the .php
extension to use a different script, pointing it at the alternate
directory.

******************************************

Regards,
Erwin Moller

Oct 20 '05 #2
> please tell me how do i change the php.ini path.
You can keep your php.ini file outside of winnt folder, provided that
file doesn't stay anywhere in the system. Then put it in it's default
php folder. Just have a look into some packages like
phpdev/xampp/easyphp/phptriad and others. You can even run
php/apache/mysql from flash drives!
--
Raqueeb Hassan
Bangladesh

Oct 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Kostatus | last post: by
117 posts views Thread by Peter Olcott | last post: by
18 posts views Thread by Ian Stanley | last post: by
28 posts views Thread by Jon Davis | last post: by
6 posts views Thread by Ammar | last post: by
2 posts views Thread by Mike Collins | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.