Hello, sorry for the late reply.
I tried to patch php like: cat patch | patch -p1 then I filed in the patch manually, but it will not work. Error: debian:/usr/src/php-5.0.2# cat b | patch -p1 can't find file to patch at input line 4 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff -u -r1.84 mail.c |--- ext/standard/mail.c 25 Sep 2004 14:48:44 -0000 1.84 |+++ ext/standard/mail.c 1 Nov 2004 18:50:16 -0000 -------------------------- File to patch: ext/standard/mail.c patching file ext/standard/mail.c Hunk #1 FAILED at 180. 1 out of 1 hunk FAILED -- saving rejects to file ext/standard/mail.c.rej missing header for unified diff at line 13 of patch can't find file to patch at input line 13 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- | -------------------------- File to patch: ext/standard/mail.c patching file ext/standard/mail.c Hunk #1 FAILED at 230. 1 out of 1 hunk FAILED -- saving rejects to file ext/standard/mail.c.rej You have new mail in /var/mail/root debian:/usr/src/php-5.0.2# I've never patched PHP, sorry for the question. alex "Sara Golemon" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > > in the phpinfo() I can find (apache2handler) the entry: "Hostname:Port", > > which displays the vhost you are running the script from. > > In [phpsources]/sapi/apache2handler/php_functions.c I found the source. > Now > > I want to display the vhost in every mail, which is sent by php. I know > that > > the source is in [phpsources]/ext/standard/mail.c and I know how to add a > > simple text, but I don't know how to insert the vhost. > > > > With two HUGE caveats: > > Index: ext/standard/mail.c > =================================================================== > RCS file: /repository/php-src/ext/standard/mail.c,v > retrieving revision 1.84 > diff -u -r1.84 mail.c > --- ext/standard/mail.c 25 Sep 2004 14:48:44 -0000 1.84 > +++ ext/standard/mail.c 1 Nov 2004 18:50:16 -0000 > @@ -180,6 +180,7 @@ > int ret; > char *sendmail_path = INI_STR("sendmail_path"); > char *sendmail_cmd = NULL; > + server_rec *serv = ((php_struct *) SG(server_context))->r->server; > > if (!sendmail_path) { > #if (defined PHP_WIN32 || defined NETWARE) > @@ -229,6 +230,8 @@ > #endif > fprintf(sendmail, "To: %s\n", to); > fprintf(sendmail, "Subject: %s\n", subject); > + fprintf(sendmail, "X-Server-Hostname: %s\n", > serv->server_hostname); > + fprintf(sendmail, "X-Server-Port: %d\n", serv->port); > if (headers != NULL) { > fprintf(sendmail, "%s\n", headers); > > > > #1) Assumes Apache2handler (probably fine since you'll be doing this on your > server only) > #2) Havn't tested it. Use at your own risk. No warranties either expressed > or implied. > > -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php