Fatal error: Call to undefined function openssl_decrypt()

服务器的php版本是5.2的(懒得升级,要改太多东西了)*

当前要做小程序获取手机号,用
$result=openssl_decrypt( $aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV);

Fatal error: Call to undefined function openssl_decrypt()
就报以上错误。

后来我把openssl扩展也打开了,phpinfo中也能看到。

但仍报这个错,有遇到的朋友不?

难不成要我升级php 版本?

谢谢!!

图:
https://img-ask.csdn.net/upload/201810/31/1540916874_664444.png
https://img-ask.csdn.net/upload/201810/31/1540916862_214520.png


2个回答

刚才查了一下官方关于openssl_decrypt()的说明,标明php版本要大于5.3,看来没办法了,

lyixian
lyixian 谢谢,参照这个做法,phpinfo中已经显示打开了,但是还是报错。
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
PHP:致命错误:调用未定义的函数openssl_pkcs12_read()

<div class="post-text" itemprop="text"> <p>I'm using PHP to read encryted file using opensll.</p> <p>when doing </p> <pre><code>openssl_pkcs12_read($storedfile, $certificateinfo, $passwd) </code></pre> <p>in my script, error came out is :</p> <blockquote> <p>Fatal error: Call to undefined function openssl_pkcs12_read()</p> </blockquote> <p>I'm trying to install <code>openssl</code> <code>extension</code> for my Suse Linux Enterprise Server 11. </p> <p>Can anybody help me how to install <code>openssl extension</code> in SLES. or how to solve this problem.</p> <p>thanks</p> </div>

在Windows32进行自定义环境搭建测试PHP连接MySQL时总是提示Fatal error: Call to undefined function

已经打开extension=PHP_mysql和extension=PHP_mysqli 用phpmyadmin测试显示PHP配置错误 可是找不到错误

致命错误php

<div class="post-text" itemprop="text"> <p>i am trying to make a secure log in and registration page using php. i found a code on internet that helped me alot but while debugging and clicking on the button register, an error appeared saying "Fatal error: Call to undefined function openssl_random_pseudo_bytes() " when i went to the specified line in the code i found this : "<code>$random_salt = hash('sha512', uniqid(openssl_random_pseudo_bytes(16), TRUE));</code>" i think i have the 5.3.8 version of php i downloaded the php 5.5.9 thread but it think i didn't install it well. I am on windows. Can alone help me please? I am still a beginner in these stuffs Thanks in advance</p> </div>

PHP:调用未定义的函数mb_strlen() - 在启用了mbstring的自定义编译的PHP上

<div class="post-text" itemprop="text"> <p>I have this custom compiled PHP (v5.3.3) with the following extensions enabled (via configure):</p> <pre><code>./configure --prefix=/usr/local/php5.3.3 --with-config-file-path=/usr/local/apache2/conf --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2 --with-curl=/usr/lib --with-curlwrappers --with-freetype-dir=/usr/local --with-gd=/usr/local --with-gettext --with-gmp --with-iconv=/usr/local --with-imap=/usr/local/imap2007e --with-imap-ssl --with-jpeg-dir=/usr/local/lib --with-kerberos --with-libxml-dir=/usr/lib --with-mcrypt=/usr/local --with-mhash --with-mysql=/usr/lib/mysql --with-mysql-sock=/var/lib/mysql/mysql.sock --with-mysqli=/usr/lib/mysql/mysql_config --with-openssl=/usr --with-pcre-dir=/usr/local/lib --with-pear --with-png-dir=/usr/local/lib --with-readline --with-sqlite --with-xmlrpc --with-xsl=/usr/local --with-zlib-dir=/usr/local/lib --with-zlib=/usr/local --without-pgsql --enable-bcmath --enable-calendar --enable-exif --enable-embedded-mysqli=shared --enable-ftp --enable-gd-jis-conv --enable-gd-native-ttf --enable-mbstring=all --enable-mbregex --enable-shared --enable-sockets --enable-soap --enable-sqlite-utf8 --enable-zend-multibyte --enable-zip --disable-pdo --disable-phar </code></pre> <p><strong>phpinfo()</strong> clearly states that mbstring is enabled: <img src="https://i.stack.imgur.com/jHhgr.png" alt="alt text"></p> <p>Funny thing is when I try to run some PHP scripts (SugarCRM updates), it reports the following error:</p> <blockquote> <p>PHP Fatal error: Call to undefined function mb_strlen() in crm/include/pclzip/pclzip.lib.php on line 4165</p> </blockquote> <p>Can anyone throw some light into WHY this is happening and how to fix this?</p> <p>Thanks, m^e</p> </div>

调用未定义的函数openssl_decrypt

<div class="post-text" itemprop="text"> <p>When I try to make a request with POST to a script that has this line:</p> <pre><code>$decrypted_data = openssl_decrypt($encrypted_data, 'AES-256-CBC', $key); </code></pre> <p>I get the following error:</p> <blockquote> <p>Fatal error: Call to undefined function openssl_decrypt() in mypath/usuario_webservice.php on line 11</p> </blockquote> <p>After some research the common reasons would be entering the wrong name for the function or the openssl extension not being installed on my web server. It turns out that it is installed as I checked with the support. So, what else should I be looking for?</p> </div>

请大神解决一下这个问题 php curl error:35 error:140770FC

cURL error 35: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) ![图片说明](https://img-ask.csdn.net/upload/201803/05/1520246872_229017.png) 各位大佬帮帮忙

litespeed - 致命错误:调用未定义的函数curl_init()

<div class="post-text" itemprop="text"> <p>I running <code>litespeed 5.1.11</code> on my <code>Centos 6.8</code> VPS (PHP 5.6.29). I use <code>cUrl</code> in my php code. When I run my code with browsing as a web page every thing work fine, but when I run with command it gave me error:<br> <code>Fatal error: Call to undefined function curl_init()</code><br> How can I fix it?</p> <p>I Compile my php with this configure parameters:</p> <blockquote> <p>'./configure' '--prefix=/usr/local/lsws/lsphp5' '--disable-fileinfo' '--with-bz2' '--enable-zip' '--with-curl' '--with-mysql' '--with-mysql-sock' '--with-sqlite' '--with-tidy' '--with-xpm-dir' '--enable-pdo' '--with-pdo-sqlite' '--with-pdo-mysql' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-soap' '--with-gettext' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-mcrypt' '--with-mysqli' '--with-openssl' '--with-pic' '--with-png-dir' '--with-zlib' '--with-pcre-regex' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--enable-json' '--with-litespeed'</p> </blockquote> <p>And cUrl section in phpinfo: <a href="https://i.stack.imgur.com/geAwh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/geAwh.png" alt="phpinfo"></a></p> </div>

为什么在PHP7上的ElephantIO没有认识到我使用OpenSSL编译

<div class="post-text" itemprop="text"> <p>I just compiled PHP7 on Ubuntu 14.04 with the <code>--with-openssl</code> flag and it's fully operational. I installed <a href="http://elephant.io/" rel="nofollow">Elephant.io</a> with Composer, but ran a test and got this error.</p> <blockquote> <p>Fatal error: Call to undefined function ElephantIO\Payload\<strong>openssl_random_pseudo_bytes()</strong> in /var/www/html/vendor/wisembly/elephant.io/src/Payload/Encoder.php on line 42</p> </blockquote> <p>Here is my test code.</p> <pre><code>use ElephantIO\Client, ElephantIO\Engine\SocketIO\Version1X; require __DIR__ . '/vendor/autoload.php'; $client = new Client(new Version1X('http://localhost:3000')); $client-&gt;initialize(); </code></pre> <p>Here's the command I ran to configure the build before compiling PHP7.</p> <pre><code>./configure --prefix=$HOME/php7/usr --with-config-file-path=$HOME/php7/usr/etc --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-curl --with-mcrypt --with-iconv --with-gmp --with-pspell --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --enable-gd-jis-conv --with-openssl --with-pdo-mysql=/usr --with-gettext=/usr --with-zlib=/usr --with-bz2=/usr --with-recode=/usr --with-mysqli=/usr/bin/mysql_config </code></pre> <p>The Ubuntu packages are there I think. Here are my openssh* packages!</p> <blockquote> <p>openssh-client openssh-sftp-server openssl-blacklist openssh-server openssl openssl-blacklist-extra</p> </blockquote> <p>Any ideas? I am stuck and new to compiling PHP.</p> </div>

PHP MS SQL - 致命错误:调用未定义的函数sqlsvr_connect()

<div class="post-text" itemprop="text"> <p>Good morning. I am trying to set up a php development environment but I keep running in circles chasing down answers that have not worked by searching.</p> <p>The error I get when trying to run the test php file in Php Designer or after saving it and running it in Chrome or Firefox to connect to my local MS SQL Express db is:</p> <blockquote> <p>Fatal Error: Call to undefined function sqlsvr_connect()</p> </blockquote> <p>I am using:</p> <ol> <li>Xampp Control Panel V3.2.2</li> <li>Apache 2.0 Handler</li> <li>PHP Version 7.2.5 (x86)</li> <li>MS SQL Express 2017 RTM</li> <li>Php Designer 8.1.2</li> </ol> <p><a href="https://i.stack.imgur.com/Uk8Ma.png" rel="nofollow noreferrer">What I think are the correct MS SQL drivers for PHP</a> php_pdo_sqlsrv_72_ts_x86.dll and php_sqlsrv_72_ts_x86.dll Both are stored in C:\xampp\php\ext</p> <p>The code I'm using in the test.php:</p> <pre><code>$serverName = "DESKTOP-1FK6JRL\\SQLEXPRESS"; //serverName\instanceName $connectionInfo = array( "Database"=&gt;"testdb", "UID"=&gt;"myusername", "PWD"=&gt;"MyPassword"); $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn ) { echo "Connection established.&lt;br /&gt;"; }else{ echo "Connection could not be established.&lt;br /&gt;"; die( print_r( sqlsrv_errors(), true)); } </code></pre> <p>This is my Apache error log:</p> <pre><code>[Sat Jun 02 11:00:31.829695 2018] [ssl:warn] [pid 11940:tid 672] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Jun 02 11:00:31.910495 2018] [core:warn] [pid 11940:tid 672] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Sat Jun 02 11:00:31.918467 2018] [ssl:warn] [pid 11940:tid 672] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Jun 02 11:00:31.965356 2018] [mpm_winnt:notice] [pid 11940:tid 672] AH00455: Apache/2.4.33 (Win32) OpenSSL/1.1.0h PHP/7.2.5 configured -- resuming normal operations [Sat Jun 02 11:00:31.965356 2018] [mpm_winnt:notice] [pid 11940:tid 672] AH00456: Apache Lounge VC15 Server built: Mar 28 2018 12:12:41 [Sat Jun 02 11:00:31.966316 2018] [core:notice] [pid 11940:tid 672] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Sat Jun 02 11:00:31.972327 2018] [mpm_winnt:notice] [pid 11940:tid 672] AH00418: Parent: Created child process 22396 [Sat Jun 02 11:00:32.801001 2018] [ssl:warn] [pid 22396:tid 744] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Jun 02 11:00:32.873530 2018] [ssl:warn] [pid 22396:tid 744] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [Sat Jun 02 11:00:32.921373 2018] [mpm_winnt:notice] [pid 22396:tid 744] AH00354: Child: Starting 150 worker threads. </code></pre> <p>Here is my php.ini with the extension_dir set to extension_dir="C:\xampp\php\ext"</p> <pre><code>extension=bz2 extension=curl extension=fileinfo extension=gd2 extension=gettext ;extension=gmp ;extension=intl ;extension=imap ;extension=interbase ;extension=ldap ;extension=mbstring ;extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client ;extension=odbc ;extension=openssl ;extension=pdo_firebird extension=php_pdo_sqlsrv_72_ts_x86 extension=php_sqlsrv_72_ts_x86 ;extension=php_pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql ;extension=pdo_sqlite ;extension=pgsql ;extension=shmop </code></pre> <p>Any help that anyone can give would be GREATLY appreciated. I have tried all types of combinations to no avail.</p> </div>

调用未定义的函数openssl_public_decrypt,安装mcrypt

<div class="post-text" itemprop="text"> <p>I try to make a local copy of a wordpress site. I'm using xampp, and everything went just fine up to this error:</p> <blockquote> <p>Fatal error: Call to undefined function <code>openssl_public_decrypt()</code> in C:\xampp\htdocs...</p> </blockquote> <p>Php info shows that mcrypt is installed, extension_loaded shows also that everything with mcrypt is fine. Any ideas what causing a problem?</p> </div>

致命错误:调用未定义的函数ftp_ssl_connect()

<div class="post-text" itemprop="text"> <p>I am trying to set up FTP SSL connection in PHP. I have used <code>ftp_connect()</code> fine and works great. As soon as I try to use <code>ftp_ssl_connect()</code>, I get this error:</p> <blockquote> <p>Fatal error: Call to undefined function ftp_ssl_connect()</p> </blockquote> <p>I do have openssl extension turned on in PHP extentions. I am not sure what else there is to do as searching google there is nothing that I can find to do to make this function call work. Does anyone know when what I am missing or to check to see if something else needs to be installed on my wampserver? </p> <p>Here is my php code I am using:</p> <pre><code>$conn_id = ftp_ssl_connect($ftp_server); $ftp_user_name = "username"; $ftp_user_pass = "password"; $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); ftp_pasv($conn_id, true); if ((!$conn_id) || (!$login_result)) { echo "FTP connection has failed!"; echo "Attempted to connect to $ftp_server for user $ftp_user_name"; exit; } else { echo "Connected to $ftp_server, for user $ftp_user_name"; } </code></pre> <p>It obviously doesn't get past the first line because of saying that <code>ftp_ssl_connect()</code> is an undefined function. </p> </div>

安装了OpenSSL但无法正常工作

<div class="post-text" itemprop="text"> <p>I'm trying to use the CryptoJS AES module in my php project but I have the following error:</p> <blockquote> <p>Fatal error: Call to undefined function openssl_random_pseudo_bytes() <a href="https://i.stack.imgur.com/jb4FB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jb4FB.jpg" alt="enter image description here"></a></p> </blockquote> <p>Checking the configuration of PHP I noticed that both OpenSSL and Mcrypt are enabled</p> <p><a href="https://i.stack.imgur.com/MIKSm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MIKSm.jpg" alt="enter image description here"></a></p> <p>Anyone know more about this error? could be some restrinction to my user? (I'm on a shared-hosting). The PHP version is 5.2.1.7 on Apache2. Thanks</p> <p>I've also checked if PHP has been compiled with the correct --openssl and so it is</p> <p><a href="https://i.stack.imgur.com/JWMHw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JWMHw.jpg" alt="enter image description here"></a></p> </div>

xampp php 7调用未定义的函数(mysql&odbc)

<div class="post-text" itemprop="text"> <p>I updated my <code>xampp</code> to a new version, which now includes <code>php7</code> all my scripts don't work anymore.</p> <p>I found here some "solutions" which don't works.</p> <p>I get these messages:</p> <blockquote> <p>Fatal error: Uncaught Error: Call to undefined function odbc_connect() Fatal error: Uncaught Error: Call to undefined function mysql_connect()</p> </blockquote> <p>I have the extensions in my <code>php.ini</code></p> <pre><code>extension=php_bz2.dll extension=php_curl.dll extension=php_fileinfo.dll extension=php_gd2.dll extension=php_gettext.dll ;extension=php_gmp.dll ;extension=php_intl.dll ;extension=php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll extension=php_mbstring.dll extension=php_exif.dll extension=php_mysql.dll extension=php_mysql_libmysql.dll extension=php_mysql_mysqlnd.dll extension=php_mysqli.dll ;extension=php_oci8_12c.dll ;extension=php_openssl.dll ;extension=php_pdo_firebird.dll extension=php_pdo_mysql.dll ;extension=php_pdo_oci.dll extension=php_pdo_odbc.dll ;extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll ;extension=php_pgsql.dll ;extension=php_shmop.dll ;extension=php_snmp.dll ;extension=php_soap.dll ;extension=php_sockets.dll ;extension=php_sqlite3.dll ;extension=php_tidy.dll ;extension=php_xmlrpc.dll ;extension=php_xsl.dll </code></pre> <p>I saved the <code>php.ini</code> and restarted my apache - but the result is the same.</p> <p>Any ideas? :(</p> </div>

php mysqli_connect()不能用 ,找不到pdo driver

我的apache服务器能正常启用,php代码也能正常运行,但涉及到数据库的就出问题了! php.ini已正常配置: extension_dir = "c:/php7/ext" extension=php_bz2.dll ;extension=php_curl.dll ;extension=php_fileinfo.dll ;extension=php_ftp.dll extension=php_gd2.dll ;extension=php_gettext.dll extension=php_gmp.dll ;extension=php_intl.dll ;extension=php_imap.dll ;extension=php_interbase.dll ;extension=php_ldap.dll ;extension=php_mbstring.dll ;extension=php_exif.dll ; Must be after mbstring as it depends on it extension=php_mysqli.dll ;extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client extension=php_openssl.dll extension=php_pdo_firebird.dll extension=php_pdo_mysql.dll extension=php_pdo_oci.dll extension=php_pdo_odbc.dll extension=php_pdo_pgsql.dll extension=php_pdo_sqlite.dll extension=php_pgsql.dll extension=php_shmop.dll 但在phpinfo()里![Loaded Configuration File 为none](https://img-ask.csdn.net/upload/201704/19/1492576243_539187.jpg) 另外只有一个pdo表,不见mysqli表:![图片说明](https://img-ask.csdn.net/upload/201704/19/1492576124_873041.jpg) 使用pdo $con= new PDO("localhost:3306","username","password"); 出现 Fatal error: Uncaught PDOException: could not find driver in C:\Apache24\htdocs\demo.com\register.php:27 Stack trace: #0 C:\Apache24\htdocs\demo.com\register.php(27): PDO->__construct('localhost:3306', 'username', 'password') #1 {main} thrown in C:\Apache24\htdocs\demo.com\register.php on line 27 使用mysqli_connect $con= mysqli_connect("localhost:3306","username","password"); 出现 Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\Apache24\htdocs\demo.com\register.php:27 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\demo.com\register.php on line 27 我的php版本是7.13,apache2.4.25,mysql5.7 请知道什么原因的大神指教,感激不尽!

Memcache.exe无法安装已安装的服务或服务

<div class="post-text" itemprop="text"> <p>I installed xampp on my local computer. The data in the project is stored in memory, but the memcached function did not work on my local machine.</p> <pre><code>$memcache=memcache_connect('127.0.0.1', 11211); </code></pre> <p>Error code:</p> <pre><code>Fatal error: Call to undefined function memcache_connect() in </code></pre> <p>I called the error, but the solutions didn't work for me.</p> <p>Suggested solutions include the addition of new services</p> <p>I am getting this error when adding new service "failed to install service or service already installed"</p> <pre><code>**Windows 7 **Xampp **Apache/2.4.34 (Win32) OpenSSL/1.0.2o PHP/5.6.38 </code></pre> </div>

尝试在PHP中使用SFTP导致500错误

<div class="post-text" itemprop="text"> <p>I've tried several different methods of connecting to an SFTP server and in all cases I get a 500 error either when I connect or when I try to upload a file.</p> <p>I've tried connecting to two different servers, getting the same results each time. I <em>am</em> however able to connect to both servers using a GUI interface client, no problem.</p> <p>Using SSH2_connect:</p> <pre><code>//&lt;!--************************************************************************--&gt; //&lt;!--*** Connect using ssh2 //&lt;!--************************************************************************--&gt; $conn = ssh2_connect($ftp_host, 22); ssh2_auth_password($conn, $ftp_username, $ftp_password); //&lt;!--************************************************************************--&gt; //&lt;!--*** Send the file //&lt;!--************************************************************************--&gt; ssh2_scp_send($conn, $localfile, $remote_file); </code></pre> <p>The connect call causes a 500 error.</p> <p>I also tried using PHPSecLib, as recommended by so many people on StackExchange, but I run into the same problem.</p> <pre><code>include("common/PHP SFTP/Net/SFTP.php"); //&lt;!--************************************************************************--&gt; //&lt;!--*** Connect using sftp //&lt;!--************************************************************************--&gt; $sftp = new Net_SFTP($ftp_host); //&lt;!--************************************************************************--&gt; //&lt;!--*** Log into ftp server //&lt;!--************************************************************************--&gt; if ($sftp-&gt;login($ftp_username, $ftp_password)) { //&lt;!--************************************************************************--&gt; //&lt;!--*** Send local file via ftp //&lt;!--************************************************************************--&gt; if(!$sftp-&gt;put($remote_file, $localfile)){ errorLog(1,"DEBUG","eft transfer","Fail"); } }else{ errorLog(1,"DEBUG","sftp connection","Fail"); } //&lt;!--************************************************************************--&gt; //&lt;!--*** Close the connection //&lt;!--************************************************************************--&gt; ftp_close($ftp_connection); </code></pre> <p>In this case creating a new Net_SFTP object causes no problems so it's not a pathing issue to the included PHPSecLib file, but as soon as I try to login to the ftp server it falls over with a 500 error.</p> <p>Using phpinfo() I've confirmed that I have OpenSSL enabled on the server. SFTP protocol is also enabled. SSH2 DLL is also installed and enabled.</p> <p>I don't know what else to look for.</p> <p>These are the errors in my log file</p> <pre><code>[25-Sep-2017 11:53:15 America/New_York] PHP Notice: Undefined index: pagedate in C:\inetpub\wwwroot\TimeSavr\Refresh\common\initialize.php on line 111 [25-Sep-2017 09:53:15 America/Edmonton] PHP Notice: Undefined variable: content in C:\inetpub\wwwroot\TimeSavr\Refresh\common\common.php on line 8 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(Math/BigInteger.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 891 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(): Failed opening 'Math/BigInteger.php' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 891 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(Crypt/Random.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 895 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(): Failed opening 'Crypt/Random.php' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 895 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(Crypt/Hash.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 899 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(): Failed opening 'Crypt/Hash.php' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 899 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(Crypt/Base.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 904 [25-Sep-2017 09:53:15 America/Edmonton] PHP Warning: include_once(): Failed opening 'Crypt/Base.php' for inclusion (include_path='.;C:\php\pear') in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 904 [25-Sep-2017 09:53:16 America/Edmonton] PHP Fatal error: Call to undefined function phpseclib_resolve_include_path() in C:\inetpub\wwwroot\TimeSavr\Refresh\common\PHP SFTP\Net\SSH2.php on line 1243 </code></pre> </div>

为什么PHP在运行脚本时不会看到sqlite库?

<div class="post-text" itemprop="text"> <p>I'm trying to make something with PHP and sqlite. I've got both the sqlite3 and pdo_sqlite3 libraries loaded (according to php -m), the php.ini gets the libraries added, but I still get the fatal error that the function (whether it's sqlite_open() or sqlite_versioninfo()) isn't found. phpinfo() shows that both libraries are loaded. So why can't I use them?</p> <p>Some info about my setup:</p> <p>I'm running on debian, I'm running Apache2 and PHP 5.4.4-4. I can't remember how I installed PHP (apparently not through apt-get), but it's launched through Apache.</p> <p>The output of <code>php -m</code>:</p> <blockquote> <p>root@ns:~# php -m [PHP Modules] bcmath bz2 calendar Core ctype curl date dba dom ereg exif fileinfo filter ftp gettext hash iconv imagick json libxml mbstring mhash mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session shmop SimpleXML soap sockets SPL sqlite3 ssh2 standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter zip zlib</p> <p>[Zend Modules]</p> </blockquote> <p>The exact error text is <code>PHP Fatal error: Call to undefined function sqlite_libversion() in [file] on line 14</code> and it occurs both through the command line and the webserver.</p> <p>If I think of anything else to add, I'll add it here.</p> </div>

如何从特征中的一个函数调用函数(父特征中存在两个函数)

<div class="post-text" itemprop="text"> <p>I define traits in php. i was try to communicate between two function witch are present in same traits, I got fatal error.</p> <blockquote> <p>---------------------------error-------------------------------- Fatal error: Call to undefined function crypto_rand_secure() in /var/www/html/clients/assuredo/include/config/generateToken/token.php on line 28</p> </blockquote> <p>I was try to call function <code>crypto_rand_secure()</code> in side the function <code>getToken()</code>.</p> <pre><code>trait token { public function crypto_rand_secure($min, $max) { $range = $max - $min; if ($range &lt; 1) return $min; // not so random... $log = ceil(log($range, 2)); $bytes = (int) ($log / 8) + 1; // length in bytes $bits = (int) $log + 1; // length in bits $filter = (int) (1 &lt;&lt; $bits) - 1; // set all lower bits to 1 do { $rnd = hexdec(bin2hex(openssl_random_pseudo_bytes($bytes))); $rnd = $rnd &amp; $filter; // discard irrelevant bits } while ($rnd &gt; $range); return $min + $rnd; } public function getToken($length) { $token = ""; $codeAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $codeAlphabet.= "abcdefghijklmnopqrstuvwxyz"; $codeAlphabet.= "0123456789"; $max = strlen($codeAlphabet); // edited for ($i=0; $i &lt; $length; $i++) { $token .= $codeAlphabet[crypto_rand_secure(0, $max-1)]; } return $token; } } </code></pre> </div>

synology php ftp_ssl_connect - 调用未定义的函数

<div class="post-text" itemprop="text"> <p>First time asking a question here, please be gentle :-)</p> <p>I'm writing a PHP command-line script on a Synology box to fetch files via ftps, and start out with this bit:</p> <pre><code>$ftp = ftp_ssl_connect("ftp.example.com"); </code></pre> <p>When run from the command line, I get </p> <pre><code>Fatal error: Call to undefined function ftp_ssl_connect() in ... </code></pre> <p>phpinfo() tells me:</p> <pre><code>... Registered PHP Streams =&gt; php, file, glob, data, http, ftp, https, ftps, zip, compress.zlib, compress.bzip2 Registered Stream Socket Transports =&gt; tcp, udp, unix, udg, ssl, sslv3, sslv2, tls ... openssl OpenSSL support =&gt; enabled OpenSSL Library Version =&gt; OpenSSL 1.0.1p-fips 9 Jul 2015 OpenSSL Header Version =&gt; OpenSSL 1.0.1p-fips 9 Jul 2015 </code></pre> <p>and <code>/etc/php/conf.d/extensions.ini</code> contains <code>extension = openssl.so</code> (without an initial <code>;</code>)</p> <p>It seems to me that all the prerequisites for <code>ftp_ssl_connect()</code> are in place. </p> <p>fwiw:</p> <pre><code>$ uname -a Linux DiskStation01 2.6.32.12 #5644 Wed Oct 28 12:36:45 CST 2015 armv5tel GNU/Linux synology_88f6282_213 </code></pre> <p>What would be the next place to look?</p> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

一文带你入门Java Stream流,太强了

两个星期以前,就有读者强烈要求我写一篇 Java Stream 流的文章,我说市面上不是已经有很多了吗,结果你猜他怎么说:“就想看你写的啊!”你看你看,多么苍白的喜欢啊。那就“勉为其难”写一篇吧,嘻嘻。 单从“Stream”这个单词上来看,它似乎和 java.io 包下的 InputStream 和 OutputStream 有些关系。实际上呢,没毛关系。Java 8 新增的 Stream 是为...

立即提问
相关内容推荐