Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Setup project with scripts located out of the web treeInstall PEAR library>
Last updated: Sat, 13 Jul 2013

HOWTO: Setup project properties in PhpED?

PhpED helps you manage your files with workspaces and projects. Typically project is the set of files associated with one website. Workspace may contain one or multiple projects. You may want to have multiple projects in one Workspace if they have something in common, e.g. share code, customer etc. Some good hints about projects in PhpED:

  • As we said, project is your website. PhpED's project's files structure is very simple and similar to that of the web. Just like Apache's web root is defined by htdoc directory, PhpED's project is defined by its own root directory as well. Select File->New Project menu item and new Project dialog appears. Second from the top is Project Root Directory. Just like web recognizes files under htdoc, PhpED project will recognize all subfolders and files residing under Root Directory as belonging to the project and will display them in Project tree on the Workspace Tab. Should you add another file to any folder or subfolder under root directory or remove existing file - the Project will update itself automatically.
  • Each project with all its files "lives" on a local disk (or sometimes on a shared network disk). It makes sense because opening, editing and saving are very common and frequently used operations. By placing all the project files on the local disk(s) phped saves your time.
  • In case if you need your project to be published on a remote development or live sever you have to setup an FTP, WEBDAV, SFTP or Samba/Windows Share account and select this account in the project publishing account setting. You will have to set top publishing directory there too. Suppose, your project root is c:\myproject1 and web tree starts in /var/www/html/, and FTP server shows this tree as ftp://yourserver/www/html/. In this case you should
    • create an FTP account with yourserver hostname
    • select this account in publishing account setting
    • set /www/html/ as top publishing directory.
    BTW, alternatively you could set top publishing to / and set /www/html as root in the account settings. With these settings your project or its directory or single file can be published by just one click. See popup menu "Upload" or Publishing->Smart Upload in the Workspace, or Project->Upload Project in the main menu.
  • Sometimes projects are big enough. In this case it may make sense to skip files that are already synchronized. Unfortunately, phped has no ability to automarically compare file contents before publishing. and this would hardly make sense as it does not know how to interpret the changes. But PhpED can compare file size and datetime stamp. This feature is available as "Smart Upload". You may publish your project by selecting Publishing->Smart Upload. Sometimes, remote servers are located in different timezones and keep datetime stamps for all files screwed up or down by some hours. In this case you have to specify this difference in Time Offset property for your publishing account.
  • If you need to download files that are modified (potentially by somebody else), you can run Publishing->Smart Download. In this case PhpED will replace local files that have either different size or older datetime stamp. Finally, there is two-way syncronization is available with Publishing->Smart Sync choise. In this case PhpED scan both local machine and server and show list with suggestions what it thinks is the best to get your server and local machine properly synchronized. There are options to change options and policy on what to do with remote files if their couterparts are missed on local disk and vice versa. There are three options for both policies: upload (download), delete and skip. Of course, there is Show Difference option, so you can inspect file content before overriding.

  • Publishing supports filters. If you have files in the project that should never be sent to the server, add their file masks to Do not publish files input on Project Properties->Publishing page Multiple choises should be delimited with semicolon, for example *.svn;*.passwords;*.csv. Similarly you can exclude directories by their relative path or name.
  • When you debug your files on a remote host, it's important to have Remote root directory properly set. If you work with local web server (such as Apache or IIS), it's easier work directly in the web tree. Just set both project root directory and remote root directory pointing to Apache htdocs directory (or Home directory in case of IIS).
  • With either local or remote web servers you need to set project Root URL. It's very simple. In case of local server this url should look like http://localhost/ and in case of remote server localhost should be replaced with your remote host name. You can add port number if you run server on a port other than 80 (443 in case of https) or change http to https if you run ssl enabled server.
  • If you want phped to hide some files in the project tree, just add corresponding masks to Hide files list. For example *.~*;*.bak;*.exe;*.dll
  • Whenever you work with Apache or IIS you have to set Run Mode to HTTP Mode (3rd party Web Server).
  • If you have one file or URL that you want to be run every time you click Run or Run in debugger (for example c:\myproject1\www\html\index.php or http://arbitrary/url/index.php) you can set this file in Default File or URL setting.



<Setup project with scripts located out of the web treeInstall PEAR library>
Last updated: Sat, 13 Jul 2013