Ticket #843 (closed defect: invalid)

Opened 14 months ago

Last modified 7 months ago

Slashes in the output with PG.

Reported by: vaibhav Owned by:
Priority: must Milestone: 2.1.1
Component: Database adapter Version: 2.1.0 Stable
Keywords: PostgreSQL Cc:

Description

I am using PG with my app and when dealing with the varchar fields, I am getting the escaped strings as the output. This patch removes the behavior imedeately. However I think a little more inspection is required for the problem.

Attachments

PG_Remove_slashes_in_the_output.patch Download (0.8 KB) - added by vaibhav 14 months ago.
Removes the escaped quotes and makes them appear normal.

Change History

Changed 14 months ago by vaibhav

Removes the escaped quotes and makes them appear normal.

Changed 13 months ago by vakopian

I haven't used PG, but are you sure the slashes are not added because you have the magic_quotes_gpc setting on?

Changed 13 months ago by olegabr

I use stripslashes in the same place too for PG.

  • magic_quotes_gpc is Off for me

Changed 13 months ago by vaibhav

I switched off magic_quotes_gpc and it is no longer needed. How about we use that within a if (get_magic_quotes_gpc()) ? I actually figured that out, forgot to update this thread.

Changed 12 months ago by vakopian

Guys we now have 2 conflicting reports here: according to olegabr setting magic_quotes_gpc off does not change the bad behaviour, while according to vaibhav it fixes it. Could you please double check and provide a definitive conclusion?

vaibhav, I don't think doing the if (get_magic_quotes_gpc()) check is a good idea, since it would be doing that at pretty low level function, which is called in tight loops (every string column of every record). It would be too costly.

Changed 12 months ago by vaibhav

Indeed yes, my site is not too complicated but with some pages with a lot of text based stuff (it has a discussion forum) - the thing became slow! Luckily for me it was working. I think we should ask Olegabr for a little more details. For me, it is:

QCubed 2.1 (HEAD)
PHP 5.3.6
PG: 8.4 Server

Changed 7 months ago by vakopian

  • status changed from new to closed
  • resolution set to invalid
Note: See TracTickets for help on using tickets.