Configurando Wamp Server para conectar ao MS SQL
Para habilitar o acesso ao banco de dados MS SQL Server (mssql) no Wamp siga esses passos:
INSTALAÇÃO:
1. Fazer download do WAMP Server1e instalar normalmente\
2. Fazer download do novo add-on do php2e instalar normalmente;\
3. Fazer download da biblioteca ntwdblib.dll3e extraí-la para:\
* C:\wamp\bin\apache\Apache2.2.11\bin\\
* C:\wamp\bin\php\php5.3.1\\
* C:\windows\system32\\
4. Habilitar a versão do PHP 5.3.1 (Menu do WAMP -> PHP -> Version -> 5.3.1);\
5. Habilitar a extenção php_mssql e php_pdo_mssql (Menu do WAMP -> PHP -> PHP Extensions);\
6. Modificar os seguintes itens do php.ini (Menu do WAMP -> PHP -> php.ini):\
* mssql.allow_persistent = off\
* mssql.connect_timeout = 30 (e retirar o ; do início da linha)\
* mssql.timeout = 60 (e retirar o ; do início da linha)\
* mssql.secure_connection = off (e retirar o ; do início da linha)\
7. Reiniciar o WAMP.
CONFIGURAÇÕES ACAFE
HABILITAR OPÇÕES DO PHP
Opções PHP\ * short open tag\ * asp tags\ * output buffering\ * y2k compilance\ * zlib output compression\ * implicit flush\ * allowc call time pass reference\ * expose PHP\ * report memleaks\ * track errors\ * register globals\ * register argc argv\ * magic quotes gpc\ * enable dll\ * file uploads\ * allow url open\ * allow url include\ \ Extensões PHP\ * php_gd2\ * php_mbstring\ * php_mssql\ * php_mysql\ * php_pdo_mssql\ * php_pdo_mysql\ \ \
NÃO ESQUEÇA:
Remover index.php padrão do Wamp Server\ \
CONFIGURAR O ARQUIVO http.ini DO APACHE
/# This should be changed to whatever you set DocumentRoot to.
/#
\<Directory "c:/wamp/www/">
/#
/# Possible values for the Options directive are "None", "All",
/# or any combination of:
/# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
/# Note that "MultiViews" must be named *explicitly* --- "Options All"
/# doesn't give it to you.
/# The Options directive is both complicated and important. Please see
/# http://httpd.apache.org/docs/2.0/mod/core.html#options
/# for more information.
/# Options Indexes FollowSymLinks
/####### BLOQUEIA ACESSO AOS DIRETORIOS WEB (NAO LISTA PASTAS) ######
Options +Indexes MultiViews
AllowOverride None
/####################################################################
/#
// AllowOverride controls what directives may be placed in .htaccess files.
/# It can be "All", "None", or any combination of the keywords:
/# Options FileInfo AuthConfig Limit
/# AllowOverride all
/#
/# Controls who can get stuff from this server.
/#
/# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1 192.168.0.0/24 # deixa rede 192.168.0.xxx acessar o server
\</Directory>