August 31st, 2000, 01:35 PM
Is there a way to do this in my php script, or is this something the server folks have to do?
August 31st, 2000, 05:13 PM
My hosting company wasn't much help.
The problem I had was that certain chracters entered on a form were killinig my script.
I solved this by using:
$data = addslashes($data);
prior to adding it to the database, and:
$data = stripslashes($data);
after pulling the data out, before printing it to the screen.
August 31st, 2000, 08:18 PM
I'm curious about this too. I set up phpMyAdmin and I got an error because magic quotes weren't set. When I contacted the host provider, they said that you should be able to set this up in the script so it's not their problem. How do you mess with those types of variables in a php script (specially magic quotes)?
August 31st, 2000, 08:23 PM
The way I understand it, magic quotes are specified in the php.ini file. Some servers(hosting co's) use them, some don't. My hosting company does not make changes to thier php.ini file based on one clients request, and I gather that is how all of them operate.
If your server doesn't have them enabled, you can do the same thing (manually) with the examples above.
Feel free to correct as needed.
August 31st, 2000, 11:48 PM
If you look at http://www.php.net/manual/configuration.php, it seems that PHP configuration directives can be specified on a per-directory level using Apache's .htaccess files (Assuming PHP is configured as an Apache module). I haven't played with this yet, but it should be quite easy, assuming you are using Apache.