Jump to content

Recommended Posts

Posted

Instead of trying to pass a login and password through the script may I offer a suggestion.

 

Create a folder at the same level as your public_html folder. Then chmod the permissions to 770. Now put your script into that folder and change the location of the script in the cron job.

 

If you put the script into a folder at the same level as your public_html folder it will be pretty secure.

 

Just be sure that your paths are set correctly in your script to get it to perform it's task.

Posted
I set up a cron job for a script I have installed for example below:

 

http://mysite.com/tasks/email_reminders.php

 

This will work fine but the "tasks/" directory I have password protected so how do I include as part of the job my username/password???

 

 

I am curious how you would reference a directory in the same level as public_html as for example public_html is the base level directory after domain name isn't it?

 

http://mysite.com/tasks

 

if tasks is same level as public_html how would you refernce it?

Posted
I believe you would use

/home/cpanel_name/folder/filename

as the path

 

 

 

Thanks. Someone from support sent me this option which worked:

 

 

php /home/mycpanelusername/public_html/tasks/email_reminders.php

 

Thanks :shocking:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...