No Fortunes Found - php

I have a site hosted at a shared host.
the site is absurdly slow. Sometimes it takes 45 seconds for the pages to generate. I've been optimizing the scripts, images and generally tidying it up.
This site is a small site, about 20 unique visits, 4 pages average/visit
It is, however, feeding iTunes with an RSS feed of podcast MP3s.
The server (apache/php5.4) error log has hundreds of entries per day like this:
[Mon Mar 03 22:55:09 2014] [error] [client 37.139.52.23] No fortunes found, referer: http://sugarkun.com/
[Mon Mar 03 22:56:21 2014] [error] [client 199.30.20.38] No fortunes found
[Mon Mar 03 23:15:03 2014] [error] [client 202.46.62.29] No fortunes found
[Mon Mar 03 23:16:30 2014] [error] [client 119.63.193.131] No fortunes found
(I have no idea what www.sugarkum.com is)
I have no idea what a "Fortune" is. I'm trying to eliminate as many variables as possible to isolate the slow load.
Can anyone help me define this error?

Seems pretty clear the host is the issue. I keep resetting it and it pops back up.
Interestingly, it's config'd to 5.4 and phpinfo returns 5.2
Regardless, I belive this to be the problem. Moving hosts and hate mail to support seems to be the only two options.

Related

Extremely slow wordpress

I have a big problem with my website. 2 days ago it started to have high response times, slow menus, etc...
When I checked the apache log I saw this:
[Tue Nov 15 08:03:02.483834 2016] [cgi:error] [pid 5936] [client
90.164.184.119:35610] End of script output before headers: ea-php56,
referer: http://m.facebook.com/
[Tue Nov 15 08:03:03.528154 2016] [cgi:error] [pid 6856] [client
90.171.139.86:55239] End of script output before headers: ea-php56,
referer: http://m.facebook.com/
[Tue Nov 15 08:02:48.314544 2016] [cgi:error] [pid 6645] [client
94.143.78.239:54843] AH01215: PHP Deprecated: Automatically populating
$HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.
To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini
and use the php://input stream instead. in Unknown on line
0:/usr/local/cpanel/cgi-sys/ea-php56, referer:
http://www.url.es/moreurl....
Apache generates this lines of code each 4 or 5 seconds, i think may be this te cause of the slow server (VPS SSD).
I tried to set always_populate_raw_post_data to -1, and the performance has improved, but not even close what it has to be.
The website is based on wordpress, and I hope someone has experience with this issue...
Thanks in advance
Solution: Finally I did set up "always_populate_raw_post_data to -1" and I reinstalled WP Supercache on WP and all it's fine now.

Internal Server Error 500 on .PHP pages only

This is a problem that has been occurring a few times a week for the last 12 months but it never used to last for longer than an hour maximum, sometimes a lot less. This time however, it has been showing for nearly 18 hours so clearly it's not going to go away on it's own this time. I've done the usual google search and also checked similar questions on here but nothing gave me a solution.
I have hosting with HostPapa and the error log within cPanel doesn't help me either. It normally just says that a file called robots.txt cannot be found and it also can't find a 404.shtml file. At this moment in time, the error log is completely empty, even if I try to visit the site beforehand.
Best theories I heard was either Wrong Permissions and/or disabling Zend Guard?
[Fri Sep 26 15:54:05 2014] [error] [client 62.24.222.132] File does not exist: /home/tmsth125/public_html/robots.txt, referer: http://tmsthermalstore.com/robots.txt
[Fri Sep 26 15:53:56 2014] [error] [client 62.24.222.131] File does not exist: /home/tmsth125/public_html/404.shtml, referer: http://tmsthermalstore.com/helloworld.php
[Fri Sep 26 15:53:56 2014] [error] [client 62.24.222.131] File does not exist: /home/tmsth125/public_html/helloworld.php, referer: http://tmsthermalstore.com/helloworld.php
After contacting Customer Support via Live Chat, they fixed the issue and confirmed it was related to permissions in the php.ini file.

Server truncates/interrupts output when request comes from external computer, but not from 127.0.0.1

Setup:
EasyPHP Dev server 13.1VC11 (Apache 2.2.4, MySQL 5.6.12, PHP 5.5.0)
Windows 7.
Apache is set up with multiple virtual hosts each pointing to a separate folder under ...data\localweb\.
Server also acts as a gateway between internet and local network.
My wife has made a webpage which includes JavaScript and jQuery and PHP.
When I open a browser on my server computer and access the pages, everything works as they should. Via both these addresses:
http://127.0.0.1/liselotte/projekt5/2vs.php
http://liselotte.mine.nu/projekt5/2vs.php
However, when I try to access the page from another computer on my local network, the two longer pages in my wife's project gets truncated. (file 2vs.php, also accessible on the page's main menu as "V/S") It always gets truncated at the same place, in the middle of a 8-letter word, in a piece of HTML formatted text.
I use Firefox and can see when the code cuts off before the browser displays an error message that "transfer was aborted". (It's in Swedish, so I'm a bit uncertain about the exact wording of the message) "The connection to the server was severed during retrieval of the page". (no HTTP-error number)
I have also tried Internet Explorer and Chrome, transfer is cut off at the exact same place every time.
Weirdly enough, the page seems to work when accessed from internet.
The Apache config file contains
Listen 127.0.0.1:80
Listen trilliadin.mine.nu:80 #which is one of the virtual hosts
Listen 192.168.137.1:80 #which is Windows local address assigned to my LAN
I've tested disabling all firewalls, but no difference.
I dumped about 4MB text into a file.html to see if this also gets truncated but the whole text-file gets transferred.
Does anyone recognize these symptoms?
EDIT:
Regarding error-reporting... I do get some weird apache-errors when I start the server.
[Wed Jan 15 21:13:37.989659 2014] [mpm_winnt:notice] [pid 968:tid 424] AH00424: Parent: Received restart signal -- Restarting the server.
Failed loading D:\EasyPHP\binaries\php\php_runningversion\php_xdebug-2.2.2-5.4-vc9.dll
PHP Warning: PHP Startup: in Unknown on line 0
[Wed Jan 15 21:13:39.861663 2014] [mpm_winnt:notice] [pid 968:tid 424] AH00455: Apache/2.4.4 (Win32) PHP/5.5.0 configured -- resuming normal operations
[Wed Jan 15 21:13:39.861663 2014] [mpm_winnt:notice] [pid 968:tid 424] AH00456: Server built: Apr 8 2013 13:46:39
[Wed Jan 15 21:13:39.861663 2014] [core:notice] [pid 968:tid 424] AH00094: Command line: 'D:\\EasyPHP\\binaries\\apache\\bin\\apache.exe -d D:/EasyPHP/binaries/apache'
[Wed Jan 15 21:13:39.861663 2014] [mpm_winnt:notice] [pid 968:tid 424] AH00418: Parent: Created child process 5240
[Wed Jan 15 21:13:40.017663 2014] [mpm_winnt:notice] [pid 5328:tid 436] AH00364: Child: All worker threads have exited.
Failed loading D:\EasyPHP\binaries\php\php_runningversion\php_xdebug-2.2.2-5.4-vc9.dll
PHP Warning: PHP Startup: in Unknown on line 0
[Wed Jan 15 21:13:41.655666 2014] [mpm_winnt:notice] [pid 5240:tid 432] AH00354: Child: Starting 64 worker threads.
But I don't understand what it means. Tonight, the Virtual Host liselotte.mine.nu became unresponsive, while virtual host trilliadin.mine.nu continued working. The problem resolved when I restarted the apache server. (see error log above)

Huge error_log filled with zeros at Joomla site in public_html directory causing server hang

I am not sure if this is related to PHP code/Joomla plugin/component or server issue so to go and post my question at serverfault.
I have a dedicated server running CentOS release 6.4 (Final) and CPanel 11.38.1 (build 15) with [Apache/2.2.24 (Unix) PHP/5.2.17] and recently we had brute force attacks which were causing system hangs with messages like "HANG: chkservd on server". After setting up a DenyHosts and changing ssh default port the server stabilized for some days until it started to suddenly hang with no specific errors in logs nor any email notifications.
The server runs just one website but with some traffic (about 2000 visitors per day) and a large Joomla database. The site was up and running flawlessly since March 2013, until two weeks ago.
After investigating, I have noticed that the error_log under the public_html (default Joomla site directory) size was over 200MB but with no specific error messages but just lines with date/time and zeros "0"!
[24-Jul-2013 12:09:18] 0
[24-Jul-2013 12:09:18] 0
[24-Jul-2013 12:09:18] 0
[24-Jul-2013 12:09:19] 0
[24-Jul-2013 12:09:19] 0
[24-Jul-2013 12:09:19] 0
[24-Jul-2013 12:09:19] 0
[24-Jul-2013 12:09:20] 0
[24-Jul-2013 12:09:26] 0
[24-Jul-2013 12:09:26] 0
[24-Jul-2013 12:09:30] 0
Almost every second, thousand lines like those above!
Sometimes the site crashes with "jos-Error: Application Instantiation Error" and some other times with an error:
PHP Fatal error: Call to a member function get() on a non-object in ...
which is due to database issues when Joomla tries to load params from the database and it fails.
I have setup a backup of the site on a local windows server machine with apache and php installed [Apache/2.2.19 (Win32) PHP/5.3.6] and these zero "0" errors also spawn on every site call with some more details in \Apache2\logs\error.log like:
[Wed Jul 24 14:42:32 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:32 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:32 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:33 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:33 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:33 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/
[Wed Jul 24 14:42:56 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/mousiki
[Wed Jul 24 14:42:56 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/mousiki
[Wed Jul 24 14:42:56 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/mousiki
[Wed Jul 24 14:42:57 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/mousiki
[Wed Jul 24 14:42:57 2013] [error] [client 192.168.1.66] 0, referer: http://virtdev.ose.domain.com/mousiki
thus I assume it is not server related, but Joomla site related from a plugin/component.
Also, we have scanned the site with online site scanners and plain file search with antivirus tools for bot injections with no positive results.
How we can locate what is causing these zeros as errors?
Finally I found what is/was causing these zero errors.
First of all, to locate what was spawning these errors I did a grep to all sites php files for the php function error_log() (http://php.net/manual/en/function.error-log.php), which writes directly the string argument message without any other information like filename, line numbers etc. At the results I saw there was an error_log(0); at a Joomla plugin that it was enabled. After opening the plugin php file, I figured out that it was my addition in order to debug something and I've had totally forgotten there. So, after deleting the line there was no more zero character errors. I don't even remember what I wanted to achieve by that call, it doesn't make any sense at all. Maybe I wanted to use error_reporting(0) to disable all errors and mistyped.
And to make it clear, these errors were not related and responsible at all for the server crash/hang. I fixed the crashes by creating a new database and restoring the backup file, so, the old database was damaged.
Now, after 24 hours, there was no crashes/hangs and everything works perfect again.
EDIT:
After some further investigation, I have realized that this error_log(0) was not my addition and it was already there when I installed the plugin! The plugin/component is Joooid, an Android client for Joomla (http://www.joooid.com). The code is located at the plg_joooidcontent inside joooidcontent.php:
...
/**
* #since 1.6
*/
public function onContentPrepare($context, &$row, &$params, $page=0)
{
error_log(0);
//echo "<pre>";
$row ->text = $this->executeTokens($row->text);
//print_r($row);
//die();
}
...
Even now it is there with the latest release. I will send them a link to this question so to inform them about it.

I keep getting the same error in my error logs on my apache server using cpanel

cPanel Version 11.28.87
Theme x3
Apache version 1.3.42
PHP version 5.2.13
MySQL version 5.0.92-community
Architecture i686
Operating system linux
I noticed in the Error Log that I was getting the same error repeatedly. A simple missing .gif that was being requested.
[Tue Apr 12 12:12:23 2011] [error] [client --.---.---.---] File does not exist: /public_html/themes/3col_blue/images/dogcat.gif
So I thought well lets just put that .gif (our logo) there...
Now I am getting a whole slew of errors regarding file does not exist that look like this:
[Tue Apr 12 02:27:47 2011] [error] [client --.---.---.---] File does not exist: /home/--------/public_html/index.php+++++++++++++++++++++++++++++++++Result:+\xe8\xf1\xef\xee\xeb\xfc\xe7\xee\xe2\xe0\xed+\xed\xe8\xea\xed\xe5\xe9\xec+"reltWeiweessy";+\xe7\xe0\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe8\xf0\xee\xe2\xe0\xeb\xe8\xf1\xfc+(\xe2\xea\xeb\xfe\xf7\xe5\xed+\xf0\xe5\xe6\xe8\xec+\xf2\xee\xeb\xfc\xea\xee+\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe0\xf6\xe8\xe8);
[Tue Apr 12 02:27:42 2011] [error] [client --.---.---.---] File does not exist: /home/--------/public_html/index.php+++++++++++++++++++++++++++++++++Result:+\xe8\xf1\xef\xee\xeb\xfc\xe7\xee\xe2\xe0\xed+\xed\xe8\xea\xed\xe5\xe9\xec+"reltWeiweessy";+\xe7\xe0\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe8\xf0\xee\xe2\xe0\xeb\xe8\xf1\xfc+(\xe2\xea\xeb\xfe\xf7\xe5\xed+\xf0\xe5\xe6\xe8\xec+\xf2\xee\xeb\xfc\xea\xee+\xf0\xe5\xe3\xe8\xf1\xf2\xf0\xe0\xf6\xe8\xe8);
how did I make this go from bad to worse?
Are there referers for those particular hits in the access_log? Looks like someone/something is pointing at your site with a badly constructed link.

Categories