View Full Version : mysql error MAX_JOIN_SIZE
bbolt360986
07-09-2010, 06:35 AM
I am using the PowerStore 300 site and while trying to delete an advanced option for one of the products the following error comes up.
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
What is the exact syntax I should put in the php.ini file that would fix this, i have tried SET SQL_BIG_SELECTS=1 and SET SQL_MAX_JOIN_SIZE=10000000 and the error still comes up.
Eric Mittman
07-09-2010, 09:00 AM
This is a MySQL setting not php, so you would either need to set this in your my.ini or other MySQL config file, or you can try setting this in the code directly.
On your options_Add.php page try adding in this code just after line 45:
<?php
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$set_query = "SET SESSION SQL_BIG_SELECTS=1";
$rsSet = mysql_query($set_query, $PowerStoreConnection) or die(mysql_error());
?>
This should execute the query before any of the others run and set this value for you for the duration of the session. Please give this a try and let us know how it works.
bbolt360986
07-09-2010, 11:40 AM
Thanks for the response, I inserted the code and the sql query did what it was supposed to, but then a warning appeared at the top that read:
Warning: Cannot modify header information - headers already sent by (output started at /home6/divinebu/public_html/Admin/options_Add.php:51) in /home6/divinebu/public_html/Admin/options_Add.php on line 507
the code on that line was
header('Location :'.$_SERVER['PHP_SELF']);
and all the information on the page got cut off after the first two lines, so I just commented it out and appears to be working just fine, it refreshes the page without that line of code.
Eric Mittman
07-09-2010, 01:51 PM
The error is telling you that the header call you have on line 507 could not be executed because of output that occurred on line 51. This almost always occurs because of white space that is outside of the php blocks, so if you have any spaces or returns that are outside of the php block that you added it can cause this problem.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.