草庐IT

sqlstate

全部标签

php - 错误 : SQLSTATE[HY000]: General error: 8 attempt to write a readonly database cakephp

我不知道如何解决这个问题。当我使用ApacheWeb服务器将此项目部署到生产服务器时发生了问题。我尝试更改Apache网络服务器上的DocumentRoot。(CakePHPdocumentation)但仍然没有运气。但是,如果我使用./cake服务器命令(http://localhost:8765/)在开发服务器下运行该项目,它似乎没问题。我可以创建、检索、更新、删除。没有数据库错误请帮帮我。 最佳答案 此问题也与anotherquestion有关关于cakePhp3.x错误来自您站点中激活的DebugKit插件,如屏幕截图所示。

php - PDO异常 : SQLSTATE[HY000] [2002] No such file or directory

我已将PushChatServer目录放入htdocs文件夹并创建数据库puschat尝试运行@"http://localhost/PushChatServer/api/test/database.php"然后我得到以下异常。我想做同样的事情来解释这个链接http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2我已经完成了所有这些但我得到了这个异常Couldnotconnecttothedatabase.Reason:exception'PDOExceptio

php 数据库库,错误 : SQLSTATE[HY000] Unknown host machine name (severity 2)

我使用的是mac电脑OSX10.9。Freetds和unixODBC已经安装在我的电脑上并作为扩展添加到php,试图连接到远程MSSQL服务器。下面是我的连接测试:错误日志文件显示:[error][client127.0.0.1]PHPFatalerror:Uncaughtexception'PDOException'withmessage'SQLSTATE[HY000]Unknownhostmachinename(severity2)可能是什么问题?如果我使用终端连接到同一个数据库,我的freetds和unixODBC似乎工作正常,如下所示:$isqlHostnameuserpw+-

php - Laravel 5 - SQLSTATE [22P02] - postgres 的无效文本表示

错误:SQLSTATE[22P02]:Invalidtextrepresentation:7ERROR:invalidinputsyntaxforinteger:"dismissnotification"(SQL:select*from"users"where"id"=dismissnotification)在我的routes.php文件中:Route::get('user/dismissnotification/{notificationid}',array('as'=>'dismissnotification','uses'=>'NotificationController@dis

php - SQLSTATE[HY000] : OCISessionBegin: ORA-21561: OID generation failed

尝试在我的其中一台Web服务器上执行PDOOCISQL查询时,我收到以下错误:SQLSTATE[HY000]:OCISessionBegin:ORA-21561:OIDgenerationfailed我已经确认可以从机器访问Oracle服务器并且网络配置看起来很好。Google返回的结果很少,而且不是很有用。有没有其他人遇到过这个问题,或者对如何解决有任何建议? 最佳答案 我遇到了同样的问题。我试图连接到本地主机上的数据库。我就是这样解决的。获取主机名>hostnamelocalhost.idc.company.com将此名称添加到

PHP PDO_mssql SQLSTATE[01002] Adaptive Server 连接失败(严重性 9)

我正在连接到外部MSSQL数据库以从PHP55/osx导出,但我遇到了奇怪的问题。代码:new\PDO("dblib:host={$hostname};dbname={$dbname}",$user,$pass);抛出:SQLSTATE[01002]AdaptiveServerconnectionfailed(severity9)但来自CLI的连接工作正常tsql-Shostname-Uuser-Ppass-Ldbname:localeis"cs_CZ.UTF-8"localecharsetis"UTF-8"usingdefaultcharset"UTF-8"1>freetds.con

php - SQLSTATE[HY093] : Invalid parameter number: no parameters were bound, 但提供了参数

我正在构建一个数据库对象,它将PDO对象与PDOStatement对象连接起来,以便链接可用。基本上我只是把我最常用的方法放在一起,但是bindParam让我很难受。private$stmt=null;...publicfunctionprepare($statement,array$driver_options=array()){if($this->stmt)thrownew\Exception('PDOStatementalreadyprepared,nooverride!');$this->stmt=parent::prepare($statement,$driver_optio

php - SQLSTATE[HY000] : General error: 1005 Can't create table - Laravel 4

我在执行phpartisanmigrate时遇到此错误。我的迁移文件有问题吗?还是我的模型编码有误?但是即使模型中有问题,迁移也应该有效吗?[Exception]SQLSTATE[HY000]:Generalerror:1005Can'tcreatetable'festival_aid.#sql-16643_2033'(errno:150)(SQL:altertable`gigs`addconstraintgigs_band_id_foreignforeignkey(`band_id`)references`bands`(`band_id`)ondeletecascade)(Bindi

php - 出现错误 - SQLSTATE [21000] : Cardinality violation: 1241 Operand should contain 1 column(s)

我收到这个错误SQLSTATE[21000]:违反基数:1241操作数应包含1列谁能帮我理解为什么?这是我的代码:setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);$query1="SELECT((SELECT*FROMparticipantsORDERBYserialDESCLIMIT0,1)%10)+1asversion";//$results=$dbh->query($query1);$results=$dbh->prepare($query1);$results->execute();$serial=$results-

mysql - Magento -- "SQLSTATE[23000]: Integrity constraint violation.."客户更新

迁移服务器后,每次我尝试更新客户信息时都会收到错误消息。我正在使用customeractivationplugin,但在禁用它之后,我仍然得到同样的错误。SQLSTATE[23000]:Integrityconstraintviolation:1062Duplicateentry'7-127'forkey2怎么了?即使卸载插件后,我在尝试保存客户信息时仍会出现此错误。所以这让我相信它是Magento和/或我切换到的服务器的一个更大的问题。我检查了Magento的日志,我多次收到此通知:ERR(3):UserNotice:Sorry,yourPCREextensiondoesnotsup