Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 2nd, 2003, 10:55 AM
Registered User
 
Join Date: Jul 2003
Location: , , .
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 ?:(
Reply With Quote
  #2 (permalink)  
Old July 2nd, 2003, 02:27 PM
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
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/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:12 AM.


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