jossylala Posted March 2, 2010 Share Posted March 2, 2010 this the error i get:Warning: include(/includes/ config.inc.php) [ function.include]: failed to open stream: No such file or directory in /home2/ infotec7/public_html/ noticeone/index.php on line 1 Warning: include() [function.include]: Failed opening '/includes/ config.inc.php' for inclusion (include_path='.:/usr/lib64/ php') in /home2/infotec7/ public_html/noticeone/ index.php on line 1 Fatal error: Call to undefined function selectFrom() in /home2/ infotec7/public_html/ noticeone/index.php on line 3 here is my index.Php file please tell me what i did wrong. thanks <? include ($HTTP_SERVER_VARS ["DOCUMENT_ROOT"] ."/includes/ config.inc.php"); $page_data = selectFrom("SELECT description FROM ".TBL_CONTENT." WHERE id = 10"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/193884-error-on-my-codeplease-help-me-find-the-faultthanks/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 2, 2010 Share Posted March 2, 2010 $HTTP_SERVER_VARS were depreciated long ago (8 years, in php4.1), turned off by default in php5, throws a depreciated error when on in php5.3, and have been completely removed in php6. Use $_SERVER Quote Link to comment https://forums.phpfreaks.com/topic/193884-error-on-my-codeplease-help-me-find-the-faultthanks/#findComment-1020377 Share on other sites More sharing options...
jossylala Posted March 2, 2010 Author Share Posted March 2, 2010 i did change it and i got this error: Warning: include(/includes/ dbuserpass.php) [ function.include]: failed to open stream: No such file or directory in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 32 Warning: include() [function.include]: Failed opening '/includes/ dbuserpass.php' for inclusion (include_path='.:/usr/lib64/ php') in /home2/infotec7/ public_html/noticeone/ includes/config.inc.phpon line 32 Warning: include(/includes/ common.inc.php) [ function.include]: failed to open stream: No such file or directory in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 33 Warning: include() [function.include]: Failed opening '/includes/ common.inc.php' for inclusion (include_path='.:/ usr/lib64/php') in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 33 Warning: include(/includes/ db.php) [function.include]: failed to open stream: No such file or directory in / home2/infotec7/ public_html/noticeone/ includes/config.inc.phpon line 34 Warning: include() [function.include]: Failed opening '/includes/db.php' for inclusion (include_path='.:/usr/lib64/ php') in /home2/infotec7/ public_html/noticeone/ includes/config.inc.phpon line 34 Warning: include(/includes/ commonfunction.php) [ function.include]: failed to open stream: No such file or directory in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 35 Warning: include() [function.include]: Failed opening '/includes/ commonfunction.php' for inclusion (include_path='.:/ usr/lib64/php') in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 35 Fatal error: Call to undefined function dbConnection() in /home2/ infotec7/public_html/ noticeone/includes/ config.inc.php on line 37 Quote Link to comment https://forums.phpfreaks.com/topic/193884-error-on-my-codeplease-help-me-find-the-faultthanks/#findComment-1020380 Share on other sites More sharing options...
PFMaBiSmAd Posted March 2, 2010 Share Posted March 2, 2010 Based on the path being shown in the error message - Warning: include(/includes/dbuserpass.php) There is no value before the first / in the path. A) What is the line of code with the include() statement? B) If there is no value for $_SERVER['DOCUMENT_ROOT'], you will either need to get your web host to find and fix what is causing that or you will need to set the value yourself at the start of your script. And what are you using to post the information in narrow columns? Because it is extremely hard to read. Quote Link to comment https://forums.phpfreaks.com/topic/193884-error-on-my-codeplease-help-me-find-the-faultthanks/#findComment-1020383 Share on other sites More sharing options...
jossylala Posted March 2, 2010 Author Share Posted March 2, 2010 thanks mate i have fixed it. the problem was that the config.inc.php file has the $HTTP_SERVER_VARS code in it. Quote Link to comment https://forums.phpfreaks.com/topic/193884-error-on-my-codeplease-help-me-find-the-faultthanks/#findComment-1020409 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.