Author Topic: Error_log File  (Read 5538 times)

0 Members and 1 Guest are viewing this topic.

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Error_log File
« on: January 12, 2011, 05:33:02 AM »
Hi,

Today i checked a error_log file located in the directory where we have installed 4images. The size of that error_log file is 650kb.

here is some text copied from error_log file.

Quote
[21-Nov-2010 10:50:32] PHP Parse error:  syntax error, unexpected $end in /home/gallery/public_html/themes/includes/functions.php on line 522
[21-Nov-2010 10:50:35] PHP Parse error:  syntax error, unexpected $end in /home/gallery/public_html/themes/includes/functions.php on line 1507
[21-Nov-2010 10:50:35] PHP Parse error:  syntax error, unexpected $end in /home/gallery/public_html/themes/includes/functions.php on line 1507
[30-Nov-2010 14:50:22] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:22] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:22] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:22] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:23] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:23] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101
[30-Nov-2010 14:50:23] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/gallery/public_html/themes/includes/db_mysql.php:192) in /home/gallery/public_html/themes/includes/sessions.php on line 101

Can anybody please suggest how to fix this?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error_log File
« Reply #1 on: January 12, 2011, 06:17:09 AM »
You could start by tracing back what you did to includes/functions.php
The error suggests that it's missing a curly bracket } somewhere
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Error_log File
« Reply #2 on: January 12, 2011, 11:15:08 AM »
Here is what we have in functions.php line 522

Quote
   $media_icon = "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name, 2)."\" />";

and here is what we have at line 1507

Quote
  if (!$check_remote || !CHECK_REMOTE_FILES) {

and here is what we have in sessions.php file on line 101

Quote
    setcookie($cookie_name, $value, $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);

Plz suggest.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error_log File
« Reply #3 on: January 12, 2011, 03:20:36 PM »
As I said "somewhere"...unfortunately this particular error doesn't show exactly where the problem is, you'll need match all open { and closing } brackets (if that's they case). Or restore backups and try modifications again.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline khansahib

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Error_log File
« Reply #4 on: January 12, 2011, 05:26:48 PM »
Hi,

well i have no knowledge of php, i have attached both the files i will really really appreciate if you can check those files for me.

-Regards.

Offline flattley

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Error_log File
« Reply #5 on: January 12, 2011, 07:02:50 PM »
In functions.php you have 327 { and you have 325 }. You are missing 2 closing braces.

Your job is to now find where they are missing from

Once you find them and add them you should be ok

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error_log File
« Reply #6 on: January 13, 2011, 12:39:26 AM »
There is nothing wrong with your files...now that I read your original post again, you didn't really say that there is a problem with your gallery, it's just the errors you found in the logs...

I think these errors comes at the moment when you were uploading modified files to the server and the exact same time someone else opened a page...I would not worry about it unless there is a problem ;)
If uploading large functions.php file takes 5-7 seconds for you, then it would definitely explain two errors with 3 seconds apart at 2 different lines in the same file.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)