FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


location of php in frih.net





badai
i want to run cronjob

/usr/bin/php -- not found

try looking at http://frih.net/phpinfo.php

can't figure out where, but i found /usr/local/lib, so i tried to use /usr/local/lib/php, got Permission denied

so is the location is /usr/local/lib/php and i don't have permission, or the location is somewhere else?

try to use php (without any path), got not found.

also, how do i access webmail interface?

thanks.

edit: i just set up task scheduler to access my php script. seem to work.
badai
how to run cron from your own computer:

1. your computer should be on 24/7

2. download netcat here http://joncraton.org/blog/netcat-for-windows

3. create this text file (create a folder first to organize your files):

Code:
GET /path/script.php HTTP/1.1
Host: username.frihost.net
Connection: close
{blank line}
exit
{blank line}


name your text file to anything.

4. create this batch file (.bat):

Code:
nc username.frihost.net 80 < your_text_file


5. create new task in task scheduler to run your batch file.

don't forget to dump this 3 files (nc.exe, your text file and your batch file in the same folder), or provide full path so that windows can find it.

since this is not cronjob run at server, you will not get any e-mail if there is any error. so your script should anticipate any error and manually e-mail it to you. your script should not have any output (echo, print, die, etc). it will just add up to your bandwidth quota if you output anything.

and don't forget: be responsible, don't run it too often. the script will still spit out some http response header to add up to your bandwidth quota.

p.s. before download netcat, please read that paragraph before download link, so you'll know why your antivirus said it's a virus, or download the "non-virus" version here: http://www.rodneybeede.com/Compile_Netcat_on_Windows_using_MinGW.html
Diablosblizz
Quote:
also, how do i access webmail interface?


Depends on what server you're on. For server 1 (cPanel) you can use: https://host.frihost.net:2096/ Otherwise, you can access it in your cPanel interface.

If you're on the other servers (DirectAdmin) you can use: http://frih.net/squirrelmail/src/login.php
badai
finally. my cronjob is working

/usr/local/bin/php -q /home/badai/domains/badai.frih.net/public_html/my_file.php

but now i have a problem. SERVER["SERVER_ADDR"] won't work when run as command line.

problem solved. just use gethostbyname to get server IP address
Related topics
how can i use the url: xxx.frih.net
Webspace.frih.net New site, please give feedback
changing frih.net domain's name
Can I have mail server on frih.net
se cayo frih.net?
frih.net down
Teikoku.frih.net
[official] Feedback for the Frihost Staff
Frih.net IP
Can I have some help with scripts for postmysite.frih.net
www.festakunvent.frih.net
My ClanSite @ xboxukclan.frih.net
http://www.funworld.frih.net/index.php
Promotion site [-litterature.frih.net-]
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.