it is possible you are doing multiple requires for the same file try require_once ("dbconnect.inc");
Robert W. Collins II Webmaster New Orleans Regional Transit Authority Phone : (504) 248-3826 Email : [EMAIL PROTECTED] -----Original Message----- From: Athar Hameed [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Help me pleaase !!!! Greetings, Can anyone please help me. I am having this weird problem. I am using PHP 4.1.1 on windows as an apache module (sapi). Everything was working perfectly, until today. I dint even do anything and things stopped working. I built this database application. I connect to the database using the file dbconnect.inc. But when i use require ("dbconnect.inc"); it doesnt work and i get this error message: Fatal error: Failed opening required '1' (include_path='') in c:\apache\htdocs\jokes\submit_joke.php on line 3 I am not doing anything wrong, because the application was working absolutely fine until today. There are no typos and no other silly mistakes. Take for example this file, index.php <?php require ("dbconnect.inc") or die(); echo "<form method=\"post\" action=\"submit_joke.php\">\n"; . . . ?> Here the require works fine. The values are read from the database and inserted into the form at proper places. But when form is submitted (submit_joke.php) I get the above mentioned error. Its happening in all my applications which were all working fine. submit_joke.php is as follows: <?php require ("dbconnect.inc") or die("require failed!"); // or die ("require failed."); $joke_date = date ("Y-m-d"); echo $joke_text . "<br>"; echo $joke_date . "<br>"; echo $joke_category_id . "<br>"; $query = "INSERT INTO new_jokes VALUES ('','$joke_text','$joke_date','$joke_category_id')"; $result = mysql_query ($query) or die ("mysql_query failed."); ?> -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php