Special Chars configuration (strip/add slashes)

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 32
Joined: Tue Feb 04, 2003 10:32 am
Location: UK

Thu Sep 18, 2003 9:11 am

I have a problem with an installation of PHP 4.1.2 in that stripslashes are not working correctly. This problem is sporadic and appears to follow no particular pattern.

I am using a competent bespoke CMS to display text on a site and slashes appear within that text where there are none in the MySQL database that it comes from. It's not a problem with a lack of the stripslashes function being present when the echo is performed. I can say this as the CMS has run many sites for over two years without problems. The problem began shortly after my hosting provider upgraded PHP on the server to v 4.1.2.

Also, text posted back to the database inherits slashes where it should not.

Testing on the most simple of platforms through creating a simple table and echoing the results of a query on the table onto the screen leads me to believe it is a configuration problem. On continual refreshes of the page the problem page either normally or abnormally at random intervals after each refresh.

Has anyone heard of this and know a cure?


A learned man is an idler who kills time by study.

George Bernard Shaw (1856-1950)

User avatar
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Mon Sep 22, 2003 5:41 am


I would reccomend a push to install the latest version which is 4.3.3

mainly because of security risks when using an outdated software. Your host should jump on the upgrade. If not I would look for another host.

User avatar
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Fri Sep 26, 2003 5:12 am

i'm agree with Redcircle about PHP version....
try to see in browser, what you have after stripslash, if all ok, see config of MySQL, if not PHP config file....
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";

Post Reply