Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member christi1's Avatar
    Join Date
    Oct 2003
    Location
    Texas, USA
    Posts
    65

    Default adding php script to /scripts

    Is here a way to get a php script to run in /scripts so I can access it via WHM and/or so I can set it up as a cron? Cron would be preferable so it will just run every X hours and get it done without having to run it manually.

    OR... is it possible to add it to my own /home/user/ directory and chown root so it will have access to all things root?

    I've tried the 'shebang' line, tried renaming it *.cgi both in the /scripts directory and nothing.

    I've written a script to go into my mail que, compare the dates on each message to the current date and delete any message that is older than X number of hours.

    Even with my exim.conf set for 2 days, I am still getting loads of messages just hanging out and partying in que for well over a week.

    If you'd like a copy once we get it running, please let me know.

    Thanks in advance.

  2. #2
    cPanel Verified Vendor This forum account has been confirmed by cPanel staff to represent a vendor.
    Join Date
    Aug 2001
    Location
    All over Europe
    Posts
    407

    Default

    I guess it will run as root if you add it to your root cron. Just log in as root and enter:

    crontab -e

    This will start the editor for the root's own cron file.

    kosmo
    http://netenberg.com/
    AccountLab Plus Affordable professional webhosting billing
    Click Be! Building websites as easy as it click be
    Fantastico De Luxe - Install your favourite scripts at a mouse click
    Universina - The CPanel skin with Heart and Soul

  3. #3
    Member christi1's Avatar
    Join Date
    Oct 2003
    Location
    Texas, USA
    Posts
    65

    Default

    Yeh, I tried that too.

    Dropped it in /scripts and set it up as a cron and nothing. Renamed it as a *.cgi on a cron and still nothing.

    I've got it setup to send me an email even if it finds 'zero' messages that need to be removed, so make sure it's running properly.

    Gives me nothing at all.

Similar Threads & Tags
Similar threads

  1. Adding rows to stat.html with data gathered by PHP script.
    By bbhsoft in forum cPanel Developers
    Replies: 6
    Last Post: 07-20-2009, 10:13 PM
  2. Adding add-on scripts
    By keith1234 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-02-2004, 12:41 PM
  3. Help With php auction Script Please - Adding Fees
    By simplysites in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-20-2004, 03:55 AM
  4. Adding more addon scripts?
    By F Brown in forum cPanel Developers
    Replies: 2
    Last Post: 08-26-2003, 07:10 AM
  5. adding email accounts with php script
    By tundra96 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-15-2003, 05:48 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube