473,326 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Failed opening required with file

does any1 here know why i got this error message when i try to run my program in php

Warning: require_once(http://localhost/own work/sql.inc.php) [function.require-once]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\wamp\www\own work\config.inc.php on line 30

Fatal error: require_once() [function.require]: Failed opening required 'http://localhost/own work/sql.inc.php' (include_path='.;C:\php5\pear') in C:\wamp\www\own work\config.inc.php on line 30
Mar 22 '07 #1
3 10265
does any1 here know why i got this error message when i try to run my program in php

Warning: require_once(http://localhost/own work/sql.inc.php) [function.require-once]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in C:\wamp\www\own work\config.inc.php on line 30

Fatal error: require_once() [function.require]: Failed opening required 'http://localhost/own work/sql.inc.php' (include_path='.;C:\php5\pear') in C:\wamp\www\own work\config.inc.php on line 30
here is my codeing in php.. is there something i missing.. when i run my program which i got an error which stated above.
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. if(!defined('CONFIG_INC'))
  4.     define('CONFIG_INC',1);
  5.  
  6. $cfg_dbsource='localhost';
  7. $cfg_dbuser='root';
  8. $cfg_dbpass='';
  9. $cfg_dbName='bhav';
  10. $cfg_dbType='mysql';
  11.  
  12. session_start();
  13. //Set no caching
  14. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
  15. header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  16. header("Cache-Control: no-store, no-cache, must-revalidate");
  17. header("Cache-Control: post-check=0, pre-check=0", false);
  18. header("Pragma: no-cache");
  19.  
  20. // This cheap little trick was found over at php.net
  21. if(PHP_VERSION < "4.1.0")
  22. {
  23.         $_COOKIE = $HTTP_COOKIE_VARS;
  24.         $_GET = $HTTP_GET_VARS;
  25.         $_POST = $HTTP_POST_VARS;
  26.         $_SERVER = $HTTP_SERVER_VARS;
  27.         $_FILES = $HTTP_POST_FILES;
  28. }
  29.  
  30. require_once 'include/sql.inc.php';
  31. ?>
  32.  
Mar 22 '07 #2
code green
1,726 Expert 1GB
It is because the file does not exist in the location specified by require or include
Mar 22 '07 #3
ronverdonk
4,258 Expert 4TB
Read the Posting Guidelines on choosing a meaningful title for your thread. The one you use does not tell very much on your problem and will NOT encourage members to look into your post. I have changed the thread title.

moderator
Mar 23 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: peter Willis | last post by:
Hello, Is there a way to recover from the following error? I have (had) an existing database and wish not to lose the data tables. Thanks for any help, Pete
2
by: Maximus | last post by:
I installed PEAR HTTP_Upload to my new server and now im getting this error when runnign the script. any help?
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
3
by: sadique | last post by:
Hello, Sadique here I've been installing a free source hotel booking system and I encountered an error while trying to go to the second step in the installation process. Fatal error:...
1
by: Sanjeeva K kanakam | last post by:
Hi all, I am developing one application. In that i have created on report file which contains tables, titles and tree view list also by using HTML tags. I am opening this file in my application it...
3
by: big.sexy.jcw | last post by:
Okay, I just set up my first dedicated server and everything is running fine, except one script that calls a file on another server. Failed opening required 'http://www.example.com/...
1
by: Bob | last post by:
Im setting up a fedora core 8 web server. Im currently running everything on another fedora core 6 server (working fine). Ive installed php 5.2.5 and apache 2.0.63 Im getting the following: ...
9
by: mohi | last post by:
hello everyone , i am trying to read a jpeg image through c++ but is unable to do so , presently i tried it with code in c as i use something like ; FILE * fp=fopen("./x.jpg","wb"); int c;...
1
by: kinhoe | last post by:
i have a program in webserver. i run smooth before. but dunno why it sudden prompt out the error below? Warning: require_once() : open_basedir restriction in effect....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.