PHP processes overloading the server

Rate this topic: Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.Evaluations: 2, 3.50 on the average.3.50 out of 6 based on 2 vote(s)
GK User
Tue May 06, 2014 6:06 pm
Reply with quote
Report this post
Hi,
my hosting provider sent me an email about PHP processes burdening the server, they all seem related to the template instyle,
I list some:
PHP Warning: Invalid argument supplied for foreach() .../public_html/templates/gk_instyle/html/com_content/article/default.php on line 13
PHP Notice: Undefined variable: alert .../public_html/templates/gk_instyle/html/com_virtuemart/productdetails/default.php on line 353
PHP Notice: Undefined variable: GK_TEMPLATE_MODULE_STYLES .../public_html/templates/gk_instyle/component.php on line 22
PHP Notice: Undefined variable: BrowseTotalProducts in .../public_html/templates/gk_instyle/html/com_virtuemart/category/default.php on line 215, referer: http://www.extrasound.it/prodotti/audio-hi-fi

thank you
User avatar
Senior Boarder

GK User
Wed May 07, 2014 9:29 am
Reply with quote
Report this post
This are notice messages and they can't overload server because they are output to log files, what is more most of this messages comes from VirtueMart views. You can ask your for disabling logging other messages than Error because this all depends of your hosting settings not from template. Joomla recommend to keep display_errors option disabled and this is the only documentation.
User avatar
Platinum Boarder

teitbite
Wed May 07, 2014 9:33 am
Reply with quote
Report this post
Hi

Those are just notices and a warning. It has no impact on server performance at all. For example "Undefined variable" notice is comming from an old php syntax notation where any variable has to be mentioned before using.

"Invalid argument supplied for foreach" means that a loop in php will not be followed, which means php will do less work.

Please show me rest of the log file.
User avatar
Moderator

GK User
Wed May 07, 2014 3:59 pm
Reply with quote
Report this post
Hi teitbite,
I sent an email with an attachment,

thanks
User avatar
Senior Boarder

teitbite
Thu May 08, 2014 2:59 pm
Reply with quote
Report this post
Hi

I've studied the logs, but I think the acctuall overloading is by writting to a log file itself :) It's true that there is a number of notices and warings but none of them is making processor of any extra work. Please reduce error writting level to log file and when ask Your hosting provider to check the server performance than.
User avatar
Moderator

GK User
Sun May 11, 2014 9:52 pm
Reply with quote
Report this post
Hi teitbite,
communicate immediately to my hosting service,

grazie mille

Fabrizio
User avatar
Senior Boarder

teitbite
Mon May 12, 2014 11:13 am
Reply with quote
Report this post
Hi

Any news in this thread? Just want to know if this require some more attention from me.
User avatar
Moderator

GK User
Wed May 14, 2014 9:50 pm
Reply with quote
Report this post
Hello Teitbite,
unfortunately the problem continues, I changed my template with "storefront" same problem, I send you an email with error logs,

thanks

Fabrizio
User avatar
Senior Boarder

teitbite
Thu May 15, 2014 8:31 pm
Reply with quote
Report this post
Hi

I saw error logs but it still shows same notices. My advice was to reduce the error level to log less errors to log file which I believe is the problem here. Error log tells me that nothing was done, so there is no way for a change here. Pleas try update joomla index.php file with this flags to disable showing errors http://www.php.net/manual/en/function.e ... orting.php but this should be done in php.ini.
User avatar
Moderator

GK User
Fri Aug 29, 2014 2:36 am
Reply with quote
Report this post
Hi

I also encountered notices:
Notice: Undefined variable: BrowseTotalProducts in /var/www/.../templates/gk_instyle/html/com_virtuemart/category/default.php on line 215

Noticed that
templates/gk_instyle/html/com_virtuemart/category/default.php
is overriding
components/com_virtuemart/views/category/tmpl/default.php
but, the line
$BrowseTotalProducts = count($this->products);
is somehow missing. So, I added this line after
$Browsecellwidth = ' width'.floor ( 100 / $BrowseProducts_...
in components/com_virtuemart/views/category/tmpl/default.php.

Will see if this fix the problem.
User avatar
Fresh Boarder

GK User
Fri Aug 29, 2014 2:46 am
Reply with quote
Report this post
Yes, the notices are gone after adding the line :)
User avatar
Fresh Boarder

teitbite
Fri Aug 29, 2014 10:39 am
Reply with quote
Report this post
Hi

Ok thank You for sharing solution with us.
User avatar
Moderator

GK User
Mon Sep 01, 2014 10:39 am
Reply with quote
Report this post
Fix will be added in following template update.
User avatar
Platinum Boarder


cron