Drupal installation Process

Source: Internet
Author: User
Tags character set php file drupal

One, the entire installation process is very simple, as described in INSTALL.txt, because I want to let the site all adopt UTF-8 code, so need special to do the following steps:

1, modify the include/database.mysql.inc, about 33 lines at the Add code:

@mysql_query ("SET NAMES UTF8;");

Its function is to let the PHP program in the entire database operation process, all uses the UTF-8 code to transmit the data, guaranteed that the data coding is not because of the incompatibility and so on causes the problem.

2, modify the Database/database.mysql, after each SQL statement to build the table, add content:

"DEFAULT Charset=utf8"

This is to make the character set of the data table UTF8 so that the data is stored in the table of that type and will not cause problems such as incompatibility.

This issue should also be noted in future module installation and upgrade processes.

After doing this 2-step operation, basically the system support UTF-8 is no problem.

Second, next to say the process of debugging procedures:

Because the previous operating environment is PHP4, so the program every problem, no need to adjust, but the current host space because of the use of php5.1.x, so some features are not supported or changed, including:

sites/default/settings.php file in the $base_url, because the php5.1.x environment in IE browser can not get $_server[' http_host '] variables, so there will be problems, and changed to:

$base _url = isset ($_server[' http_host '))? ' http://'. $_server[' Http_host ']: ' http://imysql.cn ';

Another place is the Str_replace function, and the results of the following code running under php5.1.x and PHP4 and php5.0.x are not the same:

$copy =str_replace ("\{$v}", "$var", $copy);

The role is to replace the template code "{title}" with "title", not executed correctly in php5.1.x, it escapes "\{" to "{", so the result is "{title}", and PhP4 and php5.0.x are replaced with "title" correctly.

At present, only found these 2 places have problems, so put forward, have to install drupal-4.6.5 version of Friends please pay attention to these several problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.