jjzjj

PDOException

全部标签

php - Laravel 到 SQL Server (sqlsrv)。 [PDOException] 找不到驱动程序

简介。我的laravel应用程序使用的是mysql,现在它需要托管在我工作的公司的网络中(我是一名远程worker)。而这家公司是Microsoftpeeps,所以我需要将laravel集成到他们的SQLServer中。我的.env里有这个DB_CONNECTION=sqlsrvDB_HOST=ip.address.of.serverDB_PORT=3306DB_DATABASE=my_dbDB_USERNAME=my_usernameDB_PASSWORD=my_password使用phpartisanmigrate后错误:[PDOException]couldnotfinddriv

php - PDO 错误 - PDOException',消息为 'SQLSTATE[HY000]: General error'

这个问题在这里已经有了答案:PDOerror:"SQLSTATE[HY000]:Generalerror"Whenupdatingdatabase(2个回答)关闭4年前。我收到这个错误:Fatalerror:Uncaughtexception'PDOException'withmessage'SQLSTATE[HY000]:Generalerror'in.....每当我用PDO执行这段代码时://Selectdatafromthetopic.$s=$dbh->prepare("SELECT*FROMforum_topicsWHEREforum_id=:forum_cat_idANDto

php - Laravel 5 PDOException 找不到驱动程序

这个问题在这里已经有了答案:Laravel:PDOException:couldnotfinddriver(32个回答)关闭5个月前。我在使用Laravel5时遇到问题。当我运行“phparitsanmigrate”时,我收到了这个错误***************************************ApplicationInProduction!***************************************Doyoureallywishtorunthiscommand?[y/N]y[PDOException]couldnotfinddriver我可以运行应

php - Laravel PDOException SQLSTATE[HY000] [1049] 未知数据库 'forge'

我正在使用Laravel连接到MySQL数据库。我遇到了这个异常:PDOExceptionSQLSTATE[HY000][1049]Unknowndatabase'forge'这是我的config.database.php'mysql'=>array('driver'=>'mysql','host'=>'localhost','database'=>'laravel','username'=>'Anastasie','password'=>'A@Laurent','charset'=>'utf8','collation'=>'utf8_unicode_ci','prefix'=>'',

php - Laravel:错误 [PDOException]:在 PostgreSQL 中找不到驱动程序

我正在尝试通过Laravel连接PostgreSQL数据库以进行phpartisan迁移,但似乎没有被定向,因为它正在读取MySQL的数据库名称。以下是来自database.php的命令:'connections'=>array('sqlite'=>array('driver'=>'sqlite','database'=>__DIR__.'/../database/production.sqlite','prefix'=>'',),'mysql'=>array('driver'=>'mysql','host'=>'localhost','database'=>'database','u

php - PDOException SQLSTATE[HY000] [2002] 没有这样的文件或目录

我相信我已经成功地将我的(非常基本的)站点部署到了fortrabbit,但是一旦我连接到SSH以运行一些命令(例如phpartisanmigrate或phpartisandb:seed)我收到一条错误消息:[PDOException]SQLSTATE[HY000][2002]Nosuchfileordirectory在某些时候,迁移一定会奏效,因为我的表在那里-但这并不能解释为什么它现在不适合我。 最佳答案 Laravel4:Change"host"intheapp/config/database.phpfilefrom"local

php - PDOException “could not find driver”

我刚刚使用Apache、MySQL和PHP安装了DebianLenny,我收到PDOException找不到驱动程序。这是它所指的特定代码行:$dbh=newPDO('mysql:host='.DB_HOST.';dbname='.DB_NAME,DB_USER,DB_PASS)DB_HOST、DB_NAME、DB_USER和DB_PASS是我定义的常量。它在生产服务器(以及我之前的Ubuntu服务器设置)上运行良好。这与我的PHP安装有关吗?搜索互联网没有帮助,我得到的只是专家交流和示例,但没有解决方案。 最佳答案 您需要有一个名