close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem with "Add a Default Value" Locking Up

Thread began 5/19/2010 6:10 pm by bbolt360986 | Last modified 5/26/2010 5:51 pm by Jimmy Wu | 1660 views | 17 replies |

bbolt360986

Problem with "Add a Default Value" Locking Up

After I created a new product, uploaded the photos, created the descriptions I want to add product Options.
So, under the Admin section of the website, on the Option_add.php page, I attempt to create the product options.
When I use the "Manage Advanced Options for:", for any product, "Add An Option" called, let's say "Colors". I will get a popup called "Add a Default Value". I will enter the number "B10" and mouse click on the enter button.
This pop-up will sit there for about 5 minutes and then screens goes with the following words at the top… "Query execution was interrupted"
How can I fix this or find when this is coming from…

Sign in to reply to this post

Jimmy Wu

I've never seen this occur before. The database query to insert an option in the database should not need to run for that long. There may be something that is blocking the execution of the query. Do any of the other inserts/edits on your site time out like this? Can you check the permissions on the user for connecting to the database?

One other thing you can try is to insert directly into the database and check if the options show up. You would add the option group name (Colors) to the ps3_optiongroups table as the OptionGroupName and the id can just be 1. In the ps3_options table, you can set the optionID to 1, the OptionGroupID to 1 and the OptionName to B10. Then in the ps3_productoptions table, set everything to 1, except the ProductID which you should look in the ps3_products table to find the ProductID to use.

Sign in to reply to this post

bbolt360986

Add a Default Value

I checked the table Ps3_options tables and the Add a Default Value did store the data to the table but the page gives the same error on the page with a white screen.....

any help with this would be great....

This issues has the entire site on hold because they can't finish entering the rest of the data

thanks
Bob

Sign in to reply to this post

Jimmy Wu

If the page is completely blank, this means that there has been an error on the page, but error reporting has not been turned on. Can you add this to the top of the page and run through the process again:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

Sign in to reply to this post

bbolt360986

Concerning Add a Default Value

Jim;

With the Error messages on I can't really test the problem because as the page attempts to load the session_start is in the wrong place on the Helper_PHP.php file

See error code:


Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home6/divinebu/public_html/Admin/options_Add.php:6) in /home6/divinebu/public_html/WA_SecurityAssist/Helper_PHP.php on line 5

Sign in to reply to this post

bbolt360986

Jim;

I changed the code to the following and ran the page again:

<?php
Session_start();
error_reporting(E_ALL);
ini_set('display_errors','on');
?>


This was the only message that was returned:

Query execution was interrupted

Sign in to reply to this post

bbolt360986

Concerning Add a Default Value

JIm;

the Following are the PHP error_logs from the system,,, You can see that now that we put the session_start in we have a number of errors now.... I don't understand the google_geocache error.. i believe it is unrelated but I will give you all the details


/home6/divinebu/public_html/Admin/error_log: 9 [21-May-2010 07:07:35] PHP Warning: session_start() [<a href='plugins/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home6/divinebu/public_html/Admin/options_Add.php:6) in /home6/divinebu/public_html/WA_SecurityAssist/Helper_PHP.php on line 5 [21-May-2010 07:10:33] PHP Warning: session_start() [<a href='plugins/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home6/divinebu/public_html/Admin/options_Add.php:6) in /home6/divinebu/public_html/WA_SecurityAssist/Helper_PHP.php on line 5 [21-May-2010 07:10:35] PHP Warning: session_start() [<a href='plugins/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home6/divinebu/public_html/Admin/options_Add.php:6) in /home6/divinebu/public_html/WA_SecurityAssist/Helper_PHP.php on line 5 [21-May-2010 07:15:06] PHP Warning: session_start() [<a href='plugins/function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home6/divinebu/public_html/Admin/options_Add.php:6) in /home6/divinebu/public_html/WA_SecurityAssist/Helper_PHP.php on line 5 /home6/divinebu/public_html/error_log: (empty) /home6/divinebu/public_html/google_javascript/error_log: [20-May-2010 08:50:19] PHP Warning: DOMDocument::save(../_promaps_cache/_promaps_geocache.xml) [<a href='plugins/domdocument.save'>domdocument.save</a>]: failed to open stream: No such file or directory in /home6/divinebu/public_html/google_javascript/promaps_geocache_php.php on line 48

Sign in to reply to this post

bbolt360986

Add a Default Value

Jim;

Here is the error log of slow or poor Sql from the Control Panel that traps mysql_slow_queries.... I hope this will be the help you need to fix this issue....


Fri May 21 07:07:36 2010
# Query_time: 1.078522 Lock_time: 0.000055 Rows_sent: 0 Rows_examined: 2542150
SELECT * FROM ps3_optiongroups WHERE OptionGroupID IN (SELECT DISTINCT OptionGroupID FROM ps3_productoptions INNER JOIN ps3_options ON ps3_productoptions.OptionID = ps3_options.OptionID WHERE ProductID = 7504)

# Fri May 21 07:10:35 2010
# Query_time: 1.655210 Lock_time: 0.000043 Rows_sent: 0 Rows_examined: 2581260
SELECT * FROM ps3_optiongroups WHERE OptionGroupID IN (SELECT DISTINCT OptionGroupID FROM ps3_productoptions INNER JOIN ps3_options ON ps3_productoptions.OptionID = ps3_options.OptionID WHERE ProductID = 7504)

# Fri May 21 07:11:43 2010
# Query_time: 47.420225 Lock_time: 0.000150 Rows_sent: 10 Rows_examined: 45484
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products GROUP BY GroupingID ORDER BY ProductName LIMIT 0, 10

# Fri May 21 07:12:25 2010
# Query_time: 41.796191 Lock_time: 0.000122 Rows_sent: 54 Rows_examined: 45528
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products GROUP BY GroupingID ORDER BY ProductName

# Fri May 21 07:13:20 2010
# Query_time: 9.466472 Lock_time: 0.000163 Rows_sent: 0 Rows_examined: 20971453
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = 15)) GROUP BY GroupingID ORDER BY ProductName LIMIT 0, 10

# Fri May 21 07:13:30 2010
# Query_time: 10.146906 Lock_time: 0.000133 Rows_sent: 0 Rows_examined: 20971453
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = 15)) GROUP BY GroupingID ORDER BY ProductName

# Fri May 21 07:14:21 2010
# Query_time: 11.745622 Lock_time: 0.000162 Rows_sent: 3 Rows_examined: 48748
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = 17)) GROUP BY GroupingID ORDER BY ProductName LIMIT 0, 10

# Fri May 21 07:14:33 2010
# Query_time: 12.275066 Lock_time: 0.000119 Rows_sent: 3 Rows_examined: 48748
SELECT *,(SELECT ProductStock - coalesce(sum(DetailQuantity),0) AS NumLeft FROM (ps3_orderdetails join ps3_orders on((ps3_orders.OrderID = ps3_orderdetails.DetailOrderID))) WHERE ((ps3_orderdetails.DetailProductID = ProductID) and (ps3_orders.OrderDate > ProductUpdateDate))) AS NumLeft, (SELECT CouponProductID FROM ps3_couponproducts WHERE ps3_couponproducts.ProductID = ps3_products.ProductID AND couponID = -1 LIMIT 1) AS CouponProductID, coalesce((select ps3_productoptions.GroupingID FROM ps3_productoptions where ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductID IN (SELECT ProductID FROM ps3_productcategories WHERE (CategoryID = 17)) GROUP BY GroupingID ORDER BY ProductName

# Fri May 21 07:15:07 2010
# Query_time: 1.100011 Lock_time: 0.000036 Rows_sent: 0 Rows_examined: 2581260
SELECT * FROM ps3_optiongroups WHERE OptionGroupID IN (SELECT DISTINCT OptionGroupID FROM ps3_productoptions INNER JOIN ps3_options ON ps3_productoptions.OptionID = ps3_options.OptionID WHERE ProductID = 7528)

# Fri May 21 07:16:28 2010
# Query_time: 15.762986 Lock_time: 0.000562 Rows_sent: 10 Rows_examined: 20011017
SELECT * , coalesce((select ps3_productoptions.GroupingID from ps3_productoptions WHERE ps3_productoptions.ProductID = ps3_products.ProductID limit 1),ps3_products.ProductID) AS GroupingID FROM ps3_products WHERE ProductLive = 1 GROUP BY GroupingID ORDER BY ProductName LIMIT 10, 10

# Fri May 21 07:21:06 2010
# Query_time: 1.117596 Lock_time: 0.000039 Rows_sent: 0 Rows_examined: 2620370
SELECT * FROM ps3_optiongroups WHERE OptionGroupID IN (SELECT DISTINCT OptionGroupID FROM ps3_productoptions INNER JOIN ps3_options ON ps3_productoptions.OptionID = ps3_options.OptionID WHERE ProductID = 7528)

# Fri May 21 07:23:04 2010
# Query_time: 111.880396 Lock_time: 0.000059 Rows_sent: 0 Rows_examined: 39109
SELECT DISTINCT ps3_products.ProductID, COALESCE(ps3_productoptions.GroupingID,ps3_products.ProductID) AS GroupingID FROM ps3_products LEFT OUTER JOIN ps3_productoptions ON ps3_productoptions.ProductID = ps3_products.ProductID WHERE ps3_productoptions.GroupingID = (SELECT GroupingID FROM ps3_productoptions WHERE ProductID = 7528 LIMIT 1 ) OR ps3_products.ProductID = 7528

# Fri May 21 07:28:36 2010
# Query_time: 117.540000 Lock_time: 0.000070 Rows_sent: 0 Rows_examined: 39109
SELECT DISTINCT ps3_products.ProductID, COALESCE(ps3_productoptions.GroupingID,ps3_products.ProductID) AS GroupingID FROM ps3_products LEFT OUTER JOIN ps3_productoptions ON ps3_productoptions.ProductID = ps3_products.ProductID WHERE ps3_productoptions.GroupingID = (SELECT GroupingID FROM ps3_productoptions WHERE ProductID = 7528 LIMIT 1 ) OR ps3_products.ProductID = 7528

Sign in to reply to this post

bbolt360986

Add a Default value

OK... this is the statement that is causing things to Die.... What can i do about this

SELECT DISTINCT ps3_products.ProductID, COALESCE(ps3_productoptions.GroupingID,ps3_products.ProductID) AS GroupingID FROM ps3_products LEFT OUTER JOIN ps3_productoptions ON ps3_productoptions.ProductID = ps3_products.ProductID WHERE ps3_productoptions.GroupingID = (SELECT GroupingID FROM ps3_productoptions WHERE ProductID = 7504 LIMIT 1 ) OR ps3_products.ProductID = 7504


I broke a part this sql statement into sections and at first I thought it was the Coalesce,,, but it looks like the issue is with the Left Outer Join...

Sign in to reply to this post

Jimmy Wu

Does this query run slowly when you run it directly on the sql server as well?

Try using this query instead:
SELECT DISTINCT ps3_products.ProductID, COALESCE(ps3_productoptions.GroupingID,ps3_product s.ProductID) AS GroupingID FROM ps3_products LEFT OUTER JOIN ps3_productoptions ON ps3_productoptions.ProductID = ps3_products.ProductID WHERE ps3_products.ProductID = 7504 OR ps3_productoptions.GroupingID = (SELECT GroupingID FROM ps3_productoptions WHERE ProductID = 7504 LIMIT 1)

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...