undefined errors and email issues (possibly related)

I have a SuiteCRM installation:

Version 7.9.8
Sugar Version 6.5.25 (Build 344)

I have tried many different forums and have hit a brick wall.

All files and folders are set to 755 in the crm directory.

Inbound email and outbound email settings have been created and tested (email is received from test)

I have removed all files from the cache, and performed 3 x Quick Repairs.

  • I am getting undefined errors on almost every action
  • I cannot update any of the email templates, as it goes to a 403 error
  • I cannot send emails from the email pop up, as the from address doesn’t load in the pop up and undefined error happens

I have attached Chrome console report and the SuiteCRM log file. Hopefully someone can help me out here, I’m pulling my hair out!

Chrome console is throwing the following errors.

https://jsfiddle.net/xfq165g1/

SuiteCRM log file:

https://jsfiddle.net/zvLtkb9L/

Is this your own server or shared hosting?

It really looks like you have permissions problems. Setting things to 755 doesn’t really mean anything, unless the ownership matches your web server user. Permissions in Linux are a match between those three things.

Can you tell me what you see in Admin /Schedulers, at the bottom of the table? Those instructions about setting up cron.

And can you run this command in your SuiteCRM directory?

ls -al

And show me the results, that way I can quickly check a bunch of things about your permissions.

Thank you for your reply.

Cron setup instructions:

To Setup Crontab
In order to run SuiteCRM Schedulers, edit your web server user’s crontab file with this command:
sudo crontab -e -u expertfinancefin
… and add the following line to the crontab file:

          • cd /home/expertfinancefin/public_html/crm; php -f cron.php > /dev/null 2>&1 
            

SSH results:

[11:47:28 expertfinancefin@vmrs48.ha-node.net crm]$ ls -al
total 44596
drwxr-xr-x 17 expertfinancefin expertfinancefin 4096 Jan 9 10:51 ./
drwxr-xr-x 7 expertfinancefin nobody 4096 Jan 9 17:11 …/
-rw-r–r-- 1 expertfinancefin expertfinancefin 1390 Dec 18 17:36 .htaccess
-rwxr-xr-x 1 expertfinancefin expertfinancefin 3094 Dec 15 00:41 CODE_OF_CONDUCT.md*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2811 Dec 15 00:41 HandleAjaxCall.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 34539 Dec 15 00:41 LICENSE.txt*
drwxr-xr-x 3 expertfinancefin expertfinancefin 4096 Dec 15 00:41 ModuleInstall/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 3735 Dec 15 00:41 README.md*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 5327 Dec 15 00:41 SugarSecurity.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 44146133 Dec 18 16:35 SuiteCRM-7.9.8.zip*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 5843 Dec 15 00:41 TreeData.php*
drwxr-xr-x 2 expertfinancefin expertfinancefin 4096 Dec 15 00:41 XTemplate/
drwxr-xr-x 8 expertfinancefin expertfinancefin 4096 Dec 15 00:41 Zend/
drwxr-xr-x 10 expertfinancefin expertfinancefin 4096 Jan 10 08:59 cache/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 3590 Dec 15 00:41 campaign_tracker.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 462 Dec 15 00:41 composer.json*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 17908 Dec 15 00:41 composer.lock*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 10173 Jan 9 10:51 config.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 1126 Jan 9 16:38 config_override.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 5052 Dec 15 00:41 cron.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2446 Dec 15 00:41 crossdomain.xml*
drwxr-xr-x 12 expertfinancefin expertfinancefin 4096 Jan 9 12:02 custom/
drwxr-xr-x 3 expertfinancefin expertfinancefin 4096 Dec 15 00:41 data/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2388 Dec 15 00:41 dictionary.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 12541 Dec 15 00:41 download.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2392 Dec 15 00:41 emailmandelivery.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 4912 Dec 15 00:41 export.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 967627 Dec 15 00:41 files.md5*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2367 Dec 15 00:41 ical_server.php*
drwxr-xr-x 58 expertfinancefin expertfinancefin 4096 Dec 15 00:41 include/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2374 Dec 15 00:41 index.php*
drwxr-xr-x 6 expertfinancefin expertfinancefin 4096 Dec 18 17:36 install/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 19845 Dec 18 17:36 install.log*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 31896 Dec 15 00:41 install.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2275 Dec 15 00:41 json_server.php*
drwxr-xr-x 3 expertfinancefin expertfinancefin 4096 Dec 15 00:41 jssource/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2313 Dec 15 00:41 log_file_restricted.html*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2376 Dec 15 00:41 maintenance.php*
drwxr-xr-x 2 expertfinancefin expertfinancefin 4096 Dec 15 00:41 metadata/
drwxr-xr-x 113 expertfinancefin expertfinancefin 4096 Dec 19 10:34 modules/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2890 Dec 15 00:41 pdf.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 304 Dec 15 00:41 php_version.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 73 Dec 15 00:41 robots.txt*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 3588 Dec 15 00:41 run_job.php*
drwxr-xr-x 12 expertfinancefin expertfinancefin 4096 Dec 15 00:41 service/
drwxr-xr-x 2 expertfinancefin expertfinancefin 4096 Dec 15 00:41 soap/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 4091 Dec 15 00:41 soap.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 154 Dec 15 00:41 sugar_version.json*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2296 Dec 15 00:41 sugar_version.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 127067 Dec 18 17:36 sugarcrm.log*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 73222 Jan 9 17:06 suitecrm.log*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 169 Dec 15 00:59 suitecrm_version.php*
drwxr-xr-x 6 expertfinancefin expertfinancefin 4096 Dec 15 00:41 themes/
drwxr-xr-x 4 expertfinancefin expertfinancefin 4096 Jan 9 16:33 upload/
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2980 Dec 15 00:41 vCard.php*
-rwxr-xr-x 1 expertfinancefin expertfinancefin 2248 Dec 15 00:41 vcal_server.php*

Your ownerships and permissions look fine.

Which Linux are you running? Is it shared hosting or is it your server?

And what is your version of PHP?

Hi, Thank again for you reply.

The server is shared hosting, and it is running CLOUDLINUX 6.9 vmware v68.0.23

The PHP Version 7.0

Thanks

Adam

My advice is that you focus on solving the "undefined"s problem, this means something in your SuiteCRM installation is breaking apart, files are missing (not getting loaded correctly). All the other problems can be side-effects of this.

It could still be permissions problems, but something more tricky: maybe an .htaccess file, some web-server configuration, or wrong SetUID/SetGID bits causing new directories to get reduced permissions.

If it’s not permissions, then look for PHP problems: missing required modules, memory_limit too low, …?

You should check the Apache log, usually called php_errors.log, there could be important clues there.

I’m at a loss, can I pay you to have a look at this for me?

If so, how do I get in contact with you so I can send you access privately?

Sorry, I don’t have time for this, I’m really not interested.

Are you very tied to that hosting? Maybe just starting over in a different place makes things easier.

There are people available to do payed work for you:

1 Like

I’ve resolved the issue.

I did the following:

  1. Admin -> System Settings -> Advanced -> Developer Mode (to turn off caching)
  2. Admin -> Upgrade Wizard -> Install Upgrade (installed most recent update from 7.x to 7.99)

undefined errors are gone now, and I am able to send emails from the system

That’s good news.

I wonder if turning Developer mode back off (and so, turning caching back on) will make the problems return or not. It would be nice if you could have caching.

Sometimes the web hosting uses they’re own caching systems and they interfere. I’ve seen people here with that kind of issue, and sometimes they found ways to turn off some hosting setting to get SuiteCRM to work correctly.