Because the company's environment is under Linux, so want to build on their own machines to imitate Linux environment
Environment for Linux +mssql+php +nginx+freetds
So I thought of Cygwin.
Go to http://www.cygwin.com download setup.exe
Then install, install the method on the net a lot of, mainly to install good gcc related things, I was put the devel directory of Things are installed on
Default Click defaults can be changed to install
Download Nginx
Http://nginx.org/download/nginx-1.2.6.tar.gz
Installation
Tar zxvf nginx-1.2.6.tar.gz
CD nginx-1.2.6
./configure
Make && make install
If there is no hint error is installed, go to the default installation directory Cd/usr/local/nginx
CD Sbin
If there is a nginx.exe, the installation is successful to start Nginx./nginx.exe will do.
We can see the process with Ps-efgrep Nginx.
Then install the FreeTDS
Go to http://www.freetds.org/download FreeTDS
Ftp://ftp.freetds.org/pub/freetds/stable/freetds-stable.tgz
Install the same as Nginx
Tar freetds-stable.tgz
CD freetds-0.91
./configure
Make && make install
Then install PHP
Download PHP
Http://us1.php.net/distributions/php-5.4.11.tar.gz
Tar php-5.4.11.tar.gz
CD php-5.4.11
./configure--prefix=/usr/local/php--enable-mbstring--enable-sockets--with-config-file-path=/usr/local/php- With-mssql=/usr/local/freetds--ENABLE-FPM
Make && make install
Some warnings are ignored and then start PHP
cd/usr/local/php/sbin/
./php-fpm.exe can start the PHP fpm.
But using the CI framework to find
$_server[' script_name ' gets a problem with the path to the URL
Normal $_server[' Request_uri '] gets the/index.php/welcome
$_server[' Script_name '] is supposed to get/index.php
But my cygwin get $_server[' Request_uri ' to get the/index.php/welcome
$_server[' Script_name '] is supposed to get/index.php/welcome
The two are the same, so there's a problem,
There is also a download of the Phpredis installation is not wrong, but in the php.ini extension is always prompted error
notice:php message:php warning:php startup:unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug- Non-zts-20100525/redisa '-Exec format error in Unknown on line 0
Suspect PHP is not installed well, because there are many warnings, do not know if there have been errors, to reinstall once confirmed
The error of Redis.c:1xxx:error: ' Sa_onstack ' undeclared (the ' This function ') is reported when Redis is installed
Because Cygwin doesn't define sa_onstack.
Add in the Sys/resource.h
Ifndef Sa_onstack
Define Sa_onstack 0
endif This article links http://www.cxybl.com/html/wlbc/Php/20130601/38184.html
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.