Attention

If your Photo Cart is suddenly getting a 500 error or only displaying a blank page then you or your hosting company has updated the PHP (programming language) to PHP 7 which Photo Cart is not compatible with (and will not be compatible with) mainly because of the removal of the my_sql functions which are replaced with my_sqli functions. 

You would need to have the PHP version downgraded to 5.6 in order for Photo Cart to work. If downgrading the PHP doesn't work then you may have to update Photo Cart to the last version of 7. Download Photo Cart 7 upgrade files. Upgrade instructions.

Photo Cart was retired in 2015. Check out Sytist.

Please log in or Create an account to post or reply to topics.
You will still receive notifications of replies to topics you are part of even if you do not subscribe to new topic emails.

Adding To Cart Generates Error Adding > Field 'cart_gi_descr' Doesn't Have A Def

g
14 posts
Sun Aug 30, 15 9:45 AM CST
I moved photocart from an old windows IIS server to a brand new windows 2012 AWS server running the latest and greatest IIS. The site successfully moved over using your steps of copying the files and exporting MySql, reimporting. The issue I am having is that when you add an item to the card the following error is generated: Error adding > Field 'cart_gi_descr' doesn't have a default value. Inspect element / console also shows: Refused to set unsafe header "Content-length"makePOSTRequest @ photocart.js:1447addProductToCart @ photocart.js:324(anonymous function) @ VM659:1
photocart.js:1448 Refused to set unsafe header "Connection"

I saw a post in the old forum about the mod_security issue with Apache. Is there a setting in IIS that would fix this? or do I need to upgrade photocart.

You can view the issue live here at: https://cart.zayphoto.com :9000/index.php The old site is at https://www.zayphoto.com :9000/photocart/index.php

version is 6.1.3
Edited Sun Aug 30, 15 10:56 AM by gilbert bailey
g
14 posts
Sun Aug 30, 15 11:17 AM CST
I applied the free 7.1.0 upgrade and still have the same issue. I thought maybe the javascript might have changed with the upgrade to handle the post requests differently...but I still have the same problem along with some mysql error just below the error message. It seems to be related to IIS 7/8 request filtering.

From the console:

Refused to set unsafe header "Content-length"makePOSTRequest @ photocart.js:903addProductToCart @ photocart7f.js?v=7.1.0:1513(anonymous function) @ VM2694:1
photocart.js:904 Refused to set unsafe header "Connection"makePOSTRequest @ photocart.js:904addProductToCart @ photocart7f.js?v=7.1.0:1513(anonymous function) @ VM2694:1

The two offending lines:

http_request.setRequestHeader("Content-length", parameters.length);
http_request.setRequestHeader("Connection", "close");

UPDATE: I removed the request filtering security role and restarted the server and still have the issue.
Edited Sun Aug 30, 15 12:30 PM by gilbert bailey
16,216 posts (admin)
Sun Aug 30, 15 12:39 PM CST
The error means MySQL is running in Strict Mode. You need to disable strict mode.
https://www.google.com/search?q=disable+MySQL+strict+mode&ie=utf-8&oe=utf-8
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Sun Aug 30, 15 12:58 PM CST
Tim,

Thanks! That did it. I even restored the request filtering role and it's working. The only issue I have is when you try to login as a shopper....it will sit spinning that it is waiting on the site after you click login....you have to hit a menu nav item to leave the screen while it is hung to then test it. Any ideas on that? It's the only thing I have left to knock out before switching the domain over.

Seems the login modal redirects fine. Its the login when you go to add to cart. Looks like it might be redirecting http vs. https even though I have the site set to https only in IIS.

UPDATE: I added the url rewrite for https but it is not working since it is redirecting after the login to http without the correct port #...the rewrite can't kick in. I have secure login etc.. set in admin but only the modal / login from the nav menu works. The login from adding to cart with the white dologin on the index page does not - tires to redirect from https index to http and fails.
Edited Sun Aug 30, 15 1:49 PM by gilbert bailey
16,216 posts (admin)
Sun Aug 30, 15 2:09 PM CST
Try in the Photo Cart setup.php file changing the $setup['url'] variable to have https instead of just http
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Sun Aug 30, 15 2:17 PM CST
I already have https for that variable or my thumbnails and other items don't work. - had that on my old server setup file. If I change that to http from https then I loose thumbnails and a bunch of items. Everything is working fine except that redirect on login when you click an image before the add to cart. The standard login button in the upper right / modal works just fine. Not sure what is different other than one is using the do index.php and the other is a modal.
g
14 posts
Mon Aug 31, 15 8:34 AM CST
Seems any login that use that index.php login form has the issue. When it redirects it is switching https to http and leaving the port the same.
16,216 posts (admin)
Mon Aug 31, 15 10:37 AM CST
You will need to either post or email me a link to the installation so I can see.
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Mon Aug 31, 15 10:41 AM CST
New site running 7.0.1 (server 2012/IIS8) with the issue: https://cart.zayphoto.com :9000/index.php

old site/server running 6.1.3 (server 2000 / IIS 5) without the issue: https://zayphoto.com :9000/photocart/index.php

The reply posts seem to insert an extra space between the : and port number so you may need to edit the url.
16,216 posts (admin)
Mon Aug 31, 15 10:49 AM CST
The page won't even load if you go directly to http://cart.zayphoto.com :9000/index.php

I don't understand why if you change the setup.php file like I mentioned before would make the thumbnails not load?
Try in the Photo Cart setup.php file changing the $setup['url'] variable to have https instead of just http
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Mon Aug 31, 15 10:56 AM CST
Tim the blog posts are adding an extra space between .com :9000 (the port number). Even though I type it in the blog post adds the space so you will need to copy and paste the URL and delete the space...no sure why the reply / post feature is doing that. The setup.php file currently has https for both values ...non and secure just like the old site has - I actually configured it that way. I tried the setup without https and that actually breaks a bunch of stuff. Should I downgrade to 6.1.3? I don't believe the redirect rewrites the URL after login, that started with the 7.0.1 upgrade.
16,216 posts (admin)
Mon Aug 31, 15 1:33 PM CST
I did use the port and created an account. What I mean is it doesn't come up with just http (not using https).

Email me the setup.php file please.
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Mon Aug 31, 15 1:40 PM CST
I'll get a copy to send you. Correct, it doesn't pull up http because it swaps the https to http but leaves the port # 9000.

g
14 posts
Tue Sep 01, 15 11:13 AM CST
Tim,

I have tried all of the $setup url's that you see commented out with no luck. The current configuration is uncommented. With the current config I don't get the wrong port # as before but it does swap http for https....ignores the https in the setup.php. I found a line in the javascript for where it is looking for the query string of do.photocart and view gallery and it was using window location vs. the url value but I'm not sure that was the line that was causing the https to be rewritten as http. Thanks in advance for any insights.

This reply was deleted.
This reply was deleted.
g
14 posts
Tue Sep 01, 15 11:20 AM CST
Sorry the php was stripped out of the reply. Screen shot attached - notes in the previous reply.
Attached Photos

16,216 posts (admin)
Tue Sep 01, 15 2:16 PM CST
Download this zip file and unzip it
https://www.picturespro.com/sy-misc/download/pc_login.zip

Upload the included pc_login.php file into your Photo Cart folder overwriting the existing on and this should fix it.
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Fri Sep 04, 15 7:35 AM CST
Tim,

I applied the file this morning. I renamed the old file pc_loginbackup.php. Didn't seem to work. I did restart IIS and also used incognito and another browser to make sure it was cached.
16,216 posts (admin)
Fri Sep 04, 15 11:52 AM CST
Looks like I zipped the wrong file. Use this one the same as before
http://www.picturespro.com/sy-misc/download/pc_login_page.zip
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
g
14 posts
Fri Sep 04, 15 2:01 PM CST
No problem, Thanks Tim! That worked!
21 total messages
Please log in or Create an account to post or reply to topics.
This post has been viewed 2,017 times
Category: Error
 
Loading more pages
Loading more pages

Sign up for email promotions.

Your information is safe with us and won't be shared.

Thank you for signing up!

 
©2003 - 2021 Grissett, LLC. All Rights Reserved.

By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

    Accept   Privacy & Cookie Policy
Loading More Photos
Scroll To Top
Close Window
Loading
Close