• Resolved sulabh12

    (@sulabh12)


    Its been few days that one of my website has been showing this message HTTP 500 error. And today when I checked in to cPanel, file manager I found one error log. The error log was showing this information:

    [26-Jul-2016 12:24:03 America/Chicago] PHP Parse error: syntax error, unexpected ‘(‘ in /home/mellin/public_html/semaystudio.com/index.php on line 35

    I am new to programming and coding but if you show me some ways or what to change or edit then I am able to work with it.

    Please anyone help me with it. My website name is semaystudio.com.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Moderator James Huff

    (@macmanx)

    Try manually resetting your plugins (no Dashboard access required). If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, navigate to /wp-content/themes/ and rename the directory of your currently active theme. This will force the default theme to activate and hopefully rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter sulabh12

    (@sulabh12)

    @james Huff I tried everything you mentioned above but non of them work. Is there any other way.

    Moderator James Huff

    (@macmanx)

    Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.

    Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.

    Thread Starter sulabh12

    (@sulabh12)

    Thank you for replying again but still I got same problem. I did exactly the same like you mentioned above.

    Moderator James Huff

    (@macmanx)

    What is the name of the theme you were using?

    Also, double-check /wp-content/themes/ on your server. Do you have a theme with “twenty” in the name installed?

    Thread Starter sulabh12

    (@sulabh12)

    Twenty Thirteen was the theme I was using. Yes, there’s few themes with twenty.

    Moderator James Huff

    (@macmanx)

    Ok, and to try resetting the theme, did you rename /wp-content/themes/twenty-thirteen/ to something like /wp-content/themes/twenty-thirteen-broken/ or did you rename the whole /themes/ directory?

    Thread Starter sulabh12

    (@sulabh12)

    I renamed just the theme not the whole directory.

    Moderator James Huff

    (@macmanx)

    What’s line 35 of your file at /semaystudio.com/index.php ? Or, if you don’t have a 35th line, how many lines does that file have?

    To find out, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and open the file with a plain text editor.

    Thread Starter sulabh12

    (@sulabh12)

    index.php file has 181 files. The line 35 has this code on it:

    if (preg_match_all ( “/(<img[^>]+src=”([^”]+)”[^>]*>)|(<a[^>]+href=”([^”]+)”[^>]*>)|(<img[^>]+src='([^’]+)'[^>]*>)|(<a[^>]+href='([^’]+)'[^>]*>)/i”, $l1, $regs )) {

    Moderator James Huff

    (@macmanx)

    And there’s your problem. The file should only have 18 lines. 😉

    I’ll have to ask you to please repeat from earlier: https://ww.wp.xz.cn/support/topic/error-log-and-http-500-error?replies=11#post-8720007

    Thread Starter sulabh12

    (@sulabh12)

    Do I need to replace wp-config-sample.php? And how about the error log on current directory?

    Moderator James Huff

    (@macmanx)

    You probably should replace the sample file, just as a precaution. No need to remove the error log or other not-WordPress files.

    Thread Starter sulabh12

    (@sulabh12)

    I did it and it still shows the same problem.

    Moderator James Huff

    (@macmanx)

    Hm, does the index.php file at /semaystudio.com/index.php suddenly have 181 lines again?

    Did you delete the file before replacing it?

Viewing 15 replies - 1 through 15 (of 17 total)

The topic ‘Error Log and HTTP 500 error’ is closed to new replies.