CodeIgniter Forums

Full Version: Routing question and error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]god_module[/eluser]
I'm trying to route an URL like this
Quote:http://www.example.com/Tennis
to
Quote:http://www.example.com/search/filter/Tennis/AND/0/0

using the following routing rules:
Code:
$route['(:any)'] = 'search/filter/$1/AND/0/0';

This is not working. I get an error:
Quote:Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 47 bytes) in project\system\database\drivers\mysql\mysql_result.php on line 162

Does anyone have an idea?

Thanks,
Greg

El Forum

[eluser]pistolPete[/eluser]
This is not a routing related issue.

In your search controller you try to get a too big result set from the mysql server.
Either raise the memory limit in php.ini or limit the search results.

El Forum

[eluser]Dam1an[/eluser]
a) I doubt this eror is caused by the route...
b) Can you increse the memory limit, or do you nit have access to that
c) How much data are you expecting that tp return from the database?


Edit: Damn PistolPete, beat me to it Tongue

El Forum

[eluser]god_module[/eluser]
First of all, thank you both for the fast reply.

b) Yes, I could increase the memory limit, I have full access to everything.

But why is alternative 2 (http://www.example.com/search/filter/Tennis/AND/0/0) perfectly working while alternative 1 is not?

This URL obviously triggers a search. I'm getting data from a) my DB and b) a remote Web Service. In this case the search string "Tennis" returns 0 results from my DB and 49 results from the Web Service.