![]() |
![]() |
![]()
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 |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 8 068 Pomógł: 1414 Dołączył: 26.10.2005 Ostrzeżenie: (0%) ![]() ![]() |
nie, możesz ew. próbować przez exec() ale pewnie i to jest zablokowane.
|
|
|
![]()
Post
#3
|
|
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 |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 6 381 Pomógł: 1116 Dołączył: 30.08.2006 Ostrzeżenie: (0%) ![]() ![]() |
Cytat make sure that your php.ini doesn't use: disable_functions for exec function Twoje używa i koniec tematu. Jak nie jesteś rootem to zapomnij. |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 328 Pomógł: 3 Dołączył: 10.07.2016 Skąd: UK-raine Ostrzeżenie: (0%) ![]() ![]() |
Ale jestem rootem ..... (IMG:style_emoticons/default/sad.gif)
|
|
|
![]()
Post
#6
|
|
Grupa: Zarejestrowani Postów: 965 Pomógł: 285 Dołączył: 19.06.2015 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
To edytuj php.ini i usun shell_exec z listy wylaczonych funkcji.
|
|
|
![]()
Post
#7
|
|
Grupa: Zarejestrowani Postów: 328 Pomógł: 3 Dołączył: 10.07.2016 Skąd: UK-raine Ostrzeżenie: (0%) ![]() ![]() |
Ok a czy to nie wpłynie na bezpieczeństwo ?
nie chcę spowodować jakiejś katastrofy (IMG:style_emoticons/default/wink.gif) Ten post edytował PHPRexio 28.07.2016, 15:02:20 |
|
|
![]()
Post
#8
|
|
Grupa: Zarejestrowani Postów: 6 381 Pomógł: 1116 Dołączył: 30.08.2006 Ostrzeżenie: (0%) ![]() ![]() |
Może wpłynąć, zależy od konfiguracji serwera. Jak jesteś jedynym użytkownikiem i nie masz dziur w kodzie nie powinno być źle. A co chcesz zrobić? Nie można tego np. cronem wykonywać?
|
|
|
![]()
Post
#9
|
|
Grupa: Zarejestrowani Postów: 328 Pomógł: 3 Dołączył: 10.07.2016 Skąd: UK-raine Ostrzeżenie: (0%) ![]() ![]() |
Potrzebuję odpalić TesserOCR a to wymaga shell_exec();
Ale mniejsza, powalczę, teraz jade na wakacje (IMG:style_emoticons/default/smile.gif) |
|
|
![]()
Post
#10
|
|
Grupa: Zarejestrowani Postów: 6 381 Pomógł: 1116 Dołączył: 30.08.2006 Ostrzeżenie: (0%) ![]() ![]() |
Możesz sobie gdzieś zakolejkować pliki i wykonywać akcje z crona użytkownikiem który będzie miał uprawnienia.
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 5.10.2025 - 16:24 |