I currently have SVN down pat in Zend Studio. However, I can't figure out how to upload the changed files?

Dani AI

Generated

Short answer: Zend Studio is uploading whatever folder you opened as the project root, so your SVN working-copy root (which contains trunk) ends up creating a trunk/ level on the server. The clean fix is to make the IDE’s project root match the folder you actually want deployed (or adjust the Automatic Upload / Remote Connection settings so the local project maps to the remote document root). See Zend’s docs for how Initial Directory / Project Directory are used by Automatic Upload. Automatic Upload Properties. (help.zend.com)

Recommended (clean) workflow: recreate or add the project so its local root is the trunk folder (File → New → PHP Project → create from existing source and point the Location to your local trunk). Then enable Automatic Upload and pick a Remote Connection whose Initial Directory points at the server folder that should receive the project (your httpdocs), and set the Project Directory appropriately. That aligns local paths to remote paths and avoids a stray trunk/ level. Zend’s project/remote-project wizard and Project Directory setting explain this behaviour. Creating a New PHP Project from a Remote Server. (help.zend.com)

If you prefer not to re-create the project: keep the current project, then open Project → Properties → Automatic Upload and use Manage to edit the Remote Connection’s Initial Directory / Project Directory so the server path you select maps to where you want files placed. Entering / as the Project Directory when creating a remote project makes Zend Studio treat folders relative to the Initial Directory, which can help you match the remote httpdocs location without adding another level. Working with Remote Connection Profiles. (help.zend.com)

Troubleshooting notes and caveats: check the Console view and use Test Connection after changing the Remote Connection. If you enable “On Save” uploads, remember deletions locally will remove remote files automatically — use Manual mode while you tweak mappings. If you need a quick server-side workaround, ’s symlink approach works, but it’s less clean than aligning project roots or the Project Directory/Initial Directory pairing in Zend Studio. Uploading Folders/Files to a Remote Server. (help.zend.com)

OK, I was able to right click on the project in Project Explorer and click Properties. Then under Automatic Upload I was able to select my remote connection. However, the problem is that I can't figure out how to map the local project to its place in the remote connection.

My local SVN project:
/branches/
/trunk/
/...

It's uploading it to httpdocs/trunk/foo.html instead of httpdocs/foo.html. How can I get it to map /trunk/ to the remote root?

Workaround: I created a symlink on the server redirecting /trunk to /httpdocs and then I FTP'ed in one level above httpdocs. Would still like to know a better way to do it though :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.