Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 06-30-2005, 02:45 PM   #1
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, 03:19 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

HIH! :)

Thx for the affero, btw :}
Old 07-01-2005, 01:45 AM   #3
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,703

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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, 04:24 AM   #4
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 instead


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 06:16 PM
Remove directories recursively with same name cboyd Linux - Newbie 5 01-14-2007 09:48 PM
Can ls recursively list only directories? Vosper Linux - General 3 07-16-2005 03:57 AM
tar, excluding directories recursively towlie Linux - Newbie 3 06-17-2004 12:32 PM
recursively listing directories full paths kubicon Linux - Newbie 2 02-22-2004 03:55 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:49 AM.

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