My website http://edmcginnis.net is down and showing the following:
Parse error: syntax error, unexpected 'namespace' (T_NAMESPACE), expecting identifier (T_STRING) in /home/content/94/11030494/html/wp-content/plugins/contact-form-7/includes/rest-api.php on line 15
I thought it was the contact form 7 plug-in so I disabled it via ftp. That didn't work so I updated the php to 8.0 and when that didn't work I disabled all plug-ins. Still nothing.
Can anyone help me get this site back online? I'm not really sure what to do next. Thanks
Revert all code back to how it was before it was broken, including PHP. Someone probably upgraded a PHP, WP, plugin, or accidentally edited line 15 of the CF7 rest api file. If you are unable to debug you may need to reset your code.
One last thing to remember is that if you have anything in your theme that relies on a plugin function to work it will kill your site too. Disabling plugins isn't always a good way to remove issues but it will identify them.
Related
I had an issue with the IssueM plugin recently where it was causing some back-end error and Wordpress automatically deactivated it along with IssueM's Issue to PDF. I updated via recovery mode and disabled Issue to PDF (which isn't needed anyway and seems to be the source of the issue) and the back end is now working fine. HOWEVER, none of the articles seem to exist anymore when you visit the page. From within Wordpress admin they are all there and seem to be correct as best as I can tell. On the site the titles all show up, but when you click on any (or try to preview any) it gives a not found error.
My best guess is that because IssueM uses articles and wordpress base doesn't that when it got deactivated and reactived something sort of disconnected?
I've already tried repairing the database via /wp-admin/maint/repair.php and it doesn't help (or find any errors).
TL;DR: All articles are unable to be found on site front end after plugin (IssueM) error, deactivation, update, and reactivation.
Edit: More info: It also looks like past issues are unavailable. Issues is also IssueM specific, so there's that. I tried creating a test article. Interestingly, before I published I was able to preview and everything looked fine. After I published it gave me the same "This is somewhat embarrassing, isn’t it?" message as the other articles.
I got it working! Posting this here in case it helps someone in the future.
Apparently the permalink structure got messed up. I went to Settings > Permalinks and discovered that a custom structure was set, though strangely it wasn't even a valid structure. I changed that to /%postname%/ and it all worked!
I manage a Wordpress site for a client, after trying to resolve some updates I cannot seem to edit anything inside the editor anymore. Everything is blank (see image). The site itself is still up and working fine. Has anyone ever encountered this?
There are tons of reasons, why this could be happened. Like #jiali sent you a very helpful link, I would say to try and open the debugger: inside wp-config.php file search for define('WP_DEBUG', false); and change the value to true. Then, you propably would see what causing the error and where (either plugin or custom code, or maybe plugins conflict)
Okay so in this case the problem was (when I checked the error log) that the update was not properly installed. Deactivated the plugins inside PHP MyAdmin and then reinstalled Wordpress manually onto site.
I have moved my wordpress site to a new server, and login.php is working right.
But in there many plugins is not working well, for example the login page is not linked to any other page after I submitted my username and password.
Here is the login page link:
https://cpalocate.ca/login/
I have entered the invalid username and password, it will also show the blank page, but not error page.
When I add this code in wp-config.php
define('WP_DEBUG', true);
it showed this text. " Notice: Constant WYZ_THEME_DIR already defined in /home/.....".
And I have fixed that, but the same problem.
Now there is no any error debug, but the login page is also not working.
I changed the php version of my site in cpanel, but the same.
Anyone has your idea to solve this issue?
It is possible (I'd even say likely) that on your old server it was using PHP 5.6 (or at least a different version of PHP than your new server) and now you're on 7.0, 7.2 or even 7.3. It would seem that if that's the case, some of your plugins are incompatible.
You should edit your wp-config.php and add
define('WP_DEBUG', true);
so that you can see the errors on your screen, at least until you figure out which plugins are causing the problems.
If it is a matter of PHP version, check with your host to see if they can roll you back, or you'll have to either contact the plugin author and have them update the plugins, or you need to fix the code yourself, based on whatever the error messages you see are.
Edit: if this doesn't solve your problem, first try a default WordPress theme like twenty-nineteen or whatever. If that doesn't solve it, then disable each plugin one at a time until you find the culprit.
I have turned off all my plugins and turn back it one by one.
I have found one of my plugins is caused this problem, it is PM Pro Settings.
So I deactivated it and there is no any problem now.
I am using other plugins on behalf of that one.
When I update a file in WordPress admin editor, I get an error.
Something went wrong. Your change may not have been saved. Please try
again. There is also a chance that you may need to manually fix and
upload the file over FTP.
Please help me how to resolve this error.
Thanks in advance!
Try using the Health Check plugin for general troubleshooting. This can determine is a plugin is causing the issues. If its not a plugin then most likely a server permissions issue.
Is it taking a good while for the message to appear (i.e. the ajax request times out)?
I had that issue and enabled PHP-FPM slowlog to found out it was a specific plugin causing the timeout.
I got a problem that's driving me up the wall: I made a Wordpress Blog, using the Gantry framework for layout en several different widgets and plugins. Everything works fine in FF, Safari, and Chrome, but trying to open the site with IE 8 the browser crashes or in the best cases I get a message that the tab has been closed and reopened due to an error; after which the site is loaded fine. I try finding out what happens during the opening of the page, but the debug panel of IE doesn't point out any error!
Does anybody have clue on what the problem might be?
The website is: http://www.danielevecchiotti.it/
I suffered from the same attack today, so I investigated a bit:
That injection is done through the hole in one of the plugins, most likely through the outdated contact-form-7 plugin. Check if you have this folder in your wp-content/plugins directory - even if it is not activated in Wordpress, the very presence of it there is a potential security threat as the attacker can use the direct URL of the plugin faulty file to access it.
(source: http://wewatchyourwebsite.com/wordpress/2011/11/wordpress-websites-infected-through-outdated-contact-form-7-plugin)
Patching the hole: if you use this plugin, update it to the latest version which is not vulnerable. If you don't use it and just keep it deactivated (like I did), you can remove it at all.
It is also a good idea to prevent people from accessing your plugins directly. You can create a wp-content/plugins/.htaccess with the following content:
<Files *.php>
deny from all
</Files>
This might not work with every configuration, but usually plugins are only accessed in the code, not with HTTP calls so that shouldn't do harm to visitors' experience.
Restoring your site: If you don't have backup of your *.php files to restore them all from by overwriting your current ones, you need to search for every file containing the string specific to the malicious code, e.g. "eva1fYlbakBcVSir". Then you need to edit all those files - for every file, remove a long line from it's end.
Or if you're proficient with command line and, say, perl, you can build a regular expression to do the work for you.
What was the purpose of the attack? Obviously there were links to some Java plugin added to your site's pages by those code snippets. The plugin added is believed to be the following: http://www.microsoft.com/security/portal/Threat/Encyclopedia/Entry.aspx?name=Exploit%3aJava%2fCVE-2010-0840.KM&threatid=2147649278
However, I didn't manage yet to decipher the injected code fully - it's very well messed up and the reverse engineering is hard. So I can't tell for sure that apart from showing that Java plugin to visitors the exploit was doing nothing like reading users' passwords or removing some files (unlikely, but possible).
I can't find any information about that as well, looks like nobody traced the consequences fully yet.
Please share if you know more.
I finally found the problem: the site has been HACKED!
I noticed the index.php and wp-blog-header.php files modified on a strange date and time. Downloading the two files I found they had been compromised: a whole section of unreadable code had been added. Uploading the original PHP files the above problem was solved.