IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Why Does Output From Php Have \'s In It?, I see \'s in SQL and HTMP output from PHP how do I remove it?
Martyn
post Jun 14 2006, 06:34 PM
Post #1


WSF Commander
*******

Group: Admin
Posts: 4,662
Joined: 26-August 05
Member No.: 10



SYMPTOMS

I see \'s in SQL and HTMP output from PHP and it causes the SQL to error and the HTML to display incorrectly.

CAUSE

Your host has turned on "magic quotes". This is a feature of little value and only causes confusion. Consequently most hosting companies do not switch this feature on.

SOLUTION

There are three solutions:

1. Turn it off by adding the following to your .htaccess file:

CODE
php_flag magic_quotes_gpc off


2. Ask your host to switch it off in the PHP.ini file.

3. If your host blocks the use of .htaccess files (very few do) and will not change the PHP.ini so that magic quotes are NOT used then the only option is to switch hosting companies.
Go to the top of the page
 
+Quote Post
Rich
post May 12 2007, 11:45 PM
Post #2


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



Hi Martyn,
Thanks for your help. Now I have tried the .htaccess file once more with "php_flag magic_quotes_gpc off" added to the .htaccess file with no luck, I just get an internal server error plus a 500 error....
The \\\\\' have been in the files since I started day one but the disappearance of the ISB and the missing submit button happened quickly after I was playing around withe block editor and also I had a bit of a play around with the virtual page thingy. the ISB worked fine on both public and members pages before I played around with it.

I have installed the traffic exchange in another folder just to see if it works and it seems to , the only thing that doesn


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
BobMateer
post May 13 2007, 01:50 PM
Post #3


WSF Professional
*****

Group: PM Unlimited
Posts: 927
Joined: 4-May 07
From: Phoenix, AZ
Member No.: 1,089
Exchanges:




Richard,

I have the same problem. I found a workaround that you can use. If you have phpMyAdmin on your site you can edit the block directly in the database.
After activating phpMyAdmin find the table vtp_blocks. You can edit out the \\\ directly from this table. Just delete them and then make sure the radio button marked Save is checked, and click the Go button. This will return your ISB block to the original.


--------------------
Bob Mateer

If I've helped you in any way

Go to the top of the page
 
+Quote Post
Rich
post May 13 2007, 02:06 PM
Post #4


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



G\\\'Day sunwest,
Thanks for the info I thought it must have been in the database, I'm about to give it a try.
will let you know how I go.

Richard
P.S. the \\\ in G'Day are just a joke...hehe


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
Rich
post May 13 2007, 09:58 PM
Post #5


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



Thanks sunwest,
worked a treat and now the members are a happy bunch they can see all their stats.
Just have to sort out the emailer now.

Cheers
Rich


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
alkaline
post May 13 2007, 10:06 PM
Post #6


WSF Regular
*

Group: PM Unlimited
Posts: 99
Joined: 4-October 06
From: CyberSpace
Member No.: 642
Exchanges: www.247TrafficPro.com





I have some of them in my site, I have changed hosting but have a few of those signs left. Some of them are making the "Report Site" feature in the members area not to work. Where in the database can I find this button? If thats where it is located ;-).. That way I can manually remove the signs.


--------------------
Janid Inayat
www.247TrafficPro.com

- 100% is donated to the Nurish the Children program
Go to the top of the page
 
+Quote Post
Rich
post May 14 2007, 01:29 AM
Post #7


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



G'day alkaline,
That file is found in the same place and was very easy to fix just remove the \\\ in the small file and save(remove them from all the files) use sunwest's instructions.

QUOTE
I have the same problem. I found a workaround that you can use. If you have phpMyAdmin on your site you can edit the block directly in the database.
After activating phpMyAdmin find the table vtp_blocks. You can edit out the \\\ directly from this table. Just delete them and then make sure the radio button marked Save is checked, and click the Go button. This will return your ISB block to the original.


Rich


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
Ken Athas
post Jul 26 2007, 06:38 PM
Post #8


WSF Superstar
****

Group: PM Unlimited
Posts: 401
Joined: 2-November 06
Member No.: 737



I am having the\\\\ issue in my emails.

Should magic quotes be on or off in the BCP?


--------------------
Go to the top of the page
 
+Quote Post
Rich
post Jul 26 2007, 08:23 PM
Post #9


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



QUOTE (Ken Athas @ Jul 27 2007, 02:38 AM) *
I am having the\\\\ issue in my emails.

Should magic quotes be on or off in the BCP?

Hi Ken, once you fix up the database and if you server won't turn off the magic quotes(chances they won't) I have found a few small work arrounds to overcome the \\\\\ problem.
1. use ` instead of ' (that's the one just left of the number one key) works a treat.
2. remove all ' and " from any html you write (very easy just use the replace function in your html editor) what I do is replace the" just with a space and bingo it all works fine.

Hope this helps

Rich


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
Ken Athas
post Jul 26 2007, 08:34 PM
Post #10


WSF Superstar
****

Group: PM Unlimited
Posts: 401
Joined: 2-November 06
Member No.: 737



QUOTE (Rich @ Jul 26 2007, 02:23 PM) *
Hi Ken, once you fix up the database and if you server won't turn off the magic quotes(chances they won't) I have found a few small work arrounds to overcome the \\\\\ problem.
1. use ` instead of ' (that's the one just left of the number one key) works a treat.
2. remove all ' and " from any html you write (very easy just use the replace function in your html editor) what I do is replace the" just with a space and bingo it all works fine.

Hope this helps

Rich



Hey Rich,

I'll give it a go. I tried changing the magic quote setting in BCP, that didn't do anything.

It's amazing how many times we use that little guy, isn't it?

LOL

Thanks!!


--------------------
Go to the top of the page
 
+Quote Post
Rich
post Jul 26 2007, 08:51 PM
Post #11


WSF Junkie
**

Group: Members
Posts: 104
Joined: 2-May 07
From: Australia
Member No.: 1,087



QUOTE (Ken Athas @ Jul 27 2007, 04:34 AM) *
Hey Rich,

I'll give it a go. I tried changing the magic quote setting in BCP, that didn't do anything.

It's amazing how many times we use that little guy, isn't it?

LOL

Thanks!!


Hi Ken, Oh I forgot to tell you that I tried that on/off setting in the BCP and it made no differance either.
so from then on I`ve been using the little ` and if you need to do quote marks us two of them ``GREAT STUFF`` wouldn`t you say...lol

Rich


--------------------
Rich & Jeanne

OurTrafficPlace.com
Open for Business

Go to the top of the page
 
+Quote Post
Ken Athas
post Jul 27 2007, 02:47 AM
Post #12


WSF Superstar
****

Group: PM Unlimited
Posts: 401
Joined: 2-November 06
Member No.: 737



Rich,

I do agree....

The .htaccess thing did it for me...

Now Ill try the other site.... here goes nothing...


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 9th November 2024 - 04:49 AM