UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Web Hosting and Domains > PHP Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15-02-2007, 21:23
Member
 
Join Date: Jan 2007
Posts: 32
Default Variables

Anyone find their variables not working either as part of URL or in form POSTs?
Ever since my move here no variables ever get to the file.
I cannot even echo variables passed as part of URL.
__________________
MJM Magic
Reply With Quote
  #2 (permalink)  
Old 15-02-2007, 21:37
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,294
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Please open a ticket and let me know the ticket ID. I will have one of our senior system admins to look into it.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #3 (permalink)  
Old 16-02-2007, 09:07
Member
 
Join Date: Jan 2007
Location: Northamptonshire
Posts: 37
Default PHP Version is the problem

Hi,
I came unstuck on this one. There are security features in newer versions of PHP, and there is a big change to register globals, ie. variables from forms, etc. It is documented here:

http:// uk.php.net/register_globals

The main thing I found for my program is that every variable that came back from a POST style submit had to be prefaced like this $_POST['variableName'].

I found it easiest to do this kind of thing - Say you had a variable from a form called $name, rather than replace it all the way through, just put:

$name = $_POST['name'];

and then it will work for the scope of the function.

Vickie
Reply With Quote
  #4 (permalink)  
Old 16-02-2007, 12:42
Member
 
Join Date: Nov 2006
Location: Northampton
Posts: 42
Default

Could this be what has started killing my mambo website then?

I keep getting "Template File Not Found! Looking for template" error from a website that worked fine 24 hours ago. Apparently it could be related to the register_globals setting.
Reply With Quote
  #5 (permalink)  
Old 16-02-2007, 14:57
Premium Member
 
Join Date: Sep 2006
Posts: 80
Default

If I were you I would start coding as if register_globals was switched off anyway!

PHP6 is heavily under development and as of PHP5 it comes switched off by default. If I recall rightly they have removed the ability to enable it completly.

While I will admit its nice but its a potential securrity nightmare especially if like me you tend to randomly open new varibles for holding tempory stuff (lazy I know )

Its only takes a lazy stement such as

if (x==1) {
// do something bad
}

and then someone to come along and put x=1 into their browser. Not only does it help with security but its no harder using $_POST or $_GET. if you MUST use it for conveniance for example not knowing where your stuff will be coming from then you can write your own function to pull data out.
Reply With Quote
  #6 (permalink)  
Old 16-02-2007, 15:00
Member
 
Join Date: Nov 2006
Location: Northampton
Posts: 42
Default

Yeah the problem that I have is that it's not my code, it's a mambo website which consists of 00's of files. I'm not much of a php code. Give me Assembler and Cobol any day.
Reply With Quote
  #7 (permalink)  
Old 16-02-2007, 15:56
Member
 
Join Date: Jan 2007
Location: Northamptonshire
Posts: 37
Default

Quote:
Originally Posted by Zammo View Post
Could this be what has started killing my mambo website then?

I keep getting "Template File Not Found! Looking for template" error from a website that worked fine 24 hours ago. Apparently it could be related to the register_globals setting.
Absolutely no idea. I was only talking about forms, and stuff I wrote myself. You should ask support from Eukhost.

Quote:
Originally Posted by unplugged View Post
I were you I would start coding as if register_globals was switched off anyway!
It wasn't a matter of that. I did my PHP coding when it was version 4.0 and the security stuff wasn't around. The $_POST variable didn't exist. I haven't coded anything new or major in PHP since then. It has taken a few years to break like this. I agree that register globals off is a good idea. I just didn't notice that the practice had changed.

Maybe Zammo needs a more up to date version of Mambo. Or to do a Google search on "Mambo register globals off".
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:29.

 

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles