Wrox Programmer Forums
|
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 July 2nd, 2003, 10:55 AM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default .htaccess

In PHP MySQL Website Programming (can't find this listed under Wrox any more) page 28 gives an include_path value to enter into an .htaccess file to alter the path list for php so that it searches a library on the site.
I have amended the string to include my (virtual) site, as best as I can tell, but the although the ISP allows .htaccess (and gives, forexample, instructions on how to use it to interpret php files using php3 rahter than php4), they cannot tell me the proper syntax for the directive.
Can anyone point me to some documentation please ?:(
 
Old July 2nd, 2003, 02:27 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by percy
...although the ISP allows .htaccess (and gives, forexample, instructions on how to use it to interpret php files using php3 rahter than php4), they cannot tell me the proper syntax for the directive.
Can anyone point me to some documentation please ?:(
You're crossing boundaries there... you need to add PHP configuration directives to an .htaccess file, which is an apache configuration file. For this to work, PHP _must_ be installed as an apache module, and the main apache .conf file (httpd.conf) must allow .htaccess files to override the existing PHP configuration, whether that configuration exists elsewhere in httpd.conf or in php.ini (AllowOverride Options).

That said, all you need is to add your PHP configuration items in your htaccess file just as you would in httpd.conf.

Look at the Configuration section of the PHP manual online:

  http://www.php.net/configuration.changes

Configuration values are specified as "phpvalue". Configuration flags (on/off) are specified as "phpflag".

So the configuration value you want to change is "inlcude_path", right?

Code:
phpvalue include_path my/include/path

Couldn't be easier, no?


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO with htaccess - images do not appear otonat007 Beginning PHP 1 January 27th, 2008 08:40 PM
.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





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