Jump to content

Setup your php_include_path


Recommended Posts

Hi

 

New to php so need some direction on how to  set the php_include_path. Im trying to setup the following, from a tutorial. Also I am using WAMP.

 

These scripts use a require statement that calls "Cart.php"  In order for

this to work properly, you need to set PHP's include path so that it will

look in the Cart root directory.  If your web server allows .htaccess

files to override Apache config file settings, then place a file called

.htaccess in you Cart root directory with the following line:

php3_include_path /path/to/Cart

 

If you cannot override Apache config file settings through .htaccess, then

you can place the above line in your web server's

directive in the Apache config files.

 

For PHP4, this may be changed to "php4_include_path" or "php_include_path"

- I'm not sure as PHP4 is still in beta at the time of this writing.

 

If you use a web server other than Apache, you will need to check your web

server's documentation for details.

 

If you can't do either of those, create a PHP script which contains the

following line:

<? phpinfo(); ?>

When you view that script in a web browser, you will see a directive

called "include_path" in the Configuration table.  Place the Cart.php file

in one of the directories listed.

 

If you can't make anything work, change the require(...) statement in the

files of the admin directory to read:

require("../Cart.php");

 

 

 

 

Link to comment
Share on other sites

It seems you're using awfully old tutorial... We're having PHP5.3 around the corner...

 

Click on the WAMP icon in tray, select PHP > php.ini

In the file that opens, search for "include_path"

Set it as needed.

Link to comment
Share on other sites

would this be under the following?

 

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;

;;;;;;;;;;;;;;;;;;;;;;;;;

 

; UNIX: "/path1:/path2"

;include_path = ".:/php/includes"

;

; Windows: "\path1;\path2"

;include_path = ".;c:\wamp\www\cart"    <----- changed, this correct???

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.