18 Responses to “PHP 5.3.0 RC2 packages for Lenny”

  1. James

    Hi Guillaume,

    thanks for your packages – they’re real timesavers. I recently worked on a mass-mail script (newsletter), and while inspecting the headers of a resulting mail I’ve found that you’ve included choon.net’s PHP Mail Header Patch for the `mail` function. This patch adds a X-PHP-Script header like:

    X-PHP-Script: http://www.example.com/~user/testapp/send-mail.php for

    …to a message sent thru the `mail` function.

    I believe we can agree: this behaviour is useful for any public PHP script like in forum software and welcome in 95% of the cases. However, in newsletter-like situations I don’t want to reveal what software was used to create the message nor I want details about the originating server revealed — for security reasons. The patch doesn’t provide configuration means via php.ini or the like. So I see two options:

    – patch the patch to make it configurable, or

    – workaround the problem by calling:
    `unset($_SERVER[‘REMOTE_ADDR’]);` just before calling the `mail` function. This workaround is provided in the patch source itself:

    + if (zend_hash_find(Z_ARRVAL_PP(server), “REMOTE_ADDR”, sizeof(“REMOTE_ADDR”), (void **) &remote_addr) == FAILURE)
    + break;

    I hope this helps anyone solve the problem outlined above. Now I fear that Choon will patch the patch to “fix” this 😉
    But please, Choon, if you read this, provide a php.ini option.

    Best regards

  2. Guillaume Plessis

    @James : Fortunately, I do not use the vanilla patch, I made some changes to it and introduced an ini parameter “mail_extra_headers”, that you can set to off to disable the additional headers.

  3. Stephan Wentz

    Are the apache module and cli built differently? Just installed 5.3RC2 from dotdeb, phpinfo() gives me different modules for both.

    For example in the apache module MYSQL_ATTR_INIT_COMMAND isn’t defined – and the mysqlnd module is available.

    Inside cli MYSQL_ATTR_INIT_COMMAND IS defined, but the mysqlnd module is missing.

  4. Guillaume Plessis

    The Apache2, CLI and CGI flavours have a common configuration, but are a bit different :
    – all the php5-* packages are built during the Apache build
    – then the CLI and CGI flavours do not need php5-* related configuration options, especially the mysql ones

    For more information, fetch the source package, uncompress it and take a look at debian/rules

  5. Stephan Wentz

    Uhh, I don’t know if this relates to my original problem 😉

    With the 5.3RC2 libapache module for example Zend Frameworks Zend_Db breaks – it can’t find the constant MYSQL_ATTR_INIT_COMMAND.
    I was using my own compiled 5.3RC2 at first, and there it worked.

  6. Jason Morehouse

    Has anyone been able to get this working with lighttp / fastcgi?

    After upgrading, I just get a plan text version of the php source code when browsing the website.

  7. Jason Morehouse

    .. actually I get this with apache2 mod-php5 as well, on a clean box. WTF.

  8. Gabriel Sobrinho


    Thanks for this packages, saved my life.

    I’m having a trouble with pecl which not runs. See the error:

    debian:/home/gabriel# pecl
    /usr/local/bin/pecl: line 28: /usr/local/bin/php: file not found
    /usr/local/bin/pecl: line 28: exec: /usr/local/bin/php: cannot execute: file not found

    I have the same error on local and on my remote server (also debian lenny).

    How do I fix it?

  9. Guillaume Plessis

    @Gabriel :
    Are you sure you’re using Dotdeb’s pecl?
    echo $PATH
    which pecl
    pecl config-show
    which php

    Did you install php5-cli?

  10. Randall Wiggins

    It is not possible to hide the IP address of the server that sent the email, and in addition to that, the CANSPAM law has specific provisions to not do so as well as other things like opt-out links etc.

  11. Randall Wiggins

    @Guillaume Plessis: You will still expose the IP address of the server in the mail headers of the server executing the script unless the SMTP relay strips it out like gmail does.


  1.  Twitted by takkie_nl