ubuntu下PHP动态SO库使用问题

我在ubuntu下编译了一个.so的库,在命令行下使用命令 php -r 'echo confirm_coext_compiled("coext"),"\n";' ,, 可以正确执行, 但是在php页面中,调用 confirm_coext_compiled("coext"); 却不执行,页面显示Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RESPONSE

请问可能是什么方面的原因

1个回答

untu下PHP动态SO库使用问题
我在ubuntu下编译了一个.so的库,在命令行下使用命令 php -r 'echo confirm_coext_compiled("coext"),"\n";' ,, 可以正确执行, 但是在php页面中,调用 confirm_coext_compiled("coext"); 却不执行,页面显示Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RES

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
PHP7.0 - 无法加载动态库oci8.so(Ubuntu)

<div class="post-text" itemprop="text"> <p>After following the install instructions for oracle instant client, php is not able to load the oci8 extension.<br> <a href="http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst" rel="nofollow noreferrer">http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst</a></p> <p>I am getting an error.<br> <strong>PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0</strong></p> <p>I have verified both oci8.so and libmql1.so locations.</p> <p>Am I missing something? </p> </div>

ubuntu 下安装apache 和php 的问题

我在ubuntu下安装apache和php后,进行测试,首先输入~# /usr/local/apache2/bin/apachectl restart 输入完后无任何提示(不知道apache是否启动) 然后在浏览器里输入localhost/phpinfo.php,注:事先已在/usr/local/apache2/htdocs里建了一个文件:phpinfo.php,内容为: <?php   phpinfo(); ?> 结果提示下载这个文件,而不是打开一个网页。在网上查,说apache没有成功加载php模块,接着我在/usr/local/apache2/conf/httpd.conf里添加了: #LoadModule php5_module modules/libphp5.so (是加在 # # Example: # LoadModule foo_module modules/mod_foo.so 之后的,不知道位置对不对 ) 和 AddType application/x-httpd-php .php (这句加在 # probably should define those extensions to indicate media types: # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz 之后) 然后停止apache,在重启,结果还是不行,依然提示下载,哪位大神能给个解决方案,小弟感激不尽啊(对了,我的系统时ubuntu 11.04的) 谢了啊!!!

PHP启动:无法加载动态库'pdo-sqlite.so'

<div class="post-text" itemprop="text"> <p>I found these issues after updating <em>php5-sqlite</em> (previously it was working fine) :</p> <p><code>PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/pdo_sqlite.so' - /usr/lib/php5/20131226/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0</code></p> <p><code>PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/sqlite3.so' - /usr/lib/php5/20131226/sqlite3.so: undefined symbol: sqlite3_enable_load_extension in Unknown on line 0</code></p> <p>p.s : <em>so files</em> exist</p> <p>Details :</p> <ol> <li>OS : <strong>Ubuntu 14.04 LTS</strong></li> <li>PHP : <strong>PHP 5.6.15</strong></li> </ol> <p>I have tried uninstalling (purge) and reinstalling PHP but the issues still remain.</p> <p>I have tried commenting out <strong>extension=pdo-sqlite.so</strong> in <strong>/etc/php5/cli/conf.d/pdo_sqlite.ini</strong>, but it says "<strong>Driver not found</strong>".</p> <p>Please help...</p> </div>

Ubuntu上的PHP扩展目录

<div class="post-text" itemprop="text"> <p>I've just installed the imagick PHP extension following this script: <a href="https://gist.github.com/rostockahoi/1d53a2efb8863d72d5f1acb94ae940d1" rel="nofollow noreferrer">https://gist.github.com/rostockahoi/1d53a2efb8863d72d5f1acb94ae940d1</a></p> <p>The install went fine. I found the imagick.so file in /usr/lib/php/20180731 directory. And my php.ini files (fpm and cli) have the extension=imagick.so at the end.</p> <p>I've restarted PHP and nginx.</p> <p>Though, PHP cannot find the extension. Look at this CLI test :</p> <pre><code>$ php -i $ PHP Warning: PHP Startup: Unable to load dynamic library 'imagick.so' (tried: /usr/lib/php/20170718/imagick.so (/usr/lib/php/20170718/imagick.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/imagick.so.so (/usr/lib/php/20170718/imagick.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 </code></pre> <p>PHP is looking for extensions in this directory <code>/usr/lib/php/20170718/</code></p> <p>This dir exists but the imagick.so is not in it. On the other hand, as said before, there is also the directory <code>/usr/lib/php/20180731/</code> with the imagick.so file in it.</p> <p>I guess I have to tell PHP to look into the 20180731 dir instead of the 20170718. </p> <p>How can I do that ?</p> <p>Or should I copy manually the imagick.so file into 20170718 ? That does not seem optimal...</p> <p>thanks !</p> </div>

在Ubuntu中使用PHP openssl

<div class="post-text" itemprop="text"> <p>I have created a web app which uses PHPMailer for mailing and its working properly on my local server(Windows OS). However, when I uploaded it to the production server(Ubuntu 14.04.4) it returned an error which says <strong><em>“Message could not be sent.Mailer Error: Extension missing: openssl”</em></strong>.I tried looking for solution but nothing works. Anyway I'm using PHP5.3.6. I hope you guys can help me.</p> </div>

“无法加载动态库'pdo_sqlsrv.so'”Cenos7 PHP7.2.10

<div class="post-text" itemprop="text"> <p>I have overlook at this issue <a href="https://stackoverflow.com/questions/34377338/linux-php-7-0-and-mssql-microsoft-sql">Linux - PHP 7.0 and MSSQL (Microsoft SQL)</a></p> <p>and I am sure did exactly what MS told me to do in this page <a href="https://docs.microsoft.com/en-us/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-2017#installing-the-drivers-on-red-hat-7" rel="nofollow noreferrer">installing-the-drivers-on-red-hat-7</a> howevey, i stiil got the error when type 'php -v':</p> <blockquote> <p>PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlsrv.so' (tried: /usr/lib64/php/modules/pdo_sqlsrv.so (/usr/lib64/php/modules/pdo_sqlsrv.so: undefined symbol: php_pdo_register_driver), /usr/lib64/php/modules/pdo_sqlsrv.so.so (/usr/lib64/php/modules/pdo_sqlsrv.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 </p> <p>PHP 7.2.10 (cli) (built: Sep 15 2018 07:10:58) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.10, Copyright (c) 1999-2018, by Zend Technologies</p> </blockquote> <p>I never modify the php.ini,</p> <blockquote> <p>[user@tssvr php.d]$ pwd</p> <p>/etc/php.d</p> <p>[user@tssvr php.d]$ ls </p> <p>20-sqlsrv.ini ctype.ini fileinfo.ini gmp.ini mbstring.ini pdo.ini shmop.ini tokenizer.ini xmlwriter.ini 30-pdo_sqlsrv.ini curl.ini ftp.ini iconv.ini mysqli.ini pdo_mysql.ini simplexml.ini xml.ini xsl.ini bz2.ini dom.ini gd.ini intl.ini opcache-default.blacklist pdo_sqlite.ini sockets.ini xmlreader.ini zip.ini calendar.ini exif.ini gettext.ini json.ini opcache.ini phar.ini sqlite3.ini xml_wddx.ini</p> <p>[user@tssvr php.d]$ cat 20-sqlsrv.ini </p> <p>extension=sqlsrv.so</p> <p>[user@tssvr php.d]$ cat 30-pdo_sqlsrv.ini</p> <p>extension=pdo_sqlsrv.so</p> </blockquote> <p>it seems that the sqlsrv.so is good, but the pho_sqlsrv.so just can't work correctly,,although i notice that double 'so' appear: 'pdo_sqlsrv.so.so' , can any guys can help me through this ,many thanks.</p> </div>

PHP:加载共享库时出错:libmysqlclient.so.18

<div class="post-text" itemprop="text"> <p>I'm Set Crontab :</p> <pre><code>[root@root mysql]# crontab -l 5 * * * * php /home/admin/public_html/scheduleSendMail.php </code></pre> <p>But Not Execute PHP code!</p> <pre><code>[root@root mysql]# php /home/admin/public_html/scheduleSendMail.php php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory [root@root mysql]# rpm -qR postfix </code></pre> <p>find :</p> <pre><code>.. libmysqlclient.so.16 libmysqlclient.so.16(libmysqlclient_16) .. </code></pre> <p>I am using the Centos And DirectAdmin</p> <pre><code>PHP v: php-5.3.3-14.el6_3.i686 mysql v: mysql-5.1.66-2.el6_3.i686 centos v: CentOS release 6.3 (Final) </code></pre> </div>

PHP启动:无法加载动态库'pdo_mysql.so'UBUNTU 18.04

<div class="post-text" itemprop="text"> <p>Heres the full error:</p> <blockquote> <p>PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql.so' (tried: /usr/lib/php/20170718/pdo_mysql.so (/usr/lib/php/20170718/pdo_mysql.so: undefined symbol: mysqlnd_allocator), /usr/lib/php/20170718/pdo_mysql.so.so (/usr/lib/php/20170718/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0</p> </blockquote> <p>I am running Ubuntu 18.04.2 and using the xampp stack with php version 7.2.15</p> </div>

ubuntu 16.04上的php 7.2上缺少请求的PHP扩展名ext-mysqli *

<div class="post-text" itemprop="text"> <p>when I </p> <pre><code>composer create-project phpmyadmin/phpmyadmin </code></pre> <p>I got the problems:</p> <pre><code>- The requested PHP extension ext-mysqli * is missing from your system. Install or enable PHP's mysqli extension. </code></pre> <p>I had edit my php.ini and restart the php and nginx but still show the error?</p> <pre><code>sudo systemctl restart php7.2-fpm sudo systemctl restart nginx sudo nano /etc/php/7.2/fpm/php.ini cgi.fix_pathinfo=0 ;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=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql extension=pdo_sqlite ;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=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc ;extension=pdo_pgsql extension=pdo_sqlite ;extension=pgsql ;extension=shmop ; The MIBS data available in the PHP distribution must be installed. ; See http://www.php.net/manual/en/snmp.installation.php ;extension=snmp ;extension=soap ;extension=sockets ;extension=sqlite3 ;extension=tidy extension=xmlrpc ;extension=xsl </code></pre> <p>Do I need to install another mysqli? It's so strange. I had install the sudo apt-get install php7.2-fpm php7.2-mysql php7.2-cgi php7.2-common php-pear php7.2-mbstring<br> before and work well. But I don't know why it has the problem when I reinstall the ubuntu and mariaDB and php 7.2 and phpmyadmin.</p> </div>

Debian PHP 5.4.27与Ubuntu PHP 5.4.16

<div class="post-text" itemprop="text"> <p>Well, I'm transferring a little web server from one computer to other, on the 'other' computer I cannot a more updated version of PHP, </p> <p>I just have to add my files through ssh and that's all, when I load my webpage it says explicitly:</p> <p>The error is showing on a Debian with PHP 5.4.27 squeeze, the webserver comes from an Ubuntu with PHP 5.4.16 oneiric</p> <pre><code>Parse error: syntax error, unexpected '[' in ~directory~ on line 38 </code></pre> <p>This is the line 38.</p> <pre><code>$VALUE=$DB-&gt;query("a nice sentence")-&gt;fetch()[0]; </code></pre> <p>So, i was pretty surprised because PDO was accepted since PHP 5.1, so, i look deeper and i found the possible error, you can't simply do <code>-&gt;fetch()[0]</code>, you must separate it in order to be "processed", </p> <p>However, I have transport this server with this information before, so i really don't know if it's something on the configuration of PHP or maybe the version by itself 5.4.X? You guys know any hint? As I said, i can't just install other updated version of PHP5, what do you recommend?</p> <p>Have a nice night.</p> <p><strong>Edit: updated to the issue on the PHP 5.4 now</strong></p> </div>

无法在最新的Ubuntu“18.04.2 LTS(Bionic Beaver)”上安装php7.2-fpm

<div class="post-text" itemprop="text"> <p>It looks like PHP 7.2 now comes out of the box on Ubuntu 18.04 but there are 2 versions: 7.2.3-1ubuntu1(base) and 7.2.15-0ubuntu0.18.04.1(security).</p> <p>When I try run apt install php7.2-fpm I get:</p> <pre><code># apt install php7.2-fpm Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php7.2-fpm : Depends: php7.2-common (= 7.2.3-1ubuntu1) but 7.2.15-0ubuntu0.18.04.1 is to be installed E: Unable to correct problems, you have held broken packages. </code></pre> <p>or alternatively:</p> <pre><code># apt install php-fpm Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: php-fpm : Depends: php7.2-fpm but it is not going to be installed E: Unable to correct problems, you have held broken packages. </code></pre> <p>So I cannot install either of FPM versions.</p> <p><strong>Note</strong>: 1. I've run <em>apt update</em> to update the cache before.</p> <pre><code># apt-cache search php7.2 php7.2 - server-side, HTML-embedded scripting language (metapackage) php7.2-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.2-cli - command-line interpreter for the PHP scripting language php7.2-common - documentation, examples and common module for PHP php7.2-curl - CURL module for PHP php7.2-dev - Files for PHP7.2 module development php7.2-gd - GD module for PHP php7.2-gmp - GMP module for PHP php7.2-json - JSON module for PHP php7.2-ldap - LDAP module for PHP php7.2-mysql - MySQL module for PHP php7.2-odbc - ODBC module for PHP php7.2-opcache - Zend OpCache module for PHP php7.2-pgsql - PostgreSQL module for PHP php7.2-pspell - pspell module for PHP php7.2-readline - readline module for PHP php7.2-recode - recode module for PHP php7.2-snmp - SNMP module for PHP php7.2-sqlite3 - SQLite3 module for PHP php7.2-tidy - tidy module for PHP php7.2-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.2-xmlrpc - XMLRPC-EPI module for PHP libphp7.2-embed - HTML-embedded scripting language (Embedded SAPI library) php-amqp - AMQP extension for PHP php-apcu - APC User Cache for PHP php-ds - PHP extension providing efficient data structures for PHP 7 php-gearman - PHP wrapper to libgearman php-geoip - GeoIP module for PHP php-gmagick - Provides a wrapper to the GraphicsMagick library php-gnupg - PHP wrapper around the gpgme library php-http - PECL HTTP module for PHP Extended HTTP Support php-igbinary - igbinary PHP serializer php-imagick - Provides a wrapper to the ImageMagick library php-libsodium - PHP wrapper for the Sodium cryptographic library php-mailparse - Email message manipulation for PHP php-memcache - memcache extension module for PHP php-memcached - memcached extension module for PHP, uses libmemcached php-mongodb - MongoDB driver for PHP php-msgpack - PHP extension for interfacing with MessagePack php-oauth - OAuth 1.0 consumer and provider extension php-pinba - Pinba module for PHP php-propro - propro module for PHP php-ps - ps module for PHP php-radius - radius client library for PHP php-raphf - raphf module for PHP php-redis - PHP extension for interfacing with Redis php-rrd - PHP bindings to rrd tool system php-sass - PHP bindings to libsass - fast, native Sass parsing in PHP php-smbclient - PHP wrapper for libsmbclient php-solr - PHP extension for communicating with Apache Solr server php-ssh2 - Bindings for the libssh2 library php-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP php-tideways - Tideways PHP Profiler Extension php-uploadprogress - file upload progress tracking extension for PHP php-uuid - PHP UUID extension php-xdebug - Xdebug Module for PHP php-yac - YAC (Yet Another Cache) for PHP php-yaml - YAML-1.1 parser and emitter for PHP php-zmq - ZeroMQ messaging bindings for PHP php7.2-bcmath - Bcmath module for PHP php7.2-bz2 - bzip2 module for PHP php7.2-dba - DBA module for PHP php7.2-enchant - Enchant module for PHP php7.2-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php7.2-imap - IMAP module for PHP php7.2-interbase - Interbase module for PHP php7.2-intl - Internationalisation module for PHP php7.2-mbstring - MBSTRING module for PHP php7.2-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.2-soap - SOAP module for PHP php7.2-sybase - Sybase module for PHP php7.2-xsl - XSL module for PHP (dummy) php7.2-zip - Zip module for PHP </code></pre> <p><em>apt update &amp;&amp; apt upgrade &amp;&amp; apt-get -f install php7.2-fpm</em> didn't help.</p> <p>Has someone come across this issue before? To me it looks like a broken dependency. Please help to understand what's going wrong.</p> <p>Thanks &amp; Regards, C</p> </div>

如何在Ubuntu 14.04上启用php5 curl?

<div class="post-text" itemprop="text"> <p>I have installed curl on Ubuntu 14.04 running PHP 5.6 with the following commands:</p> <pre><code>sudo apt-get install php5-curl sudo service apache2 restart </code></pre> <p>It returns a successful message, but when I run:</p> <pre><code>php -m </code></pre> <p>the curl module is not listed, and phpinfo(); does not recognize it as installed or active. I also tried adding:</p> <pre><code>extension=curl.so </code></pre> <p>to my php.ini file, but that had no effect. How do I get PHP to recognize that curl is installed?</p> </div>

在Ubuntu 12.04中安装FFMpeg并在PHP-FFMpeg中使用它

<div class="post-text" itemprop="text"> <p>I have tried many many failed attempt to install FFMpeg in my Ubuntu 12.04. I used following links: <a href="http://www.mysql-apache-php.com/ffmpeg-install.htm" rel="nofollow">1</a>, <a href="http://blog.shineservers.com/installing-and-configuring-ffmpeg-and-ffpeg-php/" rel="nofollow">2</a>, <a href="https://www.ndchost.com/wiki/server-administration/install-ffmpeg" rel="nofollow">3</a> and many others.</p> <p>Then I need to use it in <a href="https://github.com/PHP-FFMpeg/PHP-FFMpeg" rel="nofollow">PHP-FFMpeg</a> And Then I need to deploy in Linux based server. This is my requirement.</p> <p>But after much trying, I just downloaded static build through this <a href="http://johnvansickle.com/ffmpeg/" rel="nofollow">link</a>.</p> <p>This helped me to successfully convert video and use FFMpeg through terminal in Ubuntu. But I cannot use it through PHP-FFMpeg library <strong>which I need to run</strong>. In docs of PHP-FFMpeg it is written <br></p> <blockquote> <p>This library requires a working FFMpeg install. You will need both FFMpeg and FFProbe binaries to use it. Be sure that these binaries can be located with system PATH to get the benefit of the binary detection, otherwise you should have to explicitely give the binaries path on load.</p> </blockquote> <p>and I am not getting this.</p> </div>

没有加载GD图像库,Ubuntu 14.04

<div class="post-text" itemprop="text"> <p>My Drupal installations are complaining over missing GD library:</p> <pre><code>GD library rotate and desaturate effects The GD library for PHP is missing or outdated. Check the PHP image documentation for information on how to correct this. </code></pre> <p>However I have installed the gd package with</p> <pre><code>sudo apt-get install php5-gd </code></pre> <p>and restarted Apache several times.</p> <p>It shows over the list of installed packages: Packages:</p> <pre><code>dpkg -l|grep php ii libapache2-mod-php5 5.5.9+dfsg-1ubuntu4.14 amd64 server-side, HTML-embedded scripting language (Apache 2 module) ii php-pear 5.5.9+dfsg-1ubuntu4.14 all PEAR - PHP Extension and Application Repository ii php5 5.5.9+dfsg-1ubuntu4.14 all server-side, HTML-embedded scripting language (metapackage) ii php5-cgi 5.5.9+dfsg-1ubuntu4.14 amd64 server-side, HTML-embedded scripting language (CGI binary) ii php5-cli 5.5.9+dfsg-1ubuntu4.14 amd64 command-line interpreter for the php5 scripting language ii php5-common 5.5.9+dfsg-1ubuntu4.14 amd64 Common files for packages built from the php5 source ii php5-gd 5.5.9+dfsg-1ubuntu4.14 amd64 GD module for php5 ii php5-json 1.3.2-2build1 amd64 JSON module for php5 ii php5-mysql 5.5.9+dfsg-1ubuntu4.14 amd64 MySQL module for php5 ii php5-readline 5.5.9+dfsg-1ubuntu4.14 amd64 Readline module for php5 </code></pre> <p>When trying to add the library manually to a php.ini file with </p> <pre><code>extension=ge.so; </code></pre> <p>I get this warning:</p> <pre><code>PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/ge.so' - /usr/lib/php5/20121212/ge.so: cannot open shared object file: No such file or directory in Unknown on line 0 </code></pre> <p>Server has been installed with Virtualmin GPL</p> <pre><code>Ubuntu 14.04.3 LTS </code></pre> <p>PHP version:</p> <pre><code>PHP 5.5.9-1ubuntu4.14 </code></pre> <p>Any advice very appreciated!</p> </div>

PHP启动:无法加载动态库PGSQL

<div class="post-text" itemprop="text"> <p>I'am trying to run Symfony 3.x with :</p> <ul> <li>Ubuntu 16.04</li> <li>PHP 7.0</li> <li>NGinx</li> </ul> <p>I would like to interact with my PGSQL database that I created but I get this error :</p> <blockquote> <p>PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_pgsql.dll' - /usr/lib/php/20151012/php_pdo_pgsql.dll: cannot open shared object file: No such file or directory in Unknown on line 0</p> <p>[Doctrine\DBAL\Exception\DriverException] An exception occured in driver: could not find driver<br> [Doctrine\DBAL\Driver\PDOException] could not find driver </p> <p>[PDOException] could not find driver</p> </blockquote> <p>So I looked at my <code>phpinfo()</code> and it seems that pgsql driver is enabled </p> <p><a href="https://i.stack.imgur.com/TKUWn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TKUWn.png" alt="phpinfo() result"></a></p> <p>Can anyone help me on this one ? </p> </div>

如何使用tasksel在Ubuntu 12.04上安装PHP 5.6+?

<div class="post-text" itemprop="text"> <p>I recently downgraded one of my laptop from 14.04 to 12.04. Reason for downgrading operating system is speed only. 12.04 seems 10x time faster then my experience with 14.04 on my low configuration laptop. As usual I install LAMP stack using <code>tasksel</code> command:</p> <pre><code>$ sudo apt-get install tasksel $ sudo apt-get update $ sudo tasksel install lamp-server </code></pre> <p>However, this installed PHP version 5.3.10. I google to update php version and followed many suggestions including <code>sudo apt-get update</code>, <code>sudo apt-get dist-upgrade</code> and also installing latest PPA as well.</p> <p>Also fllowed this answer: <a href="https://stackoverflow.com/questions/30776257/php-upgrade-from-5-3-to-php-5-6-on-ubuntu-12-04">Php upgrade from 5.3 to php 5.6 on Ubuntu 12.04</a></p> <p>Nothing worked so far and I am here for seeking some help.</p> </div>

无法在ubuntu 16.10上再次安装php5.6-curl。 ppa被添加。

<div class="post-text" itemprop="text"> <p>Im trying to install php5.6-curl package. It was installed before but I did some stuff with manual build of curl, so I had remove php5.6-curl package from system. I also ran apt autoremove after this operation.</p> <p>So, after successfull build stuff I was trying to call apt-get install php5.6-curl and it showed me this.</p> <pre><code>dirst@dirst-machine:~$ sudo apt-get install php5.6-curl Reading package lists... Done Building dependency tree Reading state information... Done Package php5.6-curl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'php5.6-curl' has no installation candidate </code></pre> <p>You can be sure that ppa:ondrej/php5-5.6 is installed on my ubuntu as php5.6 is present in the system and php5.6-curl package had been isntalled before.</p> <p>I also tried to add ppa again and ran apt-get update. Im not sure what this messages means.</p> <pre><code>http://ppa.launchpad.net/ondrej/php/ubuntu yakkety InRelease ..... Fetched 107 kB in 3s (31.9 kB/s) Reading package lists... Done W: The repository 'http://ppa.launchpad.net/shutter/ppa/ubuntu yakkety Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: https://repo.skype.com/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1F3045A5DF7587C3 W: The repository 'https://repo.skype.com/deb stable InRelease' is not signed. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: https://linuxdesktopcloud.mail.ru/screenshoter/deb/dists/appind/InRelease: Signature by key 8A99BA500079839DF7DE4833196205AF7396FF77 uses weak digest algorithm (SHA1) E: Failed to fetch http://ppa.launchpad.net/shutter/ppa/ubuntu/dists/yakkety/main/binary-amd64/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. </code></pre> <p>Next what I tried is to check php extensions available with apt-cache search php5.6. There is no php5.6-curl but I know it should be there.</p> <pre><code>dirst@dirst-machine:~$ apt-cache search php5.6 php-igbinary - igbinary PHP serializer php-msgpack - PHP extension for interfacing with MessagePack php-ssh2 - Bindings for the libssh2 library php-xdebug - Xdebug Module for PHP php5.6-opcache - Zend OpCache module for PHP php5.6-mysql - MySQL module for PHP php5.6-json - JSON module for PHP php5.6-common - documentation, examples and common module for PHP php5.6 - server-side, HTML-embedded scripting language (metapackage) php5.6-mcrypt - libmcrypt module for PHP php5.6-readline - readline module for PHP php5.6-gd - GD module for PHP php5.6-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php5.6-cli - command-line interpreter for the PHP scripting language php5.6-mbstring - MBSTRING module for PHP php5.6-ldap - LDAP module for PHP libapache2-mod-php5.6 - server-side, HTML-embedded scripting language (Apache 2 module) php-memcached - memcached extension module for PHP, uses libmemcached </code></pre> <p>I also launched clean ubuntu 16.04 in the cloud and tried to do same actions. - Install php5.6, php5.6-curl. - Remove curl and then build it manually - Install php5.6-curl again</p> <p>All worked like a charm. And list of the extensions is way too bigger when I execute apt-cache search php5.6 on cloud ubuntu.</p> <p>I dont't know what am I doing wrong, Im not really strong linux guys, so I have no Idea what is going on. Please help.</p> </div>

Ubuntu上的XAMPP:不同的PHP版本

<div class="post-text" itemprop="text"> <p>UPDATE 16.03.2017:</p> <p>I checked the log and found the following error:</p> <pre><code>Xdebug requires Zend Engine API version 320151012. The Zend Engine API version 320160303 which is installed, is newer. Contact Derick Rethans at xdebug.org/docs/faq#api for a later version of Xdebug </code></pre> <p>I understand that I need to compile xdebug using another PHP header but how do I compile this with PHP7? Also, I am already using the latest xdebug version, which is 2.5.1</p> <p>I installed xdebug on ElementaryOS together with XAMPP (PHP7) and PHPStorm. When I enter "php -v" in the terminal, I get the following output</p> <pre><code>PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.15-0ubuntu0.16.04.4, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans </code></pre> <p>In addition, "php --ini" writes:</p> <pre><code>Configuration File (php.ini) Path: /etc/php/7.0/cli Loaded Configuration File: /etc/php/7.0/cli/php.ini Scan for additional .ini files in: /etc/php/7.0/cli/conf.d Additional .ini files parsed: /etc/php/7.0/cli/conf.d/10-mysqlnd.ini, /etc/php/7.0/cli/conf.d/10-opcache.ini, </code></pre> <p>But when running "phpinfo()" in the browser (hosted by XAMPP) the output does not contain "xdebug" and the php installation seems to be another:</p> <pre><code>Configuration File (php.ini) Path /opt/lampp/etc Loaded Configuration File /opt/lampp/etc/php.ini </code></pre> <p>In both php.ini files, I added the following but still no luck:</p> <pre><code>;[XDebug] zend_extension="/usr/lib/php/20151012/xdebug.so" xdebug.remote_enable=On xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000 </code></pre> <p>I checked that xdebug.so exists at this path. It has the following authorizations:</p> <pre><code>-rw-r--r-- 1 root root 1225696 Mär 14 2016 /usr/lib/php/20151012/xdebug.so </code></pre> <p>I have no clue what to try next - maybe someone could give me a hint!</p> <p>Cheers!</p> </div>

使用适用于SQL Server的PHP的Microsoft驱动程序连接到Ubuntu 16.04上的PHP 7.2中的SQL Server,在浏览器中工作但在命令行中失败

<div class="post-text" itemprop="text"> <p>I'm trying connecting a remote SQL Server database and getting its data for writting to my local Mysql database on Ubuntu. I've been using <em>Microsoft Drivers for PHP for SQL Server</em> (ODBC driver installed) and it works in the browsers. </p> <p>But while I run it in command-line, it shows <code>could not find driver</code>, just like the Driver is never installed.</p> <p>My environment:</p> <ol> <li>Ubuntu 16.04.5</li> <li>PHP 7.0.32</li> <li>Apache 2.4.18</li> <li>MySQL 5.7.24</li> </ol> <p>The remote server is Windows Server 2012 with SQL Server 14.0.1000.</p> <p>I've configured my Apache and PHP correctly followed the official tutorial (otherwise it probably could not work even in the browser), so I don't know why it doesn't work in the command-line or terminal. Please help, thanks.</p> </div>

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

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

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

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

springboot+jwt实现token登陆权限认证

一 前言 此篇文章的内容也是学习不久,终于到周末有时间码一篇文章分享知识追寻者的粉丝们,学完本篇文章,读者将对token类的登陆认证流程有个全面的了解,可以动态搭建自己的登陆认证过程;对小项目而已是个轻量级的认证机制,符合开发需求;更多精彩原创内容关注公主号知识追寻者,读者的肯定,就是对作者的创作的最大支持; 二 jwt实现登陆认证流程 用户使用账号和面发出post请求 服务器接受到请求后使用私...

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

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

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

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

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

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

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

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

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

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

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

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

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

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

优雅的替换if-else语句

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

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

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

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

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

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

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

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

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

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

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

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

面试:第十六章:Java中级开发

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

早上躺尸,晚上干活:硅谷科技公司这么流行迟到?

硅谷科技公司上班时间OPEN早已不是什么新鲜事,早九晚五是常态,但有很多企业由于不打卡,员工们10点、11点才“姗姗来迟”的情况也屡见不鲜。 这种灵活的考勤制度为人羡慕,甚至近年来,国内某些互联网企业也纷纷效仿。不过,硅谷普遍弹性的上班制度是怎么由来的呢?这种“流行性迟到”真的有那么轻松、悠哉吗? 《动态规划专题班》 课程试听内容: 动态规划的解题要领 动态规划三大类 求最值/计数/可行性 常...

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

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

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

Python爬虫,高清美图我全都要(彼岸桌面壁纸)

爬取彼岸桌面网站较为简单,用到了requests、lxml、Beautiful Soup4

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

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

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

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

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

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

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

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

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大胆预测下未来5年的Web开发

在2019年的ReactiveConf 上,《Elm in Action》的作者Richard Feldman对未来5年Web开发的发展做了预测,很有意思,分享给大家。如果你有机会从头...

立即提问
相关内容推荐