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).
Related
I'm trying to copy an existing Symfony project to another directory, so I can test changes before applying them to the live version.
I get a 404 error whenever I try to access the project on the copy via app.php or app_dev.php, and I can't pin down why. The live project is in a folder called representation/mvcrep and the copy is in a folder called representation_dev/mvcrep, and they are both on the same hierarchy in the directory tree.
I've already successfully cleared the cache for both the dev and prod environments in the copy, with no decipherable result. There are no errors in the Symfony logs, and the 404 is one for the site not for Symfony, so I'm assuming it's a problem with the server. Both projects have the exact same permissions as well.
Anyone have any clue to what the problem could be?
Edit: To clarify, the web directory has not been renamed or modified.
As you reported that you use two subfolders in the same virtual host, the web server configuration is probably not the issue here.
Since I suspect permissions issues, I suggest you to debug by creating a base text file in the /representation_dev/mvcrep/web folder, e.g. hello.txt, and see if you can get that via browser.
If not, check the permissions on the newly created folder.
There is not enough info for a precise answer, but this sounds definitely more like a server configuration issue than a Symfony issue,
If you make a copy of your Symfony folder, you also need to create a new web site that points to the new installation.
I.e. previously you browsed the site
http://representation.local/
which has its web root in
.../representation/mvcrep/web
Now you need to create a new site
http://representation_dev.local/
which has its web root in
.../representation_dev/mvcrep/web
I have a web hosting which hold a website I run.
I'm learning CodeIgniter so I would like to upload it a file in that web hosting and run some test and learn, CodeIgniter just for test, and keep using the website normally for users.
Is there any related or known issues or problem by running both ? I don't want the website to get frozen or act weird wit this.
Install codeigniter in it's own folder in a subdirectory instead of in the web root directory.
You will have to modify your config:
Installing a CodeIgniter application in a subfolder
Create a New Folder for your CodeIgniter Learning and Upload all CI files there including System folder and other.
If you Upload the the files with current website files folder it may create some issue.
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.
How to move my htdocs folder to dropbox and call from there?
Me and my friend are on remote location and many times we work on same php projects.
We are on Windows and we use XAMPP for PHP development.
At both systems XAMPP is installed on C:/xamppp/
Is it possible to only move htdocs folder to my dropbox folder and use it from there. Then I can share that folder with my friends so he can also use the same htdocs folder in his PC to develop and test.?
In both cases you probably only need to set the paths correctly in each of your Apache configurations.
For example, just create your 'shared_htdocs' folder in Dropbox, share that with your friend, then in your Apache configuration in XAMPP where you have the site (vhost?) defined you need to point to that 'shared_htdocs' folder within Dropbox.
As long as all the code inside is relative and doesn't even need full pathing you should be good.
I've been told by many tutorials (including the official wordpress tutorials) that I need to place all the files (in the wordpress folder) into the htdocs folder (without a sub-directory).
I'm using MAMP for my PHP environment and Dreamweaver CS5 to build the websites. The problem that I am having is that I want to create a new project in Dreamweaver that is not using wordpress, but because all those wordpress files are in the htdocs without a sub-directory, it is giving me all sorts of warnings that issues could occur if I place a directory for my new project in the htdocs folder along side all those other files.
I've tried putting all the wordpress files into a folder called "wordpress" under htdocs, but that breaks it and I've been told not to do that but not why I shouldn't do that.
How can I organize my htdocs folder so I can have more than one project present in that directory?
I would appreciate any help on this.
Thanks!
In local machine, you can be well sure of yourself that you need to organize each project of yours in a folder in the "htdocs" directory. This is of utmost importance to keep all the projects nicely so that you can later on reference all your projects easily.
When "tutorials are saying that you need to place all the files (in the WordPress folder) into the htdocs folder (without a sub-directory)", they mostly mean about the live server & not about the development server.
Also please check the ".htaccess" file of the root directory of each project, for the "Site URL" or the "Rewrite Base", when you are configuring multiple projects in the "htdocs" folder, so that each of the projects run smoothly. And you should also check that each project is running smoothly, which have been kept in the "htdocs" folder.
Hope it helps.