Re: PHP and mysql script error in webhosting

From: Date: Tue, 10 Aug 2004 03:56:30 +0000
Subject: Re: PHP and mysql script error in webhosting
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35649@lists.php.net to get a copy of this message
On Mon, 2004-08-09 at 20:45, Sukanto Kho wrote: > Hi all, > > My php files run well in my local PC > but some of PHP and mysql script just getting error when running in webhosting server. > > I found out that the problem is in the way webhosting server handling global variable. > for example : > In my local PC : $_GET['var'] is different with $var > but in webhosting server : $GET['var'] is the same with $var... I don't need > to declare $var=$_GET['var'] 'cause $var is the same with $_GET['var']... > > Anyone have such a problem before? > > Thanx > > By regard; > Flame Yes, you will need to turn off global variables. You can do this (if using Apache), add a file to your main web directory called, .htaccess. An example .htaccess entry: php_flag register_globals on. Then try.... then find another webhost as that's a lame/insecure setting to have set to On. ;-) -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | robby@planetargon.com * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/

« previous php.db (#35649) next »