I am currently installing a subversion protocol within a business, some of the users develop in Windows on local Wamp servers, and others use local Lamp servers. The main site runs on a linux server.
The issue I have is setting up the include paths within the php.ini file. As some of the files change this setting on the fly, this is becoming a pain.
The windows machines require a semicolon (;) delimiter in the include paths, and the linux machines require a colon (:).
Is there any way to change the configuration of the windows machines to use a colon as the include path delimiters?
All is possible, but the solution could be more painful than the problem in this case.
The path separator is hardcoded inside PHP binary executable. The most viable option would be to download PHP source code for Windows from here: (Important: download exactly the same version that your LAMP system uses).
http://windows.php.net/download/
Once downloaded and unzipped, open the file:
/Zend/zend.h
Look around line 41 the dynamic precompiler directives:
#ifdef ZEND_WIN32
# include "zend_config.w32.h"
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(NETWARE)
# include <zend_config.h>
# define ZEND_PATHS_SEPARATOR ';'
#elif defined(__riscos__)
# include <zend_config.h>
# define ZEND_PATHS_SEPARATOR ';'
#else
# include <zend_config.h>
# define ZEND_PATHS_SEPARATOR ':'
#endif
There you can change the windows separator.
Now compile PHP pack. It's possible with Visual Studio, following these steps:
https://wiki.php.net/internals/windows/stepbystepbuild
In theory you will be able to run PHP over WAMP with same separator character than in Linux machines.
But there is another question... do this configuration gives any problem? You will have to find the answer by yourself.
ALTERNATIVE:
If you don't want to change the precompiler directive affecting the whole system, you can try to make it "dirty" and change only "main/php_ini.c" on line 413 (aprox).
static const char paths_separator[] = { ZEND_PATHS_SEPARATOR, 0 };
Change constant name by ';' character, and compile like is described above.