Simple Question
Hi,
I am a long time user of IntelliJ and wanted to learn PHP. So I jumped at the chance to get WebStorm.
System: MAC OSX
Using MAMP - PHP and Apache
How do I automatically upload changed files from from Webstorm project directory to my local file system Apache document root. I clicked the automatically transfer files to server checkbox to on. But when I try to run, the File Transfer window displays: Cannot transfer file to Apache server. If I manually copy the php file from the project directory to the document root I can run it from Run button in Safari.
I want to use the local file system to move files from a project folder to the Apache document root folder.
In DREAMWEAVER there is a clear distinction between source files (Projects) and Server and using the local file system as the mode of transport. Just not making the connection with the WebStorm Configurations IDE.
Please sign in to leave a comment.
Hi Jim. Open PhpStorm Settings and follow arrows on the screenshot:
Hello Jim,
If I understand you right, you have Apache installed locally, but Project folder is located outside Apache web root, so that you have to copy the files before you can retrieve the pages from the server.
In this case you need to add server with 'Mounted folder' access type (File | Settings | Deployment). Typically, this type of server is used when you have web server set up remotely and mount it's filesystem to some local folder, but PhpStorm does not care if 'Mounted folder' you specify is real mount, or is just plain local folder.
Then you have to set up mappings ('Mappings' tab): simply saying, the association between your project root, it's location on server, and web path (tail of the URL) to it.
In case project is located under Apache web root, so files are picked up right from place, you need to add 'Local' server and specify just a web path, as Dmitriy kindly illustrated above.
Regards,
Kirill
Hello,
And Thank You Dmitriy and Kirill! Yes I have Apache, PHPStorm and MySQL all installed on a single MacBook Air. Just wanted to create a simple development environment to experiment with. I was thrown off by the Remote Mount option. I assumed that meant an Apache Web Server on another networked machine. I assumed local meant 'LOCAL' to the system you are on. I changed the setting to Remote Mount Folder and was running in no time! Thanks. I am a long time Java WebServer programmer and Intellij user. So I was very comfortable with the interface. A couple of humble observations.
1) I do not typically place my my project files in the target directories for the output. In Java I have a directory for Java projects to store and then deploy them to either a webserver or a Execute directory for standalone JAVA projects. I do not want Inellij artifact files like .ipr and .ipw being deployed to the server. I took this approach with Storm right away. I do notice there does not seem to be any artifact files in the Storm project directories? I was able to create new folders in the project and add PHP code to them and Storm correctly created the file and folder in the Apache document root. Is there a way to instruct the Deploy function to omit certain file types when it deploys?
2) Does Storm have its own PHP engine? Or does it depend on a PHP installation? I am still trying to figure out the whole execute/debug concept for Storm.
3) What is Xdebug? This question relatates to 2.
4) Could I just was well have used Intillij 9.0.3 to use this product as a addon? I saw on some screen shots debugging JavaScript in side Intellij which is something I have known about for sometime. I have used in the past the Mozzilia JavaScript Debugger and a product called TITO for IE. But they are browser based. Having a problem seeing how Storm fits into the developemnt cycle. Currently I use Dreamweaver (Windows Version) for HTML and JavaScript and Intellij for the Java Servlet side. I am just trying to see what PHP can do as well.
Using:
MAC OSX
MAMP 1.9
Storm 1.0.1 (Personel License)
Thanks for Your Help and your great Feedback!
Jim
Hello Jim,
Thank you for your feedback,
We will fix this confusion in the next version.
You can modify 'Exclude items by name' option at File | Settings | Deployment | Options pane. By default '.idea' pattern is there, so IDEA project folder will be ignored.
PhpStorm analyzes PHP syntax on it's own, but to execute PHP page it needs either PHP installation ('PHP console' run configuration), or web server with PHP installed.
PHP installation (File | Settings | PHP) can have a set of 'Include paths' - equivalent to Java classpath - these directories are checked by PHP interpreter when it resolves the included file (see details). So, when you specify your PHP home, PhpStorm will detect this setting and include these directories in the index, so that resolve and completion works for elements defined in these files. Still you can customize this set of paths yourself.
Xdebug is a PHP installation addon that allows to debug PHP execution. MAMP should probably have it included, but it might be disabled. Keep 'Validate Xdebug configuration before debug' checkbox selected @ your PHP run configuration page, and PhpStorm will try to check if Xdebug is installed and configured properly.
Actually, IDEA 9.0.3 contains all the features of PhpStorm, including deployment and PHP syntax checking, execution and debugging - you just have to enable corresponding plugins ('Remote Host Access', 'PHP'). JavaScript debugging in Firefox is also there: after IDE installs bundled Firefox plugin, you have all the debugging functionality right in the IDE. Anyway, you can use two products together, depending on your needs. The main difference is that PhpStorm can quickly start the project in any directory, but in IDEA you have to go though the wizard and specify module type, SDKs etc.
Regards,
Kirill