Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php script not working after upgrade
Old 10-27-2008, 06:43 PM php script not working after upgrade
Junior Talker

Posts: 2
Trades: 0
Today we upgraded php from 4.4.7 to 5.2.5

First thing i notice it's i have some scripts that i link like:

http://mysite.com/script.php?action=show

and it would show lets say the users in a database, inside the script it would be like:

Quote:

<?php
if ($action == "show") {
mysql_connect("localhost", " etc etc etc
die;
}
echo "hello world";
?>

But now the script just go directly to hello world when called like:
http://mysite.com/script.php?action=show

please help so i could update them.

thanks.
chakytori is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-27-2008, 07:27 PM Re: php script not working after upgrade
Experienced Talker

Posts: 41
Name: Jabis Sevon
Location: Tampere, Finland
Trades: 0
register_globals is set to off in your php.ini, as well as it should, for XSS attacks... instead of
if($action = "show") use
PHP Code:
 if(isset($_GET['action']) && $_GET['action'] == "show") { ... your db-stuff ... } 
read the docs and the migration info on www.php.net to get your scripts to work with minimal extra work.
jabis is offline
Reply With Quote
View Public Profile Visit jabis's homepage!
 
Reply     « Reply to php script not working after upgrade
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27986 seconds with 12 queries