The emails that are being sent out by the cron jobs for notifies.php and cmd.php just contain PHP code. Is this how they're supposed to be? I've searched everywhere and can't find anything regarding this. I think I've just about got this thing ready for beta-live.
Keith
|
I got to looking at this and figured out it just mailing the PHP file code and not whatever it's supposed to be mailing. I've verified the permissions (644) and the owner (wwwrun.www). I've looked at the cron job and all seems to be OK there. Surely someone can help me out here? |
cron probs are sometime remedied by inserting th -q switch at the end of the command line I have video tutorials to help you mrpowless.com |
OK, I'll give that a go and see what happens.
Keith
|
Nope, still get the same thing. Anything else I should check? Here's my crontab -e output
MAILTO=myemail@myemail.com 0 0 * * * /usr/bin/php5 /srv/www/htdocs/dolphin/periodic/cmd.php -q 0,10,20,30,40,50 * * * * /usr/bin/php5 /srv/www/htdocs/dolphin/periodic/notifies.php -q # * */1 * * * /usr/local/bin/php -q /home/localhost/www/d611/periodic/cupid.php
It was:
MAILTO=myemail@myemail.com 0 0 * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/cmd.php 0,10,20,30,40,50 * * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/notifies.php # * */1 * * * /usr/local/bin/php -q /home/localhost/www/d611/periodic/cupid.php
The permissions on cmd.php and notifies.php are 644. I've tried 777 also with the same results. Maybe something in php.ini needs to be changed? I've put the output of this cron job in a text file which can be seen here. This is currently the only real deal breaker on going live with this as the friend invites aren't being mailed and I imagine other emails aren't being mailed either but I just haven't figured them out yet.
Keith
|
|
Does anyone have any idea about this?
Keith
|
MAILTO=myemail@myemail.com 0 0 * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/cmd.php 0 * * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/notifies.php * */1 * * * /usr/local/bin/php -q /home/localhost/www/d611/periodic/cupid.php
Maybe your address!!
|
I actually put my real email address in there, not myemail@myemail.com, I just didn't want to publish my real email address to the whole world . This seems to be functioning properly as I received the email but it's full of PHP code, actually the code within notifies.php and cmd.php.
Keith
|
I don't think about your email adress
I think about /usr/bin/php5 and /usr/local/bin/php two different addresses to php
and /srv/www/htdocs/dolphin/periodic/ and /home/localhost/www/d611/periodic two different addresses to your files
What is correct!!
If you use /usr/local/bin/php and /home/localhost/www/d611/periodic/
on your cmd.php and notifies.php will it work correct then??
MAILTO=myemail@myemail.com 0 0 * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/cmd.php 0 * * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/notifies.php * */1 * * * /usr/local/bin/php -q /home/localhost/www/d611/periodic/cupid.php
|
Thanks for replying okweb! I'm not using the cupid one, as the copy/pastes went down the thread the "#" in front of that one disappeared. The paths for notifies.php and cmd.php are correct. So I guess my cron jobs should read as:
MAILTO=myemail@myemail.com 0 0 * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/cmd.php 0,10,20,30,40,50 * * * * /usr/bin/php5 -q /srv/www/htdocs/dolphin/periodic/notifies.php
|
Try /usr/local/bin/php instead of /user/bin/php5 ..... I think that is what he's trying to say anyway ..... . |
The path to php on my machine is /usr/bin/php and /usr/bin/php5. I don't have a /usr/local/ directory. Also, I changed it from /usr/bin/php to /usr/bin/php5 because /usr/bin/php was a symbolic link to another symbolic link to /usr/bin/php5, so I was trying to make sure that one of those links wasn't the issue.
Keith
|
OK, it appears that you have to set the following line in php.ini
allow_short_open_tags = On in addition to short_open_tag = On
At least now I'm getting something different from notifies.php. You can see the output here Surely this isn't what is supposed to be emailed by notifies.php?
|
Open notifies.php and check this two lines
require_once( '/srv/www/htdocs/dolphin/inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
|
Open notifies.php and check this two lines
require_once( '/srv/www/htdocs/dolphin/inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
Yes, they're there. See Below
require_once( '/srv/www/htdocs/dolphin/inc/header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
The permissions on those files listed are 644 and all owned by wwwrun.www
|
SOLVED!!! This was solved by the following:
<
In my particular installation there are 2 php.ini files, yours may be different. One in /etc/php5/apache2/ and another one in /etc/php5/cli/ The tags allow_short_open_tags and short_open_tag both need to be set to On in BOTH files. Also ensure all file and directory permissions are correct and whatever user the webserver runs as is the owner of the files.
<
Doing this should fix this issue.
<
< begin rant > Now, I know that short tags are part of the PHP standard, but using them causes all kinds of problems. I've been fighting with this issue for 6 days. It finally took me posting on the PHPBuilder website. If the long php tags had been used I would not have had all these problems and the 1000 emails full of php code < end rant >
<
Thanks for everyone's help
<
Keith
|