Issues that may be resolved after you deploy a PHP Web site to a Linux server

Source: Internet
Author: User

1. Install MoD
Yum Install php-pdo.x86_64
Yum Install php-mysql.x86_64
Yum Install php-ldap.x86_64

2. Create User and Grant privileges of database (admin always has the root User, but he'll not give the user and US Ername)
Create user ' stadmin ' @ '% ' identified by ' stadmin ';
Grant all privileges on * * to ' stadmin ' @ '% ';

3. Create DB and Import db (prepare the database of your website or web app)

4. Update main.php in DB section (if you are change the config file)
Username:stadmin
Password: * * * *

5. Update/etc/php.ini (the config file of this new server environment)
Date.timezone = PRC

6. Restart httpd (after change, don ' t forget to restart the servers)
/ETC/INIT.D/HTTPD restart

/etc/init.d/mysqld restart

7:set The local server can use the network and use the database. (Maybe you'll encounter this situation, try this)

Error tip: Cdbconnection failed to open the DB connection:sqlstate[hy000] [2003] Can ' t connect to MySQL server on ' 10.196.19.73 ‘

Setsebool-p httpd_can_network_connect=1

Setsebool-p httpd_can_network_connect_db =1

8:may has problem of URL rewrite

Issues that may be resolved after you deploy a PHP Web site to a Linux server

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.