My question to all of you is there a certain folder within the structure in which I can place this php.ini folder so as to provide it to the entire site without having to place it within every folder of the site.
Also on another note I noticed that I could add course categories but I can not remove/delete an empty category. I am wondering if perhaps it has to do with my hosting company php.ini. If so then where would I place my php.ini so as to correct this problem as well.
Thank you all for your prompt response to this issue.
Jesus
In some cases you can place a php.ini file in your main /moodle directory and it will cascade down to other directories (I believe). My host (Hostgator) allows you to make over-rides with a php.ini file, but it must reside in the same directory as the script being ran.
I modified a script to scan each Moodle directory and creates a symbolic link to a single php.ini file. I manually run whenever I upgrade/add a directory. I put mine in /moodle/local, so you may need to change paths if you're running it from somewhere else.
<?php require_once(dirname(__FILE__) . '/../config.php'); function getDirectory($path = '.') { $ignore = array('cgi-bin','.','..','chat'); $dh = @opendir($path); while(false !== ($file = readdir( $dh ))) { if(!in_array($file,$ignore)) { if(is_dir("$path/$file")) { getDirectory("$path/$file"); } } } if (glob("$path/*.php")||glob("$path/*.css")||glob("$path/*.js")) { exec('ln -s /path/to/php.ini '.$path.'/php.ini'); } closedir($dh); } getDirectory($CFG->dirroot); echo "Done!"; ?>
Make sure to set /path/to/php.ini to your desired "source" file. You may also want to change the glob line — ours is set up to create a symlink in directories that contain CSS and JS files as well, since we run them through PHP for compression reasons. And last, but not least, you can "ignore" certain directory names with the $ignore array. We had some trouble with Moodle's chat when using GZIP, so we just turned off the ini linking for that entire directory.