Arrexel / phpbash

A semi-interactive PHP shell compressed into a single file.
Apache License 2.0
868 stars 195 forks source link

Error 500: Permission denied in Unknown on line 0 #12

Closed elmaxid closed 6 years ago

elmaxid commented 6 years ago

Hi

I trying to use phpbash. I clone the rep and when i try to browser it appear error 500.

on apache error.log say:

PHP Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 PHP Fatal error: Unknown: Failed opening required '/var/www/html/basurero/phpbash.min.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

How i can debug this issue?.

Regards

M.

Arrexel commented 6 years ago

Can I get a bit more info on the environment (distro, apache/nginx)? Do you also get the error on the unminified version?

elmaxid commented 6 years ago

Yes sure. I try with both version with the same issue:


apache2 -v
Server version: Apache/2.4.10 (Debian)
Server built:   Sep 20 2017 04:37:43

root@dev:~/phpbash# php5 -v
PHP 5.6.33-0+deb8u1 (cli) (built: Jan  5 2018 15:46:26) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

root@dev:~/phpbash# uname -a
Linux dev 4.2.6-1-pve #1 SMP Wed Dec 9 10:49:55 CET 2015 x86_64 GNU/Linux

root@dev:~/phpbash# cat /etc/debian_version 
8.10
Arrexel commented 6 years ago

Thanks. Are permissions set correctly on the files? Seems like the web server may not have read access.

elmaxid commented 6 years ago

great!. i tried with chmod 777 bash.php and now works! Thanks!.

simmani5 commented 5 years ago

Hi.. elmaxid I got same problem.. but can't solve that. Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/yjm/rjw111/www/gnuboard5/index.php' (include_path='.;/home/yjm/php') in Unknown on line 0 -------------info--- [root@myhost www]# httpd -v Server version: Apache/2.2.15 (Unix) Server built: Jun 19 2018 15:45:13

[root@myhost www]# php5 -v -bash: php5: command not found

[root@myhost www]# php -v PHP 5.6.40 (cli) (built: Jan 9 2019 12:30:29) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

[root@myhost www]# uname -a Linux myhost 2.6.32-754.3.5.el6.x86_64 #1 SMP Tue Aug 14 20:46:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

[root@myhost www]# cat /etc/redhat-release CentOS release 6.10 (Final)

[root@myhost www]#


I Tried 777 all files but same problem. other account good. but this not work ~