Running on XP

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:  There might not be an installer for the latest version (5.4.0 at the time of updating this), so download the version you are comfortable with.  This tutorial uses the latest available installer (5.3.10).

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.  SOAP should be installed by default in my experience.

On my Windows 7 Machine, you’ll need to set the PATH variable to point to PHP in order for it to work from the command-line.  I won’t teach you how to do that here, but I found this video helpful:

Next, unpack the Zensync.tgz file, I use Winrar from here:, 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.

Edit: I just tried this under Windows 7 64-bit using the above instructions and it works great still.


This entry was posted in Uncategorized. Bookmark the permalink.

6 Responses to Running on XP

  1. Zenfolio user says:

    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.


    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\
    Stack trace:
    #0 G:\Photos6. Internet – photos put on the web\Zenfolio\
    #1 G:\Photos6. Internet – photos put on the web\Zenfolio\
    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

  2. Zenfolio user says:

    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.

  3. Zenfolio user says:

    I have located the bit of code in 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.


  4. admin says:

    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!

  5. Ian says:


    I am Trying to use this but it will not work i am just getting this.

    C:\zensync2>C:\php\php zensync.php
    ‘mv’ is not recognized as an internal or external command,
    operable program or batch file.
    ZenSync session started at Monday, 2 April 2012 15:11:20

    Logging into Zenfolio with username: eventsphototeam
    AuthToken: e9yfvo26Pi0yTqjqmyHoPS2VVriL0JbWPtfcwdWSFOsbWvSjCEUXU9b2P6i5Z0mtXFd8_

    Getting user’s existing Hierarchy
    Top Id: 1014581491
    Local directory: C:/Photos
    All Photographs: 1014581491 : MT Blackpool


    it will not upland any of my photo please help.

    many thanks

  6. admin says:

    You must be using an old version of the program – mv isn’t used anymore as far as I can tell. It’s commented out and now uses the native Rename command from PHP. I just installed 5.3.10 on my Windows 7 Dev machine and it worked great. See random photos:

    Are your photos in c:/Photos? In my config.php, the localpath is:
    “localpath” => “C:\Users\Dan\Pictures”,

    Try using a fresh copy of Zensync, edit the config.php file so that it is pointing to your photos and let me know how it goes!


Leave a Reply

Your email address will not be published. Required fields are marked *