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.
Related
I've recently taken over a project from another developer, let's call it EBAY. I'm struggling to get their live site up and running on my local server for testing and debugging. They've built a web app using CodeIgniter. In their file manager on cPanel they've placed the ci folder at the root, not in the public_html folder.
I've copied their public_html files and their ci folder into my xampp's htdocs folder. The issue is that the site only loads when the ci folder is placed WITHIN the folder for EBAY. Oherwise when I load the localhost site it gives an error message that it cannot find the codeigniter folder inside EBAY folder.
How is this? How can the application run with the ci folder at the root on the live site, but when I have migrated it to the htdocs of xampp it is expecting the ci folder to be inside the EBAY folder?
This kind of configuration is quite common nowadays, and if you look at Linux or Pear you'll discover that PHP files sometimes are completely in other directories than the webserver.
The ideas behind this are pretty simple but effective:
Any files can't be reached from the network / internet.
So they can't be altered, downloaded or even just viewed.
PHP (or other) Libraries are clearly separated from individual code and can't be easily mixed up or accidentally be deleted.
Access rights are easier to control and perhaps even that differently than the files in the webfolder.
Ok, so far an explanation. Now about your issue with it:
You've currently a webfolder htdocs in Xampp and in general you can use a subfolder as the webfolder and in htdocs directly you place the project files that are not public. You've to adjust then where the domain is pointing (docroot and/or virtual hosts).
I have a "web site project". In my project I am using the php exec to use the ubuntu package PDFTK to manipulate pdf.
For example I have this line of code(php) in my model, I am using code igniter :
shell_exec('pdftk /var/www/html/IntegrSupCours/uploads/GKAG01_FR.pdf dump_data output /var/www/html/IntegrSupCours/uploads/bookmark.txt');
Indeed Im starting from /var/www to access to my pdf file, because I am on ubuntu.
But let's say that I am on a localhost ubuntu pc and I want to migrate my site on a online server what will happend if I am changing to that, because the url string in my shell exec to access at my pdf file will be different ?
First of all the remote online server that you are mentioning is a machine with some operating system like ubuntu installed on it.
Also, the path that you are specifying is a path that is generally used by most of the web servers.
It is all about where you are installing your application on the online server. If you install the application at the same location as it is in your local, you will be able to see the pdf file in the online server too.
I've been working with a WAMP setup on windows, while learning PHP and MySQL. Lately, I wanted to try to put some of my work online and signed up for Rackspace, and I've now set up a LAMP environment for my server with centOS 6.5.
When I worked off of my own WAMP environment, all files were inside wamp/www as the root directory.
Now, I understand that my root directory for my web environment will be /var/www/html.
To be clear, I am logged as root, so I'm not interested in changing permission. I'm simply interested in learning how to add files into this directory, which the existing posts on stackoverflow or rackspace does not seem to have an answer for.
I'm completely new to Linux and I'm using Putty to write to my linux server. Could someone please walk me through the process of putting files into and taking files out of /var/www/html?
Use pscp from the putty suite, to copy your files from your machine to the server via scp.
See http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html
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.
I have a virtual machine (VirtualBox) running latest ubuntu server as my personal/development web server.
My configuration is the following:
My web server (running Zend Server CE) is running on the virtual machine.
My files, are on my host machine (Win7) and all the virtula machine does is to serve the files from a shared folder.
So if I go to /home/ronaldo/htdocs/project_name I can see all my files for that project - the shared folder in this case is the main folder - htdocs.
I use VirtualHost - so every new project has an address such as project_name.local.
Every now and then, when I add new files to a project - say, using Dreamweaver, PHPDesigner or even Internet explorer, that file is not recognized on the server.
It was working fine.
I think my last major change was to upgrade the server to the latest some weeks ago I think.
Now, lets say I'm working on an Opencart ecommerce project and I am creating a new module, with controllers, views, etc. The new files are not recognized until I reboot my server.
When I try to list the files on my web-server using "ls" - the new files appear in red.
Why is that?
Anyone has a similar setup or can help me with a workaround not to have to reboot the server.
Unmount/Mount the shared folder : http://www.virtualbox.org/manual/ch04.html#sf_mount_manual
You may get more specific help at virtualbox forums.
Or if it is an option, you can create a windows share and use that from Linux.