Welcome to Geeklog, Anonymous Friday, November 29 2024 @ 11:38 am EST
Geeklog Forums
Parse Errors
So, I've been trying to figure out for the last couple of days why I was getting parse errors in index.php
This is a brand new setup of Geeklog 1.3.9, and I only created a config.php and modified the lib-common.php as directed in the instructions.
So, coming over here, I looked around, and didn't spot an obvious quick answer, but then had a brainstorm: diff against a newly untarred Geeklog 1.3.9. Guess what, I found the problem:
-jailshell-2.05b$ diff index.php ~/www/index.php
41c41
< if (isset ($HTTP_GET_VARS['display']) \&amp;\&amp; empty ($topic)) {
---
> if (isset ($HTTP_GET_VARS['display']) && empty ($topic)) {
59c59
< if (!$newstories \&amp;\&amp; !$displayall) {
---
> if (!$newstories && !$displayall) {
225a226
Apparently, cPanel (at least on this host) is filtering files when they are being extracted. I don't know if this is a normal cPanel bug, or if it's something that's common. Might want to add that to an FAQ or something though...
(FYI -- this is actually pretty funny -- I almost never use admin panels on my sites. I only used it this time becuase I can't ssh into my site at work because of our firewall...)
// George
This is a brand new setup of Geeklog 1.3.9, and I only created a config.php and modified the lib-common.php as directed in the instructions.
So, coming over here, I looked around, and didn't spot an obvious quick answer, but then had a brainstorm: diff against a newly untarred Geeklog 1.3.9. Guess what, I found the problem:
-jailshell-2.05b$ diff index.php ~/www/index.php
41c41
< if (isset ($HTTP_GET_VARS['display']) \&amp;\&amp; empty ($topic)) {
---
> if (isset ($HTTP_GET_VARS['display']) && empty ($topic)) {
59c59
< if (!$newstories \&amp;\&amp; !$displayall) {
---
> if (!$newstories && !$displayall) {
225a226
Apparently, cPanel (at least on this host) is filtering files when they are being extracted. I don't know if this is a normal cPanel bug, or if it's something that's common. Might want to add that to an FAQ or something though...
(FYI -- this is actually pretty funny -- I almost never use admin panels on my sites. I only used it this time becuase I can't ssh into my site at work because of our firewall...)
// George
15
19
Quote
Status: offline
SoundChaser
Forum User
Newbie
Registered: 03/04/04
Posts: 11
Quote by Dirk: Cpanel is actually mentioned as a possible cause of problems in the troubleshooting section of the installation instructions.
Nope, I didn't miss it:
Editing the lib-common.php with "on-site" text editors built into tools like Cpanel (again, use a simple text editor instead)
You missed the subtle detail: I never edited the index.php file with cPanel, only un-tarred it. IOW - even just extracting the files with cPanel can have a bad affect.
// George
18
13
Quote
All times are EST. The time is now 11:38 am.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content