Suitecrm 7.11.8 undefined under: Line items in quote. Fresh install on server

Hi!
I had just installed the suitecrm 7.11.8 on external server.
PHP version is 7.2
I have errors as shown in the pictures attached. I run Admin>Repair>Quickrepair with no help.
I setup the products in products tab and category in product category. All I did since I had installed crm is that I had loaded language pack (polish 100% translated).
I had changed cache permission to 775 and jsLanugage folder inside it to 775 as I had read it might help.

I might have some major problem. When i upload logo and save settings, I would get this line of code instead of the picture
" $mod_strings.LBL_LOGO"
Is my install of suitecrm corrupted?

It looks like you have permissions problems, that’s usually the cause of all those “undefineds”.

Make sure you set ownerships as well as permissions - one doesn’t make sense without the other.

Do you know which user name your web server is running under? Is this Apache?

In Admin / Schedulers, the instructions at the bottom include your web server user name, so you can check there if it’s www-data or something else.

Hi!
Thanks for the replay.
I had setup permissions for whole crm to 775 as well as cache and jsLanugage as stated before. I log in with username Bartskol but my hosting username is sh216152.
My hosting confirmed that all files are under sh216152 ownership and it should work fine. It is an Apache server.

Log from suitecrm:

Sat Sep  7 13:25:10 2019 [10911][1][FATAL] [ERROR] Failed to remove bean to index
Sat Sep  7 13:25:10 2019 [10911][1][FATAL] [ERROR] SuiteCRM\Search\Exceptions\SearchException: Elasticsearch trying to re-indexing a bean but indexer is disabled in configuration. in /www/crm.toto-foto.pl/lib/Search/ElasticSearch/ElasticSearchHooks.php:123
Stack trace:
#0 /www/crm.toto-foto.pl/lib/Search/ElasticSearch/ElasticSearchHooks.php(105): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndex(Object(AOS_Products_Quotes))
#1 /www/crm.toto-foto.pl/lib/Search/ElasticSearch/ElasticSearchHooks.php(92): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->reIndexSafe(Object(AOS_Products_Quotes))
#2 /www/crm.toto-foto.pl/include/utils/LogicHook.php(272): SuiteCRM\Search\ElasticSearch\ElasticSearchHooks->beanDeleted(Object(AOS_Products_Quotes), 'after_delete', Array)
#3 /www/crm.toto-foto.pl/include/utils/LogicHook.php(213): LogicHook->process_hooks(Array, 'after_delete', Array)
#4 /www/crm.toto-foto.pl/data/SugarBean.php(3112): LogicHook->call_custom_logic('AOS_Products_Qu...', 'after_delete', Array)
#5 /www/crm.toto-foto.pl/data/SugarBean.php(5244): SugarBean->call_custom_logic('after_delete', Array)
#6 /www/crm.toto-foto.pl/modules/AOS_Products_Quotes/AOS_Products_Quotes.php(71): SugarBean->mark_deleted('')
#7 /www/crm.toto-foto.pl/modules/AOS_Line_Item_Groups/AOS_Line_Item_Groups.php(113): AOS_Products_Quotes->save_lines(Array, Object(AOS_Contracts), Array, 'service_')
#8 /www/crm.toto-foto.pl/modules/AOS_Contracts/AOS_Contracts.php(95): AOS_Line_Item_Groups->save_groups(Array, Object(AOS_Contracts), 'group_')
#9 /www/crm.toto-foto.pl/include/MVC/Controller/SugarController.php(684): AOS_Contracts->save(false)
#10 /www/crm.toto-foto.pl/include/MVC/Controller/SugarController.php(525): SugarController->action_save()
#11 /www/crm.toto-foto.pl/include/MVC/Controller/SugarController.php(494): SugarController->do_action()
#12 /www/crm.toto-foto.pl/include/MVC/Controller/SugarController.php(468): SugarController->handle_action()
#13 /www/crm.toto-foto.pl/include/MVC/Controller/SugarController.php(373): SugarController->process()
#14 /www/crm.toto-foto.pl/include/MVC/SugarApplication.php(113): SugarController->execute()
#15 /www/crm.toto-foto.pl/index.php(52): SugarApplication->execute()
#16 {main}
Sat Sep  7 13:28:28 2019 [10911][1][SECURITY] Email Error: Not authorized to use Outbound Account "system"
Sat Sep  7 13:28:28 2019 [10911][1][SECURITY] User Administrator attempted to send an email using incorrect email account settings in which they do not have access to.
Mon Sep  9 09:33:29 2019 [26545][1][FATAL] Chart class not found.
Mon Sep  9 09:33:30 2019 [26555][1][FATAL] Chart class not found.

Have you done a Quick Repair and Rebuild after setting permissions correctly?

Do you still have "undefined"s in several places?

I did run quick repair and rebuild and I still have the same problem.

I did changed the permission for whole CRM and it did work. I’m not seeing any undefined labels now but scheduler is still not working(other topic).
Should I change any folder back to different permission settings? is it a security risk that all my crm is 775?

Maybe this, from the SuiteCRM root directory:

  sudo chmod -R 750 .
  sudo chmod -R 770 cache custom modules themes data upload
  sudo chmod 770 config_override.php 2>/dev/null

Hi PGR!
I managed it and it works now(after changing whole suitecrm catalog to 775), I do not have any undefined labels, but should I change any folder back to different permissions? is it any security risk to leave it as it is?
I have it on a shared hosting with limited access but as I understand, you would like to change whole suitecrm back to 750 and only folders “cache, custom, modules, themes, data and upload” to 770? as well as config_override.php to 770?
Would you like me to do it via FTP ?

Correct - that is my recommendation, although there are many ways to set permissions, it depends on your settings.

I really don’t recommend running SuiteCRM on a server where you don’t have SSH access (something nowadays you can get even on really cheap hostings).

If you change config.php, remember to get your username and group right, and to specifiy the permissions with a leading zero: “0770”, “0750”. This is the PHP notation for octal. After a QR&R it will change that tothe decimal equivalents, but you shouldn’t worry about that, it means the same.

I made an ssh access available on my hosting account. I changed access with the commands that you gave me, and check it via ftp and it seems that permissions were set cos I got that message when trying to get to the server via browser:
“Forbidden
You don’t have permission to access / on this server.
Server unable to read htaccess file, denying access to be safe”

What is the full content of your .htaccess file? Did you customize it?

Hi!
I think i did at some point. Now it is like that:

# BEGIN SUGARCRM RESTRICTIONS
RedirectMatch 403 .*\.log$
RedirectMatch 403 /+not_imported_.*\.txt
RedirectMatch 403 /+(soap|cache|xtemplate|data|examples|include|log4php|metadata|modules)/+.*\.(php|tpl)
RedirectMatch 403 /+emailmandelivery\.php
RedirectMatch 403 /+upload
RedirectMatch 403 /+cache/+diagnostic
RedirectMatch 403 /+files\.md5$
<IfModule mod_rewrite.c>
    Options +SymLinksIfOwnerMatch
    RewriteEngine On
    RewriteBase /
    RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&modulename=app_strings&lang=$1 [L,QSA]
    RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&modulename=$1&lang=$2 [L,QSA]
    RewriteRule ^cache/jsLanguage/(.._..).js$ index.php?entryPoint=jslang&module=app_strings&lang=$1 [L,QSA]
    RewriteRule ^cache/jsLanguage/(\w*)/(.._..).js$ index.php?entryPoint=jslang&module=$1&lang=$2 [L,QSA]

    # --------- DEPRECATED --------
    RewriteRule ^api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^api/(.*?)$ lib/API/public/index.php/$1 [L]
    # -----------------------------

    RewriteRule ^Api/(.*)$ - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule ^Api/access_token$ Api/index.php/access_token [L]
    RewriteRule ^Api/V8/(.*?)$ Api/index.php/V8/$1 [L]
</IfModule>
<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_URI} (.+)/$
        RewriteRule ^ %1 [R=301,L]
</IfModule>
# END SUGARCRM RESTRICTIONS

There’s a “Rebuild htaccess” option in Admin / Repairs, but of course you need to be able to reach that to use it…

I don’t know if renaming the .htaccess to something else (so the system can’t find it) might help you work around this situation?

Other than that, check that the ownership and permissions on the .htaccess file allow the web server to read it…

I change name of the .htaccess and it did not work. Same with the perrmisions, I made it 777 and it didn’t work.
It happend after that code that I had put via ssh:

chmod -R 750 .
chmod -R 770 cache custom modules themes data upload
chmod 770 config_override.php 2>/dev/null

Are you sure non of the other files should be 775? Whole crm should be 750 ?
I just made change to crm folder to 775 and I managed to log in but it seems that crm is without css.

I had run “Rebuild .htaccess File” and “Quick Repair and Rebuild” But still my crm is without css on it.

Can you please give me the results of this command, given from your SuiteCRM root folder?

ls -al

Also, please have a look at your TWO logs and tell me if you seen any FATAL or ERROR level messages there.

That’s what printed after command that you gave me:


ssh.sh216152@www53:/www/crm.toto-foto.pl$ ls -al
total 1940
drwxrwxr-x  23 sh216152 4000    4096 Sep 12 09:21 .
drwxr-xr-x  10 sh216152 4000    4096 Sep  5 12:26 ..
-rwxrwxr-x   1 sh216152 4000    1509 Sep 12 09:30 .htaccess
drwxrwxr-x   5 sh216152 4000    4096 Aug 28 11:10 Api
-rwxrwxr-x   1 sh216152 4000    3094 Aug 28 11:10 CODE_OF_CONDUCT.md
-rwxrwxr-x   1 sh216152 4000    2656 Aug 28 11:10 HandleAjaxCall.php
drwxr-x---  18 sh216152 4000    4096 Sep  5 12:33 Joomla_3.9.11-Stable-Full_Package
-rwxrwxr-x   1 sh216152 4000   34539 Aug 28 11:10 LICENSE.txt
drwxrwxr-x   3 sh216152 4000    4096 Aug 28 11:42 ModuleInstall
-rwxrwxr-x   1 sh216152 4000    4275 Aug 28 11:10 README.md
-rwxrwxr-x   1 sh216152 4000     306 Aug 28 11:10 RoboFile.php
-rwxrwxr-x   1 sh216152 4000    5901 Aug 28 11:10 SugarSecurity.php
-rwxrwxr-x   1 sh216152 4000    6051 Aug 28 11:10 TreeData.php
drwxrwxr-x   2 sh216152 4000    4096 Aug 28 12:33 XTemplate
drwxrwxr-x   7 sh216152 4000    4096 Aug 28 12:33 Zend
drwxrwxr-x  16 sh216152 4000    4096 Sep 10 16:23 cache
-rwxrwxr-x   1 sh216152 4000    3477 Aug 28 11:10 campaign_tracker.php
-rwxrwxr-x   1 sh216152 4000    2904 Aug 28 11:10 composer.json
-rwxrwxr-x   1 sh216152 4000  260301 Aug 28 11:10 composer.lock
-rwxrwxr-x   1 sh216152 4000   12281 Sep  5 16:32 config.php
-rwxrwxr-x   1 sh216152 4000    1183 Sep 10 14:21 config_override.php
-rwxrwxr-x   1 sh216152 4000    5072 Aug 28 11:10 cron.php
-rwxrwxr-x   1 sh216152 4000    2290 Aug 28 11:10 crossdomain.xml
drwxrwxr-x   8 sh216152 4000    4096 Sep  5 14:16 custom
drwxrwxr-x   3 sh216152 4000    4096 Aug 28 11:12 data
-rwxrwxr-x   1 sh216152 4000    2240 Aug 28 11:10 dictionary.php
-rwxrwxr-x   1 sh216152 4000   12959 Aug 28 11:10 download.php
-rwxrwxr-x   1 sh216152 4000    2246 Aug 28 11:10 emailmandelivery.php
-rwxrwxr-x   1 sh216152 4000    4816 Aug 28 11:10 export.php
-rwxrwxr-x   1 sh216152 4000 1118524 Aug 28 11:10 files.md5
-rwxrwxr-x   1 sh216152 4000    2222 Aug 28 11:10 ical_server.php
drwxrwxr-x  57 sh216152 4000    4096 Aug 28 11:16 include
-rwxrwxr-x   1 sh216152 4000    2371 Aug 28 11:10 index.php
drwxrwxr-x   6 sh216152 4000    4096 Sep 10 16:10 install
-rwxrwxr-x   1 sh216152 4000   20883 Aug 31 08:47 install.log
-rwxrwxr-x   1 sh216152 4000   32360 Aug 28 11:10 install.php
-rwxrwxr-x   1 sh216152 4000    2275 Aug 28 11:10 json_server.php
drwxr-x---   3 sh216152 4000    4096 Aug 28 11:38 jssource
drwxr-x---   9 sh216152 4000    4096 Aug 28 11:41 lib
-rwxrwxr-x   1 sh216152 4000    2157 Aug 28 11:10 log_file_restricted.html
-rwxrwxr-x   1 sh216152 4000    2226 Aug 28 11:10 maintenance.php
drwxrwxr-x   2 sh216152 4000    4096 Aug 28 11:41 metadata
drwxrwxr-x 124 sh216152 4000    4096 Sep  3 16:29 modules
-rwxrwxr-x   1 sh216152 4000    2751 Aug 28 11:10 pdf.php
-rwxrwxr-x   1 sh216152 4000   69471 Sep  9 10:14 php7.1.ini
-rwxrwxr-x   1 sh216152 4000   69471 Sep  9 12:47 php7.2.ini
-rwxrwxr-x   1 sh216152 4000     306 Aug 28 11:10 php_version.php
drwxrwxr-x   2 sh216152 4000    4096 Sep 10 15:27 public
-rwxrwxr-x   1 sh216152 4000      73 Aug 28 11:10 robots.txt
-rwxrwxr-x   1 sh216152 4000    3458 Aug 28 11:10 run_job.php
drwxrwxr-x  12 sh216152 4000    4096 Aug 28 11:54 service
drwxrwxr-x   2 sh216152 4000    4096 Aug 28 11:54 soap
-rwxrwxr-x   1 sh216152 4000    4007 Aug 28 11:10 soap.php
-rwxrwxr-x   1 sh216152 4000     154 Aug 28 11:10 sugar_version.json
-rwxrwxr-x   1 sh216152 4000    2293 Aug 28 11:10 sugar_version.php
-rwxrwxr-x   1 sh216152 4000   94455 Sep 12 09:25 suitecrm.log
-rwxrwxr-x   1 sh216152 4000     165 Aug 28 11:10 suitecrm_version.php
drwxrwxr-x   4 sh216152 4000    4096 Aug 28 11:54 themes
drwxrwxr-x   3 sh216152 4000    4096 Sep  3 16:29 upgrade
drwxrwxr-x   4 sh216152 4000    4096 Sep  9 15:05 upload
-rwxrwxr-x   1 sh216152 4000    2686 Aug 28 11:10 vCard.php
-rwxrwxr-x   1 sh216152 4000    2248 Aug 28 11:10 vcal_server.php
drwxrwxr-x  35 sh216152 4000    4096 Aug 28 12:01 vendor

PGR I appreciate your help, but I was looking around this forum and every topic with similar problem was “permission problems”.
Please tell me which folders should have which permission settings.
For now you told me to:
Change everything to 775 - works and I did not have any “Undefined” but risk to the security.
Change everything to 750 and folders like - cache custom modules themes data upload to 770 along with config_override.php file.

  • Crm was not working after that commend and I could not open anything
    I had changed main folder back to 775 and it started to work again but with no css and probably half of other functions.

Why there are permission problems on the fresh install ? what permission settings there suppose to be ?

Suitecrm.log:

Mon Sep  9 16:07:00 2019 [25745][1][FATAL] IP Address mismatch: SESSION IP: 37.47.96.40 CLIENT IP: 165.225.84.148
Tue Sep 10 14:17:34 2019 [27422][1][FATAL] Chart class not found.
Tue Sep 10 14:17:36 2019 [27422][1][FATAL] Chart class not found.
Tue Sep 10 14:20:32 2019 [27422][1][FATAL] IP Address mismatch: SESSION IP: 165.225.84.148 CLIENT IP: 46.134.38.3
Tue Sep 10 14:20:53 2019 [27422][1][FATAL] A user (1) attempted to use an invalid file for the logo - upload://tmp_logo_company_upload/FireShot_Capture_116_-_zapytanie_ofertowe_zdj%C4%99cia_reklamowe_-_toto.fotografia.studio%40gmail.c__-_mail.google.jpg
Tue Sep 10 14:45:04 2019 [1871][1][FATAL] Chart class not found.
Tue Sep 10 14:45:05 2019 [1871][1][FATAL] Chart class not found.
Tue Sep 10 14:47:13 2019 [1871][1][FATAL] IP Address mismatch: SESSION IP: 46.134.38.3 CLIENT IP: 165.225.84.148
Tue Sep 10 15:16:45 2019 [8164][1][FATAL] SugarPHPMailer encountered an error: Invalid address:  (to): 
Tue Sep 10 15:16:52 2019 [8164][1][FATAL] Chart class not found.
Tue Sep 10 15:16:54 2019 [8164][1][FATAL] Chart class not found.
Tue Sep 10 16:11:59 2019 [26530][1][FATAL] Chart class not found.
Tue Sep 10 16:12:01 2019 [26530][1][FATAL] Chart class not found.
Tue Sep 10 16:35:17 2019 [3162][1][FATAL] IP Address mismatch: SESSION IP: 165.225.84.148 CLIENT IP: 46.134.38.3
Thu Sep 12 09:25:46 2019 [20320][1][FATAL] Chart class not found.

I don’t have php_error.log file and I had created addition line of code to php.ini but log was not created.

The permissions to use SuiteCRM correctly depend on how your Linux server is set up, we can’t guess that, and hosting providers use all sorts of combinations.

Does the user sh216152 belong to a group called 4000?

You can check this with

groups sh216152

Also please tell me the result of this command (hoping your web server is apache):

ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'

This is what I got:


ssh.sh216152@www53:/www/crm.toto-foto.pl$ groups sh216152
sh216152 : groups: cannot find name for group ID 4000
4000
ssh.sh216152@www53:/www/crm.toto-foto.pl$ ps -ef | egrep '(httpd|apache2|apache)' | grep -v `whoami` | grep -v root | head -n1 | awk '{print $1}'
Error, do this: mount -t proc proc /proc
ssh.sh216152@www53:/www/crm.toto-foto.pl$