rjcfan4ever Posted August 20, 2011 Share Posted August 20, 2011 I had some errors in my script but I solved the most of them except two: Warning: require_once(/home/a3443899/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/a3443899/public_html/include/config.php on line 32 Fatal error: require_once() [function.require]: Failed opening required '/home/a3443899/smarty/libs/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3443899/public_html/include/config.php on line 32 And I checked the map what he couldn't open the map names are just good Here is the config.php script: <? $config = array(); // Begin Configuration // This Template was Downloaded From GrabTemplates.com $config['basedir'] = 'something'; $config['baseurl'] = 'something'; $DBTYPE = 'mysql'; $DBHOST = 'my host'; $DBUSER = 'my username'; $DBPASSWORD = 'my pass'; $DBNAME = 'my dbname'; // End Configuration ini_set('session.save_path', $config['basedir']. '/temporary/sessions'); session_start; $config['adminurl'] = $config[baseurl].'/administrator'; $config['cssurl'] = $config[baseurl].'/css'; $config['imagedir'] = $config[basedir].'/images'; $config['imageurl'] = $config[baseurl].'/images'; $config['picdir'] = $config[basedir].'/pics'; $config['picurl'] = $config[baseurl].'/pics'; $config['tpicdir'] = $config[basedir].'/pics/thumbs'; $config['tpicurl'] = $config[baseurl].'/pics/thumbs'; $config['membersprofilepicdir'] = $config[imagedir].'/membersprofilepic'; $config['membersprofilepicurl'] = $config[imageurl].'/membersprofilepic'; $config['mbgdir'] = $config[imagedir].'/mbg'; $config['mbgurl'] = $config[imageurl].'/mbg'; require_once($config[basedir].'/smarty/libs/Smarty.class.php'); require_once($config[basedir].'/libraries/mysmarty.class.php'); require_once($config[basedir].'/libraries/SConfig.php'); require_once($config[basedir].'/libraries/SError.php'); require_once($config[basedir].'/libraries/adodb/adodb.inc.php'); require_once($config[basedir].'/libraries/phpmailer/class.phpmailer.php'); require_once($config[basedir].'/libraries/SEmail.php'); function strip_mq_gpc($arg) { if (get_magic_quotes_gpc()) { $arg = str_replace('"',"'",$arg); $arg = stripslashes($arg); return $arg; } else { $arg = str_replace('"',"'",$arg); return $arg; } } $conn = &ADONewConnection($DBTYPE); $conn->PConnect($DBHOST, $DBUSER, $DBPASSWORD, $DBNAME); @mysql_query("SET NAMES 'UTF8'"); $sql = "SELECT * from config"; $rsc = $conn->Execute($sql); if($rsc){while(!$rsc->EOF) { $field = $rsc->fields['setting']; $config[$field] = $rsc->fields['value']; STemplate::assign($field, strip_mq_gpc($config[$field])); @$rsc->MoveNext(); }} if ($_REQUEST['language'] != "") { if ($_REQUEST['language'] == "english") { SESSION_REGISTER("language"); $_SESSION[language] = "english"; } elseif ($_REQUEST['language'] == "spanish") { SESSION_REGISTER("language"); $_SESSION[language] = "spanish"; } elseif ($_REQUEST['language'] == "french") { SESSION_REGISTER("language"); $_SESSION[language] = "french"; } } if ($_SESSION['language'] == "") { SESSION_REGISTER("language"); $_SESSION[language] = "english"; } if ($_SESSION['language'] == "english") { include("lang/english.php"); } elseif ($_SESSION['language'] == "spanish") { include("lang/spanish.php"); } elseif ($_SESSION['language'] == "french") { include("lang/french.php"); } else { include("lang/english.php"); } for ($i=0; $i<count($lang)+1; $i++) { STemplate::assign('lang'.$i, $lang[$i]); } STemplate::assign('baseurl', $config['baseurl']); STemplate::assign('basedir', $config['basedir']); STemplate::assign('adminurl', $config['adminurl']); STemplate::assign('cssurl', $config['cssurl']); STemplate::assign('imagedir', $config['imagedir']); STemplate::assign('imageurl', $config['imageurl']); STemplate::assign('picdir', $config['picdir']); STemplate::assign('picurl', $config['picurl']); STemplate::assign('tpicdir', $config['tpicdir']); STemplate::assign('tpicurl', $config['tpicurl']); STemplate::assign('membersprofilepicdir', $config['membersprofilepicdir']); STemplate::assign('membersprofilepicurl', $config['membersprofilepicurl']); STemplate::assign('mbgdir', $config['mbgdir']); STemplate::assign('mbgurl', $config['mbgurl']); STemplate::setCompileDir($config['basedir']."/temporary"); STemplate::setTplDir($config['basedir']."/themes"); ?> Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/ Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 Long shot - its not a case sensitivity issue is it? Smarty vs smarty? Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259811 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 Nope Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259815 Share on other sites More sharing options...
MasterACE14 Posted August 20, 2011 Share Posted August 20, 2011 well either $config[basedir] is wrong, or '/smarty/libs/Smarty.class.php' is wrong. Comment out that first require_once() and see if it errors on the second one, If it does then I'd say $config[basedir] is wrong. If not then '/smarty/libs/Smarty.class.php' is wrong. Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259819 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 If I do dreamweaver says I've got a Syntax error Oh and I just putted it online and he gives this error Parse error: syntax error, unexpected ')' in /home/a3443899/public_html/include/config.php on line 32 Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259824 Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 Shouldn't session_start be session_start()? Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259825 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 Yeah.. But he gaved a error with session_start(); so I adjusted it in session_start; and it works now. But I got the error before I replaced it into session_start; Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259826 Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 It should definitely be session_start(); - there is no option to omit the parentheses. What is the error you get when you have session_start()? I'm assuming it is different from your previous error. Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259828 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 Warning: session_start() [function.session-start]: open(/home/a3443899/temporary/sessions/sess_3abc47bbd2f073e35734d72fe89ac33a, O_RDWR) failed: No such file or directory (2) in /home/a3443899/public_html/include/config.php on line 17 Warning: require_once(/home/a3443899/smarty/libs/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/a3443899/public_html/include/config.php on line 32 Fatal error: require_once() [function.require]: Failed opening required '/home/a3443899/smarty/libs/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a3443899/public_html/include/config.php on line 32 Warning: Unknown: open(/home/a3443899/temporary/sessions/sess_3abc47bbd2f073e35734d72fe89ac33a, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/home/a3443899/temporary/sessions) in Unknown on line 0 Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259829 Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 Okay - first order of business is sorting out the session errors. Does the path /home/a3443899/temporary/sessions/ exist on your server? If so, is there anything in there? I know this doesn't seem to be related to your initial issue, but sorting out other errors usually results in shedding light on your original query. Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259832 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 Yup it excist but only with a index.html in it.. But nothing in index.html lol Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259833 Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 Okay - can you clear your cookies and reload the page? Also - can you check that the session directory is writeable by the web server? Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259835 Share on other sites More sharing options...
rjcfan4ever Posted August 20, 2011 Author Share Posted August 20, 2011 Hmm.. I will contact about all the errors, it keeps erroring Thanks for your help! Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259836 Share on other sites More sharing options...
titan21 Posted August 20, 2011 Share Posted August 20, 2011 No problem! Bit difficult since I'm not there to help - but we'll get there (I hope!) Link to comment https://forums.phpfreaks.com/topic/245288-could-not-open-error/#findComment-1259840 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.