I have been using Eclipse Kepler along with PDT tools on local system to manage PHP projects and its turned out to be a better choice for me then the other editors around. Only problem I've found in this environment is that content assist is only available when you open a file residing in the workspace.
Now my problem, I am assigned to work on a PHP Project which is on another system on the local LAN network. Is there any way I can add that project folder to eclipse? so that I can directly edit and save the files on the remote system?
Things I can't look into for various reasons
Using a version control system
Copy source files to local system work
on them and then upload it (kinda have to add the remote files to the
local eclipse project).
Do any modifications on the target system for my convinence eg. Adding an FTP server.
Thanks
I managed to get what I want by creating what you call a Symbolic Link in c:\wamp\www (using WAMP) folder which is also my eclipse workspace, for the network shared project I wanted to import into Eclipse. To do this open an elevated command prompt and run this command
mklink /d projectname \\network_shared_folder
/d option creates a directory symbolic link. Now, the network project will be available as a local project on the web root which can be easily imported into Eclipse (or any other IDE)
Hope this comes in handy for someone who stumbles upon this problem. Now I can get content assist for any file in the project.
Thanks.
In the project explorer if not exist create a new project then:
1) right-click the project and select New > Folder
2) Specify a name for the folder
3) click on Advanced
4) Check Link to alternate location (Linked Folder)
5) Enter a file system path, or click Browse to select a folder in the file system.
6) Click Finish
Check here for more Creating Linked Resources on Eclipse
After hours of searching, I share the solution finally found: symbolic links are not usable if the project is managed via git.
Another solution is to use the fileSync plug-in (http://marketplace.eclipse.org/content/filesync) to automatically copy folders from the source project to user projects.
Related
I want to create a PHP project using existing source in Netbeans. But when I try to give path of my existing project inside Applications/XAMPP/htdocs/ProjectFolder, the Applications folder doesn't showing any subfolders. I have attached image of this.
As you can see there is no subfolder inside Applications folder. All other Folders for eg. Desktop, Documents showing its subfolders.
I am using netbeans version 8.0.2 and Mac OS 10.10.2
My Applications and XAMPP folders permission is as follows
I have tried with this solution but no help.
What I need to change the configuration to get the subfolders of Applications?
I was looking in wrong Applications folder where XAMPP is installed. But actually all apps are installing inside root's Application folder.
After going in root's folder Applications folder showing all inner subfolders.
Please check this out :
Importing Existing Local Source Files into a Project
In the Projects area, choose PHP Application with Existing Sources
and click Next. The New PHP Project > Name and Location panel opens.
In the Project Name text field, enter the name of the project.
In the Sources Folder field, specify the folder from where you want
to import the source files.
Note: If you are going to run the project on a local web server, do not forget to specify copying the source files to it.
From the Default Encoding dropdown list, choose the default encoding
for your project.
If you want to store NetBeans metadata in a different location than
your source files, select "Put NetBeans metadata into a separate
directory." For example, you might want to store your sources in
your document root but the NetBeans metadata in your
NetBeansProjects directory.
Click Next. The Run Configuration panel opens.
For detail information please read this.
how can i open my project/files in htdocs in netbeans IDE i tried looking for tutorial but there is none..i tried import but when i do it it does not have file to open or i tried open but i did not open as well..
I downloaded netbeans here i got the last one with many checks.
i also downloaded this but i cant import it as well.
any suggestions are accepted
GO to
File>New Project>PHP>PHP Application With Existing Sources.
The browse to htdocs and select your project folder.Optionally you can set the url for your application or you can just finish it there.
Did you follow this path when opening ?
Go to
File->New Project->Select a Category->Pick one from Projects.
Let's say PHP Application with Exciting Sources. Then select your project from the next window.
Hope this helps.
Cheers!
If you are wanting to work on a live site via FTP in NetBeans I would suggest using this NetBeans plugin:
Link:- http://plugins.netbeans.org/plugin/39197/ftpsitedeployer
If you are working with local files:
File>New Project> PHP/HTML5 > PHP/HTML Application With Existing Sources.
If you are working with a GIT type repo:
Create a proejct folder then initialize the repo and then pull from the repo you can also ADD/Commit/Push/Push via netbeans IDE toolbar.
I have been developing a PHP project solely in Dreamweaver. After determining that Netbeans will make my life easier, I installed Netbeans 7.2 for PHP.
I followed the project setup guide, yet I am having issues with the project folders. I can edit and save source files, but how do I update the files on the localhost?
Specifically, I have the project source files located on our work drive, which I can use as a regular hard drive. I even have a site file for this project in Dreamweaver, with the source folder, the local folder, and the remote folder profiles all set up and functioning well.
Do I need to change how I store the project files? My Netbeans project properties are as follows:
Sources
-Project Folder: D:\work\cms\current
-Sourec Folder: D:\work\cms\current
-Test Folder:
Run Configuration
-Configuration: <default>
-Run As: Local Web Site (running on local web server)
-Project URL: http://localhost/cms/current/
-Index File: index.php
And I see no other relevant settings, but if you ask about any I will update my question.
When I make a change, I save and select Run. The page loads as expected, but the changes are not there, the localhost copy did not get updated. How do I resolve this?
You could install an FTP server e.g filezilla server and in the project "run configuration" change to remote web server, then specify localhost and the ftp details.
Or create a script to copy over the project e.g .bat or .sh depending on OS.
Or change your project location to be inside the localhost web directory and just use it in there.
I had the same issue, I gave in and now have apache pointing to my project folders on my development machine.
In the past, with Eclipse and a PHP Server/system, I had it setup so that when I commited changes to the CVS repository, it also saved the actual php files on the server. I had this functionality on a another computer in the past (I can't check this computer). The files for the repository seemed to have been saved in a different folder. So the cvs is in a folder stucture like var/cvs and my system files/PHP files facing clients are in something like var/www/html/. How would one go about setting something like this up? I use sftp to change files right now with Filezilla. It was very convenient before being able to commit the changes and check the web to make sure that changes worked. Right now I have to commit the changes then save the file with ftp to see the changes. Would love to be able to get rid of the sftp with Filezilla step if at all possible...
It sounds to me that you are testing your latest changes on the live website, which is bad idea, because if you inadvertently edit some error in the files, your website may expose that to the public.
My current work-flow is as follows:
I use Netbeans on a local project, which is the SVN checkout too. On most projects I use the Netbeans option "Copy files from source folder to another location" to copy the edited files "on save" to the local test webserver directory. If the changes work on the local webserver, I'll commit them to the SVN repository and login to the live-webserver via SSH and checkout the latest revision from the SVN.
So in fact I have four copies of each file:
The working copy (a Netbeans project and SVN checkout)
/home/feeela/projects/xyz/ (editing here only)
The test-server copy; Netbeans stores a copy there on each save;
/var/www/vhosts/xyz/ (127.0.0.1/xyz/)
The SVN repository; I'll manually commit files to it after testing on the local webserver;
/var/svn/xyz/ (svn commit -m "my last change")
The SVN checkout on the live-server, which is the actual website;
/var/www/vhosts/xyz/ (svn update # xyz.com/)
I don't have a clue, how setup the "local copy" feature (which can also refer to some other machine) with Eclipse. If someone knows a way to reproduce the above workflow using Eclipse and not need to manually sync the files to the test-server, I#ll be glad to read it hereā¦
You could use a post-commit hook script on the CVS server to update (refresh) a working copy on var/www/html/. Every time you commit, the hook script would thus get the latest version of the files on the server and put them in var/www/html/.
Regularly develop projects in PHP using Dreamweaver but I would start using Eclipse.
I have my machine in a directory where they are armaezandos projects, but also a place where projects are published in apache.
In Dreamweaver in the project settings I map the local directory, setting to perform the sending of files to the apache automatically after you save them.
I wonder what the correct way to develop with Eclipse.
If I map the project directly in the apache directory (thus having only one copy of the project) or if the Eclipse has some configuration to achieve the same functionality I have in Dreamweaver.
Another problem is that when mapping the project directly in Eclipse are created folders and files .settings, .buildpath and .project.
Note: Keep copies of two projects (one local and one in apache) for the purpose of tests not send files, uploads, etc. in memoento that you publish the project, and sending only the project folder location.
I use Eclipse Helios.
I use Apatana based off of Eclipse, pretty much the same way when storing projects. However I map my virtual hosts files to my project folders. I also keep revision control through Subversion so if any hiccups occur they can immediately be fixed. Just map your Apache Virtual Hosts files to your project folders.