postgresql - 在 php.ini 中打开 error_reporting 会杀死我的 pg 模块

标签 postgresql error-handling php pg

我有一个问题,最近我不得不从 MySQL 切换到 PostgreSQL,因为有一个新客户端。

这是我的错误在我的 php.ini 中的设置方式:

display_errors
Default Value: On
Development Value: On
Production Value: Off

; display_startup_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED
pg dll 正在加载并且运行良好。

Pg 出现在我的 phpinfo() 中;世界很美好。

然后我需要打开错误,因为我需要它进行调试。

我当然这样做了:
display_errors
Default Value: On
Development Value: On
Production Value: Off

; display_startup_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

; error_reporting
   Default Value: E_ALL & ~E_NOTICE
   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

...但现在 pg模块无法加载,pg我的 phpinfo() 中没有显示扩展名.

什么?

有任何想法吗?这是关于什么的?

更新

所以我更正了我的php.ini看起来像这样:
display_errors= On
;   Default Value: On
;   Development Value: On
;   Production Value: Off

; display_startup_errors
;   Default Value: Off
;   Development Value: On
;   Production Value: Off

error_reporting = E_ALL & ~E_NOTICE
;   Default Value: E_ALL & ~E_NOTICE
;   Development Value: E_ALL | E_STRICT
;   Production Value: E_ALL & ~E_DEPRECATED

pgsql 加载但仍然不喜欢错误报告。

最佳答案

嗯,应该是:

error_reporting = E_ALL & ~E_NOTICE

其他内容是关于不同类型环境的建议值的 jsut 注释 ini总是
key_name = value
这些 block 是文件中的文档......如果您在文件中搜索指令并逐步查看结果,您将在文件后面找到实际设置,因此不在该部分之前:
;;;;;;;;;;;;;;;;;;;
; Quick Reference ;
;;;;;;;;;;;;;;;;;;;
; The following are all the settings which are different in either the production
; or development versions of the INIs with respect to PHP's default behavior.
; Please see the actual settings later in the document for more details as to why
; we recommend these changes in PHP's behavior.

关于postgresql - 在 php.ini 中打开 error_reporting 会杀死我的 pg 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12014899/

相关文章:

javascript - MySQL 在数据库中存储数据

php - 调用未定义的方法 Closure::getName()

php - 在linux中重新初始化系统范围的环境变量

javascript - Sequelize findOne/findAll 查询不返回关联属性

pandas - 从excel加载数据时出现python _getitem_和_getitem_column(key)错误

image - 不变违反 : App(. ..) 渲染没有返回任何内容。这通常意味着缺少 return 语句。 react 原生

error-handling - 以干净有效的方式处理 Lua 错误

ruby-on-rails - pg_search : how to prioritize exact word matches?

sql - 每组的最小行数

database - 防止 PostgreSQL 有时选择错误的查询计划