OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
php-general Digest 27 Jun 2004 15:45:17 -0000 Issue 2844

php-general-digest-helplists.php.net
Date: Sun Jun 27 2004 - 10:45:17 CDT


php-general Digest 27 Jun 2004 15:45:17 -0000 Issue 2844

Topics (messages 189107 through 189113):

Crontab PHP Script
        189107 by: Ryan Schefke
        189108 by: Marek Kilimajer
        189109 by: Scot L. Harris
        189112 by: Tim Traver

Re: image upload woes
        189110 by: Marek Kilimajer

Construction
        189111 by: Jason Davidson
        189113 by: David Goodlad

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscribelists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscribelists.php.net

To post to the list, e-mail:
        php-generallists.php.net

----------------------------------------------------------------------

attached mail follows:


Hi,

 

Can someone please give me some guidance. I'd like to run a php script
every minute (in reality every night, but just testing). I've done some
reading and found that a crontab is the best way to go (I think). I'm using
Plesk 7 on a Linux box and I have root access.

 

I made a quick php script called crontab.php to email me.

 

==============================================================

<?php //send email on domain

                                    /* subject */

                                    $str_subject = "crontab test";

                                    

                                    /* message */

                                    $messagecontent = "this is a test to see
if crontab working nightly\n\n";

                                    

                                    /* to */

                                    $to = "ryantriomfgroup.com";

                                    

                                    /* from */

                                    $headers .= "From: tgWedding
<developmenttriomfgroup.com>\r\n";

                                    

                                    /* bcc */

            // $headers .= "Bcc:
developmenttriomfgroup.com\r\n";

                                    

                                    mail($to, $str_subject, $messagecontent,
$headers);

?>

 

 

Then I setup my crontab command as:
/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
<https://217.160.251.56:8443/sysuser/crontab_edit.php?cte_src=CTEJKgkqCSoJKg
kvaG9tZS9odHRwZC92aG9zdHMvdGd3ZWRkaW5nLmNvbS9odHRwZG9jcy90Z3dlZGRpbmcvY3Jvbn
RhYi5waHA=>

 

 

I used " * " for every field except M, which I set to " 01 " to run every
minute.

 

 

It's not working...can someone guide me along and let me know what I've done
wrong.

 

Thanks,

Ryan

attached mail follows:


Ryan Schefke wrote --- napísal::
> Hi,
>
>
>
> Can someone please give me some guidance. I'd like to run a php script
> every minute (in reality every night, but just testing). I've done some
> reading and found that a crontab is the best way to go (I think). I'm using
> Plesk 7 on a Linux box and I have root access.
>
>
>

>
> Then I setup my crontab command as:
> /home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php

The crontab command should be:

/path/to/php /path/to/your/crontab.php

Add -q parameter if the php executable is cgi and not cli

attached mail follows:


On Sat, 2004-06-26 at 19:34, Ryan Schefke wrote:
> Hi,
>
>
>
> Can someone please give me some guidance. I'd like to run a php script
> every minute (in reality every night, but just testing). I've done some
> reading and found that a crontab is the best way to go (I think). I'm using
> Plesk 7 on a Linux box and I have root access.
>

You need to add #!/usr/bin/php
At the start of your script so it knows how to run it. You will also
need to set the permission bits to allow execution
chmod 700

Change the path to where you have the cli version of php on your system.

--
Scot L. Harris <webidcfl.rr.com>

attached mail follows:


Not sure if this is different in linux, but usually the first parameter is
the minutes, and if you had 01 in it, that means that it would do it once
an hour (i.e. 12:01, 1:01, 2:01, etc...

They should all have stars to do it once a minute.

In freeBSD, it would look like this :
* * * * root /usr/local/bin/php
home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php

Tim.

At 04:34 PM 6/26/2004, Ryan Schefke wrote:
>Hi,
>
>
>
>Can someone please give me some guidance. I'd like to run a php script
>every minute (in reality every night, but just testing). I've done some
>reading and found that a crontab is the best way to go (I think). I'm using
>Plesk 7 on a Linux box and I have root access.
>
>
>
>I made a quick php script called crontab.php to email me.
>
>
>
>==============================================================
>
><?php //send email on domain
>
> /* subject */
>
> $str_subject = "crontab test";
>
>
>
> /* message */
>
> $messagecontent = "this is a test to see
>if crontab working nightly\n\n";
>
>
>
> /* to */
>
> $to = "ryantriomfgroup.com";
>
>
>
> /* from */
>
> $headers .= "From: tgWedding
><developmenttriomfgroup.com>\r\n";
>
>
>
> /* bcc */
>
> // $headers .= "Bcc:
>developmenttriomfgroup.com\r\n";
>
>
>
> mail($to, $str_subject, $messagecontent,
>$headers);
>
>?>
>
>
>
>
>
>Then I setup my crontab command as:
>/home/httpd/vhosts/tgwedding.com/httpdocs/tgwedding/crontab.php
><https://217.160.251.56:8443/sysuser/crontab_edit.php?cte_src=CTEJKgkqCSoJKg
>kvaG9tZS9odHRwZC92aG9zdHMvdGd3ZWRkaW5nLmNvbS9odHRwZG9jcy90Z3dlZGRpbmcvY3Jvbn
>RhYi5waHA=>
>
>
>
>
>
>I used " * " for every field except M, which I set to " 01 " to run every
>minute.
>
>
>
>
>
>It's not working...can someone guide me along and let me know what I've done
>wrong.
>
>
>
>Thanks,
>
>Ryan

SimpleNet's Back !
http://www.simplenet.com

attached mail follows:


Edward Peloke wrote --- napísal::
> I have code which attempts to upload some files and create thumbnails. The
> same code on one server works ok, the same code on another server throws an
> error everytime I hit submit that says "The document contains no data"...it
> appears to be a javascript error. It is not an error that I am throwing.
> Has anyone ever had this problem?
>
> Thanks,
> Eddie
>

I bet that the script is dying for some reason. Turn display_errors on
or check the logs, the real reason should be there somewhere. And it's
not javascript.

attached mail follows:


If you instantiate a child class, the parent class constructor is not
called, is there a reason for this? anyone know of plans to change
this at all, ....
the obvious workaround is to call the parents constructor inside the
childs constructor, but this seems kinda strange.

Jason

attached mail follows:


As far as I know, this is fairly common in most programming languages
(but I just woke up so don't take my word on it!). It allows you a
lot greater control over the construction of your class, since you can
force the child class to override what the parent class's default
member variable values are by calling the parent constructor first, or
you can have it be overridden by the parent by calling the parent
constructor at the end of the child's constructor.

Dave

On Sat, 26 Jun 2004 20:51:58 -0700, Jason Davidson
<jason.davidsongmail.com> wrote:
>
> If you instantiate a child class, the parent class constructor is not
> called, is there a reason for this? anyone know of plans to change
> this at all, ....
> the obvious workaround is to call the parents constructor inside the
> childs constructor, but this seems kinda strange.
>
> Jason
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>