我在我的电脑MAMP上创建了一个功能齐全的网站。当我把它放在服务器上时,一切都运行良好,除了我无法将新用户插入数据库。我部分担心SSL证书正在打断它,但我对此并不了解。为了解决这个问题,我做了以下几点:
1. confirmed the connection works by returning row numbers and data that I manually placed into the database
2. confirmed openSSL is active/on
3. confirmed proper placement of my ssl certs through a separate site that confirms their presence
4. checked the error log on the server (which showed no errors) and then created a script to cause an error as proof of principle it works
5.confirmed the phpmyadmin user has full privledges
6. I have two user types and scripts that both don't work that worked on MAMP so I'm fairly confident its not poor coding
此外,我所有的php sql语句都内置了mysqli_error($ conn),它没有显示任何错误,当我尝试基本
时 "INSERT INTO users (name) VALUES ('john')"
情景,这是不成功的。
我觉得这是ssl源于我的其他(非加密)网站没有这个问题的事实。有什么基本的东西我不见了吗?
答案 0 :(得分:1)
它不是SSL,而是你的配置。看到它。如果您可以在phpmyadmin中使用原始sql进行插入,那么请检查您的配置,如主机名用户和数据库名称。你正在使用什么服务器?