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

What if phpcms can't connect to the remote database?

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

What if phpcms cannot connect to the remote database? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

Phpcms cannot connect to the remote database

Reason: the database password is a special character.

The database server could not be linked during phpcms installation. Please check the configuration, but the database information is completely correct.

After looking for a lot of problems on the Internet, I later learned that the database password has a special character "such as:! @ #" there are two ways to solve this problem

Related recommendation: phpcms tutorial

The first is to change the database password, but that's not very good, is it?

The second method: modify a total of two places

1 modify install/step5.tpl.php 127lines

Will:

Var url ='? step=dbtest&dbhost='+$ ('# dbhost'). Val () +'& dbuser='+$ ('# dbuser'). Val () +'& dbpw='+$ ('# dbpw'). Val () +'& dbname='+$ ('# dbname'). Val () +'& tablepre='+$ ('# tablepre'). Val () +'& sid='+Math.random () * 5

To be replaced by:

Var url ='? step=dbtest&dbhost='+$ ('# dbhost'). Val () +'& dbuser='+$ ('# dbuser'). Val () +'& dbpw='+'&dbpw='+escape ($('# dbpw'). Val ()) +'& dbname='+$ ('# dbname'). Val () +'& tablepre='+$ ('# tablepre'). Val () +'& sid='+Math.random () * 5

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

Will:

Var dbpw =''

To be replaced by:

Var dbpw = 'var dbpw = escape ('');'; Thank you for reading! After reading the above, do you have a general idea of how phpcms can not connect to the remote database? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

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