Page MenuHomePhabricator

ugly urls don't work (title & action parameters ignored) [IIS]
Closed, ResolvedPublic

Description

Author: df

Description:
Hello!

I have troubles with getting MediaWiki to work: The installation worked like a
charm, but using it is not possible, as ugly urls (with title and action as GET
parameters) are simply ignored. New URLS (index.php/Main_Page) are fine, but I
can't log in, as the login link
(/index.php?title=Special:Userlogin&returnto=Main_Page) simple goes to the Main
page. The problem seems to be that the title argument is not correctly read from
the URL (as is the action argument).

I use the following setup:

  • MediaWiki 1.4.1
  • PHP 4.3.11
  • IIS 6
  • MySQL 4.1.7-nt

Thanks for any pointers,
Daniel


Version: 1.4.x
Severity: major
OS: Windows Server 2003
Platform: PC

Details

Reference
bz1933

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:21 PM
bzimport set Reference to bz1933.
bzimport added a subscriber: Unknown Object (MLST).

Is PHP installed as FastCGI or an ISAPI module?

Can you provide phpinfo() output?

df wrote:

Sure! Here you are:

PHP Version 4.3.11

System Windows NT CompanySERVER 5.2 build 3790
Build Date Mar 30 2005 17:32:35
Server API ISAPI
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Programme\Services\php-4.3.11-Win32\php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety enabled
Registered PHP Streams php, http, ftp, compress.zlib

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

PHP Credits
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference On On
allow_url_fopen On On
always_populate_raw_post_data Off Off
arg_separator.input & &
arg_separator.output & &
asp_tags Off Off
auto_append_file no value no value
auto_prepend_file no value no value
browscap no value no value
default_charset no value no value
default_mimetype text/html text/html
define_syslog_variables Off Off
disable_classes no value no value
disable_functions no value no value
display_errors On On
display_startup_errors Off Off
doc_root no value no value
docref_ext no value no value
docref_root no value no value
enable_dl On On
error_append_string no value no value
error_log no value no value
error_prepend_string no value no value
error_reporting 2047 2047
expose_php On On
extension_dir ./ ./
file_uploads On On
gpc_order GPC GPC
highlight.bg #FFFFFF #FFFFFF
highlight.comment #FF8000 #FF8000
highlight.default #0000BB #0000BB
highlight.html #000000 #000000
highlight.keyword #007700 #007700
highlight.string #DD0000 #DD0000
html_errors On On
ignore_repeated_errors Off Off
ignore_repeated_source Off Off
ignore_user_abort Off Off
implicit_flush Off Off
include_path .;c:\php4\pear .;c:\php4\pear
log_errors Off Off
log_errors_max_len 1024 1024
magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off
max_execution_time 30 30
max_input_time 60 60
open_basedir no value no value
output_buffering no value no value
output_handler no value no value
post_max_size 8M 8M
precision 12 12
register_argc_argv On On
register_globals On On
report_memleaks On On
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
sendmail_from no value no value
sendmail_path no value no value
serialize_precision 100 100
short_open_tag On On
SMTP localhost localhost
smtp_port 25 25
sql.safe_mode Off Off
track_errors Off Off
unserialize_callback_func no value no value
upload_max_filesize 2M 2M
upload_tmp_dir no value no value
user_dir no value no value
variables_order EGPCS EGPCS
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
y2k_compliance On On

ISAPI
Server Variable Value
CONTENT_LENGTH 0
PATH_TRANSLATED C:\Inetpub\intranet\info.php
REMOTE_ADDR 192.168.105.86
REMOTE_HOST 192.168.105.86
REQUEST_METHOD GET
SERVER_NAME intranet
SERVER_PORT 80
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/6.0
APPL_MD_PATH /LM/W3SVC/599050834/Root
APPL_PHYSICAL_PATH C:\Inetpub\intranet\
INSTANCE_ID 599050834
INSTANCE_META_PATH /LM/W3SVC/599050834
URL /info.php
ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_KEEP_ALIVE:300
HTTP_ACCEPT:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING:gzip,deflate HTTP_ACCEPT_LANGUAGE:en-us,en;q=0.5
HTTP_COOKIE:last_loginid=dfa; last_domain=default HTTP_HOST:intranet
HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7)
Gecko/20050414 Firefox/1.0.3
HTTPS off
SCRIPT_NAME /info.php
SERVER_PORT_SECURE 0

bcmath
BCMath support enabled

calendar
Calendar support enabled

com
Directive Local Value Master Value
com.allow_dcom Off Off
com.autoregister_casesensitive On On
com.autoregister_typelib Off Off
com.autoregister_verbose Off Off
com.typelib_file no value no value

ctype
ctype functions enabled

ftp
FTP support enabled

mysql
MySQL Support enabled
Active Persistent Links 1
Active Links 1
Client API version 3.23.49

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off

odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32

Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited

overload
User-Space Object Overloading Support enabled

pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 4.5 01-December-2003

session
Session Support enabled
Registered save handlers files user

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 1440 1440
session.gc_probability 1 1
session.name PHPSESSID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path no value no value
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid Off Off

standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Internal Sendmail Support for Windows enabled

Directive Local Value Master Value
assert.active 1 1
assert.bail 0 0
assert.callback no value no value
assert.quiet_eval 0 0
assert.warning 1 1
auto_detect_line_endings 0 0
default_socket_timeout 60 60
safe_mode_allowed_env_vars PHP_ PHP_
safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags a=href,area=href,frame=src,input=src,form=,fieldset=
a=href,area=href,frame=src,input=src,form=,fieldset=
user_agent no value no value

tokenizer
Tokenizer Support enabled

wddx
WDDX Support enabled
WDDX Session Serializer enabled

xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.6

zlib
ZLib Support enabled
Compiled Version 1.1.4
Linked Version 1.1.4

Directive Local Value Master Value
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value

Additional Modules
Module Name

Environment
Variable Value
ALLUSERSPROFILE C:\Dokumente und Einstellungen\All Users
ClusterLog C:\WINDOWS\Cluster\cluster.log
CommonProgramFiles C:\Programme\Gemeinsame Dateien
COMPUTERNAME CompanySERVER
ComSpec C:\WINDOWS\system32\cmd.exe
NUMBER_OF_PROCESSORS 2
OS Windows_NT
Path C:\Programme\Windows Resource
Kits\Tools\;C:\Programme\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\Microsoft
SQL Server\80\Tools\Binn\;C:\Programme\Sonic\MyDVD;c:\programme\services\mysql\bin
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE x86
PROCESSOR_IDENTIFIER x86 Family 15 Model 2 Stepping 9, GenuineIntel
PROCESSOR_LEVEL 15
PROCESSOR_REVISION 0209
ProgramFiles C:\Programme
SBSProgramDir C:\Programme\Microsoft Windows Small Business Server
SystemDrive C:
SystemRoot C:\WINDOWS
TEMP C:\WINDOWS\TEMP
TMP C:\WINDOWS\TEMP
USERPROFILE C:\Dokumente und Einstellungen\NetworkService
windir C:\WINDOWS
winsbprogramdir C:\Programme\Windows for Small Business Server

PHP Variables
Variable Value
PHP_SELF /info.php
_REQUEST["last_loginid"] user
_REQUEST["last_domain"] default
_COOKIE["last_loginid"] user
_COOKIE["last_domain"] default
_SERVER["ALL_HTTP"] HTTP_CONNECTION:keep-alive HTTP_KEEP_ALIVE:300
HTTP_ACCEPT:text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_ACCEPT_CHARSET:ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING:gzip,deflate HTTP_ACCEPT_LANGUAGE:en-us,en;q=0.5
HTTP_COOKIE:last_loginid=user; last_domain=default HTTP_HOST:intranet
HTTP_USER_AGENT:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7)
Gecko/20050414 Firefox/1.0.3
_SERVER["HTTPS"] off
_SERVER["SCRIPT_NAME"] /info.php
_SERVER["HTTP_COOKIE"] last_loginid=user; last_domain=default
_SERVER["AUTH_PASSWORD"] no value
_SERVER["AUTH_TYPE"] no value
_SERVER["AUTH_USER"] no value
_SERVER["CONTENT_LENGTH"] 0
_SERVER["CONTENT_TYPE"] no value
_SERVER["PATH_TRANSLATED"] C:\\Inetpub\\intranet
_SERVER["QUERY_STRING"] no value
_SERVER["REMOTE_ADDR"] 192.168.xxx.xx
_SERVER["REMOTE_HOST"] 192.168.xxx.xx
_SERVER["REMOTE_USER"] no value
_SERVER["REQUEST_METHOD"] GET
_SERVER["SERVER_NAME"] intranet
_SERVER["SERVER_PORT"] 80
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["SERVER_SOFTWARE"] Microsoft-IIS/6.0
_SERVER["APPL_MD_PATH"] /LM/W3SVC/599050834/Root
_SERVER["APPL_PHYSICAL_PATH"] C:\\Inetpub\\intranet\\
_SERVER["INSTANCE_ID"] 599050834
_SERVER["INSTANCE_META_PATH"] /LM/W3SVC/599050834
_SERVER["LOGON_USER"] no value
_SERVER["REQUEST_URI"] /info.php
_SERVER["URL"] /info.php
_SERVER["SCRIPT_FILENAME"] C:\\Inetpub\\intranet\\info.php
_SERVER["ORIG_PATH_INFO"] /info.php
_SERVER["PATH_INFO"] no value
_SERVER["ORIG_PATH_TRANSLATED"] C:\\Inetpub\\intranet\\info.php
_SERVER["DOCUMENT_ROOT"] C:\\Inetpub\\intranet
_SERVER["PHP_SELF"] /info.php
_SERVER["HTTP_CONNECTION"] keep-alive
_SERVER["HTTP_KEEP_ALIVE"] 300
_SERVER["HTTP_ACCEPT"]
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
_SERVER["HTTP_ACCEPT_CHARSET"] ISO-8859-1,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_ACCEPT_ENCODING"] gzip,deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us,en;q=0.5
_SERVER["HTTP_HOST"] intranet
_SERVER["HTTP_USER_AGENT"] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.7) Gecko/20050414 Firefox/1.0.3
_SERVER["argv"]

Array
(
)

_SERVER["argc"] 0
_ENV["ALLUSERSPROFILE"] C:\\Dokumente und Einstellungen\\All Users
_ENV["ClusterLog"] C:\\WINDOWS\\Cluster\\cluster.log
_ENV["CommonProgramFiles"] C:\\Programme\\Gemeinsame Dateien
_ENV["COMPUTERNAME"] SECSERVER01
_ENV["ComSpec"] C:\\WINDOWS\\system32\\cmd.exe
_ENV["NUMBER_OF_PROCESSORS"] 2
_ENV["OS"] Windows_NT
_ENV["Path"] C:\\Programme\\Windows Resource
Kits\\Tools\\;C:\\Programme\\Perl\\bin\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;c:\\programme\\services\\mysql\\bin
_ENV["PATHEXT"] .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
_ENV["PROCESSOR_ARCHITECTURE"] x86
_ENV["PROCESSOR_IDENTIFIER"] x86 Family 15 Model 2 Stepping 9, GenuineIntel
_ENV["PROCESSOR_LEVEL"] 15
_ENV["PROCESSOR_REVISION"] 0209
_ENV["ProgramFiles"] C:\\Programme
_ENV["SBSProgramDir"] C:\\Programme\\Microsoft Windows Small Business Server
_ENV["SystemDrive"] C:
_ENV["SystemRoot"] C:\\WINDOWS
_ENV["TEMP"] C:\\WINDOWS\\TEMP
_ENV["TMP"] C:\\WINDOWS\\TEMP
_ENV["USERPROFILE"] C:\\Dokumente und Einstellungen\\NetworkService
_ENV["windir"] C:\\WINDOWS
_ENV["winsbprogramdir"] C:\\Programme\\Windows for Small Business Server

PHP License

This program is free software; you can redistribute it and/or modify it under
the terms of the PHP License as published by the PHP Group and included in the
distribution in the file: LICENSE

This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any questions about
PHP licensing, please contact license@php.net.

df wrote:

Sorry, I forgot to answer your second question: It's installed as ISAPI. At
first I used PHP5. I thought the problem might be connected with PHP5, so I
downgraded to PHP4. It did not work though. The problem is still the same.

greetings,
daniel

Can you run this test script and paste the output?
<?php var_dump( $_SERVER['PATH_INFO'] ); ?>

And if I'm making the right guess, try changing this bit of includes/WebRequest.php...

		if( isset( $_SERVER['PATH_INFO'] ) && $wgUsePathInfo ) {

to:

		if( isset( $_SERVER['PATH_INFO'] ) && ($_SERVER['PATH_INFO'] != '') && $wgUsePathInfo ) {

df wrote:

Wow! You made the right guess :) Everything works perfectly now.

Here's the output anyway: string(0) ""

Thanks a lot for the FAST help!!

I'm not sure if I should close this bug, as somebody might want to change that
line in the distribution, so I'll leave it open for now. Feel free to close the
bug if this is the normal procedure.

Kind greetings,
Daniel

Woo-hoo!

Fix checked into CVS HEAD and REL1_4. Will appear in 1.4.2 release.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:24 AM