Page 1 of 1

Parse error when trying to load index.php

PostPosted: 18. October 2004 20:07
by insomn3ak
I've recieved the source code for a clients site and I'm trying to migrate it to a new site that I'm developing. When I try to launch the index.php page, I get this error message:


Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' in D:\data\websites\old_mlstrivalley\trivalleymlssearch\inc\pm_classes.php on line 66


Here are lines 65 and 66 in pm_classes.php:

// create a database connection for this object
$this->sql = mysql_pconnect("localhost", $this->"root", $this->);


I can't see any errors in the syntax, however I'm not that familiar with mysql yet. Also, I didn't change anything in pm_classes.php yet.

Thanks for any help anyone can give...

PostPosted: 18. October 2004 20:35
by Wiedmann
$this->sql = mysql_pconnect("localhost", $this->"root", $tthis->);

I think it must be:
Code: Select all
$this->sql = mysql_pconnect('localhost', $this->'root', $this->'');

PostPosted: 18. October 2004 20:49
by insomn3ak
hmmm...still getting the error after I made the change.

PostPosted: 18. October 2004 20:56
by insomn3ak
Would it help if I provided some code before and after line 66?

I know that it's generally not prefered for people to put large chunks of code in these message boards...it's not much though.

PostPosted: 18. October 2004 23:01
by Wiedmann
Or you can try this:

$this->sql = mysql_pconnect('localhost', 'root', '');

PostPosted: 18. October 2004 23:16
by insomn3ak
That did the trick!
Much thanks!