dguilloryjr Posted April 30, 2007 Share Posted April 30, 2007 i am working on moving my php site from one server to another so right now i am trying to move my DEV site. you can see on www.live8081.com the php info pages shows up, but www.live8081.com/indexOLD.php shows a error... anyone have any idea what that is, and how i can fix it... yahoo messenger: venom2733 msn messenger dguilloryjr@msn.com Thanks Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/ Share on other sites More sharing options...
john010117 Posted April 30, 2007 Share Posted April 30, 2007 Warning: main(EDIRECTORY_ROOT/layout/header.php) [function.main]: failed to open stream: No such file or directory in Warning: main() [function.include]: Failed opening 'EDIRECTORY_ROOT/layout/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Fatal error: Call to undefined function: html_selectbox() in Make sure you've moved ALL of the files from your old site to new (to the correct directories). That's what the error messages are about. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241377 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 ok can anyone tell me what the 1st one is about. all the files should ne the same because i went into cpanel on the old server and did a HOME directory backup, do any of these error mean that i need to move over the files in the UPPER directory? above the www folder Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241381 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 here is the code related to the 1st error... # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/layout/header.php"); $array = Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); $letterDropDown = html_selectBox("letter", $array, $array, $letter, "onchange=document.search.submit();", "class='input-dd-form-searchlisting'", "All Letters"); Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241386 Share on other sites More sharing options...
john010117 Posted April 30, 2007 Share Posted April 30, 2007 I've never heard of EDIRECTORY_ROOT being used before... Just try ./ or ../ instead of that (inside of the quotes) Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241390 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 Where is the constant EDIRECTORY_ROOT defined? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241391 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 ok well it looks like that took car of 2 errors now i have a parse error? any ideas? www.live8081.com/indexOLD.php Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241393 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 # ---------------------------------------------------------------------------------------------------- # define EDIRECTORY_ROOT to set things in motion. # ---------------------------------------------------------------------------------------------------- define(EDIRECTORY_ROOT, $_SERVER["DOCUMENT_ROOT"]); Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241394 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 now i have a parse error? any ideas? Let my check my crystal ball..... I think you have an error around line 52, can't quite make it out though. Maybe if you posted some CODE! Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241395 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 # ---------------------------------------------------------------------------------------------------- # define EDIRECTORY_ROOT to set things in motion. # ---------------------------------------------------------------------------------------------------- define(EDIRECTORY_ROOT, $_SERVER["DOCUMENT_ROOT"]); Where is that included into the page you posted earlier? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241396 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 This is the indexOLD.php page Well some of it... # ---------------------------------------------------------------------------------------------------- # HEADER # ---------------------------------------------------------------------------------------------------- include(EDIRECTORY_ROOT."/layout/header.php"); $array = Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'); $letterDropDown = html_selectBox("letter", $array, $array, $letter, "onchange=document.search.submit();", "class='input-dd-form-searchlisting'", "All Letters"); ?> Here is the config.inc.php well some of it... # ---------------------------------------------------------------------------------------------------- # * FILE: /conf/config.inc.php # ---------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------- # define EDIRECTORY_ROOT to set things in motion. # ---------------------------------------------------------------------------------------------------- define(EDIRECTORY_ROOT, $_SERVER["DOCUMENT_ROOT"]); Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241397 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 Ah... makes sense now. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241402 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 so any idea how i can fix? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241403 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 seems as if its not picking up what the edirectoy_root is? I know it took me a long time just to figure that out but hey i am still new to the PHP code! so any idea how to fix? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241406 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 I was being sarcastic. You failed to show how this line... define(EDIRECTORY_ROOT, $_SERVER["DOCUMENT_ROOT"]); Was being included into the file causing the error. My suggestion would be to replace all instances of EDIRECTORY_ROOT with $_SERVER["DOCUMENT_ROOT"]. There is simply NO POINT in trying to redefine a global constant like you have done. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241407 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 ok well why would it work on the live site www.mysimbook.com that is on server a and live8081.com is the exact same site copied to server b Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241411 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 Because most of your errors are actually just warnings. These will not stop execution, just warn about old / deprecated or poor code. Most likely your old server had lower error reporting settings. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241414 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 ok well would it be ok to lower the error reporting on this server then? if so how would i do that? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241417 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 It would be better to fix the code that causes the warnings. Your dev server really ought to have the most strict error reporting available for this very reason. But yeah, you can play around with the error_reporting function. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241419 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 there were only 2 pages that had this code in it, and this is the code in both the pages! /* we stop all error reporting as we check for all sort of errors */ error_reporting ( 0 ); set_time_limit ( 0 ); Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241420 Share on other sites More sharing options...
AndyB Posted April 30, 2007 Share Posted April 30, 2007 /* we stop all error reporting as we check for all sort of errors */ 10 out of 10 for confidence (misplaced) on the part of the author. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241423 Share on other sites More sharing options...
trq Posted April 30, 2007 Share Posted April 30, 2007 The error_reporting() function only effects the script it is contained in. You can (if available) change your error reporting setting globally with your php.ini. Chances are your so called dev server has its default settings set too low in regard to error reporting. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241424 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 well there was a company that developed this or them, i am just creating a dev site on another server. so i just copied the files from server a to server b now i get this error, yeah it looks like they defined a global root as edirectory_root. Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241425 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 can i access the PHP.ini file from within the control panel? i am no good at the ssh terminal! Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241428 Share on other sites More sharing options...
dguilloryjr Posted April 30, 2007 Author Share Posted April 30, 2007 so i guess back to my original question how can i fix it? Quote Link to comment https://forums.phpfreaks.com/topic/49264-dev-site/#findComment-241437 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.