close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

add to cart - undefined function get_magic_quotes_gpc()

Thread began 4/12/2021 7:47 am by Nathon Jones Web Design | Last modified 4/22/2021 10:33 am by Ray Borduin | 1069 views | 16 replies |

Nathon Jones Web Design

add to cart - undefined function get_magic_quotes_gpc()

Hi. Just created a new cart and am trying to add an add to cart behaviour on a page. The page isn't re-directing correctly, despite having this code directly above the DOCTYPE:

<?php
// WA eCart Redirect
if ($NJeCart->redirStr != "") {
if (function_exists("rel2abs")) $NJeCart->redirStr = rel2abs($NJeCart->redirStr,dirname(__FILE__));
header("Location: ".$NJeCart->redirStr);
die();
}
?>



..and is also producing the error:
Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php:26 Stack trace: #0 C:\inetpub\wwwroot\NJ-MASTERSITE\shop.php(55): NJeCart_Definition->AddToCart() #1 {main} thrown in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php on line 26

Reading through some other support posts, it appears that the get_magic_quotes function is DEPRECATED as of PHP 7.4.
How do I resolve this?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Attach the file:
NJeCart_PHP.php

and I'll show you what lines to change.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Attached.

I'm building a template site with a set of global values that I hope to implement on more than one client's website. Will it be a problem if they all use NJeCart in terms of session values etc across sites?

Thank you.
NJ

Sign in to reply to this post

Nathon Jones Web Design

PS. Would the get_magic_quotes_gpc() issue be what's affecting the Add to Basket behaviour?

You can check the Add to Basket behaviour on this page:
https://www.nathonjoneswebdesign.co.uk/product.php?pID=9

FTP details are provided below also. Thank you.

Regards
NJ

Sign in to reply to this post

Nathon Jones Web Design

Would appreciate some support with this.
Can't get the Add to Cart behaviour to work.
Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Your triggers were set to fire with the button press "NJeCart_1_ATC"... however your submit button had no name. I added the name to your submit button:
name="NJeCart_1_ATC"

and that seems to have fixed it.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_gpc() in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php:26 Stack trace: #0 C:\inetpub\wwwroot\NJ-MASTERSITE\product.php(55): NJeCart_Definition->AddToCart() #1 {main} thrown in C:\inetpub\wwwroot\NJ-MASTERSITE\WA_eCart\NJeCart_PHP.php on line 26

Also...

1) The recordset rsPRODUCT is not displayed in the Server Behaviours or Bindings panels so we can't assign values to the Add to Cart button.
2) When we open the Add to Cart behaviour, we are not able to select the "Look up item ID from recordset" option.

EDIT

After closing down the page and re-opening, the recordset rsPRODUCT is displaying both panels, however when we open the Add to Cart behaviour and select that recordset from the "Look up item ID from recordset" drop down, the ID column drop down is blank, meaning we can't select the product ID.

Sign in to reply to this post

Ray BorduinWebAssist

That is because your SSL certificate isn't installed properly when you visit the site on the web, but it forces to https:// still. If you force to https:// you need to have SSL installed and working or else Dreamweaver won't be able to connect to the database and get the columns.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

We're testing locally. It does the same thing.

We've raised the https redirect with server support as there is no SSL certificate installed on the domain, nor are there any redirect scripts.

Sign in to reply to this post

Ray BorduinWebAssist

The issue is almost always related to the Dreamweaver site settings for the Testing server. I can't debug that from here, but if you send me a screen shot of your testing server settings I might be able to spot the problem. What is the error you get if you open the connection and click the "test" button?

Sign in to reply to this post
Did this help? Tips are appreciated...
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...