500 - Internal server error on Windows Server

Hello,

I have installed SuiteCRM on on windows 2019 server. I have been noticing that when I try to upgrade the application through Upgrade Wizard after I am getting the 500 Internal server error. Its after couple of minutes when the “System check-in Progress” is been performed. Rather I have also noticed that I get the same error whenever I am trying to import data (csv) into the module through Import module which is taking more than 2 minutes to perform the import. But it works perfectly fine wherein the import of data takes less than 2 minutes. It’s working fine otherwise.

Have made all necessary changes in the php.ini file for the following but still getting the said error.

memory_limit (made it 256MB)
max_execution_time (60 mins)
max_upload_size (60 MB)
max_post_size (20)

Can someone please help us to get rid of this error.

Thanks in advance.

Please, which version are you upgrading from, and which version are you upgrading to?

Can you post this again, but showing exactly how it is specified in your php.ini? There are subtleties that I would like to check (for example: 256MB won’t work, it should be 256M).

Please also check that these values are effective by going in Admin / Diagnostics / phpinfo and verifying.

Then, a couple more advices:

  1. Before re-attemtping any upgrade, clear the entire cache/upgrades/temp directory.

  2. check your PHP errors log (the one defined in error_log entry in php.ini). I bet you will find an error there related to `SplFileInfo*. If that is the case, then please follow the instructions in the post below:

Dear pgr,

Thank you for your reply. I am upgrading from Version 7.11.12 to Version 7.11.13.

Admin / Diagnostics / phpinfo is “Output from phpinfo()” is checked.

The Entire Cache directory have been cleared.

memory_limit = 256M
max_execution_time = 6000
max_input_time = 6000
post_max_size = 600M

Under Admin/System Settings
Maximum upload size : 60000000

In the PHP error log I did not find any error defined as “SplFileInfo” as mentioned by you.

PHP Warning: “continue” targeting switch is equivalent to “break”. Did you mean to use “continue 2”? in C:…\crm\jssource\Minifier.php on line 240

Further as mentioned earlier the said problem of 500 internal error is not only limited to while trying to upgrade the version of SuiteCRM. But also whenever I am trying to import data (csv) into the module through Import module which is taking more than 2 minutes to perform the import.

I feel this has something to do with the processing time of the application where a limit may have been set and hence getting the error.

There are the further PHP Logs for your information.

PHP Warning: file_exists(): open_basedir restriction in effect. File(C:…\crm\themes\Custom\C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/…/crm;C:\Windows\Temp) in C:…\crm\include\Sugar_Smarty.php on line 147

PHP Warning: file_exists(): open_basedir restriction in effect. File(custom/C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/,/crm;C:\Windows\Temp) in C:…\crm\include\utils.php on line 5464

PHP Warning: file_exists(): open_basedir restriction in effect. File(C:…\crm\themes\SuiteP\C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/…/crm;C:\Windows\Temp) in C:…\crm\include\Sugar_Smarty.php on line 147

PHP Warning: file_exists(): open_basedir restriction in effect. File(custom/C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/…/crm;C:\Windows\Temp) in C:…\crm\include\utils.php on line 5464

PHP Warning: file_exists(): open_basedir restriction in effect. File(C:…\crm\themes\SuiteP\C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/…/crm;C:\Windows\Temp) in C:…\crm\include\Sugar_Smarty.php on line 147

PHP Warning: file_exists(): open_basedir restriction in effect. File(custom/C:…\crm\include\utils/recaptcha_disabled.tpl) is not within the allowed path(s): (C:/…/…/crm;C:\Windows\Temp) in C:…\crm\include\utils.php on line 5464

What is your version of PHP, please?

I’ve never heard of this open_basedir restriction, it seems to be some kind of limit to which folders you can access?

Its the same both with PHP 7.3 and PHP 7.4.

This is a dedicated server and I have access to all the folders. The Write permission to teh entire CRM folder is already provided.

Don’t use PHP 7.4, it’s not supported.

I think this is some different kind of permissions issue. Not simply a matter of folder ownerships and permissions. I’ve never seen that open_basedir error, try Googling more on that, maybe articles specific to Windows server.

Remember that file access depends on more than just OS file system permissions. There’s also generic web server config, and .htaccess files, etc

Thanks for yours revert.

As mentioned in my previous reply that the result is same for both PHP 7.3 & PHP 7.4.

Tried to google the solution to the said problem before putting it here on the forum. But no luck. I would like to thank you for all your time and reverts.

What is the effective value of the open_basedir setting as seen in Admin / Diagnostics / phpinfo?

It is as under:

C:/Inetpub/vhosts/xxx;C:\Windows\Temp;C:/Inetpub/vhosts/xxx\ (Local Value)

Master Value is no value

I don’t know, but maybe try clearing that from php.ini and restarting web server.

I am not sure if that is insecure or somehow incorrect, but at least it would serve as a diagnostic to determine if that is the cause.

On my Ubuntu that value is cleared (empty) so I don’t think the security hinges on that.

Well after removing the values from open_basedir in the php.ini file the error is gone. Thank you so much for all your help.

Hoping this is secured and there is no vulnerability in the application post removing it from the php.ini.

1 Like