Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Failed to open stream!??? Fatal Errors...

Status
Not open for further replies.

stevebanks

Programmer
Mar 30, 2004
93
Hi I am a relative newbie to PHP. We are in the process of transferring a site from an offsite location, to inhouse. I have installed MySQL which is working with the DB i have. I have also installed PHP, which, seems to work ok.

When the user goes to login/register on a php page i get the following error...


Code:
Warning: main(d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web[/URL] tf_class.php): failed to open stream: Invalid argument in D:\inetpub\[URL unfurl="true"]wwwroot\instantcv.co.uk\web\instant_fns.php[/URL] on line 10

Fatal error: main(): Failed opening required 'd:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web[/URL] tf_class.php' (include_path='.;c:\php') in D:\inetpub\[URL unfurl="true"]wwwroot\instantcv.co.uk\web\instant_fns.php[/URL] on line 10
The code for instant_fns.php is:
Code:
<?

  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\data_valid_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\db_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\output_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\url_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\user_auth_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\order_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\email_fns.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\rtf_class.php");[/URL]
  require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\cv_fns.php");[/URL]



?>


Does anyone have any suggestions as to why the error is occuring? WOuld it be rtf_class.php? What confuses me even more is that the error refers to d:\inetpub\ tf_class.php rather than \web\rtf_class.php

Any tips will be much appreciated.

Thanks

Steve
 
I'm not sure if this is any help, but what strikes me odd is that in each error message it states: ' tf_class.php' instead of '/rtf_class.php'. It really looks as if the code in instant_fns.php has a '\' instead of '/'. If this is the case then the 'r' is being treated as a special charater, or carriage return.

HTH,
Itshim
 
weird isn't it... the line you refer to is definately as below:
Code:
require_once("d:\inetpub\[URL unfurl="true"]wwwroot\website.co.uk\web\rtf_class.php");[/URL]

This wouldn't cause a problem would it?
 
Try changing all the '\' to '/'. I'm assumming you are running PHP on Windows, right?
 
i'll give it a go... yes i am running on Windows 2003 Server Web Edition
 
That seems to have solved that problem. Thank you.

Now, there seems to be something else going on...
I have a form which is submitting email address password via POST.

On the second page it is supposed to check if the email/password exist in the database.

Code:
 	  if ($email && $passwd)



I have tried just
Code:
echo "The email is $email";

and it won't call the email form variable. It just says "the email is" and that's it... any ideas???

Is there any reason for this? I'm sure this is the only problem left.

Thanks


Steve
 
Much appreciated. It's all working now!

Cheers people!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top