Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Shell_exec() disabled - jak sobie z tym poradzić ?
phpamator
post
Post #1





Grupa: Zarejestrowani
Postów: 328
Pomógł: 3
Dołączył: 10.07.2016
Skąd: UK-raine

Ostrzeżenie: (0%)
-----


Panowie, usiłuję odpalić shell_exec() TesseractOCR.php i nie moge sobie poradzić z :
Warning: shell_exec() has been disabled for security reasons in /home/public_html/media/TesseractOCR.php on line 83

Jak zmusić to do dzialania ?
Można uruchomić shell_exec() dla wybranego folderu ?

Mam dodać śieżkę do php.ini gdzie uruchamiam skrypt (IMG:style_emoticons/default/questionmark.gif)

Ten post edytował PHPRexio 28.07.2016, 14:00:53
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
phpamator
post
Post #2





Grupa: Zarejestrowani
Postów: 328
Pomógł: 3
Dołączył: 10.07.2016
Skąd: UK-raine

Ostrzeżenie: (0%)
-----


Znalazłem podpowiedź:
Try the following things:

try to run test command, if it works:
php -r "echo exec('whoami');"
all parent directories and the file have r-x:
chmod 755 dir; chmod 755 file,
make sure that owner of the file is your apache user
try also to add +s flag to the file:
chmod u+s file,
your PHP is not running in safe_mode
make sure that the script is inside your Apache root,
if not - move the script inside it,
or add that directory to your Apache configuration,
or add this directory to your include_path:
php.ini: include_path ".:/usr/local/lib/php:/your/dir"
or .htaccess: php_value include_path ".:/usr/local/lib/php:/your/dir"
check as well if giving proper shell (/bin/sh) to your apache user make any difference (check with: finger),
make sure that your php.ini doesn't use: disable_functions for exec function
if using SELinux or having selinux-utils installed (a Security-enhanced Linux system), check getenforce/setenforce
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 09:44