If you’re running a fresh install of XAMPP/WAMP (PHP 5.3 or more) and CodeIgniter then you are already probably running into problems such as deprecation errors and then a URI issue here’s some help:
First, here’s how to solve the issue regarding these errors:
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\ci\system\codeigniter\Common.php on line 130
Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\ci\system\codeigniter\Common.php on line 136
In index.php in your Project folder replace line
error_reporting(E_ALL);
with this:
error_reporting(E_ALL & ~E_DEPRECATED);
Then, you’ll probably get an error about a bad URI if you try to run any controlls. It should say something like this:
The URI you submitted has disallowed characters.
Here’s the solution for that as well. In URI.php which is located in Project Folder\system\libraries\Uri.php
replace line 189 from:
if ( ! preg_match("|^[".preg_quote($this->config->item('permitted_uri_chars'))."]+$|i", $str))
to :
if ( ! preg_match("|^[".str_replace('\\-', '-', preg_quote($this->config->item('permitted_uri_chars')))."]+$|i", $str))
Happy Coding!
Cheers!
#1 by Rathod Savaji on December 7, 2012 - 1:35 PM
thanks this code is very use full