# Postfix / Sendmail



## Mwh65 (Dec 31, 2010)

Using FreeBSD 7.1.

I have a PHP cronjob that when run hangs. In the processes I can see the following line ...


```
usr/sbin/sendmail -FCronDaemon -odi -oem -oi -t
```

along with the hung PHP script. The server is configured to use Postfix which was happily working until 24th December. The /var/log/maillog is showing the following error ...


```
fatal: usage: sendmail [options]
```

which to me seems like it is trying to use Sendmail instead of Postfix. As Sendmail is disabled on my server I'm guessing this is why it is hanging the CRONJOB processes.

I've checked the entries in RC.CONF and I don't know what else to try.


----------



## wblock@ (Jan 1, 2011)

See mailwrapper(8); the word "sendmail" doesn't necessarily mean it's the real Sendmail.

As far as what's causing the problem, I'm going to take a very safe bet and say it's the PHP script, or module, or PHP itself.  What changed on the 24th?  Upgraded anything?


----------



## Mwh65 (Jan 1, 2011)

Nothing changed in the PHP script and I also reduced the script to just output the word "Hello" to make sure.

I posted in another forum here regarding the script throwing a latin1 error then hanging. Seems they are 2 different issues as reducing the script as I mentioned above removes the latin1 character set error but still hangs the script.

This all started when I updated mysql to 5.5.8

First I got blank pages. We fixed that by rolling back PHP from 5.3.4 to 5.2.16 however the PHP script still hung.

We then cleanly put PHP 5.3.4 back on which worked successfully but again the PHP script still hangs. We now wonder whether the PHP cli is the cause but can't confirm it.


----------



## rghq (Jan 2, 2011)

The problem is MySQL related - downgrade the client to 5.5.7 - the server can run 5.5.8. Then recompile Postfix, PHP and what else depends on MySQL.

Just don't upgrade the clients to 5.5.8 yet - then things will be back to a working state. I had similar errors with Pureftpd, Dovecot and Postfix - downgrading to 5.5.7 worked. Still PHP didn't made trouble yet.


----------



## junt (Jan 5, 2011)

how have you downgraded the client to 5.5.7?
I tried with portdowngrade, but I can find only 5.5.8 or 5.0.0 or older versions..

how have you done the downgrade?
thanks in advance


----------



## junt (Jan 5, 2011)

maybe I found the solution 
i portdowngraded mysql-server to 5.5.7 then deinstall and install mysql55-client
it is compiling everything now


----------

