SoftException in Application.cpp:690

SoftException in Application.cpp:690

by Aurinko Anoop -
Number of replies: 10

This installation went well. Teachers and Students are using online. 

Application.cpp:690: Could not execute script

But may users are faced with server timed out. Not consistent.  Many have reported this issue when Users are calling the Moodle home page or Users are uploading file in Assignment module. As i was looking at logs. I found these. Does this have anything to do with Server timed out?

Users being blocked is a serious issue. 

Server PHP version 7.1

Has https in url

Folders permission 755

Files permission 644


Error Line

[Sun May 31 03:48:46.182698 2020] [:error] [pid 798899:tid 140663944873728] [client 49.207.56.77:0] SoftException in Application.cpp:690: Could not execute script "/home1/mywebsite/public_html/course/pluginfile.php", referer: https://www.mywebsite.com/course/course/modedit.php?add=hvp&type=&course=22&section=3&return=0&sr=0

Error Line

[Sat May 30 02:16:51.382855 2020] [:error] [pid 394176:tid 140664280581888] [client 122.166.128.95:0] SoftException in Application.cpp:690: Could not execute script "/home1/mywebsite/public_html/course/course/jumpto.php"

Error Line

[Sat May 30 02:16:51.287541 2020] [:error] [pid 394176:tid 140664263796480] [client 106.51.24.180:0] SoftException in Application.cpp:690: Could not execute script "/home1/mywebsite/public_html/course/index.php"

Error Line

[Sat May 30 02:16:48.301282 2020] [:error] [pid 395832:tid 140663953266432] [client 106.76.46.163:0] SoftException in Application.cpp:690: Could not execute script "/home1/mywebsite/public_html/index.php", referer: https://www.mywebsite.com/course/?redirect=0

Error Line

[Sat May 30 02:16:45.921858 2020] [:error] [pid 395832:tid 140663911302912] [client 122.166.128.95:0] SoftException in Application.cpp:690: Could not execute script "/home1/mywebsite/public_html/course/course/jumpto.php", referer: https://www.mywebsite.com/course/course/view.php?id=113&notifyeditingon=1


Any quick help is appreciated

Thanks in advance


Attachment error 500.jpg
Attachment error 524.jpg
Average of ratings: -
In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Ken Task -
Picture of Particularly helpful Moodlers

2 errors ... second might be a result of the first.

Softexception error indicates site running suPHP and it doesn't like group write permissions granted to script files.

cd /path/to/moodlecode/ (where you can see config.php.  thensmile

chmod g-w * -R

Hopefully that will clear the 2nd error which is a CloudFlare error.

No CLI? but cPanel ...

Then see:

https://documentation.cpanel.net/display/EA/Apache+PHP+Request+Handling#ApachePHPRequestHandling-suPHPConsiderationssuPHPconsiderations

For such things in future, Google is your friend.

'SoS', Ken


In reply to Ken Task

Re: SoftException in Application.cpp:690

by Ken Task -
Picture of Particularly helpful Moodlers

Follow up ... on suPHP ..

Might want to read/consider:
https://www.suphp.org/FAQ.html
which states:

"suPHP is not maintained any longer and will not receive any further updates not even security patches.
If you want to continue using suPHP, feel free to create a fork (the complete code is licensed under the GPL version 2).
If you are looking for an alternative, have a look at php-fpm.
There also is a fork of suPHP maintained by John Lightsey on GitHub.
"

Consult with your provider.

'SoS', Ken

In reply to Ken Task

Re: SoftException in Application.cpp:690

by Aurinko Anoop -
Hi Ken, thanks for the quick reply, I felt like you are an expert veteran smile I couldnt even think of this explanation.

As you mentioned I explored the permission of folders and files. Seems ok to me. Tried removing group permissions. Then reverted back. This same server hosts Wordpress with absolutely no issues.

In Moodle 3.8 we can create catagories, course, add h5p, and do a lot of stuff without any issue. But if its permission related these tasks would have be affected.

Here is what is happening. Im able to attach a file (shows a progress bar), when i submit it times out. But this issue is also for sending emails, the server process timesout.

Im lost here. Is it suPHP related? I dont understand.
In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Ken Task -
Picture of Particularly helpful Moodlers

Google for that error: SoftException in Application.cpp:690

You might not find info on Moodle, but will for other applications.

Most say error related to suPHP ... which is no longer being updated ... and error speciifically related to settings for 'group' to be allowed to write.

I don't host where you host.  I don't use suPHP ... so suggest, again, that you check with provider (where you host) on changing group permissions not to allow 'write' or  turning off suPHP (since it is no longer being developed nor getting fixes/patches/security fixes).

'SoS', Ken


In reply to Ken Task

Re: SoftException in Application.cpp:690

by Aurinko Anoop -

Hi Ken,

I did spend an entire day with tech support. Found that suphp was disabled in htaccess. I checked by enabling and disabling. As of now its disabled. And all file permissions as you mentioned (no write for group)

# Use PHP73 as default
AddHandler application/x-httpd-php73 .php
# BEGIN custom php.ini PHP73
<IfModule mod_suphp.c>
  #  suPHP_ConfigPath /home1/mywebsite
</IfModule>
# END custom php.ini

Also I noticed while digging, the uploaded files are stored in moodledata and form submissions are getting into db. There is some unknown timeout during response. 

In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Aurinko Anoop -
"SoftException in Application.cpp" refers to excess permission. The issue is which file/folder?
In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Ken Task -
Picture of Particularly helpful Moodlers

The issue is which file/folder?

Would assume all files/folders in moodle code directory.

But if suPHP is off ... ie, not loading ... there should be no SoftExecption in Application errors. 

See: https://docs.moodle.org/38/en/Security_recommendations#Most_secure.2Fparanoid_file_permissions

you can choose to run as paranoid as you like ... as long as it works! smile

'SoS', Ken




In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Ken Task -
Picture of Particularly helpful Moodlers

No reason to have the <IfModule lines for mod_suphp.c nor the closing <IFModule line as well.

no write for group was only when/if suPHP enabled.

'There is some unknown timeout during response' ... so how would anyone know the answer to that if that's a question?

So a time out?   Then check php settings via moodle site admin Server PHPinfo for time outs.  Check web server logs for more info.

'SoS', Ken

In reply to Ken Task

Re: SoftException in Application.cpp:690

by Aurinko Anoop -
Hi Ken,

Found the culprit! It was the SMTP settings. Here's what I did.

I looked for email timeouts which caused 504 errors. And came across this post (https://moodle.org/mod/forum/discuss.php?d=360614) which had exactly the same problem I descibed.

I removed the perfectly correct SMTP settings (because these same settings work for other email clients) from the Moodle smtp configuration form. Then tested the Assignment Submission and it worked like a charm.

I also installed this plugin "Moodle eMailTest" https://moodle.org/plugins/local_mailtest

And now i realized its not the suphp or suexec. But I still dont know why my smtp settings didnt work here.

Hope this solution helps everyone who are searching for similar issue.

Thanks Ken for all your time and support.
In reply to Aurinko Anoop

Re: SoftException in Application.cpp:690

by Nelson Tacadena -
I'm also experiencing this problem... what was your SMTP settings? by default it empty for outgoing and incoming. Can you help please