new, first install, undefined, missing calendar, and other things

Im trying out suitecrm since sugar seams to be leaving the CE version and You are writing suitecrm is better :slight_smile:

I downloaded the newest version, installed on a webhotel, php5.3.3 and the website is running same user as the fileowner. Everything this way is writeable.

I get a lot of popup, alerts and stuff that clearly should read something else but just says undefined. Also if I try to add the dashlet showing a pipeline its just blanck (gives some undefined popups first and ever load) also if I try to add an appointment the calendar goes blanck…

is this a issue with hosting or CRM? I see some write about setting 775 but in this case the webserver is running as the file owner so that should not be a issue or?

sudo chown -R www-data:www-data .

sudo chmod -R 755 .

sudo chmod -R 775 cache custom modules themes data upload config_override.php

then do a quick repair and rebuild from the admin panel

I’m actually having the same problem and it seems to be getting worse with every upgrade of suiteCRM. I tried changing permission like Andy described but that didn’t lead to any success. I also tried deleting the cache without success.

With a fresh install the issue doesn’t seem to occur. By the way I also upgraded from sugar CE to suiteCRM but that’s quite some time ago and the issue started coming up since suiteCRM 7.x. I didn’t notice anything like that prior to 7.x.

Any hints are greatly appreciated.

System Info:

SuiteCRM 7.2.2

PHP 5.3.10-1ubuntu3.18 with Suhosin-Patch (cli) (built: Apr 17 2015 15:11:25)
Copyright © 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright © 1998-2012 Zend Technologies

Server version: Apache/2.2.22 (Ubuntu)
Server built: May 28 2015 23:53:47

I’m probably going to try doing a fresh install trying to use my existing database in order to get rid of this problem. Does anybody have any advice for that other than creating backups? I would like to avoid messing up my production environment without realizing.

Thanks!

Here is what i use as a solution to this,
if anyone else can use it, hope it works for you also.

Step 1
create a file called permissions.php on the root of your suite crm instance

add this to the file

Running over file and directory permissions...

<?php

function get_execution_time()
{
static $microtime_start = null;
if($microtime_start === null)
{
$microtime_start = microtime(true);
return 0.0;
}
return microtime(true) - $microtime_start;
}
get_execution_time();

function chmod_R($path, $filemode = 0644, $dirmode = 0755) {
if (is_dir($path) ) {
if (!chmod($path, $dirmode)) {
$dirmode_str=decoct($dirmode);
print “Failed applying filemode ‘$dirmode_str’ on directory ‘$path’\n”;
print " `-> the directory ‘$path’ will be skipped from recursive chmod\n";
return;
}
$dh = opendir($path);
while (($file = readdir($dh)) !== false) {
if($file != ‘.’ && $file != ‘…’) {
$fullpath = $path.’/’.$file;
chmod_R($fullpath, $filemode,$dirmode);
}
}
closedir($dh);
} else {
if (is_link($path)) {
print “link ‘$path’ is skipped\n”;
return;
}
if (!chmod($path, $filemode)) {
$filemode_str=decoct($filemode);
print “Failed: ‘$filemode_str’ on file ‘$path’\n”;
return;
}
}
}

$current_user = get_current_user();
echo ’ Script owner: ’ . $current_user . ‘
’;
$processUser = posix_getpwuid(posix_geteuid());
$processUserName = $processUser;
echo ‘Process owner: ‘. $processUserName .’
’;

// Phase I: 644 all files, 755 all folders.

echo “

1: Permissions. 644 all files, 755 all folders

Fixing: set all files to 644, all folders to 755, recursively.
”;
chmod_R ( “./” );

// Phase II: 664 files, 775 folders.

echo “

2: Permissions. Some files 664 and some folders 775.


”;
chmod_R ( “./config.php”, 0664, 0775 );
echo “
Fixing config_override.php
”;
chmod_R ( “./config_override.php”, 0664, 0775 );
echo “
Fixing sugarcrm.log
”;
chmod_R ( “./sugarcrm.log”, 0664, 0775 );
echo “
Fixing cache dir (all files and subdirs)
”;
chmod_R ( “./cache”, 0664, 0775 );
echo “
Fixing custom dir (all files and subdirs)
”;
chmod_R ( “./custom”, 0664, 0775 );
echo “
Fixing data dir (all files and subdirs)
”;
chmod_R ( “./data”, 0664, 0775 );
echo “
Fixing modules dir (all files and subdirs)
”;
chmod_R ( “./modules”, 0664, 0775 );

//Phase III: Fix settings inside ./config.php and ./include/utils.php

echo "

3: Do the following manually.

Fix the default_permissions setting in 3 places:

1) ./config.php

";

$fixed_config = “‘dir_mode’ => 02755,\n ‘file_mode’ => 0644,\n ‘user’ => ‘$current_user’,\n ‘group’ => ‘$current_user’,”;
echo " ‘default_permissions’ => array (
$fixed_config
),
\n";

echo "

2) ./include/utils.php - in the function make_sugar_config() - line 138

";

$fixed_make_sugar_config = “‘dir_mode’ => 02770,\n ‘file_mode’ => 0660,\n ‘chown’ => ‘$current_user’,\n ‘chgroup’ => ‘$current_user’,”;

echo " ‘default_permissions’ => array (
$fixed_make_sugar_config
),
\n";

echo “

3) ./include/utils.php - in the function get_sugar_config_defaults() - line 264

”;

$fixed_get_sugar_config_defaults = “‘dir_mode’ => 02770,\n ‘file_mode’ => 0660,\n ‘user’ => ‘$current_user’,\n ‘group’ => ‘$current_user’,”;

echo " ‘default_permissions’ => array (
$fixed_get_sugar_config_defaults
),
\n";

echo “
Happy Days.
”;
echo “
Execution time: “.get_execution_time().” seconds.

?>

Step 2
save the file
Then run the file from your browser
www.whateveryourcrm.com/permissions.php

Thank you for sharing your script. I ran your script and performed the steps described but unfortunately that did not fix the problem for me.

did it confirm all files and directories or did it tell you to do any files manual?

This is the output I got:

I adjusted config.php and utils.php manually.

Not sure if this is related to your cal issue but
I have installed a clean copy on mamp pro

the cal was missing etc etc
I found that when i resize my browser the cal appears again
I have attached screen shots with it missing and after browser resize

I see the same behavior. After re-sizing the browser window the calendar appears. However this does not work the “undefined” labels.

I extracted a fresh version of Suite-CRM 7.2.2 and placed my old config.php into it. The issue went away. Everything seems to be working fine with it. The only thing I had to do in addition is placing the old upload folder into the new install.