Upgrade from 7.11.13 to 7.11.15 error

Hi, I was performing an upgrade from 7.11.13 to 7.11.15 of my SuiteCRM and it return me this error
in the phase “Check System in Progress”:

Fatal error : Uncaught Error: Cannot use object of type SplFileInfo as array in C:\xampp\htdocs\CRM\include\utils\file_utils.php:57 Stack trace: #0 C:\xampp\htdocs\CRM\modules\UpgradeWizard\uw_utils.php(4590): clean_path(Object(SplFileInfo)) #1 C:\xampp\htdocs\CRM\modules\UpgradeWizard\systemCheck.php(83): dirInArray(Object(SplFileInfo), Array) #2 C:\xampp\htdocs\CRM\modules\UpgradeWizard\index.php(292): require(‘C:\xampp\htdocs…’) #3 C:\xampp\htdocs\CRM\include\MVC\View\SugarView.php(834): include_once(‘C:\xampp\htdocs…’) #4 C:\xampp\htdocs\CRM\include\MVC\View\views\view.classic.php(72): SugarView->includeClassicFile(Object(SplFileInfo)) #5 C:\xampp\htdocs\CRM\include\MVC\View\SugarView.php(226): ViewClassic->display() #6 C:\xampp\htdocs\CRM\include\MVC\Controller\SugarController.php(435): SugarView->process() #7 C:\xampp\htdocs\CRM\include\MVC\Controller\SugarController.php(375): SugarController->processView() #8 C:\xampp\htdocs\CRM\include\MV in C:\xampp\htdocs\CRM\include\utils\file_utils.php on line 57

I have already seen the post at this link Upgrade Wizard Error on 7.10.25 but after i have done the changes to C:\xampp\htdocs\CRM\modules\UpgraeWizard\uw_utils.php i still get the error.
I have done also a quick repair but nothing changed.
What could be the problem?

Whats your install specifications?
PHP version

That link is outdated, it was before the official fix came out

You need to follow the release notes, install the extra package.

1 Like

Thanks pgr, what do you mean with “extra packages” and where can I find them?

:point_up: it’s all in there

Thanks, I solved this problem but now the Upgrade Wizard gives me an error for file permissions but until few days ago all file had the correct permission. I attach an example of permission of a file that generate error. Maybe someone can help me.

I have the same issue for all files directly under htdocs. This is after installing the corrective patch via the module loader.
All give a permission error (Windows):

File Permissions: [Show Files with Bad Permissions](javascript:void(0); toggleNwFiles(“filesNw”):wink:

File Name Permissions Owner Group

D:/CRM/SugarCRM/apps/SuiteCRM/htdocs.gitignore 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs.htaccess 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs.travis.yml 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\bower.json 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\campaign_tracker.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\CODE_OF_CONDUCT.md 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\composer.json 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\composer.lock 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\config.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\config_override.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\cron.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\crossdomain.xml 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\custom.zip 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\deprecated.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\dictionary.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\download.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\emailmandelivery.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\export.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\files.md5 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\HandleAjaxCall.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\ical_server.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\index.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\install.log 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\install.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\json_server.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\LICENSE.txt 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\log_file_restricted.html 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\maintenance.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\pdf.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\php_errors.log 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\php_version.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\README.md 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\RoboFile.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\robots.txt 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\run_job.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\soap.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\sugarcrm.log 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\SugarSecurity.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\sugar_version.json 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\sugar_version.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\suitecrm.log 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\suitecrm_version.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\travis.php.ini 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\TreeData.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\upgradeWizard.log 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\vcal_server.php 0666 0 0
D:/CRM/SugarCRM/apps/SuiteCRM/htdocs\vCard.php 0666 0 0

I have the same problem with file permissions… Any solution here?

With respect to file permissions, the error that you’re getting is related to the ability of the webserver to write to the files concerned. In windows this is slightly more complicated than a *nix environment, but is outlined reasonably well here:


Obviously this applies to apache, but you could be using some other web server and similar issues apply. It is worth stating your webserver in this type of question.

Another cause of failure to be able to write relates to file locking. This is where you have the correct read/write permissions, but the file is locked due to some other process accessing the file concerned. AJAX can be a particular pain with this is other people are logged in. Caches can again cause a similar type of problem. Therefore a couple of things that may help:

  1. Make sure that you don’t have any other windows open onto your suiteCRM instance
  2. Carry out an Admin->Repair->Quit Repair and Rebuild (This clears the cache)
  3. Disable Ajax Admin->System Settings->Configure User Interface->Temporarily drag all of the modules across to disabled. Don’t forget to return them when you’ve finished.

As a top tip, I often present an index.html page to the user in the web route saying that the site is undergoing maintenance and mv index.php to index2.php to prevent any external people accessing the site when I’m trying to carry out maintenance.

If any of the above 3 suggestions change the list of files that you have bad permissions on, then you are moving in the correct direction to identify the fault.

1 Like

I understand that but this is NOT the problem it seems. I checked the files manually and the file permissions are OK. I tried to change Owner of a file to SYSTEM, I tried to add Administrators, Users even Everyone and give full permissions but upgrade wizard still sees the file as 666 :frowning:

What is the user name under which your web server is running? That’s what you need to know in order to get the ownerships (and consequently the permissions) right.

Well I tried that. I tried to change ownership to all accounts and now I added every possible user and added a full control to all of them and the file still keeps telling me it has 666.

But I did notice something. All the files that SuiteCRM upgrade wizard sees as wrong permissions are all the files in root folder only. So NO FOLDER is involved and no other files except all files in root folder of SuiteCRM (.htaccess and so on)

Also - this started after I used the repair package from SuiteCRM website. I never had any problems with file permissions untill now. I am upgrading from 7.11.13 to 7.11.15.

You can find the exact user name that your web server is running under in many ways, from the web server config, from Task manager (I use SysInternals Process Explorer instead).

Don’t just try random user names, there is only one specific certain answer to that question, and it’s better to start with certainties so that we can manage the other uncertain factors better.

I believe there is a bug somewhere, but my experience is that SuiteCRM developers and most admins out there are Linux people, and nobody has an easy way of testing your problem in a real Windows machine at this moment. That’s why getting all the facts straight one by one is the only way you’ll reach a solution.

It would also be nice to have specific information about the permissions applied (I would do it from the command-line with icacls), since that 666 figure is bogus, there is no such thing in Windows, that’s just a simplistic Linux routine throwing sand in our eyes…

As it’s an xampp configuration ,I’m going to assume that the name will be something like apache or httpd. (Obviously permisisons required for this user)

As an additional issue with the ‘fake windows’ file permissions, check that the permissions for the containing folder are a minimum of 755/775 i.e for this folder:



which contains htdocs.gitignore etc

1 Like

Grrrr - completely hijacked thread!!

Anyway… @matto98 Let’s deal with your problem as it is the reason for this thread existing. The error is almost certainly due to some form of malformed path…so let’s identify what that path is, so we can locate the cause.

The error is occurring in the clean _path function. We want to know what the path is that suiteCRM is trying to clean, and then go and look at that path and sort out the problem.

In order to do this, we are going to edit some code. (REMEMBER TO CHANGE IT BACK AFTER YOU HAVE FINISHED!!!)

File that we are going to edit is:

and the function is clean_path. It will look something like this:

 53 function clean_path($path)
 54 {
 55     // clean directory/file path with a functional equivalent
 56     $appendpath = '';
 57     if (is_windows() && strlen($path) >= 2 && $path[0].$path[1] == "\\\\") {
 58         $path = substr($path, 2);
 59         $appendpath = "\\\\";
 60     }
 61     $path = str_replace("\\", "/", $path);
 62     $path = str_replace("//", "/", $path);
 63     $path = str_replace("/./", "/", $path);
 64     return($appendpath.$path);
 65 }

The numbers on the left are my line numbers from a recent 7.10.x version, so should be pretty similar to yours. If they’re slightly different, then don’t worry.

Remember to make a backup copy of this file before you edit it, if this sort of thing is new to you.

You want to add the line:
LoggerManager::getLogger()->error('The path is: '. $path." :path[0] is: ‘.$path[0].’ :path[1] is: '.$path1);

between line 55 and 56.

You will then be able to inspect the suiteCRM logs, and the last ‘The path is:’ message before your Fatal error will be the one that lists your malformed path.

Additional resources for you:

  1. SuiteCRM logging:
  2. In order to change the logging level you need to change Admin->System Settings->Log level to at least the error level for this debug message to be shown.

Once you have identified and corrected the malformed path/filename, remember to remove/comment out the line, and change your logger level back to whatever you have chosen for your system.

If this identifies the problem for you, then please post back what the malformed path looked like so that others can learn from your experience. Good luck :slight_smile:

1 Like