Jump to content

Recommended Posts

I need help copying my php.ini file to all of the subdirectories on my site.  There are over 300, and I've done it manually, but I don't want to have to do it all over again every time I have to make a change.  I found a script here -->http://tips-scripts.com/?tip=php_ini_copy  but I don't know how to configure it, it just tells me there is no source php.ini.  Thanks in advance for any help.

First ask yourself are the settings that you need in php.ini can be set at runtime?  If so, then I would use an include/require file where you set everything you need using ini_set(). Then include that file in all your scripts. In the future, when you need to change a setting, you only have to change it in one place/file.

 

I assume you need this to override your web hosts php.ini settings and that's how they allow you to do it. Most hosts only need you to put one version of php.ini in your root (member) area. Check with your web host provider if you haven't already.

 

Please note that we don't support third-party scripts in PHP help area...so I've moved this post to here.

 

Good luck.

 

You have to learn PHP. Pick up a PHP book, read tutorials (ours and others) and also use php.net as reference.

 

See:

 

http://us2.php.net/manual/en/function.ini-set.php

 

http://us2.php.net/manual/en/function.include.php

 

This lists all the things that can be changed. Look at the table at the bottom of that page ("Definition of PHP_INI_* constants") to understand what they mean and which settings can be set at runtime using init_set() or have to be modified in the php.ini file:

 

http://us2.php.net/manual/en/ini.php#ini.list

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.