作者:快乐宝宝的哭泣_826 | 来源:互联网 | 2023-02-10 13:54
Ihavenoideawhymycodeisfailingsilently.PDOandPDOSQLiteareconfirmedloaded.Errorsare
I have no idea why my code is failing silently. PDO and PDO SQLite are confirmed loaded. Errors are turned on and OTHER errors display.
我不知道为什么我的代码会无声地失败。 PDO和PDO SQLite已确认已加载。错误已打开,并显示其他错误。
The SQLite file exists. Perms are set correctly. If I change the filename, PHP actually DOES create the file but still fails silently. No output or commands are excecuted after the "$dbh = new PDO($db_conn);
" command. I'm not sure what else I can possibly do to troubleshoot.
SQLite文件存在。 Perms设置正确。如果我更改文件名,PHP实际上是创建文件但仍然无声地失败。在“$ dbh = new PDO($ db_conn);”之后没有输出或命令。命令。我不确定我还可以做些什么来排除故障。
What else... this is on Modwest shared hosting. PHP Version is 5.2.6.
还有什么...这是在Modwest共享主机上。 PHP版本是5.2.6。
ABOUT TO RUN
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (Exception $e) {
exit("Failed to open database: {$e->getMessage()} \n" );
}
?>
THIS NEVER OUTPUTS!
ADDITIONAL NOTE: I tried a simple proof of concept of running this line of code in PHP CLI on the same server. This time I get an error: "Segmentation Fault".
附加说明:我尝试了在同一服务器上运行PHP CLI中的这一行代码的简单概念证明。这次我收到一个错误:“Segmentation Fault”。
1 个解决方案