LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 06-30-2005, 03:45 PM   #1
osio
Member
 
Registered: Jun 2005
Posts: 70

Rep: Reputation: 15
recursively copy php.ini to www directories


My web host allows me to modify server parameters like register globals by writing a php.ini with, for instance,

register_globals = off

and only that!

The server takes all my host's php.ini as default except for the directory where that php.ini instructs to switch register globals off.

The problem is that if I want to set that parameter for all my web site I would have to copy my small php.ini to every directory in the www tree .

I can't do that. How can I copy my php.ini to all my directories? Although I can request ssh access to my host, is there a way to achieve this whenever I need it, with, for instance a simple ftp client?
 
Old 06-30-2005, 04:19 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
find /path/to/htdocs -type d -exec cp /path/to/php.ini {} \;


HIH! :)


Thx for the affero, btw :}
 
Old 07-01-2005, 02:45 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Well, the OP is asking for a ftp solution, while Tinkster one requires shell access ...
I guess they can be reconciled by using LUFS ftpfs.
 
Old 07-01-2005, 05:24 AM   #4
osio
Member
 
Registered: Jun 2005
Posts: 70

Original Poster
Rep: Reputation: 15
Tinkster, your tip worked in my local server

jlliagre, I tried to install lufs following your suggestions but I bumped into a series of install problems, probably related to the kernel.

I won't request shell access to my host yet; I may try a php script at http://tips-scripts.com/?tip=php.ini_copy#tip instead
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using chmod to recursively change directories / files [GOD]Anck Linux - Software 6 11-10-2008 07:16 PM
Remove directories recursively with same name cboyd Linux - Newbie 5 01-14-2007 10:48 PM
Can ls recursively list only directories? Vosper Linux - General 3 07-16-2005 04:57 AM
tar, excluding directories recursively towlie Linux - Newbie 3 06-17-2004 01:32 PM
recursively listing directories full paths kubicon Linux - Newbie 2 02-22-2004 04:55 PM


All times are GMT -5. The time now is 05:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration