[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


turning off magic quotes

Posted on 2007-10-04
Medium Priority
Last Modified: 2008-02-05
I want to turn off the magic quotes but I do not have access to the ini. How can I do this at runtime? With .htaccess or another way.

Question by:roscoeh23
  • 2
LVL 48

Expert Comment

ID: 20016692
LVL 28

Accepted Solution

gamebits earned 2000 total points
ID: 20017297

or in htaccess file

php_flag magic_quotes_gpc off
LVL 48

Expert Comment

ID: 20017408
set_magic_quotes_runtime does not work for magic_quotes_gpc
See http://www.php.net/set_magic_quotes_runtime

If magic_quotes_runtime is enabled, most functions that return data from any sort of external source including databases and text files will have quotes escaped with a backslash. If magic_quotes_sybase  is also on, a single-quote is escaped with a single-quote instead of a backslash.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question