Opened 16 years ago

Closed 15 years ago

#454 closed defect (fixed)

MapGuide 2.0 - login.php Administrator Fails

Reported by: crispinatime Owned by: ronnielouie
Priority: high Milestone: 2.1
Component: Map Admin Version: 2.0.0
Severity: major Keywords:
Cc: External ID:

Description

MG 2.0 RC4 IIS .net Install on XP.

This is the first version that I cannot get the Web Admin interface to load. PHP is registered OK and the login page appears but then fails with HTTP 500:

res://ieframe.dll/http_500.htm#http://localhost/mapguide/mapadmin/login.php

The refresh button on MGStudio DataConnection pages also gives the an error and I assume it is related.

I have tried an uninstall of the Web Server Extensions, reboot and reinstall to no avail?!

Crispin

Change History (21)

comment:1 by tomfukushima, 16 years ago

Hi Crispin. Thanks for taking the time to report this. Can you give me answers to the following? 1 Is there any other version of PHP installed on the system, and details on this please? 2 Is there or was there ever another version of MGOS installed on the system, and details on this please? 3 What is the value of the system PATH on your machine?

That's all I have for now :)

BTW, I have not been able to reproduce this problem, and that is why I am looking for something that might cause it.

Thanks Tom

comment:2 by crispinatime, 16 years ago

... sorry for late reply (notifications were going into spam hole)

Crispin

1 Is there any other version of PHP installed on the system, and details on this please? NO.

2 Is there or was there ever another version of MGOS installed on the system, and details on this please?

Every other MG Since 1.0 and including att previous 3 RCs! All uninstalled prior to RC4 though.

3 What is the value of the system PATH on your machine?

PATH=C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE;C:\Program Files\ Microsoft Visual Studio .NET\VC7\BIN;C:\Program Files\Microsoft Visual Studio .N ET\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin \prerelease;C:\Program Files\Microsoft Visual Studio .NET\Common7\Tools\bin;C:\P rogram Files\Microsoft Visual Studio .NET\FrameworkSDK\bin;C:\WINDOWS\Microsoft. NET\Framework\v1.0.3705;G:\Program Files\Perl\bin;f:\oracle\product\10.2.0\clien t_1\bin;C:\orant\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\ Program Files\Common Files\Autodesk Shared\;C:\Program Files\ATI Technologies\AT I.ACE\;C:\orant\jdk\bin;F:\Program Files\QuickTime\QTSystem\;f:\Program Files\Sm art Projects\IsoBuster;C:\Program Files\MapGuideOpenSource2.0\WebServerExtension s\Php;

comment:3 by crispinatime, 16 years ago

Additional Info:

Uninstalled RC4, Reboted, Installed MGOS 2.0 and the same issue occurs. I suspect it is an XP related issue and will try on Win2003 sometime soon...

comment:4 by tomfukushima, 16 years ago

Hi Crispin, This is probably not an XP issue. Most of the developers use XP here and do not have problems with it. I was able to produce a problem for a while on Win2003 but it went away and I wasn't able to get it to show up again. Could you try moving the "C:\Program Files\!MapGuideOpenSource2.0\WebServerExtensions\Php" as the first entry in your path an see if that makes any differrence?

Also, if you have some firewalls or antivirus programs, please try disabling them to see if it makes any difference.

comment:5 by crispinatime, 16 years ago

Summary: RC4 login.php Administrator FailsMapGuide 2.0 - login.php Administrator Fails

Tom...,

Disabled AV, stopped service, started cmd prompt, reset path to have PHP priority and restarted service from the cmd interactivly to ensure it was in environ with the right path... same problem.

This week I also rebuilt an XP box from scratch, put SP3 RC2 and every patch on, office 2003 pathched and VS2008. Very clean development machine... same problem there too!

Is it related to:

http://www.nabble.com/MGOS-2.0.0-Beta-2-loadfile-error-to14373978s16610.html

where they get an error with:

LoadFile ../Php/MgHttpHandler.dll

?

Crispin

comment:6 by tomfukushima, 16 years ago

Owner: set to ronnielouie

comment:7 by tomfukushima, 16 years ago

Hi Crispin, is this on an English OS?

comment:8 by tomfukushima, 16 years ago

What is the URL that you are using to login and what is the version of IE that your are using?

comment:9 by crispinatime, 16 years ago

Updates:

OS Language XP SP2, English (UK, not US).

URL: http://127.0.0.1/mapguide/mapadmin/login.php

Browsers: IE 7.0.5730.13 (returns HTTP 500) Firefox 2.0.0.12 (return blank page)

comment:10 by crispinatime, 16 years ago

My IIS logs...

#Fields: time c-ip cs-method cs-uri-stem sc-status 17:06:05 127.0.0.1 GET /mapguide/mapadmin/login.php 200 17:06:05 127.0.0.1 GET /mapguide/mapadmin/css/resizablestyles.css 304 17:06:05 127.0.0.1 GET /mapguide/mapadmin/js/scripts.js 304 17:06:05 127.0.0.1 GET /mapguide/mapadmin/images/help.gif 304 17:06:13 127.0.0.1 POST /mapguide/mapadmin/login.php 500 17:06:18 127.0.0.1 GET /mapguide/mapadmin/login.php 200 17:06:18 127.0.0.1 GET /mapguide/mapadmin/css/resizablestyles.css 304 17:06:18 127.0.0.1 GET /mapguide/mapadmin/js/scripts.js 304 17:06:18 127.0.0.1 GET /mapguide/mapadmin/images/help.gif 304 17:06:20 127.0.0.1 POST /mapguide/mapadmin/login.php 500 17:08:04 127.0.0.1 GET /mapguide/mapadmin/servermanagement.php 500 17:08:15 127.0.0.1 GET /mapguide/mapadmin/servermanagement.php 500 17:08:15 127.0.0.1 GET /favicon.ico 404 17:08:25 127.0.0.1 GET /mapguide/mapadmin/login.php 200 17:08:25 127.0.0.1 GET /mapguide/mapadmin/css/resizablestyles.css 200 17:08:25 127.0.0.1 GET /mapguide/mapadmin/js/scripts.js 200 17:08:25 127.0.0.1 GET /mapguide/mapadmin/images/help.gif 200 17:08:35 127.0.0.1 POST /mapguide/mapadmin/login.php 500

comment:11 by ronnielouie, 16 years ago

Crispin,

Can you edit your php.ini file to enable the following, restart IIS, and try the admin page again to see if it will report anything? Thanks.

display_errors = On

display_startup_errors = On

comment:12 by crispinatime, 16 years ago

... that's defined the problem!

Fatal error: Call to undefined function MgInitializeWebTier() in C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\mapadmin\login.php on line 70

I googled a bit and found some vague references to the same issue and MapGuide. Perhaps you have no issues in dev because you all have a full PHP instaltion and configuration. I only install with IIS and the .net client (and PHP admin of course). If it helps I am sure this was from the ticket taking PHP to 5.2.5 after RC2.

comment:13 by ronnielouie, 16 years ago

Hmm... that's a typical error when PHP hasn't loaded the MapGuide API extension. Can you check your php.ini for

extension = php_MapGuideApi.dll

Also check that extension_dir = "C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\php\ext"

comment:14 by crispinatime, 16 years ago

Checked and paths etc verified OK.

If I create a phpinfo() page the "MapGuideApi" is not shown in the listings which it is on other servers with different versions of MapGuide... looks like the extension is not loading.

Not sure how this helps but first time I restart IIS and go to the login.php page I get a MessageBox with just "Error" in the title, no message and an "OK" button. Login page always looks loaded OK.

comment:15 by crispinatime, 16 years ago

Just to keep this open... with MG 2.0.0.2713 I get the same message below after editing my php.ini to turn errors on.

After an uninstall / reboot / install on XP SP2.

Fatal error: Call to undefined function MgInitializeWebTier() in C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\www\mapadmin\login.php on line 70

I can edit my serverconfig.ini by hand but still a defect on my hardware!

in reply to:  description comment:16 by cgountanis, 16 years ago

Priority: mediumhigh

I am running into the same issue on Windows 2003 server. I have seen issues before where changing the php save path fixes. In this case the MapGuideApi is not shown in a phpinfo() page which is strange. So ultimately the php admin will fail casue it can't use the mapguide api to login. What is the fix for this issue?

comment:17 by jbirch, 16 years ago

Can you confirm in phpinfo() that the path to the runtime php.ini is set to the correct value? I wonder if there's a stray php.ini getting in the way, or if the following registry key isn't set correctly (or maybe has the wrong permissions):

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2.5\IniFilePath

It should be set to something like:

C:\Program Files\MapGuideOpenSource2.0\WebServerExtensions\Php

Jason

comment:18 by jbirch, 16 years ago

Also, check to make sure that the PHPRC environmental variable isn't set to an alternate location; this value was checked AFTER the registry setting prior to PHP 5.2, so would not have been noticed in an earlier version.

http://www.php.net/manual/en/configuration.php

comment:19 by cgountanis, 16 years ago

Added registry entry type "String" to this location which contained the PHP.INI file: HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath

I also tweaked the windows path and made sure webext\php was first as well, maybe helped?

Everything works now as far as PHP seeing the MapGuideApi using PHPInfo(); which is a start. Maybe the current mapguide installer is not doing this? Not sure why this happens but I have seen it a lot. Only now do I know why. Thanks again Jason Birch!

Still consider this a bug in the installer or something.

comment:20 by crispinatime, 16 years ago

Hi,

This is OK with a manual workaround that should be in the 2.1 installer according to http://trac.osgeo.org/mapguide/ticket/657

  • Install MGOS 2.0.2
  • Build a copy of php_MapGuideApiEnvConfig.dll from SVN
  • Placing this new DLL in the PHP\ext folder
  • Add as an extension to PHP.ini
  • Restart IIS

For the first time in ages I have the admin interface back.

comment:21 by jng, 15 years ago

Resolution: fixed
Status: newclosed

Fixed by #657

Note: See TracTickets for help on using tickets.