Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Can someone please point me to a valid example of how to use the Config pkg?
Hi-

I would like to leverage the capabilities of the
Config package to edit some config.inc.php file
programmatically. I would like to use the Config
package rather than PHPs parse_ini_file because I want
to be able  to insert, update, and delete
configuration data. This is a standard type of PHP
config file that is very widely used. Format is
straightforward ike this:

// comment comment
$var1 = "blah";
$var2 = "blahblah";
$var3 = "blahblahblah";

All of us have seen this type of file before.

But I have hit a roadblock because the documentation
on the PEAR site for the Config package is very
unclear. Many of the examples seem not to be up to
date and are inconsistent with one another. The
tutorial on devshed that is suggested as a good
starting point seems to be several years old and the
examples there no longer match what is on the PEAR
site (in terms of objects, methods, etc.)

I have tried to implement just a rudimentary example
using parseConfig, and I am getting the following
error:

"File 'config.inc.php' does not contain a required
'conf' array"

Yet nowhere (that I could see) is it explained what a
"conf array" is. In fact, there is no explanation for
what types of parameters are even acceptable to pass
to parseConfig. You can see what I mean here
(http://pear.php.net/manual/en/packa...fig.php
)

Is there a practical example anywhere or an up-to-date
tutorial that someone could point me toward?

Any assistance appreciated. Thanks.

-Kush

P.S.- I searched through the mail archives and found
quite a few people asking this same question, but I
didn't see any definitive explanation, although one
person (I think on the PEAR dev team) suggested
hacking out a solution in PHP instead of using the
Config package, so I would really appreciate it if
someone could let me know if the Config package is
simply buggy  and should be avoided so I do not keep
beating my head against a wall here :)

Report this thread to moderator Post Follow-up to this message
Old Post
Kushmit Indurain
08-25-04 04:04 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:53 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.