php not found or unable to stat [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
In my Apache error log, I have continues below PHP error every day.
[Wed Dec 26 01:31:33.736040 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/help.php' not found or unable to stat
[Wed Dec 26 01:31:33.968964 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/java.php' not found or unable to stat
[Wed Dec 26 01:31:34.193285 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/_query.php' not found or unable to stat
[Wed Dec 26 01:31:34.438809 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/test.php' not found or unable to stat
[Wed Dec 26 01:31:34.670210 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/db_cts.php' not found or unable to stat
[Wed Dec 26 01:31:34.906519 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/db_pma.php' not found or unable to stat
[Wed Dec 26 01:31:35.730291 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/logon.php' not found or unable to stat
[Wed Dec 26 01:31:35.951930 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/help-e.php' not found or unable to stat
[Wed Dec 26 01:31:36.191505 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/license.php' not found or unable to stat
[Wed Dec 26 01:31:36.847792 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/log.php' not found or unable to stat
[Wed Dec 26 01:31:37.550605 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/hell.php' not found or unable to stat
[Wed Dec 26 01:31:37.798508 2018] [php7:error] [pid 14965] [client 129.204.75.228:62753] script '/var/www/html/pmd_online.php' not found or unable to stat
I don't have any PHP files on the path /var/www/html/
The client IP is unknown to me and every day this client IP changes. I use PHP 7.2 on Ubuntu 18.04 and Apache 2.4.29.

These files are related to potential vulnerabilities that attackers try to exploit.
The IP address that is showing in your log is from China https://www.abuseipdb.com/check/129.204.75.228
As you don't have the files, you can create the files with the same name to redirect the attackers to download a huge file.
<?php
header('Location: http://speedtest.tele2.net/10GB.zip');
die();
?>
Also, by doing this, the log will no longer report the error.

Related

AWS - Elastic BeanTalk: [error] 'php' not found or unable to stat

I have a simple website deployed on Elastic BeanTalk ( platform: PHP 5.6 ).
public
|about.html
|index.html
|style.css
|+ include
|subscribe-email.php
|+ phpmailer
When I checked the log, I received many errors related to '.php' not found or unable to stat. I don't know from where these php files were generated.
[Thu Jun 21 06:18:52.967190 2018] [:error] [pid 12523] [client xxx] script '/var/www/html/xxxx/public/wp-login.php' not found or unable to stat
[Thu Jun 21 06:25:46.354172 2018] [:error] [pid 12742] [client xxx] script '/var/www/html/xxxx/public/wp-login.php' not found or unable to stat
[Thu Jun 21 06:44:44.392342 2018] [:error] [pid 12963] [client xxx] script '/var/www/html/xxxx/public/wp-login.php' not found or unable to stat
[Thu Jun 21 07:18:12.899793 2018] [:error] [pid 13726] [client xxx] script '/var/www/html/xxxx/public/index.php' not found or unable to stat
[Thu Jun 21 07:18:24.145541 2018] [:error] [pid 13531] [client xxx] script '/var/www/html/xxxx/public/wuwu11.php' not found or unable to stat
[Thu Jun 21 07:18:24.925862 2018] [:error] [pid 13418] [client xxx] script '/var/www/html/xxxx/public/xw.php' not found or unable to stat
[Thu Jun 21 07:18:25.689064 2018] [:error] [pid 13418] [client xxx] script '/var/www/html/xxxx/public/xx.php' not found or unable to stat
[Thu Jun 21 07:18:26.489205 2018] [:error] [pid 13418] [client xxx] script '/var/www/html/xxxx/public/s.php' not found or unable to stat
[Thu Jun 21 07:18:27.282847 2018] [:error] [pid 13418] [client xxx] script '/var/www/html/xxxx/public/w.php' not found or unable to stat
[Thu Jun 21 07:18:28.081399 2018] [:error] [pid 13418] [client xxx] script '/var/www/html/xxxx/public/sheep.php' not found or unable
Any suggestion is appreciated.
It is not a solution but I had the same issue.
I'm posting it as an answer to be able to upload an image.
I found something very similar. Also PHP 5.6.
It was new droplet, recently updated. Ubuntu 16, I added a repo to be able to install PHP 5.6 instead of PHP 7 which is the default.
sudo add-apt-repository ppa:ondrej/php
Where does it comes from?

PHP and MySQL user accounts [duplicate]

This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Closed 5 years ago.
I'm very new to both PHP and MySQL.
I have only begun to learn them to run a game server.
The problem I have run into is descriped in apache error log as:
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP Notice: Undefined variable: db in C:\Program Files\VertrigoServ\www\sw_game_login.php on line 24
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP Stack trace:
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP 1. {main}() C:\Program Files\VertrigoServ\www\sw_game_login.php:0
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP Fatal error: Call to a member function fetch_row() on null in C:\Program Files\VertrigoServ\www\sw_game_login.php on line 24
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP Stack trace:
[Mon Sep 04 01:00:16.928467 2017] [:error] [pid 3656:tid 784] [client 127.0.0.1:49401] PHP 1. {main}() C:\Program Files\VertrigoServ\www\sw_game_login.php:0
line 24 of sw_game_login.php looks like the following:
if(list($id)=$db->fetch_row($db->query("SELECT ID FROM accounts WHERE ACCOUNT_NAME='$account' AND ACCOUNT_PASSWORD='$pass'"))){
The error I receive from my game client says that incorrect account or password, I know this is not the case I have tried several and checked several times. Thus leading me to believe that maybe the request is not being sent through properly.
Thanks in advance to any help!
According to your error log, your db variable is undefined. Add this to the top of your sw_game_login.php script.
if (!isset($db))
$db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);

Website shows 404 not found nginx?

Recently I transferred my website and domain from 1and1 to inmotionhosting. When I try to visit my website (www.wapgee.com). It shows this error:
Anyone who have faced this problem? I will appreciate the help!
This error log I found in public_html folder
[Wed Nov 09 02:38:23.846102 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.694511 2016] [:error] [pid 663540:tid 139899990714112] [client 144.76.13.209:64845] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.542651 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.391229 2016] [:error] [pid 662939:tid 139899948750592] [client 144.76.13.209:64849] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:38:23.088840 2016] [:error] [pid 663540:tid 139899990714112] [client 144.76.13.209:64845] File does not exist: /home/wapgee/public_html/index.php
[Wed Nov 09 02:30:14.558814 2016] [:error] [pid 572374:tid 139899906787072] [client 141.8.143.213:57443] File does not exist: /home/wapgee/public_html/index.php
Firstly You have to wait at least one day. Because dns changes can take 12 hours or than 12 hours to change.
Secondly you need to remove dns cache, lets do it
Windows 7 and Vista:
Click on the Start Menu
Type cmd in the search box
Right click on cmd in the programs search results and choose Run as Administrator
Windows 98/NT/2000/XP
Click on the Start Menu Select Run
Type or select cmd to open the command line window
Once the cmd opens type this command:
ipconfig /flushdns
Then you need to clear your browser chache:
Google chrome:
https://support.google.com/accounts/answer/32050?hl=en
Firefox: https://support.mozilla.org/en-US/kb/how-clear-firefox-cache
See if the root directory of your site is placed at the right place. Unlike Apache, Nginx does not display a file index.

Apache2 won't run a Script, PHP-CLI do

I've wrote a script which reads a log-file and write it into an Database. Because of many different line-types it would take about 30 minits executiontime.
Log-Files got:
~20 MB filesize
~200.000 lines
If I include it to my website, the script would run only with small log-files(~2MB tested), it won't run till end if i'm using normal-log-files. I included the script like this:
<?php
include "logLauncher/main.php";
?>
The strange thing is if i using a syscall it would run.
<?php
system("php5 logLauncher/main.php");
?>
Three last entrys in file: /var/log/apache2/error.log
[Wed Aug 26 11:11:22.210994 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:22.211004 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 2. include() /var/www/cowrean_logs/alpha/main.php:121, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:22.211014 2015] [:error] [pid 18893] [client 192.168.0.100:54746] PHP 3. include() /var/www/cowrean_logs/alpha/mod_focus.php:192, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131411 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131462 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131481 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:28.131494 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=2&left=1&right=1&event=5&trigger=18200&focus=2&filter1=&encounter=11982&start=2015-05-27%2019:59:07&end=2015-05-27%2020:00:48
[Wed Aug 26 11:11:29.080694 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080728 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080741 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.080751 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081747 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Notice: Undefined property: mysqli::$close in /var/www/cowrean_logs/alpha/mod_execute_log.php on line 131, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081769 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081790 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:29.081801 2015] [:error] [pid 18894] [client 192.168.0.100:54747] PHP 2. include() /var/www/cowrean_logs/alpha/main.php:118, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?top=1&left=4&right=0
[Wed Aug 26 11:11:35.819211 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP Notice: A session had already been started - ignoring session_start() in /var/www/cowrean_logs/alpha/main.php on line 47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819247 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP Stack trace:, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819267 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP 1. {main}() /var/www/cowrean_logs/alpha/main.php:0, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
[Wed Aug 26 11:11:35.819279 2015] [:error] [pid 21277] [client 192.168.0.100:54748] PHP 2. session_start() /var/www/cowrean_logs/alpha/main.php:47, referer: http://192.168.0.10/cowrean_logs/alpha/main.php?left=7&top=1&right=0
I would not post whole config-files because "/etc/php5/apache2/php.ini" and "/etc/php5/cli/php.ini" got more than 600 lines!
I think these lines could be interested, but they are in both files identical -.-
post_max_size = 20M
max_execution_time = 30
memory_limit = -1
Got anyone have a solution for me to kick out the syscall from my code? And include the log-reader script directly into my page? Syscalls doesn't look fine!
Ubuntu 14.4
PHP5
Apache2
PHP-CLI
In the script in question add this at the top of the code
<?php
ini_set('max_execution_time', -1 );
This will tell PHP not to timeout this script.
It has its dangers, for example if you manage to code and infinite loop then the script will run till you kill either apache or PHP, depending on your configuration.
It is best not to change this in the php.ini as that will effect every php script.

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