1
RVirtue
OK with PHP CGI but not with ISAPI (Problem Solved!)
  • 2004/8/24 13:26

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


Problem: XOOPS is OK with PHP CGI/FAST CGI but not with PHP ISAPI

Xoops version 2.0.7.1

Test platforms: "Genuine Intel" PCs (P4s with 1 GB RAM)

OS versions:
Windows XP Pro Edition with IIS5
Windows Server 2003 Standard Edition with IIS6

MySQL version 4.0.20d with phpMyAdmin 2.5.7-pl1

PHP version 4.3.8 with "php.ini-recommended" modified as follows:
memory_limit 32M
error_reporting 
E_ALL & ~E_NOTICE
error_log 
syslog
include_path 
".;(my sub-directory)"
extension_dir "(my sub-directory)"
cgi.force_redirect (required for IIS)
fastcgi.impersonate 1; (recommended for IIS)
upload_tmp_dir "(my sub-directory with server write access)"
upload_max_filesize 16M
extension 
php_gd2.dll
SMTP 
= (my SMTP servername)
sendmail_from = (my email addy)
browscap "(my inetsrv browscap.ini file)"

For evaluation purposes, I am currently running XOOPS along with PostNuke v0.750 and Xaraya v0.9.9 (each with its own MySQL database, of course) on test platforms under two OS/IIS systems as noted above. When using the CGI version of PHP, all three CMSs work perfectly on both platforms. However, when I switch to PHP's ASAPI mode, XOOPS produces errors while the other CMSs continue to function without any problem.

Details of the XOOPS problem are as follows:- The main index.php and login user.php pages remain accessible. I am also able to log on to XOOPS and access the administration admin.php page. When I attempt to access any user module or admin function, however, only a blank page is produced. Setting Xoops' DEBUG option, shows only the following PHP "notice-level" error: Notice [PHP]: Undefined offset: 2 in file F:\VIRtech\XOOPS\include\common.php line 253. A possible "clue", but not much real help there.

Having tried a bit of "searching and fiddling" on my own, I'm hoping that someone else with longer XOOPS experience may be able to offer some more pertinent ideas for a solution. Otherwise, I'm about ready to give it up. Suggestions will be gratefully received.

Regards to all,
Richard

P.S.: I should have mentioned that the IIS server is always restarted between CGI and ISAPI tests. And yes, I have tried the latter both with and without the DLL installed as an ISAPI "filter" for the IIS web service.

2
ackbarr
Re: OK with PHP CGI but not with ISAPI

for debugging purposes, add to /include/common.php
echo($xoopsRequestUri);

after:
if (file_exists('./xoops_version.php')) {


This will output a value above your XOOPS site. Please respond with the outputted values for the IIS configurations that fail.

3
RVirtue
Re: OK with PHP CGI but not with ISAPI
  • 2004/8/24 15:12

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


Thank you. Done as asked. Unfortunately, I don't think the results are going to help us very much.

When XOOPS is running with PHP in CGI mode ALL modules work corectly. In that case, with your suggested addition to common.php, accessing the news module shows the following: /xoops/modules/news/index.php?

When XOOPS is running with PHP in ASAPI mode, however, attempting to access ANY module produces NO output at all except a blank page. The contents of the page are as follows:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<
HTML><HEAD>
<
META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<
BODY></BODY></HTML>
And the addition to common.php shows nothing extra.

I would tentatively conclude that the error, whatever it may be, is occurring before the process uses that inclusion in common.php. But I must admit that I'm completely baffled by this, especially since the other two beta versions CMSs seem unaffected.

4
ackbarr
Re: OK with PHP CGI but not with ISAPI

is php debug mode still on? If not, turn it on and try to access the site.

5
RVirtue
Re: OK with PHP CGI but not with ISAPI
  • 2004/8/24 15:27

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


With debug mode on (with or without the added line in common.php) it outputs only the following PHP "notice-level" error: Notice [PHP]: Undefined offset: 2 in file F:\VIRtech\XOOPS\include\common.php line 253.

Is it possible that XOOPS is halting on PHP notice-level errors even though PHP itself has been configured to ignore them? Obviously, I'm "reaching" for this one.

BTW, I appreciate very much your taking the time to respond. I'll work with you as long as you think it's worth it, but don't "bust a gut" over one baffled tester.

6
chnwalkman
Re: OK with PHP CGI but not with ISAPI
  • 2004/8/25 3:14

  • chnwalkman

  • Just popping in

  • Posts: 35

  • Since: 2004/8/25


Quote:

RVirtue wrote:
With debug mode on (with or without the added line in common.php) it outputs only the following PHP "notice-level" error: Notice [PHP]: Undefined offset: 2 in file F:\VIRtech\XOOPS\include\common.php line 253.

Is it possible that XOOPS is halting on PHP notice-level errors even though PHP itself has been configured to ignore them? Obviously, I'm "reaching" for this one.

BTW, I appreciate very much your taking the time to respond. I'll work with you as long as you think it's worth it, but don't "bust a gut" over one baffled tester.


Yes, I had a same question, too
Notice [PHP]: Undefined offset2 in file ...XOOPSincludecommon.php line 253.


OS versions:
Windows 2000 Server with IIS
MySQL version 4.0.16
PHP version 4.3.7
Xoops version: 2.0.7 to 2.0.7.1

so I searched some others posts, and now it's ok.

add to /include/common.php
$xoopsRequestUri = ($xoopsRequestUri)?$xoopsRequestUri:xoops_getenv('REQUEST_URI');
    
$xoopsRequestUri = ($xoopsRequestUri)?$xoopsRequestUri:(($rq xoops_getenv('SCRIPT_NAME')) ? $rq:getenv('REQUEST_URI'));

after:
$xoopsRequestUri $_SERVER'REQUEST_URI' ];        // Deprecated (use the corrected $_SERVER variable now)
    /**#@-*/


that's all. what do you think about this?
Sorry for my english.

Regards,

7
RVirtue
Re: OK with PHP CGI but not with ISAPI
  • 2004/8/25 12:17

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


Ackbarr may have his own thoughts about it, but I think you've located the problem exactly. I don't know where you found it. (I read every post with Xoops+ISAPI that I could find here and via Google.) Wherever it was hiding, that suggested fix works.

One place I didn't look for answers was throughout the XOOPS code itself, but I now see that the programmers have obviously located and commented that $xoopsrequesturi line themselves. For some reason, in the latest XOOPS version, however, their "Host abstraction layer" doesn't quite work with ISAPI. Trying to keep up with Microsoft's quirkiness is never an easy task.

THANK YOU for your help. (Your English seems perfectly OK to me, BTW.) Now I can continue my side-by-side testing on a more even playing field.

Regards,
Richard

8
VincentLGVL
Re: OK with PHP CGI but not with ISAPI
  • 2004/10/23 15:40

  • VincentLGVL

  • Just popping in

  • Posts: 1

  • Since: 2004/10/23


Followed the instructions posted by chnwalkman and it solved my blank page problem too.

My notice message didn't involve line 253 but 267!

Thanks a lot!

Running:
- W2KServer SP4
- IIS 5.0
- PHP 4.3.9
- MySQL 4.0.21

Login

Who's Online

205 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 205


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits