Notes for Drupal website from local release to server

Source: Internet
Author: User
Tags ini php code drupal

When the Drupal website is migrated from a local server to a server, you may encounter different problems, such as import timeout, small memory, and excessive cache import failure lines. Solution: PHP. ini configuration

Extension = php_gd2.dll is started. This graphic processing extension is widely used in the process of uploading portraits, online photo processing, verification codes, and so on.

Extension = php_mbstring.dll is required. Without it, multi-byte string (such as Chinese) truncation will become abnormal and complex.

Extension = php_pdo_mysql.dll PHP5.3 is already integrated with PDO by default (if less than 5.3, extension = php_pdo.dll should be enabled). If mysql_connect is still in use, it will be outdated, using mysqli is not as good as using PDO.

Extension = php_pdo_sqlite.dll if you also like the combination of ASP + ACCESS, try PHP + SQLITE. Similarly, the database is just a single file, and the size is limited by space, so no special MYSQL space is required.

Extension = php_sockets.dll if you prefer to communicate with a port of other desktop software, sockets should be your best choice.

Extension = php_zip.dll have you ever wanted to package and download your website online?

Extension = php_curl.dll. It is estimated that not many people will arrive at the extension, because file_get_contents is enough to obtain the source code of a website, but programmers are more and more careful, they will often check whether your USER_AGENT looks like a browser, otherwise your access will be prohibited. Generally, the collection software has its own USER_AGENT or this item is empty. Therefore, this extension is used when the request header needs to be precisely set. It can be used to conveniently set the request method and COOKIE carried. In general, its complexity and scalability are between file_get_contents and sockets. This guy is usually seen in my php. ini.
Other configurations
Short_open_tag = On PHP short tag. <? = $ Ret?> To replace <? Php echo $ ret;?>, I usually turn it on, but note that when you need to use PHP to output the XML declaration, you need to make a slight adjustment: you cannot write it directly, and you must use PHP to output the statement. For example: <? Xml encoding = "UTF-8"?> Must be changed to <? Php echo '<? Xml encoding = "UTF-8"?> ';?>

Display_errors = On: a script error is displayed. Local debugging is usually set to On, and the officially launched server is usually set to Off, but I usually set to On, which is controlled in PHP code

Error_reporting = E_ALL indicates the error level. This is usually used in the configuration file and is modified in the code.

Max_execution_time = 30 script timeout. Generally, 30 seconds is enough for a website, but if I need to collect data for a long time, it is best to set a large point, such as 0-no limit, to increase it by myself.

File_uploads = On

Upload_max_filesize = 100 M maximum size of the file that can be uploaded. I usually set it to a large size and use PHP to limit it.

Post_max_size = 100 M the maximum length of data that can be submitted in POST mode, because apart from uploading files, it is generally better to be larger than upload_max_filesize, however, files of exactly MB will not be uploaded in general.

When Drupal data is exported, the cache is disabled first, and the cache is cleared. All the caches starting with the cache in the clear cache are cached starting with cache in the clear cache. Execute database export, migrate the files in the local WWW directory to the corresponding folder on the server, and import the files to the local backup database under PHP Myadmin. Then the Drupal website is successfully created.

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.