Portál AbcLinuxu, 11. května 2025 04:30
Závažná chyba: Nezachycená chyba: Volání nedefinované funkce openssl_encrypt() ...v souboru index.php mám
<?php openssl_encrypt();Znamená to, že tu funkci nezná? Musí se někde zapnout nebo kde ji vezmu? Snažím se v PHP zašifrovat string. Děkuji
Řešení dotazu:
System Linux DS216j 3.10.108 #42661 SMP Mon Jun 27 15:07:25 CST 2022 armv7l Build Date Mar 22 2022 17:52:42 Build System Linux 09884daacff7 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux Server API FPM/FastCGI Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/etc/php80/cli Loaded Configuration File /volume1/@appstore/PHP8.0/misc/php-fpm.ini Scan this dir for additional .ini files no value Additional .ini files parsed /usr/syno/etc/packages/WebStation/php_profile/139939eb-365d-4381-9996-ecf91c4216bc/conf.d/user_settings.ini, /run/php-fpm/conf.d/timezone.ini PHP API 20200930 PHP Extension 20200930 Zend Extension 420200930 Zend Extension Build API420200930,NTS PHP Extension Build API20200930,NTS Debug Build no Thread Safety disabled Zend Signal Handling enabled Zend Memory Manager enabled Zend Multibyte Support provided by mbstring IPv6 Support enabled DTrace Support disabled Registered PHP Streams php, file, glob, data, http, ftp Registered Stream Socket Transports tcp, udp, unix, udg Registered Stream Filters string.rot13, string.toupper, string.tolower, convert.*, consumed, dechunk
php -m
vidim openssl a pri php -i
vidim:
OpenSSL support => enabledMozna to bude nejaka orezana verze.
php -i openssl OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.1.1n 15 Mar 2022 OpenSSL Header Version => OpenSSL 1.1.1n 15 Mar 2022 Openssl default config => /etc/ssl/openssl.cnf
<?php if (function_exists('openssl_encrypt')) { echo "Functions are available."; } else { echo "Functions are not available."; } Result: Functions are not available.
Nie je funkcia v zozname zakazaných?To je v souboru php.ini nebo někde jinde?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.