error reading data from FastCGI server - php

I get the following error:
[Fri Dec 22 19:45:04.824183 2017] [fcgid:warn] [pid 11484:tid 140643225478912] (104)Connection reset by peer: [client xx.xx.xx.xx] mod_fcgid: error reading data from FastCGI server, referer: http://8-bit.nl/ag-admin/import.php?action=node
[Fri Dec 22 19:45:04.824289 2017] [core:error] [pid 11484:tid 140643225478912] [client xx.xx.xx.xx] End of script output before headers: getSpecificNode.php, referer: http://8-bit.nl/ag-admin/import.php?action=node
It's a PHP-script which reads XML files and post this into the database.
I found online that it has something to do with FcgidBusyTimeout. How can I change this value in .htaccess? I'm on shared hosting.

Related

PHP Fatal error: require(): Failed opening required 'template/header.phtml' (include_path='.:/usr/share/php')

I have created a website and just uploaded it on a virtual host, but when I try accessing it I get the "This page isn’t working (HTTP ERROR 500)" and I got this from the error log file, I understand it is something to do with the file paths but I don't know how to fix it. does anyone know how to fix it?
[Sun Dec 20 00:18:28.000823 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Warning: require(/home/ae504/public_html/AuctionSystem/View/Template/header.phtml): failed to open stream: No such file or directory in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000849 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000853 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000856 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5
[Sun Dec 20 00:18:28.000859 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Fatal error: require(): Failed opening required '/home/ae504/public_html/AuctionSystem/View/Template/header.phtml' (include_path='.:/usr/share/php') in /home/aee504/public_html/AuctionSystem/View/index.phtml on line 1
[Sun Dec 20 00:18:28.000862 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP Stack trace:
[Sun Dec 20 00:18:28.000865 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 1. {main}() /home/aee504/public_html/AuctionSystem/index.php:0
[Sun Dec 20 00:18:28.000868 2020] [fcgid:warn] [pid 2449] [client 89.168.52.229:52594] mod_fcgid: stderr: PHP 2. require_once() /home/aee504/public_html/AuctionSystem/index.php:5
/home/ae504/public_html/AuctionSystem/View/Template/header.phtml
The file doesn't exist or is not readable. Simple *nix error
Either your templating engine is not producing it, or it is being produced but not readable. Given your error report, there is no way of telling. Suggest you go look at whatever framework you are using.

Static PHP array throws Error 500 on every call

I have got a little problem. My application runs into a Error 500 each time this line of code is executed in PHP 7.2 (PHP 5.6 was fine)
function selfDbDM($query,$type=0)
{
global $db;
static $db_exe = array();
$error = 0;
if($type==0)
{
$db_exe[] = $query;
}
else
{
//Do Something
}
}
The calling script simply just calls
selfDbDM('SQL QUERY ...');
selfDbDM('SQL QUERY 2 ...');
etc.
Then it calls
selfDbDM('',1);
to submit every change to DB.
I am doing it that way, so that I can use mysqli_autocommit in a simple way.
Now the thing is, I have switched the server for better performance and now the code is not working anymore.
EDIT:
Errorlog
[Tue Oct 15 22:55:51.371463 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: Stack trace:, referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.371468 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: #0 /var/www/vhosts/xyz/public/system/page/contract_new.php(171): selfDbDM('INSERT INTO `ko...'), referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.371472 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: #1 /var/www/vhosts/xyz/public/system/page/contract_new.php(340): contract_new_save_step2(), referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.371477 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: #2 /var/www/vhosts/xyz/include/core.function.php(300): init_contract_new(), referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.371481 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: #3 /var/www/vhosts/xyz/public/system/index.php(58): include_page('contract_new', '/var/www/vhosts...', '/var/www/vhosts...'), referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.371485 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: #4 {main}, referer: https://xyz/index.php?page=contract_new&step=2
[Tue Oct 15 22:55:51.372000 2019] [fcgid:warn] [pid 11859:tid 140389409335040] [client 37.201.185.7:8833] mod_fcgid: stderr: thrown in /var/www/vhosts/xyz/include/functions_mysql.php on line 132, referer: https://xyz/index.php?page=contract_new&step=2
EDIT 2:
Fatal error: Uncaught Error: [] operator not supported for strings in /var/www/vhosts/cash-keeper.eu/dev2.cash-keeper.eu/include/functions_mysql.php:132
Found the issu...
PHP told me everytime that line 132 was the problem.
That was this line:
$db_exe[] = $query;
But a couple of lines later, after one successfull db commit, the array gets cleared like that
$db_exe = '';
Well PHP 7.2 doesn't support that type of "its a string, but we need an array, then its an array" anymore.
So the real problem was, that in the first db commit was doing alright because it was an array. After that one it got cleared to a string, in the secound round to commit something to the db, that could not work anymore.
The fix was just to change the line where the array was cleared to this:
$db_exe = array();
Well thanks to all.

zend_mm_heap corrupted ERROR crashing app server

I have encountered "zend_mm_heap corrupted" Error on my app server.
error_log trace is below
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] zend_mm_heap corrupted
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] Premature end of script headers: index.php
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] zend_mm_heap corrupted
[Fri Oct 16 23:25:57 2015] [error] [client "client ip"] Premature end of script headers: index.php
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] zend_mm_heap corrupted, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] Premature end of script headers: index.php, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] zend_mm_heap corrupted, referer: http://domain/
[Fri Oct 16 23:25:58 2015] [error] [client "client ip"] Premature end of script headers: index.php, referer: http://domain/
I tried different approach bu no luck. Any Idea how this problem can be fixed.
Thanks in advance
Update : Issue is resolved now.
Made two changes in app server to clear the issues.
One reinstalled the frame work used in the server. that resolved the issue of zend_mm_heap.
Secondly removed unwanted extension of homeloader.so from php.ini to end the error of Premature end of script headers: index.php.

php does not work always returns 500 error

I host 3 web site on an vps.
each has a phpt test script
a1.com/test.php
a2.com/test.php
a3.com/test.php
a1.com/test.php
a2.com/test.php
work well
but when I call
a3.com/test.php
it always report error
[Wed Jan 28 01:01:52.801563 2015]
[fcgid:warn] [pid 27783] (104)Connection reset by peer:
[client ***.***.27.***:50211]
mod_fcgid: error reading data from FastCGI server
[Wed Jan 28 01:01:52.801651 2015] [core:error] [pid 27783]
[client ***.***.27.***:50211]
End of script output before headers: test.php
your comment welcome
Speaking on personal experience, make sure that the directory/file permissions are set properly on a3.com/test.php. If not set properly they can result in a 500 error

WAMPSERVER virtual host not working and black hat error log messages

For some reason my virtual host has stopped working after installing the windows 8.1 preview which hasn't changed any files, I have check all of the settings/host file and they are still the same.
Additionally I just checked my error log and I have some strange messages with the w00tw00t black hat and I am not sure how serious it is and what is needed to prevent it as I only use the wampserver for creating and testing so I haven't really considered security that much on it. See the messages below:
[Fri Jul 05 10:46:50.530891 2013] [core:error] [pid 2276:tid 1644] [client 112.216.56.58:41021] AH00126: Invalid URI in request GET <title>phpMyAdmin HTTP/1.1
[Fri Jul 05 10:47:35.955591 2013] [core:error] [pid 2276:tid 1636] [client 112.216.56.58:37237] AH00126: Invalid URI in request GET <title>phpMyAdmin HTTP/1.1
[Fri Jul 05 10:48:40.849824 2013] [core:error] [pid 2276:tid 1636] [client 112.216.56.58:35299] AH00126: Invalid URI in request GET <title>phpMyAdmin HTTP/1.1
[Fri Jul 05 19:19:20.762245 2013] [:error] [pid 2276:tid 1644] [client 58.218.199.250:2678] script 'C:/wamp/www/domain/ip.php' not found or unable to stat
[Sat Jul 06 01:01:31.057542 2013] [:error] [pid 2276:tid 1644] [client 58.218.199.250:3488] script 'C:/wamp/www/domain/judge.php' not found or unable to stat
[Sat Jul 06 18:31:27.013514 2013] [:error] [pid 2276:tid 1636] [client 58.218.199.250:1072] script 'C:/wamp/www/domain/ip.php' not found or unable to stat
[Sun Jul 07 00:18:23.526305 2013] [:error] [pid 2276:tid 1636] [client 58.218.199.250:3124] script 'C:/wamp/www/domain/judge.php' not found or unable to stat
[Sun Jul 07 06:06:29.065962 2013] [:error] [pid 2276:tid 1636] [client 58.218.199.250:1055] script 'C:/wamp/www/domain/judge.php' not found or unable to stat
[Sun Jul 07 14:56:16.247827 2013] [:error] [pid 2276:tid 1608] [client 58.218.199.250:2531] script 'C:/wamp/www/domain/ip.php' not found or unable to stat
[Sun Jul 07 17:51:47.664564 2013] [:error] [pid 2276:tid 1608] [client 58.218.199.250:1083] script 'C:/wamp/www/domain/judge.php' not found or unable to stat
[Mon Jul 08 05:29:18.812115 2013] [:error] [pid 2276:tid 1632] [client 58.218.199.250:2121] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
[Mon Jul 08 08:24:24.184430 2013] [:error] [pid 2276:tid 1632] [client 58.218.199.250:2312] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
[Mon Jul 08 10:22:43.460832 2013] [core:error] [pid 2276:tid 1632] (20024)The given path is misformatted or contained invalid characters: [client 219.142.74.32:36211] AH00127: Cannot map GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1 to file
[Mon Jul 08 17:13:02.492876 2013] [:error] [pid 2276:tid 1608] [client 58.218.199.250:4642] script 'C:/wamp/www/domain/aop0igj.php' not found or unable to stat
[Tue Jul 09 19:40:41.125664 2013] [:error] [pid 2276:tid 1636] [client 58.218.199.250:1686] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
[Wed Jul 10 01:29:54.474140 2013] [:error] [pid 2276:tid 1636] [client 58.218.199.250:3712] script 'C:/wamp/www/domain/judge.php' not found or unable to stat
[Thu Jul 11 12:48:56.141853 2013] [:error] [pid 4272:tid 1628] [client 58.218.199.250:1354] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
[Thu Jul 11 15:49:21.114210 2013] [:error] [pid 4272:tid 1628] [client 58.218.199.250:3950] script 'C:/wamp/www/domain/aop0igj.php' not found or unable to stat
[Thu Jul 11 19:52:48.727956 2013] [core:error] [pid 4272:tid 1600] [client 199.19.107.6:52897] AH00126: Invalid URI in request GET <title>phpMyAdmin HTTP/1.1
[Thu Jul 11 19:52:50.415469 2013] [core:error] [pid 4272:tid 1636] [client 199.19.107.6:54153] AH00126: Invalid URI in request GET HTTP/1.1
[Fri Jul 12 21:26:57.610483 2013] [core:error] [pid 4272:tid 1600] (20024)The given path is misformatted or contained invalid characters: [client 202.104.192.164:33167] AH00127: Cannot map GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1 to file
[Sat Jul 13 05:37:22.188676 2013] [core:error] [pid 4272:tid 1636] (20024)The given path is misformatted or contained invalid characters: [client 85.249.4.47:56578] AH00127: Cannot map GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1 to file
[Sat Jul 13 20:24:14.463941 2013] [:error] [pid 4272:tid 1600] [client 58.218.199.250:2994] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
[Sat Jul 13 23:26:20.631467 2013] [:error] [pid 4272:tid 1600] [client 58.218.199.250:2639] script 'C:/wamp/www/domain/proxyheader.php' not found or unable to stat
I had the same problem and solved it like this
1. click on the red icon in the system tray
Select the menu apache/srvice/install service
then select MySql/service/install service
(Now it works)
My friend.
I got a lot of problems with WampServer and i have solved all my problems when i have found a program called UwAmp.
Its not too much known, but when i got this... i do never get more problems with local servers.
Its fantastic.
Take a look, i believe that you will like it too much.
http://www.uwamp.com/en/
That have a virtual hosts editor, cpu monitor, and a lot more tools. Very easy to use, dont need to install, you can put in any location and its works without need any work of config.
Can I assume that you have port forwarded your router to allow access from the big bad internet, because it looks like you are being probed by some hackers.
They are just trying to find if you have any known compromised code on your site. There is not much you can do to stop it. This is why live servers are better off on proper hosted environments professionally maintained and managed.

Categories