Using UNIX paths on a Windows box

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Using UNIX paths on a Windows box

Postby nutkenz » 14. December 2006 17:58

DocumentRoot is 'D:\Webs'

A PHP script requires the bootstrap.php file to be included.

This does not work: require '/Zoek.net/cake/bootstrap.php';
This works fine: require 'D:\Webs\Zoek.net\cake\bootstrap.php';

The problem is that all paths are - and should remain - like '/Zoek.net/cake/bootstrap.php' because the production server is a Linux box. I want to be able to test it on my Windows box without having to change all paths though. Does anyone have a suggestion on how to accomplish this?

The error produced by require '/Zoek.net/cake/bootstrap.php':

Code: Select all
Warning: require(/Zoek.net/cake/bootstrap.php) [function.require]: failed to open stream: No such file or directory in D:\Webs\Zoek.net\public_html\test\index.php on line 81


When I try to enter this include path as a regular URL (http://localhost/Zoek.net/cake/bootstrap.php), the page loads, so it's certain that the path is correct...
nutkenz
 
Posts: 12
Joined: 14. December 2006 11:45

Postby Wiedmann » 14. December 2006 19:00

This does not work: require '/Zoek.net/cake/bootstrap.php';
This works fine: require 'D:\Webs\Zoek.net\cake\bootstrap.php';

The problem is that all paths are - and should remain - like '/Zoek.net/cake/bootstrap.php'

Then you must move your files from "D:\Webs\Zoek.net\" to "D:\Zoek.net\"
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby nutkenz » 14. December 2006 19:11

But then they won't even be available for apache because DocumentRoot is 'D:\Webs'... :?
nutkenz
 
Posts: 12
Joined: 14. December 2006 11:45


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 106 guests