1
ultimike
Issue with PHP 4.3.11 on Windows?
  • 2005/5/18 2:33

  • ultimike

  • Just popping in

  • Posts: 13

  • Since: 2004/4/21


Good evening,

I came across a problem with a "file_exists" call in /include/common.php and I was wondering if anyone else has run across it.

I developed the XOOPS site on my laptop - running PHP 4.3.2 on WinXP. Today I went to upload and configure the site on a web hosting provider. They use PHP 4.3.11-dev on Windows (not sure of which version).

While the code runs great on my laptop, I ran into a problem on the web hosting server. I tracked the problem down to line 226 of /include/header.php:

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


For some reason, even when I surfed to the main root (http://www.domainname.com/) of the web site, the file_exists function thought I was deeper in the site (http://www.domainname.com/modules/wfchannel/). The file_exists function would then return "true", and this would cause a fatal error in /header.php.

I've tried searching both these forums, the docs at PHP.net, as well as Google for someone else with this problem - to no avail. As far as I can tell, it seems like it is a bug with the getcwd() functionality of PHP, as I tried debugging it with this function and found that it wasn't working correctly either.

I figured out a work-around - I changed the file_exists code to this:

if (stristr($xoopsRequestUri'module')) {


The only caveat to this change is that I'm assuming that the module will have a xoops_version.php file. So far, it looks like it is working.

Does anyone have any idea of what is going on with this? Does anyone know if the "fix" I implemented will cause problems down the road?

Thanks in advance,
-mike

Login

Who's Online

354 user(s) are online (320 user(s) are browsing Support Forums)


Members: 1


Guests: 353


heyula,

more...

Donat-O-Meter

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

Latest GitHub Commits