There was a request for instructions on how to run Zensync on Windows, specifically XP. Someone has previously sent me info that it worked, and since I never tried it, I just assumed it did. And it does – it’s just not obvious if you’re not a PHP coder like I am. So, since my daughter is sick and I’m at home on this nice Sunday, I figured I’d give it a shot.
Here goes:
First, get the PHP executable from here: http://us2.php.net/get/php-5.2.5-win32-installer.msi/from/a/mirror
Install as normal. Since you probably aren’t running a webserver for this, select, “Do not set up a web server”. Next, hit the “+” on PHP->Extensions and scroll down to SOAP, and select, “Will be installed on local hard drive”. The installer should proceed like any other after this.
Next, unpack the Zensync.tgz file, I use Winrar from here: http://www.rarlab.com/, but Winzip would probably work, too.
Now, set up a photo directory in a manner that you are going to use Zensync. This is totally up to your taste. I just make a directory in the same location that Zensync.php is, and copy all my photos there. This really makes it easier on a Windows machine, since you don’t have to account for drive letters (C:, D:, etc..) when you configure Zensync.
Copy, copy, copy, organize, rename, move, shuffle, etc…
Now you need to edit things. You need to know your Zenfolio username (NOT e-mail!), and password. You also need to know the location of your photos. Right-click on “zensync.php” and select Open With…, and Choose Program. Select WordPad, otherwise the formatting will look terrible. Edit these 3 lines to reflect your account. The local directory name could be “photos”, if you want to make it really easy.
$userlogin = “username”;
$userpass = “password”;
$path = “local directory name”;
Finally, if you want the warnings to not show, go to Start->Programs->Php5->php.ini. Find this line: “error_reporting = E_ALL” and change it to “error_reporting = E_ALL & ~E_NOTICE | E_STRICT”. PHP is very strict on its error reporting, and this just relaxes it a bit.
Now, go to Start->Run, and type “cmd”. A terminal should open up. From here, navigate to your Zensync directory (“e:\”, and “cd zensync” if it happens to be at “e:\zensync”). Now, just type “php zensync.php” and it should run!
You could make it a one-click deal, too. Just right-click on Zensync.php, and “Open With…” and “Choose Program…”. Browse to “C:\program files\Php” and select “php.exe”. Check the “always use this program…” checkbox if you want to make this permanent.
That should be it – I created a test Zenfolio account just now, and it uploaded all my photos.
-Dan
Hi there
I attempted to use the zensync script but got an error message, which I’ve added below. I’ve never used Perl before so do not understand what the error message means and how to resolve it. I am hoping to use ZenSync as an easy way of publishing my photos online.
Regards
PHP Notice: Undefined variable: skip in G:\Photos6. Internet – photos put
on the web\Zenfolio\zensync.php on line 17
Logging into Zenfolio with username
…..login message section removed …….
Parsing Directory: /LOCAL/PATH
PHP Notice: Undefined variable: Skip in G:\Photos6. Internet – photos put
on the web\Zenfolio\zensync.php on line 45
PHP Fatal error: Uncaught exception ‘RuntimeException’ with message ‘DirectoryI
terator::__construct(/LOCAL/PATH): failed to open dir: No error’ in G:\Photo
s6. Internet – photos put on the web\Zenfolio\dirclass.inc:43
Stack trace:
#0 G:\Photos6. Internet – photos put on the web\Zenfolio\dirclass.inc(43):
DirectoryIterator->__construct(‘/LOCAL/PATH’)
#1 G:\Photos6. Internet – photos put on the web\Zenfolio\dirclass.inc(24):
DirObj->ScanDir(Object(SoapClient), ’6SvuFfyM-yp-lm9…’, Resource id #15, Obje
ct(stdClass), NULL, ‘The Image Depot’)
#2 G:\Photos6. Internet – photos put on the web\Zenfolio\zensync.php(45):
DirObj->Load(Object(SoapClient), ’6SvuFfyM-yp-lm9…’, 458039839, Object(stdClas
s), NULL, ‘/LOCAL/PATH’, ‘The Image Depot’, 458039839)
#3 {main}
thrown in G:\Photos6. Internet – photos put on the web\Zenfolio\dirclass
.inc on line 43
Hi there
I had resolved the issue by naming the path directly and it appears to be uploading the photos, although it is replacing all – with a ‘. I use – as : can’t be used when creating sub titles in a line.
It dose however keep going on about an undefined variable but not I’m sure how what that means.
PHP Notice: Undefined variable: skip in G:\Photos6. Internet – photos put
on the web\Zenfolio\zensync.php on line 17
…..removed login details section………
Parsing Directory: /Tim/Photos/06. Internet – photos put on the web/Zenfolio
PHP Notice: Undefined variable: Skip in G:\Photos6. Internet – photos put
on the web\Zenfolio\zensync.php on line 45
Then it moves on to the directories and keeps saying undefined variable.
I have located the bit of code in dirclass.inc which converts the – to a ‘.
It’s the line:
$trans = array(“_” => ” “, “___” => ” & “, “-” => “‘”, “.jpg” => “”, “.JPG” => “”, “.PCD” => “”, “.pcd” => “”);
just remove the part , “-” and in theory, still to test this out, it should work. In my case I also need it not to remove & either so I’ve taken that part out as well.
Regards
I’m glad you found a fix – the translation codes should really be a configuration thing, but I hard-coded it in for my use case. The syntax is pretty straight-forward – when it encounters a filename with the first part, it converts the text to the second part. Not really sure why the ` sign is causing problems. When I get a chance, I’ll look into it.
And it’s not taking OUT the & sign, it’s actually adding it in – although I could see a potential problem with this in that it might not be getting escaped properly while uploading to Zenfolio (using URL syntax, the & means another parameter is coming unless it’s escaped or in HEX)
Thanks for digging into this – sorry for the late reply!
-Dan