Jump to content

include_path in php4 with apache, mysql and MDK9.1


phanly
 Share

Recommended Posts

:help:

 

I have php4 running with apache and mysql on mdk 9.1

 

Simple php pages work (eg telling the date from the server in a web page)

 

Simple php pages interacting with a simple mysql database work eg a simple login form.

 

However, once I use include(myfile.php) in a script I get errors relating to myfile not being found in an include_path which refers to pear eg /usr/share/pear or something like that.

 

I have looked at php.ini (based on the two supplied php.ini versions) but cant find how to set the include path so it loads files in my web directory where I try to include() them:

/var/www/html/membersite/

 

(http://localhost/membersite/)

 

Is there a way to set the include_path globally and should I, and can you add multiple include paths to search?

 

Do I need to specify a particular include_path in the script before I use the include()?

 

Any help would be appreciated.

 

cheers

Paul

Link to comment
Share on other sites

I have never had to set an include path manually in php.ini. I think as long as you use a relative path to the included file, it should find the file without any problems.

 

<?php include("../foo.php"); ?>

 

Can you post the code in question?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

×
×
  • Create New...