Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Resolve the problem that the phpcms v9 installation cannot connect to the database

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to solve the problem that the installation of phpcms v9 can not connect to the database, which can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

What if the phpcms v9 installation cannot connect to the database?

Phpcms v9 installation prompt "database connection error" solution

Description:

Today, when building the phpcms v9 program, to the fifth step, the installer has been prompting "unable to connect to the database server, please check the configuration". It is very strange that my server configuration is correct. Enter the correct account number and password several times and still indicate that you cannot connect. So I looked it up and finally solved it, and now I share it. I hope it will be useful to you.

The problem is shown in the figure:

Reason:

The phpcms v9 installer code does not escape escape the special characters in the submitted password, such as & $^! @ #.

Solution:

Modify the install/step5.tpl.php 127line as follows:

'& dbpw='+escape ($(' # dbpw'). Val ())

two。 Modify line 55 of install/step6.tpl.php as follows:

Vardbpw = escape (''); thank you for reading this article carefully. I hope it is helpful for everyone to share and solve the problem that the installation of phpcms v9 cannot connect to the database. At the same time, I also hope that you can support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report