[PHP] change server unix-win
Hi I have a serious problem: The client want's to emigrate the webhosting from a unix server to a windows server. Now my biggest problem are the path's. Is there a way to fast convert all the /root-style directories into the windows standard \ ?? Thanks for your consideration, I have the strong feeling that this is much work coming. -- Patrick Fehr Swiss Federal Institute Of Technology -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] change server unix-win
On Wed, 2004-10-20 at 07:17, Patrick Fehr wrote: Hi I have a serious problem: The client want's to emigrate the webhosting from a unix server to a windows server. Now my biggest problem are the path's. Is there a way to fast convert all the /root-style directories into the windows standard \ ?? Thanks for your consideration, I have the strong feeling that this is much work coming. Conversion of / to \ is done for you by PHP. The only thing you might need to consider is the drive on which PHP is installed. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] change server unix-win
On Wed, 20 Oct 2004 13:17:08 +0200, Patrick Fehr [EMAIL PROTECTED] wrote: I have a serious problem: The client want's to emigrate the webhosting from a unix server to a windows server. Now my biggest problem are the path's. Is there a way to fast convert all the /root-style directories into the windows standard \ ?? Thanks for your consideration, I have the strong feeling that this is much work coming. A small sed script would easily handle this conversion. I doubt you have any of those on windows so I'd do the conversion before moving. for file in *.php; do cp $file $file.tmp sed -e s/\///g $file.tmp $file rm $file.tmp done Remember on windows you will be dealing with backslashes instead of forward slashes, and you have to escape the backslashes with backslashes. $path = '/usr/local/blah'; will be something like: $path = 'c:\\inetpub\\www'; -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] change server unix-win
Just a point: this will be a problem if they have some forward slashes that are not specifying file paths, i.e. URLs in the code like http://www.whereveryouwant.com/ will be substituted by http:\\www.whereveryouwant.com\ Greg Donald wrote: On Wed, 20 Oct 2004 13:17:08 +0200, Patrick Fehr [EMAIL PROTECTED] wrote: I have a serious problem: The client want's to emigrate the webhosting from a unix server to a windows server. Now my biggest problem are the path's. Is there a way to fast convert all the /root-style directories into the windows standard \ ?? Thanks for your consideration, I have the strong feeling that this is much work coming. A small sed script would easily handle this conversion. I doubt you have any of those on windows so I'd do the conversion before moving. for file in *.php; do cp $file $file.tmp sed -e s/\///g $file.tmp $file rm $file.tmp done Remember on windows you will be dealing with backslashes instead of forward slashes, and you have to escape the backslashes with backslashes. $path = '/usr/local/blah'; will be something like: $path = 'c:\\inetpub\\www'; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php