php.ini after install D7

Hi, I am in a share host and every Dolphin instalation it requires me to put php.in into all main folders.
It has its own instaler, so I would like to know if is there a simple way to put php.ini into all required folders/subfolders right after instalation (not before).

Quote · 16 Sep 2011
Any one knows?
Quote · 17 Sep 2011

You should be able to get away with adding one php.ini to the root directory of the installation. Have you tried that?

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 17 Sep 2011
Not tried that yet. I did 4 instalations due bad mods, and for each new instalation I had to place php.ini into many folders. I will try what you said. Huge Thank you Nathan
Quote · 17 Sep 2011
 I tried that and somehow it requires me put place php.ini file in all folder. Even with one in the root. Sharing host things lol.
Quote · 24 Sep 2011

in case somebody need this:

( automatic translation from http://faq.1and1.fr/scripts/php/phpini/4.html )

Manually copy the file php.ini may be be a very long depending on your application (Joomla for example). 

A simple PHP script can perform the copy operation for you, and thus place the php.ini in all directories and subdirectories of the application. 

Here is a sample PHP script: 

File 1: phpini.php
  <? Php 
 / / Set this value to Y if you only want to overwrite old php.ini files 
 / / Set this value to N if you want to put a php.ini file in Every directory 
 OverwriteOnly $ = "N"; 

 if ($ overwriteOnly == "Y") echo "Operating in Overwrite Only Mode <br>"; 
 $ Path = "/ homepages / xx / dxxxxxxxxx / htdocs"; 
 $ Source = $ path.  "/ Php.ini";
 if (file_exists ($ source)) die ('Error - no source php.ini file'); 
 function search ($ dir) { 
   global $ source; 
   global $ overwriteOnly; 
   $ Dh = opendir ($ dir); 
   while (($ filename = readdir ($ dh))! == false) { 
     if ($ filename! == '.' AND $ filename! == '..' AND $ filename! == 'cgi-bin' AND is_dir ("$ dir / $ filename")) { 
       $ Path = $ dir. "/". $ Filename;  
       $ Target = $ path.  "/ Php.ini"; 
       if (file_exists ($ target) AND $ overwriteOnly == "Y") { 
         echo "$ path <b> skipped - no php.ini file </ b> topics:"; 
       Else {} 
         echo "$ target <br>"; 
         if (copy ($ source, $ target)) echo "<b> Write failed for $ target </ b> topics:"; 
         if (file_exists ($ target)) chmod ($ target, 0600); 
     } 
       search ($ path); 
     } 
   } 
   closedir ($ dh); 
 } 
 search ($ path); 
 echo "Done."; 
 ?> 



To use the above script, you must know the path to your webspace (the path). 

* Via the Customer Area 
In your Customer Area, click Configure Domains => Select the checkbox to the left of the field =>Click Info 
Then you find home directory with a value similar to /homepages/xx/dxxxxxxxxx/htdocs/.
* SSH 
If your pack has SSH access, you can login after entering the command
  pwd 
who will provide you the home directory of your webspace.


Now in possession of this information, you can adapt the script to your accommodation. 
Note the latter in the above script in place of votre_repertoire_d_accueil which lies next to the variable $path = 
The line of the file must thus be provided 

  $ Path = "/ homepages / xx / dxxxxxxxxx / htdocs"; 



Now save the code in a file phpini.php (for example) and place it at the root of your webspace with the file php.ini containing the new variables / values. 

Call the file with your browser, copying will be done automatically.

Quote · 30 Mar 2012

very interesting and nice.  Thank you.

Quote · 31 Mar 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.