Hey guys,
I am on the 7.11.18 and after migrating to IIS I have a huge problem with API. Here is the sum up:
-
in IIS we have URL Redirect module installed
-
web.config is this:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" /> </rule> <rule name="redirect0" stopProcessing="true"> <match url="suitecrm\.log\.*" /> <action type="Redirect" url="log_file_restricted.html" redirectType="Found" /> </rule> <rule name="redirect1" stopProcessing="true"> <match url="install.log" /> <action type="Redirect" url="log_file_restricted.html" redirectType="Found" /> </rule> <rule name="redirect2" stopProcessing="true"> <match url="upgradeWizard.log" /> <action type="Redirect" url="log_file_restricted.html" redirectType="Found" /> </rule> <rule name="redirect3" stopProcessing="true"> <match url="emailman.log" /> <action type="Redirect" url="log_file_restricted.html" redirectType="Found" /> </rule> <rule name="redirect4" stopProcessing="true"> <match url="not_imported_.*.txt" /> <action type="Redirect" url="log_file_restricted.html" redirectType="Found" /> </rule> <rule name="redirect5" stopProcessing="true"> <match url="XTemplate/(.*)/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect6" stopProcessing="true"> <match url="data/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect7" stopProcessing="true"> <match url="examples/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect8" stopProcessing="true"> <match url="include/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect9" stopProcessing="true"> <match url="include/(.*)/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect10" stopProcessing="true"> <match url="log4php/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect11" stopProcessing="true"> <match url="log4php/(.*)/(.*)" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect12" stopProcessing="true"> <match url="metadata/(.*)/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect13" stopProcessing="true"> <match url="modules/(.*)/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect14" stopProcessing="true"> <match url="soap/(.*).php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect15" stopProcessing="true"> <match url="emailmandelivery.php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect16" stopProcessing="true"> <match url="cron.php" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="redirect17" stopProcessing="true"> <match url="upload/.*" /> <action type="Redirect" url="index.php" redirectType="Found" /> </rule> <rule name="rule 1R" stopProcessing="true"> <match url="^Api/access_token$" /> <action type="Rewrite" url="/Api/index.php/access_token" /> </rule> <rule name="rule 2R" stopProcessing="true"> <match url="^Api/V8/(.*?)$" /> <action type="Rewrite" url="/Api/index.php/V8/{R:1}" /> </rule> <rule name="rule 3R"> <match url="^Api/(.*)$" /> <action type="Rewrite" url="/-" /> </rule> </rules> </rewrite> <caching> <profiles> <remove extension=".php" /> </profiles> </caching> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" /> </staticContent> <defaultDocument> <files> <add value="index.php" /> </files> </defaultDocument> </system.webServer> </configuration>
So as you can see at the very bottom - the Api redirections are present (not sure if correct though). Before this redirection there was a 404 problem in postman API call.
- After adding proper redirections the 404 problem was gone but there was this bug instead:
Fatal error: Uncaught RuntimeException: Unexpected data in output buffer. Maybe you have characters before an opening <?php tag? in C:\web_server\www\vendor\slim\slim\Slim\App.php:624
I dealt with it using this method:
but basically this is still a current issue on windows So this repair now works but only until next update when I will have to adjust the files again.
-
after I repaired this I now have another bug
I really have no idea how to repair this one…
Slim Application Error The application could not run because of the following error: Details Type: Error Message: Call to undefined function openssl_pkey_get_private() File: C:\web_server\www\vendor\lcobucci\jwt\src\Signer\OpenSSL.php Line: 46
Could you please help me?