I have recently installed Joomla 1.5.8 on a Windows Server. (My previous experience using Joomla was on CentOS LAMP.)
Windows 2003 Server Enterprise
Windows NT IIS01001 5.2 build 3790
I have run into a lot of trouble trying to install the Community Builder component (yes, I have posted on the CB forums without much luck) as well as a few other random components I tried to install for testing.
This is the kind of error I was getting:
Fatal error: JInstallerComponent::require_once() [function.require]: Failed opening required '\WINFS52\home\users\web\a3485\rh.domain\joomla\administrator\components\com_comprofiler\
install.comprofiler.php' (include_path='.;c:/php5/includes') in \\WINFS52\home\users\web\a3485\rh.domain\joomla\libraries\joomla\installer\adapters\component.php on line 268
Testing with manual php scripts, I determined that the path needs to have FORWARD SLASHES on this server rather than backslashes.
I was not sure how to go about solving this problem, so the first successful method I have tried involves editing two files:
libraries\joomla\installer\installer.php line 172
return (!empty($this->_paths[$name])) ? str_replace('\\','/',($this->_paths[$name])) : $default;
libraries\joomla\installer\adapaters\component.php line 268
This reverses all the slashes from backslash to forward slash and also adds a second leading slash to the path.
With these changes, I finally got Community Builder to install successfully, but I'm wondering how many other things might be broken or need edits to reverse slashes to function correctly.
Continuing to look into the problem, I learned about DIRECTORY_SEPARATOR and the DS constant. On this Windows machine, the value given by DIRECTORY_SEPARATOR (which seems to be '\' backslash) doesn't work for any of the Joomla paths. The Joomla component installer only seems to work with FORWARD SLASHES.
So, I'm looking for advice on how to force all the DS constants to FORWARD SLASHES or else somehow disable the OS detection, so Joomla uses only Linux paths and directory separators.
Can I just search for all instances of:
define( 'DS', DIRECTORY_SEPARATOR );
and replace with:
Is there a better way to this, such as a single file where I can set DS or force it to default to forward slash? Or is there a Windows Server or PHP setting I can change to return a DIRECTORY_SEPARATOR value of forward slash?
Or are there any other better solutions to get Joomla and component installs to run smoothly on this server?
Will these path changes possibly cause any other problems with other parts of the code?
Thank you for your help.
Some more information in my Joomlapolis Forums post