Using Codeigniter with SFTP - php

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";

Related

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).

openshift "www" directory?

My openshift rhc client is not working so i again use Filezilla FTP to acess my openshift
Past year i use filezilla then "www" directory found at /var/lib/openshift/54216b58500444bb9d0009d0/app-root/repo/php/ But now there no such structure exist i think may openshift change directory structure.
My question is where i upload my code? so that my scalable app work seamless
You can find the path to your code by looking at OPENSHIFT_REPO_DIR environment variable. So doing an echo $OPENSHIFT_REPO_DIR should print the path to your code.
But please remember that the only directory that is persistent accross deployments is the data directory (OPENSHIFT_DATA_DIR). Any change you make in other place will be lost on your next deployment.
Read more about directory variables.

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.

Folder structure while hosting a php app

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

Get website's root directory using ftp details

In php is it possible to get a website's root directory using ftp details?
Using ftp_nlist() function it displays all directories.I want only the root directory.
No. The FTP server doesn't know that - the web root directory is something that only the web server knows, and the FTP server isn't in communication with that.

Categories