sulabh12 on "Error Log and HTTP 500 error"

ساخت وبلاگ

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.

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).

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

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.

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

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?

sulabh12
Member
Posted 17 hours ago #

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

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?

I renamed just the theme not the whole directory.

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.

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 )) {

And there's your problem. The file should only have 18 lines. ;)

I'll have to ask you to please repeat from earlier: https://wordpress.org/support/topic/error-log-and-http-500-error?replies=11#post-8720007

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

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

sulabh12
Member
Posted 2 minutes ago #

I did it and it still shows the same problem.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 302 تاريخ : شنبه 16 مرداد 1395 ساعت: 18:58