Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 30th, 2005, 11:23 PM
Registered User
 
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to set php_value thru .htaccess

Please tell me how to change a php_value using a .htaccess configuration file.
Including the procedure for it.
 
Old October 31st, 2005, 03:02 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

Just write e.g., like this, in a single line. This changes value for directory (and sub-directories) in which .htaccess.

php_value register_globals 0

Not all values can be changed; directory level: see PHP manual.

Regards,

`~@#\^%&*/\.<.\/-|+|_!:;..=?>
Support Indian students' finances http://scholarship.mediasworks.com/
 
Old October 31st, 2005, 08:22 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you find that your setting cannot be updated using a .htaccess file, consider using ini_set(), instead: http://uk.php.net/manual/en/function.ini-set.php. Settings overridden using a call to the ini_set() only hold for the execution time of the script that the call is made in, and for that part of the execution time after the call is made (along with any scripts that are included after this point, as well, of course).

You could, if you wanted, switch certain settings on and off in this way, as you made your way down the page: in the absence of anything better, this approach can be used as a rudimentary form of runtime debugging.






Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess mkgupta.mca MySQL 0 August 14th, 2006 03:03 AM
.htaccess problems vertmonkee Beginning PHP 0 March 8th, 2006 07:33 AM
.htaccess question cfemocha BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 October 5th, 2004 10:36 PM
.htaccess file ruhin Beginning PHP 3 June 23rd, 2004 09:31 PM
.htaccess percy PHP How-To 1 July 2nd, 2003 02:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.