My site fails verification pagespeed (ERR_CONNECTION_FAILED) - pagespeed

My site https://www.megarion.ru/ is being tested by google pagespeed. It produces the following error: Lighthouse returned error: FAILED_DOCUMENT_REQUEST. Не удалось загрузить страницу. Убедитесь, что URL введен правильно и сервер отвечает на все запросы. Подробнее: net::ERR_CONNECTION_FAILED.

The issue you have is that your site does not have a valid SSL certificate.
The latest version of Lighthouse (the engine behind Page Speed Insights) has a problem with this and throws an error as it sees there is a certificate at the server IP address but fails to reconcile the fact that the certificate is not for your site and crashes.
Update your certificate to include your .com and it should then work fine (as the redirect I believe is where the issue is occurring).

Related

WordPress on MAMP giving 'Error 500' with internet connection

I have WordPress installed on a MAMP server. After installing some plugins I suddenly got an 'Error 500' but only when my MacBook had wifi connected.
Turning the wifi off fixes the issue, but turning it back on or uploading to a live server causes the issue to return.
After looking through the PHP log, I got:
PHP Parse error: syntax error, unexpected '<', expecting end of file
in /private/var/tmp/theme_temp_setupGlYc25 on line 2
and:
PHP Warning: Use of undefined constant REQUEST_URI - assumed
'REQUEST_URI' (this will throw an Error in a future version of PHP)
in /Applications/MAMP/htdocs/wordpress/wp-
content/themes/THEME_NAME/functions.php on line 48
Uninstalling the plugins that I had recently installed did not fix the issue, nor did re-installing MAMP or moving the installation to a new localhost.
The error is from a WordPress plugin downloaded from an untrusted source.
On installing the plugin, it wrote a number of lines of code in the functions.php file within the theme I was using which was throwing the 'Error 500' as it tried to connect to a server at 'spekt.cc'.
By following the PHP log; googling the Parse error and PHP warning, I saw a post on Medium from someone saying a similar thing happened to them with WordPress attempting to connect to 'spekt.cc'.
Using 'ack' in Homebrew, I searched my WordPress directory and found the affected files. (It had been installed on all themes within the directory)
After removing this PHP code it had inserted and removing the affected plugin, my WordPress is working fine again.

Warning Error on Godaddy server

Recently i purchase new Linux server in godaddy. i transfer my wordpress website in my one another server to godaddy server. but in godaddy server display one Warning error message: "Warning: preg_replace(): Compilation failed: unknown option bit(s) set at offset 0 in /home/flyfabrics/public_html/wp-includes/shortcodes.php on line 309" and this message also display in inner pages.
My wordpress site is work perfect in my old server with out any warning message. But this warning message is only display in this godaddy server.
if any one know how to remove this warning message in godadddy server then please know me.
you might be running a different version of php/pcre on this server in comparison to your old server.
See this post here:
PHP 5.4 after-install: preg_match(): Compilation failed: unknown option bit(s) set at offset 0

http status 500- null pointer Exception only on google chrome

I am using tomcat 7 and net beans IDE 7.3.1 for my project. My servlet program is working fine on Mozilla Firefox and Internet Explorer.but when i m running it on Google chrome it shows following error.
HTTP Status 500 -
type Exception report
message description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
Controller.CreateQuestion.doPost(CreateQuestion.java:200)
javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
Filters.logoutfilter.doFilter(logoutfilter.java:27)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.34 logs.
Apache Tomcat/7.0.34
Please help anybody,
thanks.

WordPress Site Error failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

I am trying to open a WordPress site on an external server for which I do not have a domain yet using its ip address and an adjusted HOST file on my Mac to check it on the server. When I access the site I get errors like:
Warning: file_get_contents(http://domain/folder/wp-content/themes/theme-name/img/phonehead.svg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme-name/inc/control/file.php on line 16
I did find some articles on the same issues like this one. The issues is not that the path is wrong or the file is not there. It seems that it has something to do with either my router or the way I use the hosts file to resolve the domain to the new ip address.
The hosts file line I added should be fine, so perhaps there is an issue with my D-Link DVG-N5412SP router is handling the request. But nowhere did I find how I can fix the issue. What do I need to adjust?
Update
From another location I got
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme/inc/control/THeaderControl.php on line 16
This might point me to the right direction. Working on it.
To make the path request local and not over the network I had to use the WordPress template tag get_template_directory() instead of get_bloginfo('stylesheet_directory') .

LinkedIN - PHP Sample Code

I am trying to implement the LinkeIN API with PECL oAuth Module, I have managed to import my contacts and the scrip works well on my Development envoirnment
But on my Live Server it raises an exception when I get redirected to my website after authentication(From Linked In Website)
I have confirmed the following:
1. The TimeZone is proper and My Server DateTime is set correct.
2. The CallBack URL is proper
Exception :
Exception caught! Response: 400 1302008612531 0 Unsupported POST target {/v1/people/~:(id,first-name,last-name,headline,location,industry,distance,relation-to-viewer,current-status,current-status-timestamp,connections,summary,specialties,proposal-comments,honors,positions,educations,member-url-resources,picture-url,site-standard-profile-request,api-standard-profile-request)}
Fatal error: Uncaught exception 'OAuthException' with message 'Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)' in /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php:217 Stack trace: #0 /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php(217): OAuth->fetch('https://api.lin...') #1 /var/www/html/contaxz/app/webroot/linkedIn/example/index.php(23): LinkedIn_Request->pullConnections() #2 {main} thrown in /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php on line 217
Please suggest
Thanks
Ravi
I had been breaking my head with the code, server configuration, oAuth installation, php and apache version, TimeZone and what not.... but had No Luck….
Finally, I found my way and thought of posting it here as it could help someone:
Stop Apache
Hunted for the PHP OAuth Module in the PHP lib directory in my case I found this at /usr/lib/php/modules/oauth.so
Copied PHP OAuth Module from my DEV server and uploaded it on LIVE server
Restarted apache and it worked!
Thanks
Ravi

Resources