Current location: Hot Scripts Forums » Programming Languages » PHP » $_GET creating problem because of PHP version difference


$_GET creating problem because of PHP version difference

Reply
  #1 (permalink)  
Old 08-30-06, 02:21 AM
mohit's Avatar
mohit mohit is offline
Newbie Coder
 
Join Date: Jul 2006
Location: India
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
$_GET creating problem because of PHP version difference

Greeting,

i'm working on search script.
i 'm using this code
PHP Code:

if (!empty($_GET))

{
     
$q=$_GET['q'];
     
$offset =$_GET['offset'];
     
$uri=$_SERVER['PHP_SELF'];

this is working on my local server perfectly.
i have PHP 5 version.

but this is creating problem on my test server
actually it is working perfectly when i pass single word for search but when i pass multi words e.g. "Mohit mehta" then it gives
PHP Code:

CGI Error

The specified CGI application misbehaved by not returning a complete set of 
HTTP headers

on my test server there is PHP 4 version.

how can i solve it. I searched for this but din't get anything.

let me kno if you need more info.

mohit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-30-06, 02:48 AM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
If you are running PHP on an IIS web server using CGI, you must do the following -
Quote:
CGI users must set the cgi.force_redirect PHP directive to 0 inside php.ini.
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-30-06, 03:01 AM
mohit's Avatar
mohit mohit is offline
Newbie Coder
 
Join Date: Jul 2006
Location: India
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
hi mab

yes i'm working on IIS webserver

i can't access my test server only can upload this php file.

i mean i can't made changes in php.ini that is ftp site.

what else can we do.


mohit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-30-06, 03:03 AM
mohit's Avatar
mohit mohit is offline
Newbie Coder
 
Join Date: Jul 2006
Location: India
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
hi

$querystring= $_SERVER['QUERY_STRING'];

i added this nd this is working.

the only thing which is not working that is
$q=$_GET['q'];

i'm getting error just because of this.

mohit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 08-30-06, 03:14 AM
nova912's Avatar
nova912 nova912 is offline
Code Guru
 
Join Date: Sep 2004
Location: Traverse City, MI, USA
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by mohit
hi

$querystring= $_SERVER['QUERY_STRING'];

i added this nd this is working.

the only thing which is not working that is
$q=$_GET['q'];

i'm getting error just because of this.

mohit
long shot but try, $HTTP_GET_VARS['q'];
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 08-30-06, 03:26 AM
mohit's Avatar
mohit mohit is offline
Newbie Coder
 
Join Date: Jul 2006
Location: India
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
i have tried this one too and this is also not working..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Windows 2003 Problem - Help Please dwdviper PHP 1 04-19-06 02:39 PM
creating files in linux with php klaniak PHP 2 03-20-06 04:17 AM
.htaccess and PHP Redirect problem dodod PHP 3 06-19-05 11:56 PM
PHP email form problem jcwilde1 PHP 2 06-19-05 12:19 AM
php coding problem meggsontoast PHP 2 06-01-05 05:24 AM


All times are GMT -5. The time now is 10:35 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.