Deployment of PHP Project records on Sina SAE

Source: Internet
Author: User
Sina sae:http://sae.sina.com.cn

Deployment steps:

1, need to register the user first.
2, enter the user management background-add application-fill in the relevant domain name, project name, project description and so on.

3, on the local computer, the name is the same as the names of the items on the SAE, the database name is the same, and then in the project file config.php:

' Db_type ' = ' mysql ',//database type
' db_host ' = ' localhost ',//server address
' db_name ' + ' test0527 ',//database name, required to match the project name
' Db_user ' + ' test0527 ',//username, required to match the project name
' Db_pwd ' = ' 123456 ',//password
' Db_port ' = 3306,//Port
' Db_prefix ' = ', '//database table prefix
' Db_charset ' = ' utf8 ',//Character Set
' Url_model ' + 2,//URL access mode, optional parameters 0, 1, 2, 3, representing the following four modes:

4, Import code: 1, GitHub. 2.svn

Choose SVN to be aware of:
The file name extension (. zip,gz, tar.gz Three) of the compressed package that imports the code,
In addition, the code package must not exceed 20MB,
In particular, remember that the root directory of a compressed package is not a single project folder,
That is, do not right-click on the project folder to generate a compressed package.
To select all in the directory of the project folder and then directly generate a zip-format compression package,
Since this is uploaded to the SAE SVN,
The SAE will extract all the project files from the root directory of the archive to the root directory of the SAE release.
Otherwise, you will see three folders in the root directory of the SAE release, one is your project folder,
The other two are Config.yaml and index.php from the SAE system,
Then, no matter how you set the default home page, always prompt for URL redirection,
Or just a bunch of weird questions like page blanks.

5. Edit the Config.yaml file within the editing code:

Also, because the SAE does not recognize the htaccess file, it needs to be modified in Config.yaml to the following code:

App Management--code management--editing code:

Config.yaml:

Name:test//SAE default generated project name
Version:1//SAE default generated SVN version

Handle
-Rewrite:if (!is_dir () &&!is_file () && path~ "^ (. *) $") goto "index.php/$1" [l,qsa,r=301] "

6. Import the database:

Under "Database and caching Services" in the SAE console, click on "Shared MySQL", click "Manage MySQL", then "MySQL", the SAE will automatically create the same database name as the project name, then within phpMyAdmin, by importing SQL, Import your local SQL file.

7, open memcached: There is a database connection, be sure to open memcached, otherwise the page load is empty.

Run OK.

  • 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.