Athar: I have the same problem apparently with my ISP server Linux+Apache after 'upgrading to 4.12' Suddenly all my include statements don't work. This is what I find out so far: 1) The directory of my include statement seems to need the $DOCUMENT_ROOT in order to work. 2) The $DOCUMENT_ROOT seems to change alternatively to: /nfs/www/WWW-data and /usr/local/lib/WWW-data 3) Note that the WWW-data should actually be :WWW_pages/usr/ 4) My provisionally fix is to get and format correctly the document root as: $DOCUMENT_ROOT= substr($DOCUMENT_ROOT,0,-5)."_pages/my_file_path"; and add that to the previous include directory as: include "$DOCUMENT_ROOT/includes/my_include_file.inc"; Now a question for you: Do you use the same php.ini with PHP4.12 as you had with the previous version? This is important to me because I'm not sure that the php.ini is the same as the previous one in my ISP (something I do not control). If your php.ini was the same then it seems that will point to a bug in php 4.12. Please let me know. Thanks. A+ Alain
-----Original Message----- From: Athar Hameed [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 8:44 PM To: Collins, Robert; [EMAIL PROTECTED] Subject: Re: [PHP-WIN] Help me pleaase !!!! But everything was working fine. What has gone wrong now. ----- Original Message ----- From: "Collins, Robert" <[EMAIL PROTECTED]> To: "'Athar Hameed'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, March 06, 2002 2:29 AM Subject: RE: [PHP-WIN] Help me pleaase !!!! > 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 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php