Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Tuesday, May 21 2013 @ 07:41 PM EDT


 Forum Index > Support > Installation Support New Topic Post Reply
 Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$
   
1PLM
 01/14/11 01:32AM (Read 2315 times)  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
I just did a new install for Mysite.com. Geeklog recommended configuring plugins for new install, when I try to continue i get the following error. What am I missing? Below is the on screen message. Thanks.
Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in Mysite.com/plugins/staticpages/services.inc.php on line685

 
Profile Email
 Quote
Dirk
 01/14/11 01:59AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
You are trying to install Geeklog 1.7.1 on a server with PHP 4. That should work in theory, but in practice, there is a bug in the Static Pages plugin, since it accidentally contains some code that only works on PHP 5.

If you can, switch to using PHP 5. Otherwise, you'll have to wait for Geeklog 1.7.2 (or go back to 1.6.1sr2).

bye, Dirk

 
Profile Email Website
 Quote
1PLM
 01/14/11 02:05AM  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
I realized after the install that I may need PHP5 and thus changes my server settings to have the default as PHP5 but the error is still there. Is it too late after the install to change my default PHP4.9 to PHP5 or Do I need to do a new Install? Thanks.

 
Profile Email
 Quote
Dirk
 01/14/11 03:02PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Switching to PHP 5 should fix that error. Double-check that you really are on PHP 5 now.

There's an info.php script in admin/install that you can call up. It'll display the PHP 5 version, among other things.

bye, Dirk

 
Profile Email Website
 Quote
1PLM
 01/14/11 06:19PM  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
Dirk,
Thanks for your prompt feedbacks. I realized the settings I changed for PHP (from 4.9.9 to 5) affected a different directory on my server. I reset the entire Geeklog directory to Enabled for PHP 5 and now the "Parse Error" is gone but I get the following message instead,"Oops the link appears to be broken" When I go back to continue installation. (the admin/install/index.php exists at it's location). Also When I rechecked the admin/install/info.php it shows: <?php phpinfo(); ?>
What do I do now?

 
Profile Email
 Quote
Dirk
 01/14/11 06:31PM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
The "Oops" message is not something Geeklog would display, so not sure where that is coming from.

If you get the source code of a PHP script displayed, then PHP is not running at all. See if you can get it going again or try contacting your hosting service.

Btw, this (PHP not running and displaying the source code instead) is one of the security risks with having your db-config.php file accessible from the web. Anyone can see your database password now ...

bye, Dirk

 
Profile Email Website
 Quote
1PLM
 01/14/11 08:18PM  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
@ Dirk: Are you saying my Dbase password is now visible per my post? I will provide feedback/status update later.

 
Profile Email
 Quote
Dirk
 01/15/11 03:32AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
In another post, you mentioned that you put your db-config.php in your webroot and that Geeklog's security check gave you a warning about that. If PHP is not interpreted now, then calling up example.com/db-config.php would display the contents of that file, including your db password.

bye, Dirk

 
Profile Email Website
 Quote
1PLM
 01/15/11 04:24AM  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
Sorryfor the confusion but that post related to another Geeklog site of mine running version 1.6. When you try to access example.com/db.config.php it says: This file can not be used on its own! so I am thinking it cannot be accessed via http.

 
Profile Email
 Quote
Dirk
 01/15/11 05:07AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
Quote by: 1PLM[pWhen you try to access example.com/db.config.php it says: This file can not be used on its own! so I am thinking it cannot be accessed via http.[/p]

Actually, that proves that it can be accessed via http. As long as PHP is interpreted, it will display this message. If not (which apparently happened on your other site), then it would display the entire content of that file, i.e. the PHP code and your db password.

Granted, that's a rare and temporary case (usually), but why take the risk?

bye, Dirk

 
Profile Email Website
 Quote
1PLM
 01/20/11 10:09PM  
+++--
Chatty

Status: offline


Registered: 07/11/08
Posts: 39
Thanks a lot.I I have read and learned.

 
Profile Email
 Quote
Anonymous: q
 04/11/11 10:21AM  



Tried to install GL 1.7.2 with PHP 4.4.9 and got the following:

Parse error: syntax error, unexpected '&', expecting T_VARIABLE or '$' in /homepages/36/d136911130/htdocs/geeklogbase/geeklog-1.7.2/plugins/staticpages/services.inc.php on line 686

Since I can't change php version of on server how can I fix?

 
 Quote
Dirk
 04/11/11 10:40AM  
AAAAA
Admin

Status: offline


Registered: 01/12/02
Posts: 13027
That's a bug :shock:

Since the piece of code it's complaining about won't be executed on PHP 4 anyway, simply open that file at the given line and remove the offending '&' sign.

Can you please file a bug report for this? Thanks.

bye, Dirk

 
Profile Email Website
 Quote
Content generated in: 3.64 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content