Wordpress parse error unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING - wordpress

Mates, two days ago, the webhosting of a site i'm administrating went down.
Now it seems to be back working, but when I try to acces to wp-admin i recieve the following error message:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,
expecting T_STRING or T_VARIABLE or T_NUM_STRING in
/home/ohmycut/public_html/wp-settings.php on line 80
These are lines from 75 to 85:
// Include the wpdb class and, if present, a db.php database drop-in.
require_wp_db();
// Set the database table prefix and the format specifiers for database table columns.
$GLOBALS['table_prefix'] = $table_prefix;
wp_set_wpdb_vars();
// Start the WordPress object cache, or an external object cache if the drop-in is present.
wp_start_object_cache();
I, honestly, don't understand why am i getting this error.
Any ideas?
thanks!

Try contacting the web hosting service to see if they can revert it to a state before the service went down.

Related

Uncaught error in Pagespeed Insights on Wordpress installation

Have no clue what ghost-rider is... Error follows.
Lighthouse returned error: generic::internal: Extension result empty.
Lighthouse calling Page.navigate with https://www.redacted.com/blog
Uncaught (in promise) Error: Extension timed out. No call to exit()
before render timeout. at wrs.Extension.onTimeout_
(http://ghost-rider/devtools_script_api.js:5576:13) at
http://ghost-rider/devtools_script_api.js:708:9 at Map.forEach
() at chromium.DevTools.Connection.dispatchMessage
(http://ghost-rider/devtools_script_api.js:707:76) at
chromium.DevTools.Connection.onJsonMessage_
(http://ghost-rider/devtools_script_api.js:689:65) at :1:40
i agree it looks sketchy. i'm getting that same error when running pagespeed on my joomla test site. i grepped 'ghost-rider' on my server and full-text searched my db and can't find that anywhere on the site.
the url doesn't work and the domain ghost-rider is invalid of course. no .com or anything. weird...
running lighthouse on https://www.webpagetest.org/lighthouse gives a timeout after 80 seconds on my site (nothing about ghost-rider). http://gtmetrix.com/ and sites like that seem to work fine and the site loads in about 6-10 secs.
ran an ispp scan and didn't find anything.
nothing else to add... anyone else getting this on pagespeed/lighthouse?

Not able to display 404 error in prod environment

When I try to throw a simple throw $this->NotFoundHttpException('We do not currently have a website configured at this address. Please visit our website for more information or contact our support team');in dev environment, it works fine. But when I do the same in prod environment I get 500 server error.
Any ideas?
Here are screenshots of my dev and prod log files
Note: 500 error only happens when I use www in the url in prod env. On using any other word eg. nike, this is what i get
Here is the dev env result for the normal www.blore.eduflats.com url
According to the symfony documentation in order to return a 404 from your controller you need to do the following:
throw $this->createNotFoundException('The product does not exist');
Whereas, you have
throw $this->NotFoundHttpException
The error you are seeing is telling you that NotFoundHttpException does not exist. To fix your problem simply replace NotFoundHttpException with createNotFoundException
You call Eduflas.. UniversityResolver->NotFoundHttpException();
If you want to trhow exception like this, you should declare it.
Symfony Controller have $this->createNotFoundException('Something Not found');
You can throw 404 like this:
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException
//...
throw new NotFoundHttpException("Not found");
Use this way to be sure that Exception exist and test it.
Anyway clear your production and dev cache to be sure you use "the same code".
Last thing that come to my head - its possible you override error pages and you make something to your error.html.twig or error404.html.twig and you got different pages.
EDIT
When i enter your http://blore.eduflats.com/ i got
"array(29) { ["HTTP_HOST"]=> string(18) "blore.eduflats.com" ["HTTP_USER_AGENT"]=> s..."
Anyway your dev env. got error too so how it can work on prod env...
If you throw NotFoundException in dev you should get symfony debugger page and this error. In porduction this error is catch with ExceptionController and display blank error page (user should not see exceptions, only 500 error)

You have requested a non-existent service "projet_rating.manager.rating"

I am getting the following error message: "You have requested a non-existent service "projet_rating.manager.rating" - Help please.
Two possibilities come to mind:
1) Somewhere in your application you have a controller that includes $this->container->get("projet_rating.manager.rating")
2) Somewhere in a config file you create a service that includes as an argument %"projet_rating.manager.rating"%.
If you're using an IDE that allows searching multiple files for a string, try searching for "projet_rating.manager.rating" in ...src/ or ...app/config

Why do I get a "Access to the path denied" error when path doesn't even exist

I get the following intermittent error in my asp.net application
System.UnauthorizedAccessException: Access to the path '\\[path to file]' is denied.
The application is trying to open the file when this error occurs, but when I check the path and file I discover that it doesn't actually exist. Shouldn't I be getting a 'file not found' type error? Can someone explain how this could be possible?
I'm not 100% sure (in that I don't have a link to back this up) but my guess is that IIS suppresses file exist errors to prevent the possibility of systematically testing a multitude of different paths/files determine an applications folder/file structure.
Much in the same way you shouldn't display a login message saying email exists but the password is wrong, which would allow someone to fish for emails.

Drupal CMIS Alfresco-link issue

I am getting the following error when I try to update or add contents to alfresco via drupal.
Notice: Undefined index: workspace://SpacesStore/2e3ea968-07ec-48c8-8295-80bfbef554d6 in CMISService->getLink() (line 421 of /home/drupal/myra/sites/all/modules/contrib/cmis/cmis_common/lib/cmis_repository_wrapper.php).
HTTP call to [http://myra-dev-repo.bmi.utah.edu:80/alfresco/service/cmis/s/workspace:SpacesStore/i/2e3ea968-07ec-48c8-8295-80bfbef554d6/content] returned [500]. Response: Web Script Status 500 - Internal Error Web Script Status 500 - Internal Error The Web Script /alfresco/service/cmis/s/workspace:SpacesStore/i/2e3ea968-07ec-48c8-8295-80bfbef554d6/content has responded with a status of 500 - Internal Error. 500 Description: An error inside the HTTP server which prevented it from fulfilling the request. Message:11212017 Failed to execute transaction-level behaviour
I understand that the problem is with the getLink() method which is returning an index of the workspace where the data needs to be saved.But I am unable to figure out where the change has to be made.Moreover this is a new error that has popped up recently.I remember not changing/updating anything : - ( drupal or alfresco setup) that was working just fine.
Please let me know what is going wrong.Thanks.
This problem arises only if the permissions are messed up within the server.So proper attention needs to be paid to, when the content is edited/added/modified etc

Resources