[Phpwm] Basic PHP Query (Very basic!)

Jon Spriggs jon at spriggs.org.uk
Thu Apr 27 11:56:15 BST 2006


Hi there,

Some things to check.

1) Is the CRON task running from a specific account, or from the
system CRON jobs?

This can be identified by running (as your web user) the command

crontab -e

If there's a line in there showing something like * * 7 * *
/path/to/my/command then it's running as the user. If you have a root
account, check /etc/cron.daily and see what's in there.

2) You're looking for a command like either "someprogram.sh" or "php
-q someprogram.php" or "perl someprogram.pl"

One of these files will contain the e-mail address you want to remove.
I suggest changing it to a generic distribution list address, and then
only have your administrator in that D-List.

Another alternative, if you're really having problems is to search for
the e-mail address. It's fairly processor intensive, so I'd use the
nice command to make sure you don't stop it from being able to run
anything else.

Your command will look like the following:

nohup nice 19 grep -R -i 'fred at bloggs.com' '/path/to/website/*' >~/findemail.txt

It may take some time, but will complete even if you disconnect.
You'll see all files which refer to the e-mail address, so there will
be some red herrings - especially if the person who was there before
would sign each file he touched with his e-mail address, but you
should also see some form of variable setting (like
$email="fred at bloggs.com")

Hope this helps, and please feel free to come back with any questions.

Regards,

Jon "The Nice Guy" Spriggs

On 4/27/06, Justin Joyce <justin.joyce at cit.coop> wrote:
>
> Ladies and Gents,
>
> I have inherited an app from a previous supplier. It's a very simple app
> based on PHP and MySQL - it resided on a Linux server hosted by Xcalibre. In
> a nutshell, on a daily basis it sends a pre formatted email out to
> recipients based on certain criteria. The problem I have got is that the
> CRON job seems to be falling over and I have no idea why - I have managed to
> establish that the CRON job sends out a status report after each run to a
> specified email address; my question is thus; where do I find that email
> address so I can change it to my own rather than the (now departed) supplier
> who is incommunicado (sourced from ELance.com).
>
> Thanks in advance for any kind assistance.
>
> Justin Joyce
>  Co-operative IT is part of The Midcounties Co-operative
>  The Midcounties Co-operative is an innovative co-operative business, owned
> by its customers and staff in the 9 counties it spans. We trade in a number
> of retail sectors including food, travel, funerals, motors, childcare,
> pharmacy, post offices and IT. We are proud to be a successful co-operative,
> founded on co-operative values and principles that co-ops share throughout
> the world.
>
>
>
>  This e-mail is confidential and is for the named recipient(s) only. If you
> are not the named recipient(s) please do not disseminate or copy this
> e-mail, but please delete it and any copies from your computer. The
> Midcounties Co-operative has taken reasonable precautions to ensure that any
> attachment to this e-mail has been checked for viruses. However, we cannot
> accept liability for any damage sustained as a result of any such viruses
> and advise you to carry out your own virus checks before opening any
> attachment. Furthermore, we do not accept responsibility for any change made
> to this message after it was sent by the sender.
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm
>
>
>



More information about the Phpwm mailing list