douhui5953 2015-03-05 20:43
浏览 442

在尝试从外部访问index.php时出现404错误

After extensive search, double checking install, reinstalling, troubleshooting, I don't know where to turn next.

Background:

  • I'm trying to get a wiki working using MediaWiki.
  • I have PHP Manager installed for IIS 7.
  • I have a MySQL server installed on the same machine.
  • PHP version is 5.6.5 and installed at C:\PHP.

The main issue: Locally I can view the index.php file, but not externally.

I get a generic page can't be displayed error if linking to the /w/ directory.

Depending on the browser I'll get two results when linking to w/index.php:

  1. page can't be displayed
  2. IIS 404.0 Error.

Depending on the browser I'll get two results linking to w/index.php?title=Main_Page;

  1. IIS 404.0 Error
  2. unformatted page content

The error:

Module: IIS Web Core
Notification: MapRequestHandler
Handler: StaticFile
Error Code: 0x80070002
Requested URL: http://localhost:80/w/index.php?title=Main_Page
Physical Path: C:\inetpub\wwwroot\w\index.php
Logon Method: Anonymous
Logon User: Anonymous

Troubleshooting done:

  • No errors shown by PHP Manager.
  • Switched PHP versions (no effect).
  • Externally tested other PHP forms running inside HTML (works fine).
  • Checked permissions on all folders (fine).
  • Edited Feature Permissions under Handler Mappings to allow executable (no change).
  • Changed PHP_via_FastCGI's access restriction to execute (no change).
  • Checked to make sure PHP Handling Mapping was set to *.php (it is).
  • Checked Default Document settings and index.php. Externally tested index.html in w/ (works both by direct link to file and link to folder).
  • Externally tried tested /w/index.html with PHP "Hello World" inside it (blank page).

What am I doing wrong? Everything works perfectly fine run locally on the server.

  • 写回答

1条回答 默认 最新

  • doushaiyu5065 2015-07-18 21:15
    关注

    As Christpher says, localhost is a wrong in an URL to be contacted from outside: if that's what you see, you forgot to set $wgServer correctly.

    评论

报告相同问题?

悬赏问题

  • ¥15 matlab实现基于主成分变换的图像融合。
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊