Folder structure while hosting a php app - php

I have a simple php application and I need to host it. I have created a free account in 000webhost.com . They have provided me ftp credentials. In my local machine, the directory structure for the project is as follows:
C/wamp/www/myproject
Also I have placed the framework yii from http://www.yiiframework.com/ in the same path above.
When I log in to ftp for the free server account, I can only see the public_html folder. I do not know where I should place myproject and yii folders to host the project successfully.
I have already created database in this free server space using phpmyadmin.

You have to put the contents of the local folder /myproject in the remote /public_html

just try to upload your files into this folder.
if you upload the whole folder myproject, you have to call it with
http://mydomaingivenbymyprovider.com/myproject

Related

Socialengine php Installation error

I am struggling with socialengine php installation to my private server. I already have it hosted but want to develop it on my own computer. I have installed xampp, FileZilla server and client and netbeans.
I download and extract my socialengine zipped folder to into a folder within ht docs. Then I upload onto the FileZilla server. I then right click on the folder to copy the path. When I paste this into google browser I am not seeing the socialengine install wizard page where you enter your licence key.
Instead I am seeing an index page listing all the folders and other folders within ht docs directory. I have looked at many tutorials. Deleted everything and re-installed.
Can somebody please tell me what I am doing wrong.
Here are the cases to debug:
Check mod_rewrite enabled
.htaccess is available in that directory.
Server directory index set to index.php (DirectoryIndex index.php) in .htaccess file.
Check permission are fine on files and folders

Using Codeigniter with SFTP

I want to access CodeIgniter system folder on another server securely via SFTP. I was able to connect to the server but the path to application and system folder could not be read in the index.php file on my local server.
It usually resides in the application folder. See their website or this tutorial for further information.
You need to change your application folder path like this :
$application_folder = "/Path/to/your/application";

How to download a file from ftp on server and then use import data from it

Hi I have build a script that downloads files from ftp account and then import data from them. However it works on localhost as after downloading files I save them on c drive and then read the files from there and process them. I need help to do this on live server. How can I achieve this and where can I store the files on server outside public_html folder.
I would really appreciate if someone can help me please. Thank you.
Yes, it will be good to store the files outside public_html
You can create download folder outside public_html using various tools. Log into you host provider account and use file manager tools there or else you can get an SSH credential for the host and create the folder using some SSH client
Also give proper permission to the folder, so that we can write/ read from it.
You can refer the location of the download folder from script using the script $_SERVER['DOCUMENT_ROOT'] .(Replace public_html with down load folder name)
this is not a very specific question, but sounds like you need to check permissions on your download folder on the server, set permissions so that your script can save into it, and you may want to keep it outside of public_html so that it is not accessible via the web server?
For example save it in public_html/../ftp (just illustrating the path here).

Automatic upload in Zend-Studio with SVN

a question about Eclipse/Zend-Studio. I'm trying to use the automatic upload feature but
i'm also using SVN so the projekt-data are in the subfolder trunk.
Now when i save a file it goes to the folder trunk on the webserver but it should be on the root-folder of the webserver and i don't know how to tell Zend-Studio to do this.
thx in advance for your help
Access the Automatic Upload Properties (Project | Properties | Automatic Upload). Then select a Project Directory:
A Project Directory is a folder within the Initial Directory that you would like to work with. This is the folder with which you will be transferring data when Uploading and Downloading files and folders to/from the remote server.
See http://files.zend.com/help/Zend-Studio/zend-studio.htm#automatic_upload.htm
If this doesn't work and you happen to have shell access to the remote host, symlink the webroot to the trunk folder.

Problem with uploading files on root linux server

I have a plesk panel and root dedicated server on 1and1. I'm using custom programed php script to upload the files and create the folders to server. I have the upload folder named upload_data_folder with the 777 permission.
The scenario is the following:
I want to create folder in my upload_data_folder and than upload files in that newly crated folder. I'm doing this over php script so every file or folder that I create has apache user and the group as the owner.
I'm successfully crate the folder in my upload_data_folder and that folder is owned by apache, has apache as a group and has 777 premission. Then When I try to upload some files to that newly created folder It can't.
I think the problem is with some owner permission but if anyone has some idea what this can be I would be very grateful
It was my custom made script. huuu I solved the problem. The php safe mode was turned on. After I turned it off everything works perfectly.
By default apache document root is /var/www/html/. If plesk is installed document root will have a path like:/var/www/httpdocs for non-secure sites. Thus secure sites are stored in /var/www/httpsdocs.

Categories