-
- 13 Posts
I’m new to Modx but had installed and tested a previous release some time ago without problems. However I’ve just done a new install of this release on the same host I had used before and I am experiencing all I can describe as browser hangs. The install itself went without a hitch but these problems have cropped up since starting to use the CMS. These hangs occur randomly and can occur either whilst I’m browsing the site or whilst in the manager and they happen regardless of browser in use. The only solution is to close the browser and try again after a period of time. As a newbie I’m not sure how to track down the problem and would be grateful in anyone can point me in the right direction.
Many Thanks.
-
- 4,205 Posts
Is this with the demo site? If you are on a shared host it may be an overloaded database or something like that.
-
- 13 Posts
It is shared (paid for) hosting but I’ve never had problems before.
It was a new clean install (new database) but I did flag to include the demo site, however I’m the only user so it’s difficult to believe it’s overloaded however maybe I misunderstand, please explain.
Thanks
Les
Have you tried accessing the site from a different computer? Might also be worthwhile checking the MODx demo site for a comparison.
You could also display the php, mysql time on your site which could highlight any slowness / server overloads
<p align="center">MySQL: [^qt^], [^q^] request(s), PHP: [^p^], total: [^t^], document retrieved from [^s^].</p>
-
- 13 Posts
Ok, checked on another PC.....Same Problem.
The code you provided gave this result:
MySQL: 0.0053 s, 5 request(s), PHP: 0.6657 s, total: 0.6710 s, document retrieved from database.
It probably won’t help but when I get this hang on Internet Explorer, after a while I also see and error, which is:
"Fatal Error: Maximum execution time of 30 seconds exceeded in ********\manager\includes\config.inc.php on line 61"
***** = path to installed site
Here’s the area around line 61 in config.inc.php
55 // start cms session
56 if(!function_exists(’startCMSSession’)) {
57 function startCMSSession(){
58 global $site_sessionname;
59 session_name($site_sessionname);
60 session_start();
61 $cookieExpiration= 0;
62 if (isset ($_SESSION[’mgrValidated’]) || isset ($_SESSION[’webValidated’])) {
63 $contextKey= isset ($_SESSION[’mgrValidated’]) ? ’mgr’ : ’web’;
64 if (isset ($_SESSION[’modx.’ . $contextKey . ’.session.cookie.lifetime’]) && is_numeric($_SESSION[’modx.’ . $contextKey . ’.session.cookie.lifetime’])) {
65 $cookieLifetime= intval($_SESSION[’modx.’ . $contextKey . ’.session.cookie.lifetime’]);
66 }
67 if ($cookieLifetime) {
68 $cookieExpiration= time() + $cookieLifetime;
69 }
70 if (!isset($_SESSION[’modx.session.created.time’])) {
71 $_SESSION[’modx.session.created.time’] = time();
72 }
73 }
74 setcookie(session_name(), session_id(), $cookieExpiration, MODX_BASE_URL);
75 }
76}
sounds like your host has set php to timeout after 30s of running which helps stop bad scripts on the server. 30s is a bit low.
Create a test.php file on your server and put in
<?php
phpinfo();
?>
Then load up the page check max execution time and have a look at the sessions section it could be a paths / permission issue.
-
- 4,205 Posts
In the manager you can run phpinfo in the system info page (under reports).
-
- 13 Posts
Ok, took a while before I got around to it but the info from the Modx manager report is:
Directive Local Value Master Value
max_execution_time 30 30
session
Session Support enabled
Registered save handlers files user
Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name SN49841c5172337 PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path C:\WINDOWS\Temp C:\WINDOWS\Temp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off
Les
Might be worthwhile getting your host to check that your website has modify rights to c:\windows\temp so that sessions are created, we had a similar thread before and this was resolved by checking the permissions and re uploading the files.
http://modxcms.com/forums/index.php/topic,32352.msg197032.html#msg197032