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
Related
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.
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?
So I'm having an issue with a MAMP & Wordpress local install where frequently on reload I get a "No data received ERR_EMPTY_RESPONSE" page. I also get the following in the console.
/deep/ combinator is deprecated. See
https://www.chromestatus.com/features/6750456638341120 for more
details. http://localhost:8888/xxx/:1 GET
http://localhost:8888/xxx/ net::ERR_EMPTY_RESPONSE
http://localhost:8888/xxx/:1 GET http://localhost:8888/xxx/
net::ERR_CONNECTION_REFUSED
I've not been able to find anything that addresses these errors, except to restart the server. Not sure what else I need to do to trouble shoot this.
I've been getting this error constantly over the past few days. I found that if I switched themes back to the default twentyfifteen it solved the issue.
There was obviously an error somewhere in my custom theme, so I started to re-name files to find the culprit. It ended up being the functions.php file. There was this snippet of code in there:
'packages-nav' => _('Packages Nav'),
The single underscore was causing the issue.
Try a similar method on your theme to find the error. Not sure if this is any help, but I've been Googling the issue and couldn't find any solutions, so when I found a fix I wanted to share.
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));
I am getting this error message while trying to access a wordpress blog which is installed in a directory. Is this due to .htaccess or something? Any help is appreciated.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster#xxxxx.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at xxxx.com Port 80'
This is almost always a problem with your Apache configuration. Errors originating in PHP won’t trigger the Apache 5xx handler, which is what you’re seeing.
Unfortunately, without more information, your problem is impossible to diagnose. I’d recommend that you:
Check the logs. First thing! It should give you a better idea where your problem is.
Stop and restart Apache. If there is a problem with permissions on something Apache needs write access to (logs), it could completely fail to start. This should give you the proper motivation to fix the problem, particularly if there are other VirtualHosts on that Apache.
Move your .htaccess file(s) somewhere else. If Apache works, you know it’s a problem with that file.
It sounds like you're getting some sort of PHP error but PHP isn't set to display errors. You'll want to check your Apache logs for detailed error info.
The mostly likely culprit is that you're missing some prerequisite for running WordPress, although all you should really need is Apache, MySQL, & mod_rewrite.
I was able to fix it by adding the following line to my .htaccess file:
php_value memory_limit 128M
Russ
This is happening to me RIGHT NOW.
As to from what I know, my hosting providers did a DNS change and so I'm waiting for the DNS to propagate, it's been like three hours and still zero.
Blog is showing ok, apache is up and working, I just can't get access into the WP Admin area.
If it does get fixed by tomorrow, I'll reply here so it can be of help for others.
Edit: I just fixed my problem.
In my case it was determined that the Fast Contact Form plug-in was creating the problem. I modified the folder name from si-contact-form to si-contact-form-hold then I regained WP Admin access.
After that I created a php.ini file with this string inside 'memory=64MB' and saved that into the wp-admin folder.
Manually deleted the si-contact-form-hold (to avoid possible corrupted files) and reinstalled the Fast Contact Form.
All my settings were already there and everything is back up and running good!
Hope this helps.
Look at http://zemalf.com/1470/wordpress-htaccess-the-definite-guide/, and look for the paragraph which says something like "Good and default .htaccess looks like this...."
My issue was a little bit different. I had an .htaccess file inside the wp-admin directory. I deleted the .htaccess inside of wp-admin and that fixed my problems.
Unfortunately it could be anything. Do static pages on the site work properly.
Have you checked the server logs.
I think it is likely to do with php. If static pages are there then possibly your config for wordpress is incorrectly configured or files missing.
Has php be working? Did the blog work and then stop? Did you get through the install process?
Check wordpress files ownership for the user are correct or not.
In linux ls -laZ command will display the ownership.
For setting the ownership for a folder use this command
chown -R username:username /user/username/public_html/
An HTTP 500 error could be caused by a great many things. Have you changed your .htaccess file recently? If you try to use a .htaccess feature that is disabled on your host, that is one possible cause.
Some more points
Blog has been running successfully. Just observed this problem since yesterday.
Blog is in a directory so it works something like this www.xyz.com/blog. Apparently www.xyz.com is working perfectly.
Update on logs
Getting these two errors in the logs:
File does not exist: /home/directory/public_html/500.shtml
/home/sub-directory/public_html/sub-directory/.htaccess: RewriteCond: bad argument line '%{REQUEST_FILENAME}!-f'
/home/directory/public_html/sub-directory/.htaccess: # without matching # section
How do I restart apache on cpanel ?
memory = 64MB;
The above line inside a php.ini file uploaded to the wp-admin folder solved my problem. I was not being able to log into the dashboard either through /wp-admin or /wp-login.php, and was getting a HTTP server error 500.
There can be multiple causes for this, I just solved mine, after 2-3 hours of going crazy.
I had another WP instance in a subdirectory inside the main WP instance (in the root folder).
Have checked / deleted .htaccess
deleted plugin folder
In the end, it was to do with the permission of the subfolder in which second instance was running. It was originally 775 (write permission for group), I had to change it to 755 (no write permission for group) and this finally fixed it, like magic.
This is of course just one of possible the answers to your question, I wanted to write it down though as I didn't find it explicitly written anywhere so it might save others some time.