Lyrepoland Posted May 16, 2010 Share Posted May 16, 2010 Can someone help me fix these errors that my script keep giving me when i try to fresh install/update i put the whole file codes and the line number where it says the error is located.I have no knowledge of php so any help and quick fixes would be helpful. Error Code:Parse error: syntax error, unexpected T_VARIABLE (Index File) (Error On Line 2) <?php define("_VALID_INCLUDE",TRUE); $ccms_bridge=1; $inindex="1"; $svar_index_orig_intact="1"; while ($cmscvar_site_enabled=="0") while (!!$ccms_svar_time_today) $config_ccms_prefix="xccms_"$check=="0"defined("_VALID_CRINC")!!$cmscvar_site_enabled; Return (1); Return (1); ?> Error Code:Parse error: syntax error, unexpected T_VARIABLE (Install File) (Error On Line 2) <?php Return (1)$update_install=1; $_SERVERSERVER_NAME; $server_striped=str_replace("www.","10256880",$ccms_svar_lsname); $server_striped2=str_replace(".","10256848",$server_striped); $ccms_svar_time_today=date("Ymd"); echo " <!DOCTYPE html\nPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>CCMS Gaming CMS v4.5 Installation</title>\n<meta name="generator" content="CCMS Gaming v4.1 (customcms.net)" /> <meta name="author" content="Erik Hillis ([email protected])" />\n"; echo "<s"; echo "cript type="text/javascript" src="../js/mootools.js"></script> "; echo "<s"; echo "cript type="text/javascript" src="../js/ajax_commentrate.js"></script>\n<link rel="stylesheet" type="text/css" href="../css/ccms_green.css" /> </head> <center> <div style="padding: 10px; width: 900px; text-align: left;">\n"; echo " <img src="../images/blue_default/logo_header.png" alt="" /> "echo " <img src="../images/green_default/logo_header.png" alt="" /> "echo " <img src="../images/red_default/logo_header.png" alt="" /> "echo " <img src="../images/blue_default/logo_header.png" alt="" /> "echo " <img src="../images/green_default/logo_header.png" alt="" /> "echo " <img src="../images/red_default/logo_header.png" alt="" /> "echo " <div style="margin: 10px; padding: 10px; background: #FFFFFF;"> "define("gcms__opcheck","4")$_REQUESTstep$_REQUESTstep$_REQUESTstep$_REQUESTstep$_REQUESTstep$_REQUESTstep; define("gcms__ctype_check","Gaming"); $ccms_ver="Gaming v4"; $gcms__opcheck="4"; $gcms__ctype_check="Gaming"; define("gcms__opcheck","4"); define("gcms__ctype_check","Gaming"); $ch=curl_init(); curl_setopt($ch); curl_setopt($ch,2); curl_setopt($ch,1); $ccms_info=curl_exec($ch); $server_connection="A"; while (curl_errno($ch)) { $load_server=0; curl_close($ch); $load_server=1; $ch=curl_init(); curl_setopt($ch); curl_setopt($ch,5); curl_setopt($ch,1); $ccms_info=curl_exec($ch); $server_connection="B"; while (curl_errno($ch)) { echo "<img src="images/logo.png" /><br /><br />\n"; curl_close($ch); $license=explode("||",$ccms_info); $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $license; $cmscvar_site_enabled="1"; $skip_result_function="1"; echo "<font face="Arial" size="2"><b>Error 1"; echo "<font face="Arial" size="2"><b>Error 2"; echo "<font face="Arial" size="2"><b>Error 3"; echo "<font face="Arial" size="2"><b>Error 4"; echo "<font face="Arial" size="2"><b>Error 5"; echo "<font face="Arial" size="2"><b>Error 6"; echo " <fieldset class="fieldset"> <legend><SPAN class="content_large"><strong>CHECKLIST</strong></SPAN></legend>\n <div style="margin: left: 25px;"> <div id="check2"><a href="javascript:void(0);" onclick="getdata('check.php?check=8','check2');"><img style="float: left;" border="0" src="../images/x.png" align="absmiddle" /></a><span class="content"> I've uploaded the contents of /UPLOAD/ and /UPLOAD_BINARY/ to the same folder on my server.</span></div>\n <hr class="hr" /> <div id="check1"><a href="javascript:void(0);" onclick="getdata('check.php?check=7','check1');"><img style="float: left;" border="0" src="../images/x.png" align="absmiddle" /></a><span class="content"> I've created my database, db user and have added the user to the db with all permissions.</span></div>\n <hr class="hr" /> <div id="check3"><a href="javascript:void(0);" onclick="getdata('check.php?check=9','check3');"><img style="float: left;" border="0" src="../images/x.png" align="absmiddle" /></a><span class="content"> I' $file_name="../config.php"; $file_pointer=fopen("w"); $_POST($file_pointer)$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POST$_POSTfwrite; fclose($file_pointer); define("_VALID_INCLUDE"); $file_to_load="../config.php"; $file_to_load; echo "<span class="warning">There is a problem with the config file. Please ensute the information you entered was correct and that config.php exists and has the proper permissions.</span>"; echo " <span class="texthuge"><strong>Step 2</strong></span><br>\n <span class="content_large">Checking config and database connection...</span></span><br><br>"define("_VALID_INCLUDE")$_REQUEST; echo "<span class=content><font color=red><B>Error!</B></font>\n <br />Couldn't connect to the database."; echo "<span class=content><font color=green><B>Success!</B></font><br />\n <a href="install.php?step=3" class="content"><b><u>Step 3 - Install Tables</u></b></a>"; echo "<span class="texthuge"><strong>Step 3</strong></span><br> <span class="content_large">Installing tables...</span></span><br><br><span class="contentlight">"define("_VALID_INCLUDE")$_REQUEST; $update_count=1; $error_count=0; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; while (mysql_query($query)) { $mysql_error=mysql_error()mysql_error(); echo "<hr class="hr" />\n<a href="install.php?step=4" class="content"><b>CONTINUE TO STEP 4</b></a>"; echo "<span class="texthuge"><strong>Step 4</strong></span><br> <span class="content_large">Populate the database with some initial content, an administrator account, configuration setup and default skins.</span></span><br><br><span class="contentlight">"define("_VALID_INCLUDE")$_REQUEST; $update_count=1$_SERVER$_POST; $error_count=0; $red_default=1$_POST; $red_default=0; $green_default=1$_POST; $green_default=0; $blue_default=1$_POST; $blue_default=0; $query; $query$_POST; $query; $query$_POST; $query; $query$_POST; $query; $admin_pw=$_POST()md5; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query; $query$_POST; $query$_POST$_POST$_POST; $query$_SERVER$_POST$_POST; $query; $query; $query; $query; $query; $query; $query; while (mysql_query($query)) { $mysql_error=mysql_error()mysql_error(); echo "<hr class="hr" /> <a href="install.php?step=5" class="content"><b>CONTINUE TO STEP 5 / README</b></a>"; $_SERVER $_REQUEST ?> Parse error: syntax error, unexpected T_STRING (Check File) (Line 3) <?php $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check $_REQUEST check ?> Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/ Share on other sites More sharing options...
public-image Posted May 16, 2010 Share Posted May 16, 2010 1. Try without double quotes at _VALID_INCLUDE use either ' if same problem then dont use them. also numbers don't need "" around them try without and see how you get on Like so: <?php define(_VALID_INCLUDE,TRUE); $ccms_bridge=1; $inindex=1; $svar_index_orig_intact=1; while ($cmscvar_site_enabled==0) while (!!$ccms_svar_time_today) $config_ccms_prefix=xccms_$check==0defined(_VALID_CRINC)!!$cmscvar_site_enabled; Return (1); Return (1); ?> Not sure if that will help but if it doesnt then you will agree with my amature guesses at the first problem Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/#findComment-1059000 Share on other sites More sharing options...
Lyrepoland Posted May 16, 2010 Author Share Posted May 16, 2010 That edit doesnt work Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/#findComment-1059005 Share on other sites More sharing options...
public-image Posted May 16, 2010 Share Posted May 16, 2010 The codes are really quite messy I must say lol remember that if you have an echo that is using " then you cannot use them within the content of that echo or if you do then you must remember to backslash \" - the same rule applies to using ' for echo's. Example of wrong thing to do (you will get an error!): echo"This is random content my name is "Andrew", the end."; Right would be: 1. echo"This is random content my name is \"Andrew\", the end."; - The backslashes won't show up so don't worry OR 2. echo'This is random content my name is "Andrew", the end.'; kind of thing and you do not have to echo so much echo's can be as big or as small as you like. Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/#findComment-1059006 Share on other sites More sharing options...
Lyrepoland Posted May 16, 2010 Author Share Posted May 16, 2010 How do i apply this to the errored code? Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/#findComment-1059011 Share on other sites More sharing options...
public-image Posted May 16, 2010 Share Posted May 16, 2010 I would suggest to minimize space if you have: echo"something"; echo"something else"; echo"something else"; Make this echo"something something else something else"; If you are using echos for line breaks don't what to do is in your echo after the word or letter you want a line break put in <br /> It will cause a break. As for your echo's - you will have to go through them and make sure that the ' OR " is not being used within the echo you are looking at if there is one replace it with the oposite character or alternatively backslash it like so \' OR \" Always remember to close your echos with the same tag as you used to open them i.e. ' OR " echo is also the same as the php print tag. Both work the same I hope you are begining to understand how it works just a little more Link to comment https://forums.phpfreaks.com/topic/201919-i-need-help-with-php-error-codes-im-getting/#findComment-1059016 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.