PHP framework CodeIgniter connection MS Sqlserver2014 and URL Rewrite problem solving, codeigniterrewrite

Source: Internet
Author: User
Tags microsoft drivers for php for sql server codeigniter

PHP framework CodeIgniter connection MS Sqlserver2014 and URL Rewrite problem solving, codeigniterrewrite

I recently learned about the CodeIgniter framework and encountered some problems. I recorded them so that you can view them later.

I want to try connecting to the database. Because I am a windows system and MS Sqlserver2014 is also installed on the local machine, I thought of using CI to connect to SQL Server.

PHP 5.6 does not have a default dll to connect to SQL server. You need to download Microsoft Drivers for PHP for SQL Server from the Microsoft official website. However, this function can only run properly in win32 systems.

Because my system is 64-bit, I modified the php. ini configuration according to the online statement, and still reported the error "Can not find undifined function sqlsvr_conncet. Although I see

The article also talked about this driver problem and never cared about it. Two days later, I had no choice but to download unofficial 64-bit drivers from CSDN. The results are amazing. Well, I think

I believe in Microsoft too much and do not pay enough attention to this small bug. How many beginners need to jump into the trap.

In addition, the CI wants to put the index in the URL. php removed, according to the official documentation, is in Application \ config. in php, set $ config ['index _ page'] = 'index. php '; changed

$ Config ['index _ page'] = ''; then, modify the httpd. conf file of Apache Server. Remove the comment before the Rewrite module. Create a. htaccess file under the application root directory,

Enable rewriteengine. However, I did not perform the test according to the method.

Later, I found Baidu Zhili's article on the Internet. In this article, we need to add a Directory node in httpd. conf. The Node information is as follows:

<Directory "D:/phpserver/www/yourApp">

Options Indexes FollowSymLinks

AllowOverride All

Order allow, deny

Allow from all

</Directory>

Restart Apache.

I hope this article will help my friends who encounter problems like me.

 

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.