My Joomla! site loads too slowly

大城市里の小女人 提交于 2019-12-11 03:54:54

问题


My Joomla! site loads very slowly and sometimes return an error which is: Fatal error: Maximum execution time of 30 seconds exceeded in D:\Hosting\6926666\html\libraries\joomla\environment\request.php on line 11 Note that the D:\Hosting\6926666\html\libraries\joomla\environment\request.php on line 11 alayws changes (not the same path).

Hint: In local my site working very good, the problem happened when the site and the database are on the server, or the database is only on the server. My site is Joomla! 1.6 and my host server is godaddy.com


回答1:


I changed to another template and the website sped up considerably. I then did some investigating and found the index.php of the template has been HACKED and there was EVAL() and BASE 64() code in there! As soon as I put in a "clean" version of the PHP, the website was back to normal!




回答2:


I agree with Jav_Rock : godaddy is not "compatible" with Joomla.

So, to solve your problem, you should find another hosting provider!




回答3:


Are you using any third-party extensions? If so, how many? The more you use, the more likely it is that one of them has introduced an 'issue'.

I'd like to suggest that you review the code and database structure associated with each extension to determine where there might be a problem. I'm currently doing this with a fairly simple site that is using a LOT of extensions (so many that it breaks the admin UI). Some of them are terribly written - e.g. making many database lookups when 1 is required, writing to the database with every single request, storing several values in a single column, etc.

However, you say you're a 'beginner', so I think your best bet is either:

  • Get someone who is not a beginner to do the above review for you
  • Experiment by enabling/disabling each extension in turn to determine which are problematic. That's not very scientific, but might get you somewhere.

If you can, try enabling debug (you can do that via the Global Configuration). This will show you - amongst other things - how many database queries are required to generate your page. I can't give you an absolute figure for what is 'good' or not, suffice it to say that fewer is better! So, for example, if you identify a low-priority extension whose removal saves you 25% of the total, you might well decide to disable that module - and, possibly, look for an alternative. As a guide, the site I'm working on originally made 500-600 queries for the home page. In my opinion that is far, FAR too many.




回答4:


for:

Fatal error: Maximum execution time of 30 seconds exceeded

first create a php.ini file and place the code only 'max_execution_time=120' means execution time is 120 Sec. or 2 Minute. or modify according to you..

and put that file into you joomla administrator folder.
Or you can directly edit the php.ini if you have access on it.

also enable cache for the required modules.



来源:https://stackoverflow.com/questions/9210893/my-joomla-site-loads-too-slowly

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!