> I tried to patch php like:
>
> cat patch | patch -p1
> then I filed in the patch manually, but it will not work.
>
> Error:
>
*shrug*... didn't give me issues, but why not just edit the files directly,
the patch is tiny enough....
1) Open up ext/standard/mail.c in your favorite editor
2) Look for lines similar to the following somewhere around line 180:
int ret;
char *sendmail_path = INI_STR("sendmail_path");
char *sendmail_cmd = NULL;
if (!sendmail_path) {
#if (defined PHP_WIN32 || defined NETWARE)
3) Add in this line at the end of the variable declaration block:
server_rec *serv = ((php_struct *) SG(server_context))->r->server;
4) Go down a few lines (somewhere around line 229) and look for:
#endif
fprintf(sendmail, "To: %s\n", to);
fprintf(sendmail, "Subject: %s\n", subject);
if (headers != NULL) {
fprintf(sendmail, "%s\n", headers);
5) Then add in this just after the Subject: line:
fprintf(sendmail, "X-Server-Hostname: %s\n",
serv->server_hostname);
fprintf(sendmail, "X-Server-Port: %d\n", serv->port);
Congrats, you just learned how to read a patch file!
-Sara
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php