【PHP MongoDb驱动程序:如何设置执行代码的超时】教程文章相关的互联网学习教程文章

如何在OSX上为XAMPP安装PHP MongoDB驱动程序?

我在命令终端上输入了以下命令,以便在Macbook Pro的XAMPP上的PHP中使用“ MongoClient”: >酿造安装wget> brew安装autoconf>须藤/ Applications / XAMPP / xamppfiles / bin / pecl install mongo>在php.ini中添加了extension = mongo.so/ Applications / XAMPP / xamppfiles / etc>重新启动Apache 但是,我没有运气.我不断收到此错误:致命错误:在第5行的/Applications/XAMPP/xamppfiles/htdocs/xampp/index.php中找不到类’Mong...

php-找不到驱动程序pdo_sqlsrv【代码】

我正在Windows 7上使用Symfony 3.0,PHP 5.6.17,IIS 7.5和SQL Server数据库(MSSQL). 像很多人一样,我目前拥有pdo_exception:[Doctrine\DBAL\Exception\DriverException]An exception occured in driver: could not find driver[Doctrine\DBAL\Driver\PDOException]could not find driver[PDOException]could not find driver但是,我不知道如何跟踪错误.这是我所拥有的: PHP.ini这两个dll被正确命名并位于ext文件夹中;extension=ph...

如何使用适用于php 7的MongoDB驱动程序执行drop()?【代码】

如何使用适用于php 7的MongoDB驱动程序执行drop()或remove()等功能? 我提到了https://docs.mongodb.org/v3.0/reference/method/js-collection/ 但是,我没有太多有关PHongo(PHP 7的MongoDB驱动程序)的文档. 先感谢您.解决方法:您可以像这样删除集合:$manager = new \MongoDB\Driver\Manager("mongodb://" . $username . ":" . $password . "@{$host}:{$port}"); $manager->executeCommand('database', new \MongoDB\Driver\Comman...

php-CodeIgniter从mysql切换驱动程序-> mysqli

我在读这个问题:The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead 这让我想到应该从mysql更改为mysqli.这是CodeIgniter中的一个字符更改,因此并不是很难:) 但是,我有什么需要注意的地方,以发现可能发生的任何错误?是否存在某些区别对待的查询?解决方法:Are there certain queries that are treated differently?没有. MySQL和MySQLi扩展是“驱动程序”,负责处理PHP和MySQL数据...

php – Laravel到SQL Server(sqlsrv). [PDOException]找不到驱动程序【代码】

介绍.我的laravel应用程序使用的是mysql,现在它需要托管在我正在工作的公司的网络中(我是一名远程工作者).这家公司是微软的,所以我需要将laravel集成到他们的SQL Server中. 我的.env中有这个DB_CONNECTION=sqlsrv DB_HOST=ip.address.of.server DB_PORT=3306 DB_DATABASE=my_db DB_USERNAME=my_username DB_PASSWORD=my_password使用php artisan migrate后 错误:[PDOException]could not find driver我正在使用Ubuntu,一个专用于我...

带有MS SQL Server的PHP的SQLSRV驱动程序与PDO驱动程序

在SQLSRV驱动程序与PDO驱动程序之间进行选择时,我应该考虑哪些因素(对于带有MS SQL服务器的PHP)? 我看到了之前的Stackoverflow帖子(When using PHP on Windows, what is better (1) the native driver for SQL Server or (2) the PDO driver?),但答案似乎有点缺乏,并没有提到使用this article中提到的SQLSRV驱动程序的所有好处. 我正在寻找一个全面的和最新的(例如,SQLSRV驱动程序是否仅适用于Windows?),程序员可以将其称为资源....

PHP 7.0上的Laravel 5.4:PDO异常 – 找不到驱动程序(MySQL)【代码】

我在我的Ubuntu 14.04上有一个Laravel 5.4项目(VPS与Plesk 12.5.30).创建数据库并设置带有所需信息的.env文件后,我运行了php artisan migrate并抛出了异常:[Illuminate\Database\QueryException]could not find driver (SQL: select * from information_schema.tables where table_schema = pmaramaldb and table_name = migrations) [PDOException]could not find driver我的.env文件有:DB_CONNECTION=mysql DB_HOST=127.0.0.1 ...

用于SQL Server的PHP的Microsoft驱动程序2.0仍在某处吗?

所以版本3.0是在Microsoft’s download site.此外,该页面上有一行说Please note that the download link for the 2.0 Driver will be deprecated in the near future是的,这很好,但是根据要求PHP 5.3.6 or PHP 5.4我正在使用5.2.x,对于我正在设计的应用程序,我真的不应该那么高.我只是找不到我需要从google搜索的php_sqlsrv.dll文件的副本,但我相信它仍然在某处.有谁知道我可以在哪里得到一份副本?解决方法:在PDO_SQLSRV的PHP文档...

php – Laravel – [PDOException]:无法在PostgreSQL中找到驱动程序 – MAC OS【代码】

我在stackoverflow上查看了有关此问题的多篇帖子,但我仍然遇到同样的问题: php.ini文件中列出了以下内容:extension=php_pdo_pgsql.dllextension=php_pgsql.dllENV文件:DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_DATABASE=owe DB_USERNAME=postgres DB_PASSWORD=password我重新启动apache,重新启动计算机,当我进行迁移时,我收到以下错误:me$php artisan migrate PHP Warning: PHP Startup: Unable to load dynamic library '/...

用于MS SQL Server的PDO DBLIB驱动程序:找不到php_pdo_driver.h【代码】

我正在按照以下链接上的教程在我的Mac Os Mojave中编译PDO的DBLIB驱动程序. https://github.com/BellevueCollege/public-docs/blob/master/PHP/configure-mssql-pdodblib-mac.md 问题是,当我运行以下代码时:$cd php-7.2.9/ext/pdo_dblib $phpize $./configure --with-php-config=/usr/bin/php-config --with-pdo-dblib=/usr/local/ $make $sudo cp modules/pdo_dblib.so /usr/lib/php/extensions/no-debug-non-zts-20121212特别是...

在Mac上安装本机PHP / Mysql,激活PDO驱动程序【代码】

我在MacOSX Lion上进行了自定义安装,包括以下内容: >原生PHP升级到5.4,就像一个魅力.>安装的MySQL,从/usr/local/mysql-5.5.25-osx10.6-x86_64/bin/mysql运行,就像一个魅力,Workbench连接,可以做ops.>在/ etc /中编辑php.ini以激活以下内容:extension=php_mysqli.so extension=php_pdo_pgsql.so extension=php_pdo_mysql.so> phpinfo()说如下: PDO PDO支持已启用PDO驱动程序mysql,pgsql,sqlite PDO_MYSQL 启用了MySQL的PDO驱动程...

PHP MongoDb驱动程序:如何设置执行代码的超时【代码】

我有以下代码在MongoDb端执行一段代码:$mongoCode = new MongoCode('/* Some JS code */'); $db->execute($mongoCode, array('socketTimeoutMS' => 1000000, ));如您所见,我已尝试通过在execute()函数的第二个参数中设置socketTimeoutMS值来设置代码执行的超时.但它不起作用. PHP网站中的文档表明execute()命令的第二个参数作为参数发送给代码.如何为MongoDB :: execute()设置超时?请注意我使用版本1.5的MongoDB驱动程序用于php和...

在PHP中执行存储过程后调用odbc_fetch_array会出现错误[Microsoft] [ODBC SQL Server驱动程序]无效的描述符索引【代码】

所以,我正在尝试使用ODBC在SQL数据库中执行存储过程,但它返回错误odbc_fetch_array() [function.odbc-fetch-array]: SQL error: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index, SQL state S1002 in SQLGetData这是PHP部分,非常标准... $id = 240$user = "user"; $password = "password"; $server = "server"; $database = "database";$con = odbc_connect("SERVER=$server; DRIVER=SQL Server;DATABASE=$database"...

php – Mac上的Laravel 4本地主机:无法找到SQLSRV的驱动程序

我正在尝试将Laravel 4连接到SQL Server数据库.我收到错误,但我认为这是一个PHP错误,而不是Laravel错误.它说PDOException:找不到驱动程序.我将驱动程序设置为sqlsrv,就像database.php文件中的另一个示例一样.就像我说的,我认为这是一个PHP错误,而不是Laravel. 我在Mac上的本地主机上.我需要在php.ini文件中配置一些东西吗?我发现another article说我需要在PDO下注释掉MySQL驱动程序.我也在php.ini中找不到该行.但无论如何我也需要...

在Laravel PHP Framework中找不到PGSQL驱动程序【代码】

您好我在CentOS 6.3上使用Laravel PHP框架.我安装了PostgreSQL 9.1,以及PDO和PDO-PGSQL.在application / config / database.php下我设置Laravel使用PostgreSQL:'default' => 'pgsql','connections' => array('pgsql' => array('driver' => 'pgsql','host' => 'localhost','database' => 'dbname','username' => 'username','password' => 'shhhpass','charset' => 'utf8','prefix' => '','schema' => 'public',), ),但...