Hi everyone,
We are looking into migrating most of our apps to containers, osticket being one of them.
I am in the midst of testing ,and after a long week of trial and error I am now close to finishing.
There is one last issue though that I haven't been able to solve on my own.
After pressing the install now button and the popup appears, approximately 90 seconds later it times out
with error 500.
Things I have tried:
increasing php execution time to 300
increasing iis execution time to 300
doubling VM resources
using local mysql installation instead of mysql hosted on separate container
swapping out php versions and trying different osticket versions as well.
Current setup:
osticket 1.17.3
php 8.1.18
zend engine 4.1.18
mysql: 8.0.31, on a separate windows container
my php.ini contains the following:
max_execution_time = 300
extension_dir = "ext"
log_errors = On
error_log = C:\php\php-errors.log
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
fastcgi.logging = 0
php error logs do not contain anything after this timeout occurs
the IIS logs dont say anything helpful:
2023-04-29 06:41:55 10.10.10.100 POST /osticket/setup/install.php - 80 - 192.168.77.176 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/112.0.0.0+Safari/5
37.36 http://192.168.77.240:8080/osticket/setup/ 500 0 258 95607
The dockerfile for osticket if interested:
FROM mcr.microsoft.com/windows/servercore/iis
#enable cgi feature for iis
RUN powershell dism.exe /Online /Enable-Feature /FeatureName:IIS-CGI /All
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\inetpub\wwwroot*
WORKDIR C:\
COPY osTicket.zip .
COPY php.zip .
#script that adds php to PATH
COPY addpath.ps1 .
RUN powershell -NoProfile -Command Expand-Archive -LiteralPath .\osticket.zip -DestinationPath C:\osticket_expanded
RUN powershell -NoProfile -Command Expand-Archive -LiteralPath C:\php.zip -DestinationPath C:\php
#php dependency
RUN powershell -NoProfile -Command Invoke-WebRequest 'https://aka.ms/vs/17/release/vc_redist.x64.exe' -UserAgent '' -OutFile C:\vc_redist-x64.exe
RUN powershell -NoProfile -Command New-Item -Type Directory C:\inetpub\wwwroot\osticket
RUN powershell -NoProfile -Command cp -Recurse C:\osticket_expanded* C:\inetpub\wwwroot\osticket
RUN powershell -NoProfile -Command cp -Recurse C:\inetpub\wwwroot\osticket\upload* C:\inetpub\wwwroot\osticket
RUN powershell -NoProfile -Command rm -Recurse C:\inetpub\wwwroot\osticket\scripts
RUN powershell -NoProfile -Command rm -Recurse C:\inetpub\wwwroot\osticket\upload
RUN powershell -NoProfile -Command Remove-Item -Recurse C:\osticket_expanded
#configure handler mappings and php-cgi for IIS
RUN C:\Windows\System32\InetSrv\appcmd.exe set config /section:system.webServer/fastCGI /+"[fullPath='c:\php\php-cgi.exe']"
RUN C:\Windows\System32\InetSrv\appcmd.exe set config /section:system.webServer/handlers /+"[name='PHP-FastCGI',path='.php',verb='',modules='FastCgiModule',scriptProcessor='c:\php\php-cgi.exe',resourceType='Either']"
RUN C:\Windows\System32\InetSrv\appcmd.exe set config /section:system.webServer/fastCgi /+[fullPath='c:\php\php-cgi.exe'].environmentVariables.[name='PHPRC',value='C:\php']
RUN C:\Windows\System32\InetSrv\appcmd.exe set config /section:defaultDocument /enabled:true /+files.[value='index.php']
RUN C:\vc_redist-x64.exe /quiet /install
COPY php.ini C:\php
RUN powershell -NoProfile -Command Copy-Item -Path C:\inetpub\wwwroot\osticket\include\ost-sampleconfig.php -Destination C:\inetpub\wwwroot\osticket\include\ost-config.php
RUN powershell -NoProfile -Command icacls C:\inetpub\wwwroot\osticket\include\ost-config.php /grant 'Everyone:F'
RUN powershell -NoProfile -Command rm C:\php\php.ini-production
RUN powershell -NoProfile -Command rm C:\php\php.ini-development
#i like having chocolatey in all containers for conveniency
RUN powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))"
RUN powershell -NoProfile -Command .\addpath.ps1
COPY url_rewrite.msi .
#install the URL rewrite IIS module, needed for the app
RUN msiexec /i C:\url_rewrite.msi /quiet /norestart
The connection to the database works, as tables are created in the database after pressing the install now button
If I missed any relevant info, please let me know
Thanks!