error: include_path

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
tparker
Forum Newbie
Posts: 5
Joined: Fri Oct 18, 2002 8:32 pm
Location: San Diego
Contact:

error: include_path

Post by tparker »

I get this error when I add the "include()" to my script.

Warning: Failed opening 'connectphp' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/spasoft/do_authuser_include.php on line 2

Do I need to set this anywhere?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

The error message is reporting the file name as 'connectphp' should this maybe be 'connect.php'? Also make sure that there is a connect.php file in the spasoft directory.

Mac
tparker
Forum Newbie
Posts: 5
Joined: Fri Oct 18, 2002 8:32 pm
Location: San Diego
Contact:

Post by tparker »

I have it in the spasoft directory. Here is the piece of code
<?include(connect.php); ......?>
tparker
Forum Newbie
Posts: 5
Joined: Fri Oct 18, 2002 8:32 pm
Location: San Diego
Contact:

Post by tparker »

OK, I find my mistake. the (.) in connect.php will not parse unless I have it in "". Rooky move. Bare with me gang. :)
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

Post by Dale »

tparker wrote:(.)

Hmm.. that isnt what i think it is, is it? Image
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Yup, you don't need the parenthesis for include() statements but you do need the quotes:

Code: Select all

include 'connect.php';
http://www.php.net/manual/en/function.include.php

Mac
tparker
Forum Newbie
Posts: 5
Joined: Fri Oct 18, 2002 8:32 pm
Location: San Diego
Contact:

Post by tparker »

Awesome guys. Thank you for taking the time to help out a green horn.
This is what I added to my script. I works now.

include("connect.php");

Thanks again,
Tony
User avatar
mikeq
Forum Regular
Posts: 512
Joined: Fri May 03, 2002 3:33 am
Location: Edinburgh, Scotland

Post by mikeq »

Dale wrote:
tparker wrote:(.)

Hmm.. that isnt what i think it is, is it? Image
Stop it!! :lol:
Post Reply