Nodral Posted November 28, 2012 Share Posted November 28, 2012 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 live files change this setting on the fly, this is becoming a pain. The windows machines require a semi colon 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? Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/ Share on other sites More sharing options...
Christian F. Posted November 28, 2012 Share Posted November 28, 2012 Use the PHP constant PATH_SEPARATOR, as it'll contain either a semicolon or a colon depending upon the OS the script is running on. Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395897 Share on other sites More sharing options...
Nodral Posted November 28, 2012 Author Share Posted November 28, 2012 Can this be referenced in the php.ini as I really don't want to be adding loads of if statements to my files Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395910 Share on other sites More sharing options...
Christian F. Posted November 28, 2012 Share Posted November 28, 2012 No, you cannot use PATH_SEPARATOR inside PHP ini, as it is a PHP (parser) constant. However, how are you making those "live changed"? That's where you'll need to use the constant, assuming you're using PHP to do those changes. Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395911 Share on other sites More sharing options...
Nodral Posted November 28, 2012 Author Share Posted November 28, 2012 I have approx 50 sites set up on the server, and each uses one of 3 common config files. Therefore we dyamically change the include path to point at the relevant config file. This is fine for the Linux developer guys, as they can just recreate the file structure on their machines, however I have an issue with the Windows guys as when they copy the files, their include paths break, and I really don't fancy going through everything and changing the include path settings to an 'if' statement. I'd rather just change the php settings on 3 machines if possible. If there's a way to do this, I'd be much appreciative. If not within the php.ini, whether I can do some sort of dynamic redirect solely on the Windows machines (like a symbolic link on linux) without amending the site files. Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395914 Share on other sites More sharing options...
Christian F. Posted November 28, 2012 Share Posted November 28, 2012 Windows (NTFS, rather) also supports symbolic links. Just search for mklink, or whatever the appropriate command is for your Windows version. Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395919 Share on other sites More sharing options...
Nodral Posted November 28, 2012 Author Share Posted November 28, 2012 so how would I use mklink to go from C:\Users\******\Documents\NetBeansProjects\tier3\tier3shared:/home/tier3shared to C:\Users\******\Documents\NetBeansProjects\tier3\tier3shared , as the colon is not a valid character within a file path Link to comment https://forums.phpfreaks.com/topic/271295-php-ini-configuration/#findComment-1395920 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.