...

View Full Version : using includes w/ godaddy host



nervegas87
07-01-2007, 10:00 AM
Does anybody know how to make the include() function work on a godaddy.com host. I tried using the .htaccess method that is on the web but that doesn't help. I get the following:

Warning: main(1): failed to open stream: No such file or directory in /home/content/e/r/i/ericjacobson01/html/index.php on line 4

Warning: main(1): failed to open stream: No such file or directory in /home/content/e/r/i/ericjacobson01/html/index.php on line 4

Fatal error: main(): Failed opening required '1' (include_path='.:/usr/local/lib/php') in /home/content/e/r/i/ericjacobson01/html/index.php on line 4

Line four is where my include is located.
I placed the
or die(mysql_error());
and this is what i got. The hosting is being run on Linux. Can anyone help?:confused:

kbluhm
07-01-2007, 10:16 AM
It looks like the file doesn't exist:


Warning: main(1): failed to open stream: No such file or directory in /home/content/e/r/i/ericjacobson01/html/index.php on line 4

CFMaBiSmAd
07-01-2007, 02:16 PM
You would need to post your code to get any specific help with it.

You either have the wrong path or a file name that does not exist. Because of this part of one of the errors - Failed opening required '1' your syntax in the require/include statement is probably wrong, but you would need to post your code for anyone here to help you with it.

nervegas87
07-02-2007, 01:23 AM
Here are my opening lines:



<?php

require("connect.php") or die(mysql_error());
require_once("table.php") or die(mysql_error());

?>

rafiki
07-02-2007, 01:43 AM
why do you have or die(mysql_error()) on a require and require_once statement?

firepages
07-02-2007, 02:42 AM
use the full path...


<?
require('/home/content/e/r/i/ericjacobson01/html/connect.php');
require('/home/content/e/r/i/ericjacobson01/html/table.php');
?>


also note that require() will die with a fatal error if the file can not be found.

kbluhm
07-02-2007, 03:32 AM
why do you have or die(mysql_error()) on a require and require_once statement?

I am interested in hearing the answer to this question as well.

nervegas87
07-02-2007, 08:08 PM
i've tried firepages' solution, but it's still not working.
mysql_error...i got used to that since i am working w/ a lot of mysql recently, sorry if it gave you guys any doubts
The or dies were just me trying to get a more descriptive error anyways, but i see that it is no good.

I still believe that this is a godaddy.com error though, i was hoping that maybe i could create another path with the ini_set() function, but after experimenting a little bit w/ it i don't get any results...
I am truly stuck



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum