Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

system() ; exec()...

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR
Good Morning.

does any one how I could allow one of my php script to
connect to my remote server (Unix) and to run the following
command in order to rotate the log files: ~/usr/local/urchin/urchin

I've used system() and exec() but it didnt't work.
Do I have to autentificate myself as when I connect through
a telnet application? If so, how should I do?

Thanks A LOT for the one who will give response.

Have a good day.

 
You will have to authenticate yourself as root or one who has the privileges to the logs. PHP does not have the ability to telnet. I had a similar problem and I could not resolve it. I tried system(), exec() and ``(backticks). They all fail due to permissions. There is one way that I know of; use cron to run urchin and run it as root or therelike.

Good luck!

Scottk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top