View Issue Details

IDProjectCategoryView StatusLast Update
0001951OXID eShop (all versions)6. ------ Setup -------public2010-07-01 10:04
Reportertabsl Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
Product Version4.3.2 revision 27884 
Summary0001951: mod_rewite check
Descriptionsometimes the mod_rewrite checkt @setup or @admin is false (red).

issue: it is either a htacess password protection or the webserver configuration

solution: $iModStat = ( strpos( $sOut, 'mod_rewrite_on' ) !== false || strpos( $sOut, 'mod_rewrite_on' ) !== 0 ) ? 2 : 0;
Additional InformationThis function may return Boolean FALSE, but may then return a non Boolean value, which evaluates to FALSE such as 0 or "'. Please read the section on Booleans for more information.

http://www.php.net/manual/en/function.strpos.php
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

alfonsas_cirtautas

2010-07-01 09:37

reporter   ~0003239

Last edited: 2010-07-01 09:42

There is a problem in your solution.

if:
strpos( $sOut, 'mod_rewrite_on' ) === false

check will be
$iModStat = ( false !== false || false !== 0 ) ? 2 : 0;

and result will be
$iModStat = 2


PHP documentation warns you just about using type safe checks, which is done correctly in current implementation.

alfonsas_cirtautas

2010-07-01 10:04

reporter   ~0003241

System requirements check tries to fetch (using fsock open on port 80)
http://[yourhost]/oxseo.php?mod_rewrite_module_is=off

---------------------------------------
POST http://[yourhost]/oxseo.php?mod_rewrite_module_is=off HTTP/1.1
Host: oxid
User-Agent: oxid setup
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Connection: close




and expect's it to return :
mod_rewrite_on

---------------------------------------
HTTP/1.1 200 OK
Date: Thu, 01 Jul 2010 07:48:57 GMT
Server: Apache/2.2.14 (Ubuntu)
X-Powered-By: PHP/5.3.2-1ubuntu4.2
Vary: Accept-Encoding
Content-Length: 14
Connection: close
Content-Type: text/html

mod_rewrite_on


Try to fetch this URL (http://[yourhost]/oxseo.php?mod_rewrite_module_is=off) using wget of open in lynx and fix your server configuration.