News:

Wondering if this will always be free?  See why free is better.

Main Menu

Syntax error

Started by mark48, June 17, 2017, 01:40:24 PM

Previous topic - Next topic

mark48

Hello my forum is down and shows a 500 error

I contacted my host and they told me there is a syntax error in my index.php

I am a coding noob and have no idea what this means or how to fix this

Can anyone help me?


Gwenwyfar

A syntax error is when something in the code is incorrect, and it fails to be processed by your server. You should take your index.php file and fix the error(s). If your forum is completely down you can check for errors on online checkers, or see if there is anything in the error log for your server.
"It is impossible to communicate with one that does not wish to communicate"

vbgamer45

Attach your index.php we can do a quick scan of it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mark48

Thank you both for the fast reply

I  have attached the index.php  and copied the error logs

[Sat Jun 17 17:50:58 2017] [error] [client 94.242.252.59] File does not exist: /home/clitw/public_html/forum, referer: http://talkptc.com/forum/index.php?board=19.0 [nofollow]
[Sat Jun 17 17:50:58 2017] [error] [client 94.242.252.59] File does not exist: /home/clitw/public_html/forum, referer: http://talkptc.com/forum/index.php?board=19.0 [nofollow]
[Sat Jun 17 17:50:04 2017] [error] [client 101.50.111.80] File does not exist: /home/clitw/public_html/wp-login.php
[Sat Jun 17 17:26:34 2017] [error] [client 37.133.65.252] File does not exist: /home/clitw/public_html/wp-login.php
[Sat Jun 17 17:24:56 2017] [error] [client 192.99.110.131] File does not exist: /home/clitw/public_html/wp
[Sat Jun 17 17:24:56 2017] [error] [client 192.99.110.131] File does not exist: /home/clitw/public_html/wordpress
[Sat Jun 17 17:24:56 2017] [error] [client 192.99.110.131] File does not exist: /home/clitw/public_html/blog
[Sat Jun 17 17:24:55 2017] [error] [client 192.99.110.131] File does not exist: /home/clitw/public_html/blog
[Sat Jun 17 16:53:40 2017] [error] [client 151.80.38.67] File does not exist: /home/clitw/public_html/forum, referer: http://talkptc.com/forum/index.php?board=19.0 [nofollow]
[Sat Jun 17 16:52:21 2017] [error] [client 199.127.226.150] File does not exist: /home/clitw/public_html/forum, referer: http://talkptc.com/forum/index.php?board=19.0 [nofollow]
[Sat Jun 17 16:41:48 2017] [error] [client 121.204.102.195] File does not exist: /home/clitw/public_html/403.shtml, referer: http://www.talkptc.com [nofollow]
[Sat Jun 17 16:41:48 2017] [error] [client 121.204.102.195] client denied by server configuration: /home/clitw/public_html/, referer: http://www.talkptc.com [nofollow]

vbgamer45

No errors in the file. And the error log is ok.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

mark48

Thanks for the reply.
I contacted my host again and they sent me these logs. Maybe this helps?

[18-Jun-2017 02:30:07 America/New_York] PHP Notice: Undefined variable: boarddir in /home/clitw/public_html/index.php on line 48
[18-Jun-2017 02:30:07 America/New_York] PHP Notice: Undefined variable: sourcedir in /home/clitw/public_html/index.php on line 52
[18-Jun-2017 02:30:07 America/New_York] PHP Warning: require_once(/QueryString.php): failed to open stream: No such file or directory in /home/clitw/public_html/index.php on line 52
[18-Jun-2017 02:30:07 America/New_York] PHP Fatal error: require_once(): Failed opening required '/QueryString.php' (include_path='.:/opt/alt/php55/usr/share/pear:/opt/alt/php55/usr/share/php') in /home/clitw/public_html/index.php on line 52

Illori

is there anything in your Settings.php file?

mark48

Both the settings.php and settings_bak.php  are empty

Illori

do you have a backup you can restore of those 2 files? if not ask your host if they do, you only need those 2 files nothing else.

mark48

I restored both from the backup and its running again  ;D

Thanks everyone for the help

Advertisement: