UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > PHP Hosting

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 30-01-2008, 23:02
Member
 
Join Date: Jul 2007
Posts: 44
Question Turn Off magic_quotes

Hi all,

I'm trying to get TinyMCE working with php, but have hit a snag. There seams to be a problem with magic_quotes, see here

Is it possible to switch off magic_quotes with the .htaccess file?

Thanks Stu
Reply With Quote
  #2 (permalink)  
Old 30-01-2008, 23:35
System Administrator
 
Join Date: Dec 2006
Location: localhost
Posts: 633
Thumbs up

You can use any one of these...
Quote:
php_flag magic_quotes_gpc off
php_value magic_quotes_gpc 0
__________________

Rock _a.k.a._ Jack L.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Reply With Quote
  #3 (permalink)  
Old 31-01-2008, 08:41
mephisto's Avatar
Senior Member
 
Join Date: Feb 2007
Location: Darlington
Posts: 101
Send a message via ICQ to mephisto Send a message via MSN to mephisto
Default

A page on how to disable them.

http://uk3.php.net/manual/en/securit....disabling.php

Which version of php are you using? In php 5 they are disabled by default, php 6 is not even going to support them.

If you're using php 4, then you should consider updating to 5 as 4 is only getting critical updates now, and will be fully dropped on 08/08/2008.
Reply With Quote
  #4 (permalink)  
Old 31-01-2008, 20:50
Member
 
Join Date: Jul 2007
Posts: 44
Unhappy

Quote:
Originally Posted by mephisto View Post
Which version of php are you using? In php 5 they are disabled by default, php 6 is not even going to support them.
Our reseller package uses php 5, but phpinfo() says magic_quotes_gpc On

Quote:
php_flag magic_quotes_gpc off
php_value magic_quotes_gpc 0
I've tried both of these and get the following in the error log.

Invalid command 'php_value', perhaps mis-spelled or defined by a module not included in the server configuration
Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration


Any ideas?
Reply With Quote
  #5 (permalink)  
Old 01-02-2008, 07:40
mephisto's Avatar
Senior Member
 
Join Date: Feb 2007
Location: Darlington
Posts: 101
Send a message via ICQ to mephisto Send a message via MSN to mephisto
Default

Have you got access to php.ini? If so then change these in the file to

Code:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
Unfortunatly you can't disable these at runtime using ini_set.

If php is being ran under fast-cgi instead of an apache module, then the .htaccess commands won't work. You'll be able to tell if it is fast-cgi if there aren't any apache sections in phpinfo.
Reply With Quote
  #6 (permalink)  
Old 01-02-2008, 14:52
Member
 
Join Date: Jul 2007
Posts: 44
Default

We have a Linux Standard reseller package http://www.eukhost.com/reseller-hosting.php
So I don't think I can change it.
Reply With Quote
  #7 (permalink)  
Old 01-02-2008, 15:44
flesso's Avatar
Premium Member
 
Join Date: Mar 2007
Location: 127.0.0.1
Posts: 1,317
Default

This can be done with the use of .htaccess and a custom php.ini file.

First, create or modify the .htaccess file in the root of your site, and paste in the following line:

Quote:
SetEnv PHPRC /path/to/site/my_custom_php.ini
Once thats done, you can then go on to create your custom php.ini file. To achieve what you want to, you will need to paste the following into it:

Quote:
magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
Thats all that done. To check that you are using the new custom php.ini file, create a PHP page containing the following text:

PHP Code:

<?php phpinfo(); ?>
Your custom php.ini file will affect your web site hosting only, and not the sites of other customers. It can also be done per directory, if needed.
__________________
Regards,
Josh Hold


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Over 1000 Computer Related Articles to Sink Your Teeth Into!



To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
- Gig Listings for London


Super Moderator
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


I'm only a forum gremlin (moderator), and do not work for eUKhost in any way. Opinions expressed by me are mine only, and do not reflect those of either eUKhost or any company that may be listed above.

I don't bite, honest.
Reply With Quote
  #8 (permalink)  
Old 04-02-2008, 07:57
Member
 
Join Date: Jul 2007
Posts: 44
Smile

Thanks for that Flesso, you helped me solve the problem.

It also works if you just have a php.ini file in the directory.

Thanks all, Stu
Reply With Quote
  #9 (permalink)  
Old 14-02-2008, 11:41
Junior Member
 
Join Date: Jun 2007
Location: Marylebone, London
Posts: 11
Default

Thanks, this helped me out a lot too!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 00:41.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles