0

I've a site that runs on my local machine. These rows are ok when I'm on OSX. While on windows generates errors:

set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../lib/propel/runtime/lib/' ); set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../lib/smarty/libs/' ); set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../classes/' ); set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../classes/ORM/' ); 

This is the error

Fatal error: require_once(): Failed opening required 'Propel.php' (include_path='.:C:/wamp/www/emporio-rossi/conf/:C:\wamp\www\emporio-rossi\wapp/../lib/propel/runtime/lib/:C:\wamp\www\emporio-rossi\wapp/../lib/smarty/libs/:C:\wamp\www\emporio-rossi\wapp/../classes/:C:\wamp\www\emporio-rossi\wapp/../classes/ORM/') in C:\wamp\www\emporio-rossi\wapp\conf.inc.php on line 33

Propel.php is located in the firs URI (set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../lib/propel/runtime/lib/' );)

1 Answer 1

2

Windows uses ; as a path separator whereas nix (including OSX) uses :.

The answer is to use the PATH_SEPARATOR constant:

set_include_path ( get_include_path () . PATH_SEPARATOR . dirname ( __FILE__ ) . '/../lib/propel/runtime/lib/' ); 

From the docs:

Making use of the PATH_SEPARATOR constant, it is possible to extend the include path regardless of the operating system.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.