Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Codeigniter Application on IIS 8 #5

Closed
ryumada opened this issue May 18, 2020 · 0 comments
Closed

Deploy Codeigniter Application on IIS 8 #5

ryumada opened this issue May 18, 2020 · 0 comments
Labels
notes This is a notes, that maybe help for development

Comments

@ryumada
Copy link
Owner

ryumada commented May 18, 2020

so this is my journey to deploy my Codeigniter Application to IIS 8.

first, install this from Windows Platform Installer image :

  • php -> you can choose any version
  • mysql
  • Microsoft Drivers (x86 or x64 for PHP <php_version>

after install those platform, go to php.ini for my installation the file goes here C:\Program Files\PHP\v7.2\php.ini, scroll to the bottom of file and make sure the last setting like this:

[WebPIChanges]
error_log=C:\Windows\temp\PHP72x64_errors.log
upload_tmp_dir=C:\php\upload_temp_dir
session.save_path=C:\php\session
cgi.force_redirect=0
cgi.fix_pathinfo=1
fastcgi.impersonate=1
fastcgi.logging=0
max_execution_time=300
date.timezone=Asia/Krasnoyarsk
extension_dir="C:\Program Files\PHP\v7.2\ext\"

[ExtensionList]
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll

[PHP_WINCACHE]
extension=php_wincache.dll

extension=php_pdo_sqlsrv.dll

extension=php_sqlsrv.dll

for [ExtensionList] you can enable what you want and disable it by adding ; in front of extension line. In the code above I enable all extension.

you need to make sure the temp and session path goes to outside of windows folder, because it will conflict with the permission if place it on windows temporary folder, for example I will place in this folder:

error_log=C:\Windows\temp\PHP72x64_errors.log
upload_tmp_dir=C:\php\upload_temp_dir
session.save_path=C:\php\session

next, for those who still experiencing 404 error not found, install this module, this module is important if you want to use .htaccess file to rewrite index.php, on IIS you'll be using web.config to rewrite index.php. Something like this localhost/index.php/auth to this localhost/auth:

  • URL Rewrite
  • Application Request Routing module

otherwise your web.config file won't be read by IIS
source: https://stackoverflow.com/questions/14607390/iis-urlrewrite-is-not-working-for-iis-8

place your web.config file to root directory and done.

web.config file: https://gist.github.com/rizuki-ryumada/682a3b65b6539b32264aaceb5ff92c04

@ryumada ryumada added the notes This is a notes, that maybe help for development label May 18, 2020
@ryumada ryumada closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes This is a notes, that maybe help for development
Projects
None yet
Development

No branches or pull requests

1 participant