phpcms installation cannot connect to the database
We are building the phpcms v9 program. When we reach the fifth step, install The program keeps prompting "Unable to connect to the database server, please check the configuration." Let's take a look at how to solve this problem.
Reason:
The phpcms v9 installation program code does not escape special characters (such as: &$^!@#) in the submitted password. If the password contains # or &, it will be incorrectly separated by the $_GET parameter, causing our password to be inconsistent with what we entered, causing problems!
Solution:
1. Modify install/step5.tpl.php 127 behavior:
'&dbpw='+escape($('#dbpw').val())
2. Modify install/step6.tpl. PHP 55 behavior:
var dbpw = escape('<?=$dbpw?>');
After the above modification, the problem of being unable to connect to the database is solved.
Recommended tutorial: phpcms tutorial
The above is the detailed content of phpcms installation cannot connect to the database. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version
God-level code editing software (SublimeText3)
