Forum Home
Press F1
 
Thread ID: 27574 2002-11-26 00:13:00 Attn: php Wizards, I need 1's of your time.... nz_liam (845) Press F1
Post ID Timestamp Content User
101441 2002-11-26 00:13:00 Can somone please tell me where I have gone wrong here:

<?php
require("www.farr.net.nz);
echo "Type: $C_DB_TYPE";
echo "Host: $C_DB_HOST";
echo "DB Name: $C_DB_NAME";
echo "DB User: $C_DB_USER";
echo "DB Pass: $C_DB_PASS";
echo "MSG Table: $C_MSG_TBL";
echo "USR Table: $C_USR_TBL";
echo "REG Table: $C_REG_TBL";
echo "Ban Table: $C_BAN_TBL";
?>

When I load the file (www.farr.net.nz) I get:
Fatal error: Failed opening required 'www.farr.net.nz (include_path='.:/usr/local/lib/php') in /home/farr/public_html/config_grab.php3 on line 2

Im sure its something VERY simple that im doing wrong :8}


Cheers

Liam
nz_liam (845)
101442 2002-11-26 00:30:00 From what I gather, the path you gave on line 2 is wrong :) Does the file actually exist there? segfault (655)
101443 2002-11-26 00:41:00 Is the path in;
require("www.farr.net.nz);
Correct? You bet ya its correct, it points to 'config.lib.php3' which is a config file that defines the variables I want to read... and hopefully echo the the screen.

Oh, and before you ask, the 'config.lib.php3' file is set to 644, so it is World-Redable.

Any other Ideas?


Cheers

Liam
nz_liam (845)
101444 2002-11-26 00:48:00 > require("www.farr.net.nz config.lib.php3");

Did you cut and past this? If so do you realsie that there is a space between ....config/ config.lib.php3
crozier (2004)
101445 2002-11-26 00:51:00 Fixed that problem......... and hit another.

The code now stands as this
<?php
include_path='.:/usr/local/lib/php'
require("www.farr.net.nz);
echo "Type: $C_DB_TYPE, ";
echo "Host: $C_DB_HOST, ";
echo "DB Name: $C_DB_NAME, ";
echo "DB User: $C_DB_USER, ";
echo "DB Pass: $C_DB_PASS, ";
echo "MSG Table: $C_MSG_TBL, ";
echo "USR Table: $C_USR_TBL, ";
echo "REG Table: $C_REG_TBL, ";
echo "Ban Table: $C_BAN_TBL.";
?>

And now I get the following error:

Parse error: parse error in /home/farr/public_html/config_grab.php3 on line 2

Any Ideas?


Cheers

Liam
nz_liam (845)
101446 2002-11-26 00:54:00 > > require("www.farr.net.nz
> config.lib.php3");
>
> Did you cut and past this? If so do you realsie that
> there is a space between ....config/ config.lib.php3


That was just a copy/paste error......


Cheers

Liam
nz_liam (845)
101447 2002-11-26 00:56:00 > require("http:/ /www.farr.net.nz/chat/chat/config/config.lib.php3");

Space here: http:/ / between the //

What fixed the other problem?
crozier (2004)
101448 2002-11-26 01:00:00 > > require("http:/
> /www.farr.net.nz/chat/chat/config/config.lib.php3");
>
> Space here: http:/ / between the //
>
> What fixed the other problem?


That space it not in MY code, it's a bug with this forrum, it keeps inserting spaces.......... X(


Cheers

Liam
nz_liam (845)
101449 2002-11-26 01:19:00 Er doesn't include_path want to be set in your php.ini configuration file ?
By default the include path is the current directory.

www.php.net
gibler (49)
101450 2002-11-26 03:24:00 first of all, u didnt need to have that include line in there, so what happens if u use this again?...

<?php
require("www.farr.net.nz);
echo "Type: $C_DB_TYPE\n";
echo "Host: $C_DB_HOST\n"
echo "DB Name: $C_DB_NAME\n";
echo "DB User: $C_DB_USER\n";
echo "DB Pass: $C_DB_PASS\n";
echo "MSG Table: $C_MSG_TBL\n";
echo "USR Table: $C_USR_TBL\n";
echo "REG Table: $C_REG_TBL\n";
echo "Ban Table: $C_BAN_TBL";
?>

grtz sal.
tga

*theres a space in the url string, but i didnt put it there, i think its a forum bug
sal (67)
1