Welcome Guest, Not a member yet? Register   Sign In
fresh install gives errors when removing index.php
#1

(This post was last modified: 03-04-2015, 07:32 AM by geegee.)

i have latest 2.2 and i get these errors when setting:

PHP Code:
$config['index_page'] = ''



Code:
A PHP Error was encountered
Severity: Warning
Message: strpos(): Empty needle
Filename: core/URI.php
Line Number: 187

Code:
A PHP Error was encountered
Severity: Warning
Message: strpos(): Empty needle
Filename: core/URI.php
Line Number: 191

everything seems to work fine none the less but it seems very strange to me that no one is reporting this error.. i couldnt find it except for only a few links.

perhaps everyone just disables the error out like i did by adding a "@" in front of the strpos function:

PHP Code:
        $uri $_SERVER['REQUEST_URI'];
        if (@
strpos($uri$_SERVER['SCRIPT_NAME']) === 0)
        {
            
$uri substr($uristrlen($_SERVER['SCRIPT_NAME']));
        }
        elseif (@
strpos($uridirname($_SERVER['SCRIPT_NAME'])) === 0)
        {
            
$uri substr($uristrlen(dirname($_SERVER['SCRIPT_NAME'])));
        } 


perhaps the 2.2 version is really new and no one has run into to error because no one has upgraded yet?
Reply
#2

2.2 is really... old. Try version 3.0. Although I've used 2.x previously, I don't remember seeing such an error.
Reply
#3

2.2 was released less than a year ago, and 2.2.1 just 2 months ago. That said, I haven't seen this message under either version, and I've been running them almost since they were released. Of course, a lot of code which might be relevant to this issue is modified on my site.

Since the error messages point to $_SERVER['SCRIPT_NAME'] being empty (but set, since the script continued past line 181), it is probably an issue with your rewrite settings. Another possibility would be an empty route, but I wouldn't expect execution to get this far in that case.
Reply
#4

Post your .htaccess
Reply




Theme © iAndrew 2016 - Forum software by © MyBB