PDA

View Full Version : Copying php.ini


forman
02-17-2008, 10:41 PM
I followed the directions in the article describing how to automatically copy your php.ini across your system:

http://helpdesk.bluehost.com/kb/index.php?mod_id=2&id=260&kb_rating=yes

However, when I executed the script, it only ran on about 30 folders, once in the subdirectory cig-bin/ and otherwise all in one other subdirectory of public_html, while ignoring all other subfolders of public_html. Does anyone have any idea why this might have happened?

adz
02-18-2008, 04:30 AM
Im not too sure how to fix your problem, but, you don't actually have to have a copy of PHP.INI in every folder, you can have it in your public_html folder and any changes will be carried through the entire site.

You only need it in subfolders if that folder needs different settings to the rest.

Early Out
02-18-2008, 07:04 AM
Im not too sure how to fix your problem, but, you don't actually have to have a copy of PHP.INI in every folder, you can have it in your public_html folder and any changes will be carried through the entire site.

You only need it in subfolders if that folder needs different settings to the rest.I don't think that's correct. That's why the knowledge base has instructions for creating a routine for copying it to all the subdirectories. Another knowledge base article says, "You will need to copy this file into all subdirectories within your site which have php files that you would like to affect."

Apparently, there is a master php.ini on the server. It affects all directories that don't have a php.ini of their own. It carries through your entire site. But the one in your own public_html does not carry through - you have to copy it.

Then again, I may be completely off-base. :)

arnb
02-18-2008, 07:20 AM
When using FastCgi it only needs to be in the public_html directory, otherwise it needs to be in all directories running php scripts.

Early Out
02-18-2008, 07:54 AM
Ah, yes, now I remember. I knew there was a twist to it. Thanks.