ISSUE SUMMARY:
A white page is displayed when trying to access to the jomsocial Dashboard.
Chrome report an error 500 ( internal server error ).
it occurs under php 7 and NOT under php 5.6
After hours, I found that the issue comes from _getListCount() used line 89 in /administrator/components/com_community/models/mailqueue.php
I had more than 250 000 emails reported by the dashboard.
For this amount _getListCount() works under php5.6 not under php7
Solution : click on "purge sent" in the Monitor/Mail queue menu ( I had to comment line 89 temporary to get this menu working )
Hope it helps !
Hi,
I'm running now Jomsocial 4.2.2 ( with Joomla 3.5.1 and php 7.0.7 ), and I 'm still facing the same issue.
What is your solution ?
Regards
Olivier
Hi,
this issue can be from 3rd party extensions that not compatible with PHP 7.
please edit your first post at this topic. and put super user login detail at site info form (it's private)
I need it for debugging purpose.
Regards
Hi,
I just found the issue.
The mysql query for calculating the number of emails sent take a lot of memory ressources.
You may rewrite this piece of code.
The mysql query under php7 takes much more memory than under php5.
I changed memory_limit = 256M ( instead of 128M ) and it is solved for now.
Anyway, you have to find a solution for that as the dashboard becomes slower to appear as the number of sent emails increase, so :
- change the way to do the query
or
- autopurge the sent mails
regards
Olivier
Hi,
you can increased memory_limit to 1024, and need to asking your hosting provider to increased mysql query buffer. only hosting support know about it.
and about query, jomsocial cant changing the query, because the query has been optimized log time ago,
autopurge the sent mails not recomanded, better you do it manualy at jomsocial mail queue page (backend)
Regards
Hi,
I do not agree:
the query for counting the emails sent are not optimized.
PHP queries ALL the table then counts the row ---> the dashboard take 13s to appear with a 120000 rows in the table.
Same thing in the menu Monitor/Mail Queue
Now please reconsider the function getTotal() with this :
public function getTotal()
{
// Load total number of rows
if( empty($this->_total) )
{
$mainframe = JFactory::getApplication();
$jinput = $mainframe->input;
$db = JFactory::getDBO();
$status = $jinput->getInt( 'status' , 3 );
$condition = '';
if( $status != 3 )
{
$condition .= ' AND status='. $db->Quote( $status );
}
$query = 'SELECT COUNT(*) FROM '
. $db->quoteName( '#__community_mailq' ) . ' WHERE 1'
. $condition
. ' ORDER BY created DESC';
$db->setQuery($query);
$this->_total = $db->loadResult();
}
return $this->_total;
}
thank you,
and please consider all others files in /administrator/components/com_community/models/
This may increase the display speed of the dashboard.
regards
Olivier