[ciapug] Zend IDE and PHP Eclipse

Mike Parks parksmike at dwx.com
Sat Mar 25 14:19:55 CST 2006


http://www.eclipse.org/proposals/php-ide/

The PHP IDE Project is a proposed open-source project under the Eclipse 
Tools Project.


----- Original Message ----- 
From: <ciapug-request at cialug.org>
To: <ciapug at cialug.org>
Sent: Friday, March 24, 2006 12:00 PM
Subject: ciapug Digest, Vol 11, Issue 16


> Send ciapug mailing list submissions to
> ciapug at cialug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://cialug.org/mailman/listinfo/ciapug
> or, via email, send a message with subject or body 'help' to
> ciapug-request at cialug.org
>
> You can reach the person managing the list at
> ciapug-owner at cialug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ciapug digest..."
>
>
> Today's Topics:
>
>   1. DB Manager Configuration file best practice?  (Wade Arnold)
>   2. Re: DB Manager Configuration file best practice? (David Champion)
>   3. Re: DB Manager Configuration file best practice? (Chris Van Cleve)
>   4. Re: DB Manager Configuration file best practice? (Tony Bibbs)
>   5. Re: DB Manager Configuration file best practice?
>      (Dave J. Hala Jr.)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 23 Mar 2006 12:30:04 -0600
> From: Wade Arnold <wade at t8design.com>
> Subject: [ciapug] DB Manager Configuration file best practice?
> To: "ciapug at cialug.org" <ciapug at cialug.org>
> Message-ID: <C048454C.D7B9%wade at t8design.com>
> Content-Type: text/plain; charset="US-ASCII"
>
> I am wondering if anyone has a best practice for setting up a 
> configuration
> file for my database connection variables
>
> In the past I have used the code below but now that I am using classes it
> fails to declare the constant. Any ideas or tidbits of wisdom?
>
> Thanks;
> Wade Arnold
>
> <?php
> // this will be in your DBManager.php
> require_once dirname(__FILE__).'./conf/_dbconfig.inc';
>
> echo DB_USER;
> echo DB_PASSWORD;
> echo DB_PASSWORD;
> echo DB_HOST;
> ?>
>
>
> <?php
> // name this file _dbconfig.inc
>
> /**
> * Thide defines CONSTANTS
> */
> define( 'DB_USER', 'wadearno_bvlt1' );      // your MySQL username
> define( 'DB_PASSWORD', 'zorwvMw5OV2L' );  // ...and password
> define( 'DB_PASSWORD', 'wadearno_bvlt1' );   // the name of the database
> define( 'DB_HOST', 'localhost' );     // mySQL Server (typically
> 'localhost')
> ?>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 23 Mar 2006 14:20:15 -0600
> From: David Champion <dchampion at visionary.com>
> Subject: Re: [ciapug] DB Manager Configuration file best practice?
> To: ciapug at cialug.org
> Message-ID: <442302FF.2010505 at visionary.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Is this a scope issue? You could include the _dbconfig.inc in your class
> code, or wherever you're instantiating the db object, and set the
> properties for the object...
>
> BTW - I would recommend that you don't name include files .inc. If you
> don't specifically configure your web server to deny showing this file
> type on every server you're using it on, people will be able to do this:
>
> http://yourserver.com/_dbconfig.inc
>
> .. and see the contents of that file.
>
> -dc
>
> Wade Arnold wrote:
>> I am wondering if anyone has a best practice for setting up a 
>> configuration
>> file for my database connection variables
>>
>> In the past I have used the code below but now that I am using classes it
>> fails to declare the constant. Any ideas or tidbits of wisdom?
>>
>> Thanks;
>> Wade Arnold
>>
>> <?php
>> // this will be in your DBManager.php
>> require_once dirname(__FILE__).'./conf/_dbconfig.inc';
>>
>> echo DB_USER;
>> echo DB_PASSWORD;
>> echo DB_PASSWORD;
>> echo DB_HOST;
>> ?>
>>
>>
>> <?php
>> // name this file _dbconfig.inc
>>
>> /**
>>  * Thide defines CONSTANTS
>>  */
>> define( 'DB_USER', 'wadearno_bvlt1' );      // your MySQL username
>> define( 'DB_PASSWORD', 'zorwvMw5OV2L' );  // ...and password
>> define( 'DB_PASSWORD', 'wadearno_bvlt1' );   // the name of the database
>> define( 'DB_HOST', 'localhost' );     // mySQL Server (typically
>> 'localhost')
>> ?>
>>
>> _______________________________________________
>> ciapug mailing list
>> ciapug at cialug.org
>> http://cialug.org/mailman/listinfo/ciapug
>>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 23 Mar 2006 14:38:18 -0600
> From: Chris Van Cleve <vanish at dreamscapevisionery.com>
> Subject: Re: [ciapug] DB Manager Configuration file best practice?
> To: ciapug at cialug.org
> Message-ID:
> <CBD15374-91C4-43A7-90FA-53CF64B76039 at dreamscapevisionery.com>
> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
> Scope shouldn't be an issue with constants. Is this PHP 5 by chance?
> If memory serves me correctly, I had to uses double quotes when
> defining constants in PHP 5 like so:
>
> define("DB_USER", "wadearno_bvlt1");     // your MySQL username
> define("DB_PASSWORD", "zorwvMw5OV2L");   // ...and password
> define("DB_PASSWORD", "wadearno_bvlt1"); // the name of the database
> define("DB_HOST", "localhost");          // mySQL Server (typically
> 'localhost')
>
> Dave's note about .inc is important. I usually get around it by
> naming my files .inc.php and keeping them out of the web server tree.
>
> Chris VC
>
> On Mar 23, 2006, at 2:20 PM, David Champion wrote:
>
>> Is this a scope issue? You could include the _dbconfig.inc in your
>> class code, or wherever you're instantiating the db object, and set
>> the properties for the object...
>>
>> BTW - I would recommend that you don't name include files .inc. If
>> you don't specifically configure your web server to deny showing
>> this file type on every server you're using it on, people will be
>> able to do this:
>>
>> http://yourserver.com/_dbconfig.inc
>>
>> ... and see the contents of that file.
>>
>> -dc
>>
>> Wade Arnold wrote:
>>> I am wondering if anyone has a best practice for setting up a
>>> configuration
>>> file for my database connection variables
>>> In the past I have used the code below but now that I am using
>>> classes it
>>> fails to declare the constant. Any ideas or tidbits of wisdom?
>>> Thanks;
>>> Wade Arnold
>>> <?php
>>> // this will be in your DBManager.php
>>> require_once dirname(__FILE__).'./conf/_dbconfig.inc';
>>> echo DB_USER;
>>> echo DB_PASSWORD;
>>> echo DB_PASSWORD;
>>> echo DB_HOST;
>>> ?>
>>> <?php
>>> // name this file _dbconfig.inc
>>> /**
>>>  * Thide defines CONSTANTS
>>>  */
>>> define( 'DB_USER', 'wadearno_bvlt1' );      // your MySQL username
>>> define( 'DB_PASSWORD', 'zorwvMw5OV2L' );  // ...and password
>>> define( 'DB_PASSWORD', 'wadearno_bvlt1' );   // the name of the
>>> database
>>> define( 'DB_HOST', 'localhost' );     // mySQL Server (typically
>>> 'localhost')
>>> ?>
>>> _______________________________________________
>>> ciapug mailing list
>>> ciapug at cialug.org
>>> http://cialug.org/mailman/listinfo/ciapug
>>
>>
>> _______________________________________________
>> ciapug mailing list
>> ciapug at cialug.org
>> http://cialug.org/mailman/listinfo/ciapug
>
>
>
> ------------------------------
>
> Message: 4
> Date: Thu, 23 Mar 2006 16:02:43 -0600
> From: Tony Bibbs <tony at tonybibbs.com>
> Subject: Re: [ciapug] DB Manager Configuration file best practice?
> To: ciapug at cialug.org
> Message-ID: <44231B03.1020100 at tonybibbs.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> In Geeklog (and most our projects at work) we do this:
>
> config.php
>
> $conf['db_name'] = '';
> $conf['db_host'] = '';
> $conf['db_user'] = '';
> $conf['db_pass'] = '';
>
> then other config values:
>
> $conf['cookie_name'] = '';
> $conf['cookie_timeout'] = '';
>
> Works fine for me.
>
> --Tony
>
> Wade Arnold wrote:
>> I am wondering if anyone has a best practice for setting up a 
>> configuration
>> file for my database connection variables
>>
>> In the past I have used the code below but now that I am using classes it
>> fails to declare the constant. Any ideas or tidbits of wisdom?
>>
>> Thanks;
>> Wade Arnold
>>
>> <?php
>> // this will be in your DBManager.php
>> require_once dirname(__FILE__).'./conf/_dbconfig.inc';
>>
>> echo DB_USER;
>> echo DB_PASSWORD;
>> echo DB_PASSWORD;
>> echo DB_HOST;
>> ?>
>>
>>
>> <?php
>> // name this file _dbconfig.inc
>>
>> /**
>>  * Thide defines CONSTANTS
>>  */
>> define( 'DB_USER', 'wadearno_bvlt1' );      // your MySQL username
>> define( 'DB_PASSWORD', 'zorwvMw5OV2L' );  // ...and password
>> define( 'DB_PASSWORD', 'wadearno_bvlt1' );   // the name of the database
>> define( 'DB_HOST', 'localhost' );     // mySQL Server (typically
>> 'localhost')
>> ?>
>>
>> _______________________________________________
>> ciapug mailing list
>> ciapug at cialug.org
>> http://cialug.org/mailman/listinfo/ciapug
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 23 Mar 2006 17:28:31 -0600
> From: "Dave J. Hala Jr." <dave at 58ghz.net>
> Subject: Re: [ciapug] DB Manager Configuration file best practice?
> To: PHP List <ciapug at cialug.org>
> Message-ID: <1143156511.18539.100.camel at dsl-69.marshallnet.com>
> Content-Type: text/plain
>
> You could also put these .inc files outside of the document root,
>
>
>
> On Thu, 2006-03-23 at 14:20, David Champion wrote:
>> Is this a scope issue? You could include the _dbconfig.inc in your class
>> code, or wherever you're instantiating the db object, and set the
>> properties for the object...
>>
>> BTW - I would recommend that you don't name include files .inc. If you
>> don't specifically configure your web server to deny showing this file
>> type on every server you're using it on, people will be able to do this:
>>
>> http://yourserver.com/_dbconfig.inc
>>
>> ... and see the contents of that file.
>>
>> -dc
>>
>> Wade Arnold wrote:
>> > I am wondering if anyone has a best practice for setting up a 
>> > configuration
>> > file for my database connection variables
>> >
>> > In the past I have used the code below but now that I am using classes 
>> > it
>> > fails to declare the constant. Any ideas or tidbits of wisdom?
>> >
>> > Thanks;
>> > Wade Arnold
>> >
>> > <?php
>> > // this will be in your DBManager.php
>> > require_once dirname(__FILE__).'./conf/_dbconfig.inc';
>> >
>> > echo DB_USER;
>> > echo DB_PASSWORD;
>> > echo DB_PASSWORD;
>> > echo DB_HOST;
>> > ?>
>> >
>> >
>> > <?php
>> > // name this file _dbconfig.inc
>> >
>> > /**
>> >  * Thide defines CONSTANTS
>> >  */
>> > define( 'DB_USER', 'wadearno_bvlt1' );      // your MySQL username
>> > define( 'DB_PASSWORD', 'zorwvMw5OV2L' );  // ...and password
>> > define( 'DB_PASSWORD', 'wadearno_bvlt1' );   // the name of the 
>> > database
>> > define( 'DB_HOST', 'localhost' );     // mySQL Server (typically
>> > 'localhost')
>> > ?>
>> >
>> > _______________________________________________
>> > ciapug mailing list
>> > ciapug at cialug.org
>> > http://cialug.org/mailman/listinfo/ciapug
>> >
>>
>>
>> _______________________________________________
>> ciapug mailing list
>> ciapug at cialug.org
>> http://cialug.org/mailman/listinfo/ciapug
> -- 
>
> Open Source Information Systems, Inc. (OSIS)
> Dave J. Hala Jr., President <dave at osis.us>
> 641.485.1606
>
>
>
> ------------------------------
>
> _______________________________________________
> ciapug mailing list
> ciapug at cialug.org
> http://cialug.org/mailman/listinfo/ciapug
>
>
> End of ciapug Digest, Vol 11, Issue 16
> ************************************** 



More information about the ciapug mailing list