Parse error , Wordpress No FTP server - wordpress

I edited function.php file in wordpress. I edited this accidenlty incorrect. When i try to login in or go on wordpress page there is an error "Parse error: syntax error, unexpected ''" data-text="'' (...) "
I dont have installed plugin with ftp on wordpress, what is the solution ?how to fix it?

I know where error is, I just dont have access to fix it. I cant even log in to wp-admin.
Here is whole error :
Parse error: syntax error, unexpected ''" data-text="'' (T_CONSTANT_ENCAPSED_STRING) in /home3/dhazard/public_html/zero-below.com/wp-content/themes/credenza-wp/vc_templates/thb_share.php on line 10
I dont have code because i dont have access to this.
I tried to access via ftp but it doesn't work.
Is there any other way to access wordpress files to fix this bug in code?

Related

WordPress internal Server Error 500 when moving hosts

I am trying to move my WordPress site from one hosting service to another. I made a backup and restored it on the new host. But I am getting internal server 500 error on the site. I have tried to fix the .htaccess file but its still giving error.
The issue is, if I try to rename it to test it, its not giving the internal 500 error but redirecting me to WordPress installation page called wp-admin/install.php
Can someone help me for solve the issue.Thanks
All the suggestions that are given are great, but if those do not work, then you can try to downgrade PHP. It had worked in my case when I was facing the same error.
You can dig in the error log and find what exactly is causing the error.
Steps for debug.
As previously said: stop all plugins and try again. If problem still exists check logs again. Then switch to default theme and so on.
Btw have moved the DB properly? With the same connection settings.
I think you should check your wp-config.php and PHP version. make sure you have entered correct DB info in wp-config like db_name, password, and table_prefix etc...
if You have changed hosting, probable You need to check database and .htacess file. If You are getting installation page means its database issue, Please check database prefix in wp-config.php file and it will solve your issue.
there are lot of causes for internal server error. The main reasons for internal server errors are.
Corrupt .htaccess file
PHP Memory limit
Faulty code in Theme
Corrupted plugin
Corrupted core files
Incompatible PHP version
In oder to fix this issue, you need to investigate in step by step order.
To solve this issue first of all you need to enable Debug mode and check the issue.
after that try with restoring .htacess file, enabling default theme, disabling plugins etc.
if you still facing 500 internal server issue, follow tutorial on WPERA to fix 500 internal server error. Hope this helps.

Can't update files on the wordpress editor

I'am getting the message "Can not send a message to the site to verify the absence of fatal errors. As a result, the PHP modification has been canceled. You will need to upload your modified PHP file by other means, for example using an FTP client." when i try to update files on the wordpress editor, i've noticed this error after the last wordpress update.
Thanks,
You are trying to update the code has error. Please check the code.

Unable to access/use my Drupal site after .htaccess mistake

hoping i could get some quick help on this problem.
Here is the URL for my site: www.eastwestcards.com - I accidentally used the .htaccess file generated by drupal for someother sites on my hosting and I think this is what caused this error. Could anyone tell me how to fix this? It literally happened right after i copied the drupal .htaccess file and used it on another domain that uses drupal as well. This same error occurs when i try accessing my other domain which uses drupal.
This is the error that I am reading when i try to access my site
Parse error: syntax error, unexpected T_CLASS in Parse error: syntax error, unexpected T_CLASS in /nfs/c07/h04/mnt/108263/domains/eastwestcards.com/html/includes/bootstrap.inc on line 287
Thanks in advance for any help given.
I think here you could find a answer http://drupal.org/node/1373932

drupal wont open - gives a parse error

I was creating a module and had made a typo and then got a "Parse error: syntax error, unexpected '[', expecting ']' in..." error. But now when I try to go to my drupal site it gives me this error even though I fixed it! I can't get into the site at all! How do I flush this error out of drupal so that I can restart?
You knew what you have been doing last to your module, comment all last inserted code and check than if your site works. If it works add code again, also check if that code is cashed for some reasons and clear cache.

finding out what is causing dreaded "The website encountered an unexpected error. Please try again later." message

while doing a drupal 6 to 7 upgrade I am getting the not so helpful message
"The website encountered an unexpected error. Please try again later." everytime I go to certain pages.
ex) /admin/config
What is the best way to find out what is causing the fatal error so that I can fix it?
All I can think of right now is to start disabling contributed modules until that page works or looking through the logs.
Thanks.
If dlog/watchdog and php error log aren't working, try this:
go on /includes/error.inc
comment line line 245
print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.')));
and put this
print theme('maintenance_page', array('content' => t('The website encountered an unexpected error. Please try again later.'.$fatal.' '.var_export($error,true))));
Very similar, you put var_export($error,true)) at end of error
By clearing the logs at /admin/reports/dblog then reloading the broken page I easily could identify the offending module when I rechecked the log.
Site is working fine now : )
You definitely should be disabling all contrib modules to perform the upgrade.
Then enable them a few at a time after they have been replaced with the D7 version. When replacing the module, be sure to clean out the entire module directory, just in case some old files remain.
This should help narrow down the problem and be sure to check the php error log in case you find something there. (Although that is usually in the case of the White Screen Of Death.)
As gyozo mentioned if you are not able to log into the site, then it might be difficult to debug.
Then probably you could try
Log into database and run delete from watchdog;
Refresh the page
Then execute the database query select variables from watchdog;
Look out for the text near message
Am replying on 8 years old thread. But wanted to share my inputs to fix this error. I am using Drupal 8.*
I faced the same error when I tried to clear the cache (From performance). I tried several things mentioned in most of the blogs or drupal help.
In the end I came to know that, there was some YML formatting issue in my Drupal 8 theme files. I removed tabs and validated my YML files from online YML validator.
In Drupal 8.7 you can do this in core/lib/Drupal/Core/EventSubscriber/FinalExceptionSubscriber.php line 126:
$content = $this->t('The website encountered an error. Please try again later.' . var_dump($error));

Resources