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.
Related
I want to move moodle lms from local server to live server, I moved moodeldata to httpdocs and tired to figure out httpdocs directory path on shared Linux based Plesk server. I appreciate any one helps me!
I tried like this
$CFG->dataroot='\httpdocs\moodledata';
but the result is
Fatal error: $CFG->dataroot is not configured properly, directory does
not exist or is not accessible! Exiting.
On Linux, they should be forward slashes
$CFG->dataroot = '/moodledata';
Also, its a really bad idea to put the data root in a web directory (httpdocs) that's publicly available - put the data root in a directory that's outside of the web root
https://docs.moodle.org/401/en/Installing_Moodle#Create_the_.28moodledata.29_data_directory
If you are migrating, then you probably need to backup the old data root too
https://docs.moodle.org/401/en/Moodle_migration#Copy_moodledata_from_the_old_server_to_the_new_server
Thanks all for your help! And now I changed as
$CFG->dataroot ='/data/www/example.com/moodledata'; then
I moved moodledata from httpdocs to home-directory and it worked correctly.
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).
I have create a project from existing files over SSH.
PhpStrom copied this project to a local folder on my computer.
When i used the same construction
requre '/var/www/libs/log.php';
i've got notice from IDE like this: Include expression is not resolved
Project are available on remote server by this path: /var/www/project
How i can resolve this notice?
You can definitely do this on Ubuntu Linux, i test it and it works. Here is how to do this.
1. Open nautilus and connect to your host over sftp (also you can use other file managers)
2. Navigate to folder /run/user/xxx/gvfs/ where xxx is user uid. Possible you path will be run/user/1000/gvfs/
3. Open PhpStorm and add external library pointed to you folder.
The main feature is to mount your remote host folder with local folder.
important: don`t include huge external folders from your host to phpstorm.
Btw it is better to keep all your files locally.
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.
i'm using Xampp. When I tried to do this earlier, it worked, but now it is not working.
I'm trying to make a directory in my www folder to hide it from baddies who steal files.
Each user gets their own folder in uploads to put their files on.
Xampp uses apache, and Xampp is a local web server. It allows me to design websites without the need of an online host. The www folder is in my C:\program files\xampp\php\www\ and I need to make a directory there. I know it's possible because i've done this before, I have just forgotten how to make it happen.
When I make a directory I use:
$uploaddir1 = "xampp/php/www/uploads/".$esclcusername."/";
mkdir($uploaddir1,0777);
Do I need to include C:\program files\ before xampp?
And finally, how would this be possible on a real online web host?
I saw your question here and searched some on google. This is what i found:
mkdir("D:/hshome/rubygirl58/gameparody.com/clansites/".$sitename."/lib", 0777)
So yes, I think you have to include the complete path.
Greetings,
Younes
you need to make sure that you give permisions to the parent folder to create dirs in it (0777)
to get the full path you can use dirname(FILE) wich will return the path for the directory of the file in wich it is runned