Bill Tj Posted August 16, 2012 Posted August 16, 2012 Hi, In the Wiki, there is an instruction to: "Create a symbolic link from [Home Directory]/app_name/public to [Home Directory]/public_html/app_name" But how do we create symbolic link in Heliohost through the cPanel? Regards, Bill
Ice IT Support Posted August 16, 2012 Posted August 16, 2012 To create a symbolic link in cPanel, create and run a one-time cron job with the following command: ln -s /home/username/app_name/public /home/username/public_html/app_name >/dev/null 2>&1 Replace username and app_name with your info. The cron jobs utility may be found under the Advanced section of cPanel.
Bill Tj Posted August 16, 2012 Author Posted August 16, 2012 Hi, Thanks for your reply. I have done it twice, but without any success. What kind of time zone does the cron process at the server use? (I am at the Eastern Time Zone.) Also, is there a minimum period of time before we can schedule a one-time cron job? (I tried to schedule it for several minutes before the event.) Regards, Bill
Ice IT Support Posted August 16, 2012 Posted August 16, 2012 The servers are operating in the Pacific Time Zone. The minimum time is based on the schedule you set it to. Cron jobs don't run immediately, so if you set it to run every day (for example), it won't run until 24 hours after it is set. There isn't a 'run once' option for cron jobs, so if you need fast results I would recommend setting it to run every minute. Wait 1 minute after setting it, then check if the link was created. Be sure to delete the cron job after so you don't exceed the two cron job per user per day limit!
Bill Tj Posted August 16, 2012 Author Posted August 16, 2012 Hi, Thank a lot for your suggestions. It is working now! May I put a suggestion, to put this in the Wiki or FAQ so that other people can find this method to create symbolic link? Thanks. Best regards, Bill
Ice IT Support Posted August 16, 2012 Posted August 16, 2012 Glad your question got answered! Please spare a few minutes to take our brief survey:http://feedback.heliohost.org/Your participation in this survey is greatly appreciated. Also, I have created a page in the wiki with these instructions and added a link on the Ruby on Rails page.
Bill Tj Posted August 16, 2012 Author Posted August 16, 2012 Hi, Thanks a lot. I have filled in the survey. And I also have seen the new instruction in the wiki. Thank you very much! Regards, Bill
Byron Posted August 16, 2012 Posted August 16, 2012 You do know you can use a simple php script to create a symbolic link?
Bill Tj Posted August 17, 2012 Author Posted August 17, 2012 You do know you can use a simple php script to create a symbolic link? No, I don't. But it means that I have to learn PHP and also how to run PHP script at heliohost, right? Regards, Bill
Ice IT Support Posted August 17, 2012 Posted August 17, 2012 Running PHP scripts is as simple as loading the page in the browser. In this case, you would create a file called symlink.php containing the following: <?php symlink("/home/username/app_name/public","/home/username/public_html/app_name"); echo "Link created successfully!"; ?> Of course either method works, but using PHP scripts does not add to your cron job limit.
Bill Tj Posted August 17, 2012 Author Posted August 17, 2012 It worked beautifully! I was never aware of the power of PHP. Thank you, thank you. (With this I don't have to wait another day for cron-related jobs.) I have put this in the wiki after the cron method. Thanks. Best regards, Bill
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now