URL / QUERY STRING Issue

View: New views
1 Messages — Rating Filter:   Alert me  

URL / QUERY STRING Issue

by ashish.sharma :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello ALL,

I am facing a very wierd problem. I have developed an application on ZF1.0 and just deployed on our local Linux server for testing. I have developed this application on my Machine running windows XP. Now the problem I am facing on Linux system is in paging. The application is having search functionality, and I am displaying 10 records per page. Now when I perfoem a search it shows the result very nicely on the first page but if I click on page 2 or 3 or 4 etc... It just show "No Record Found" even if the records are there in the DB for the searched performed. On searching further I have noticed that the parameters which are going in the Query String are causing this problem as the symbols like (?, =, &) are getting encoded as (%3F, %3D, %26) BUT this is only coming on LINUX system and NOT on Windows as the application is running fine on windows.

Here are the sample URLs  ..

=================================

Page 1 (running fine on LINUX & Windows)

/search-results/?ctry_id=1&srch_type=local&st_id=10&cty_id=746&usr_bus_loc=on&wht=travel&whr=&searchType=searchBus

=================================

Page 2 (causing problem on LINUX)

/search-results/page/2%3Fctry_id%3D1%26srch_type%3Dlocal%26st_id%3D10%26cty_id%3D746%26usr_bus_loc%3Don%26wht%3Dtravel%26whr%3D%26searchType%3DsearchBus

=================================

Page 2 (running fine on WINDOWS)

/search-results/page/2?ctry_id=1&srch_type=local&st_id=10&cty_id=746&usr_bus_loc=on&wht=travel&whr=&searchType=searchBus

=================================

******************************************

Here is the code which I have written to create page links ...

******************************************

if ($_SERVER['QUERY_STRING'] != '') {
   $url = $this->_view->url(array('page' => $page . '?' . $_SERVER['QUERY_STRING']));
} else {
   $url = $this->_view->url(array('page' => $page));
}

The above code is a part inside FOR LOOP where $page is containing the page number.


Can anyone help me in this?

Thanks in advance!
Ashish Sharma