CodeIgniter Forums
Routing question and error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Routing question and error (/thread-21815.html)



Routing question and error - El Forum - 08-21-2009

[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


Routing question and error - El Forum - 08-21-2009

[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.


Routing question and error - El Forum - 08-21-2009

[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


Routing question and error - El Forum - 08-21-2009

[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.