Computing.Net > Forums > Linux > INI Entries

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

INI Entries

Reply to Message Icon

Name: poiuz123
Date: February 22, 2004 at 03:19:48 Pacific
OS: Linux Suse 8.2
CPU/Ram: 225 Mhz
Comment:

Hi All,

how do i change an entry in INI files ?

something like this:

#!/bin/sh

changeinietnry /etc/php.ini register_globals=On

Thank you all!
Alex.



Sponsored Link
Ads by Google

Response Number 1
Name: 3Dave
Date: February 23, 2004 at 08:59:04 Pacific
Reply:

Not quite sure what you are trying to do... Sounds like all you need to do is to edit a text file (/etc/php.ini) which you can do with any text editor, you shouldn't need a script for that.


0

Response Number 2
Name: poiuz123
Date: February 25, 2004 at 01:30:59 Pacific
Reply:

Well - i'm trying to write a kind of setup
program - like a small shell script
for my web application - so i can run it
on a new linux machine - and i have working
server - you know ...


0

Response Number 3
Name: 3Dave
Date: February 25, 2004 at 03:24:03 Pacific
Reply:

OK...I think I follow you now. If you know exactly what you want to change, try the sed command (Stream EDitor). The syntax is:
$ sed 's/find/replace/g' file.txt
This outputs to stdout, if you wwant to output to a file:
$ sed 's/find/replace/g' infile.txt > outfile.txt

Your script might be something like:
#!/bin/bash

sed 's/register_globals=Off/register_globals=On/g'
/etc/php.ini > /tmp/php.ini.new

mv /tmp/php.ini.new /etc/php.ini

I'm not much of a bash scripter (usually use perl myself), there may be a better way....


0

Response Number 4
Name: poiuz123
Date: February 25, 2004 at 13:08:44 Pacific
Reply:

Thank you!

i'll try it out ...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: INI Entries

dual booting Linux and Win XP www.computing.net/answers/linux/dual-booting-linux-and-win-xp/23692.html

Dual Bootin win98/Linux 7.1 www.computing.net/answers/linux/dual-bootin-win98linux-71/5762.html

Dual Boot Help PLEASE!!!! www.computing.net/answers/linux/dual-boot-help-please/5564.html