douhui5529 2017-10-26 23:20 采纳率: 100%
浏览 28
已采纳

我的php不解释postgresql或sql函数

hello to everyone here ... please i need your help . i have some trouble with php and my SGBDs ... i have installed php mysql and apache separately . but when i launch a php program with mysql_connect it send a 500 internal error without response . i have changed mysql to postgresql but it is the same problems . i have also remove the comma before some line in php.ini but it's the same result ... there is a simple connection to the database code examples `

<?php

$link = pg_connect('localhost', 'USERNAME', 'PASSWORD');
if (!$link) {`
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
pg_close($link);

` and there is the result the result of the code with 500 error and there is my php.ini file image of my php.ini thanks you

  • 写回答

2条回答 默认 最新

  • douang4294 2017-10-27 12:41
    关注
    • Have you restart apache ?

    • Set display_errors directive to On in your php.ini

    • Create info.php in your document root, put <? phpinfo(); ?> into it. Open info.php from your browser, try to find word "pdo_pgsql" / "pdo_mysql". Has it appear correctly ?

    • Dig into your apache access_log and error_log files to get further clue about your error.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 SQLServer怎么录入下标
  • ¥100 无网格伽辽金方法研究裂纹扩展的程序
  • ¥15 错误于library(org.Hs.eg.db): 不存在叫‘org.Hs.eg.db’这个名称的程序包,如何解决?
  • ¥60 求一个图片处理程序,要求将图像大小跟现实生活中的大小按比例联系起来的
  • ¥50 求一位精通京东相关开发的专家
  • ¥100 求懂行的大ge给小di解答下!
  • ¥15 pcl运行在qt msvc2019环境运行效率低于visual studio 2019
  • ¥15 MAUI,Zxing扫码,华为手机没反应。可提高悬赏
  • ¥15 python运行报错 ModuleNotFoundError: No module named 'torch'
  • ¥100 华为手机私有App后台保活