Return to iWEBTOOL

Go Back   iWEBTOOL Talk > The Web and your Website > Programming > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
Welcome to iWEBTOOL Talk, where you talk about webmaster-related stuff.
 
Discuss topics which interest you.
With over thousands of threads (topics), we're sure you'll find something that'll interest you.
Ask for help whenever you need it.
We have thousands of members who are available to help you if you need it.
It's absolutely FREE!

 1  Register           2  Browse the board           3  Discuss whatever may interest you!
 


Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 07-28-2006, 10:05 PM   #1
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Angry Now I'm Ticked:... Advice Please!

Hi all,

I'm a "little" upset at PolurNet for turning OFF register_globals on my server without notice the other day.

I wandered onto one of my sites and noticed that it just kinda... broke... for no reason and no alteration.

Turns out they turned off register_globals, which is a PHP setting that defines how variables are interpreted. For example, $id is a very generic variable. But, if $id came from the URL as a GET variable (file.php?id=1) or from a form as a POST variable, it cannot be known to exist if register_globals is off.

Want to see what I'm talking about? Go to www.ilookup.info and do a search. I haven't touched that site in months. What comes up? It's BLANK. There's 0 results, because it doesn't know the variables exist.

My problem then: Do I have to go through the thousands and thousands of lines of code in my network of websites' code and replace $id with $_GET['id'] or $_POST['id']? That will take me WEEKS if not MONTHS to figure out and re-interpret.

Is there any easier solution?
-Matt
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
SEO Checklist
Get yourself better ranking with
our "Do-it-Yourself" SEO Checklist.
Click Here
Old 07-29-2006, 07:55 AM   #2
jumpenjuhosaphat
 Contributor 
 
jumpenjuhosaphat's Avatar
 
Join Date: Jun 2006
Location: Denver
Posts: 4,459
jumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud ofjumpenjuhosaphat has much to be proud of
Default Re: Now I'm Ticked:... Advice Please!

Yeah, contact your hosting company and request that they reset the globals. I wonder why they would turn them off in the first place? Maybe they were hacked?
__________________
Storage Sheds
Lost Forum
jumpenjuhosaphat is offline  
Old 07-29-2006, 09:23 AM   #3
rohan2kool
Member
 
rohan2kool's Avatar
 
Join Date: Dec 2005
Posts: 132
rohan2kool will become famous soon enough
Default Re: Now I'm Ticked:... Advice Please!

most probably they have set it off because of XSS vulnerabilities or maybe b'coz it's the worst programming practices ever known to me.

unfortunately, register_globals cannot be changed using ini_set() function. If you have apache serve, you can try putting this .htaccess file in your script to turn it on:

php_flag register_globals off

just save it as '.htaccess' in the folder where your files are located. Just might help.

OR

at the top of the script type this:

Code:
$id = $_GET['id'];

for each variable. Know that's pretty tedious.. but u got no real choice

And from the next time, use $_GET[] and $_POST[]
__________________
Eat healthy, Stay Fit, Die Anyway.
--==--
If there is a man who knows everything about women, there is a Windows distribution without bugs.
rohan2kool is offline  
Old 07-30-2006, 03:29 PM   #4
compuXP
Retired Member
 
compuXP's Avatar
 
Join Date: Dec 2005
Posts: 139
compuXP will become famous soon enough
Default Re: Now I'm Ticked:... Advice Please!

Quote:
Originally Posted by jumpenjuhosaphat
Yeah, contact your hosting company and request that they reset the globals. I wonder why they would turn them off in the first place? Maybe they were hacked?
No, they turned it off for security reasons...

Quote:
for each variable. Know that's pretty tedious.. but u got no real choice [IMG]../images/smilies2/wink.gif[/IMG]
Yeah, I know, which is what I'm scared about.

I actually just found a way to emulate register_globals... which I'll do, but from now on, I'll use $_GET and $_POST.
__________________
Retired Moderator/Member/Friend/Helper - it was great working with all of you!
compuXP is offline  
Old 07-30-2006, 04:06 PM   #5
kenni
Registered Member
 
kenni's Avatar
 
Join Date: Dec 2005
Posts: 1,543
kenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to beholdkenni is a splendid one to behold
Default Re: Now I'm Ticked:... Advice Please!

You should be using $_GET and $_POST from the start to get your habbits going. Alternatively, you can add that line (rohan2kool posted) to your .htaccess and it should be working
__________________
Wanna thank someone? Give 'em a rep. More info.

Last edited 07-30-2006 at 04:09 PM.
kenni is offline  
 
This is an Ad Revenue Sharing forum Place your advert here
Webmaster Tools Webmaster Tools Click Here
Closed Thread

(Threads which have no activity for more than 30 days are automatically closed.)



Quick Reply
Message:

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice about buying Spirit Domain Name 17 10-10-2006 06:12 AM
Advice and Review PLEASE ! mrveryrich Website Reviews 2 08-28-2006 07:24 PM
Need some advice autosurfnetwork Marketing and Promotion 3 05-08-2006 09:03 PM
need seo advice jenifer Search Engine Optimization (SEO) 2 04-21-2006 11:38 AM
Can Sum1 Plz Advice sadiqbaig Search Engine Optimization (SEO) 4 01-09-2006 07:34 AM


All times are GMT. The time now is 04:56 AM.


Powered by vBulletin v3.6.7 © 2008, Jelsoft Enterprises Ltd. SEO by vBSEO © 2006, Crawlability, Inc.