php-general Digest 6 May 2007 02:15:37 -0000 Issue 4775

Topics (messages 254469 through 254477):

Re: Mailbox @php.net
        254469 by: M.Sokolewicz

mail() only working with php-cli
        254470 by: Andy B.
        254474 by: Tijnema !
        254475 by: Andy B.
        254477 by: Oliver Block

Feisty Fawn and apt-get
        254471 by: Skip Evans
        254472 by: Travis Doherty
        254473 by: Davi

Re: Why create_element function always return false?
        254476 by: Tijnema !

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message --- Get a php.net CVS account and you get an @php.net email adress with it. It's an extra for the work you do, not just to be able to show off your new email.

- tul

Shadow wrote:
Hi, All.

Does anybody know how someone can get an email @php.net?


Thanks.

---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.

--- End Message ---
--- Begin Message ---
Is there any way to debug the mail() function within PHP4 or PHP5?

The following code is not working when called from a browser, but it does
work from the command line:

<?php
$to      = '[EMAIL PROTECTED]';
$subject = 'the subject';
$message = 'hello.......';
$headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
    'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

if(mail($to, $subject, $message, $headers))
        echo "IT WORKED";
else
        echo "DAMN!!!";
?>


php and php-cli use the same php.ini file. Php via Apache is launched as a
module, NOT as CGI!

sendmail_path is correctly set to /usr/sbin/sendmail -t -i

the /var/log/mail.log only shows activity when I try my code via command
line, so my best guess is that sendmail is never reached when run from the
browser.

I went a little deeper and modified the sendmail_path to /tmp/test.sh, which
contains:

#!/bin/bash
echo "I was used!!" > /tmp/test.log

(chmod 777 /tmp/test.sh)

Again I tried my script from the web and from the command line. Same
result... command line is fine and generates the test.log file. In the
browser no log file is created.

I have already made numerous LAMP installations, but I never had this kind
of mail() issue. This installation is quite simple: standard Apache 2.0 with
php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-(

What am I missing?

Thanks a lot!!

----
Andy

--- End Message ---
--- Begin Message ---
On 5/5/07, Andy B. <[EMAIL PROTECTED]> wrote:
Is there any way to debug the mail() function within PHP4 or PHP5?

The following code is not working when called from a browser, but it does
work from the command line:

<?php
$to      = '[EMAIL PROTECTED]';
$subject = 'the subject';
$message = 'hello.......';
$headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
   'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
   'X-Mailer: PHP/' . phpversion();

if(mail($to, $subject, $message, $headers))
       echo "IT WORKED";
else
       echo "DAMN!!!";
?>


php and php-cli use the same php.ini file. Php via Apache is launched as a
module, NOT as CGI!

sendmail_path is correctly set to /usr/sbin/sendmail -t -i

the /var/log/mail.log only shows activity when I try my code via command
line, so my best guess is that sendmail is never reached when run from the
browser.

I went a little deeper and modified the sendmail_path to /tmp/test.sh, which
contains:

#!/bin/bash
echo "I was used!!" > /tmp/test.log

(chmod 777 /tmp/test.sh)

Again I tried my script from the web and from the command line. Same
result... command line is fine and generates the test.log file. In the
browser no log file is created.

I have already made numerous LAMP installations, but I never had this kind
of mail() issue. This installation is quite simple: standard Apache 2.0 with
php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-(

What am I missing?

Thanks a lot!!

----
Andy


Are you sure that the PHP CLI and PHP-module are exactly the same build?
And you could try to set error reporting level to E_ALL, maybe there's
a warning generated that's hidden now because of a lower reporting
level.

Tijnema

--- End Message ---
--- Begin Message ---
Yes, it's the same build.

I am running php5 on a debian distribution that has been installed via
apt-get.

Details:

------
CLI php.ini = /etc/php5/cli/php.ini

PHP 5.2.0-8+etch3 (cli) (built: Apr 29 2007 10:42:07) 
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
------

------
APACHE php.ini = = /etc/php5/apache2/php.ini

PHP Version 5.2.0-8+etch3 

System  Linux A011 2.6.21 #1 SMP Fri Apr 27 22:50:50 CEST 2007 i686  
Build Date  Apr 29 2007 10:24:27  
Server API  Apache 2.0 Handler  
Virtual Directory Support  disabled  
Configuration File (php.ini) Path  /etc/php5/apache2/php.ini  
------


Both are exactly the same, as I copied the CLI version into the Apache
Version. Of course I first tested with the original Apache php.ini before
overwriting it with the CLI version.

Unfortunately error Reporting does not help. I've already tested with E_ALL
and also dumping errors/warnings into log files...


----
Andy

-----Original Message-----
From: Tijnema ! [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 05, 2007 23:58
To: Andy B.
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] mail() only working with php-cli


Are you sure that the PHP CLI and PHP-module are exactly the same build?
And you could try to set error reporting level to E_ALL, maybe there's
a warning generated that's hidden now because of a lower reporting
level.

Tijnema

--- End Message ---
--- Begin Message ---
Hello Andy,

did you take a look into the apache log files?

Regards,

Oliver


Am Samstag, 5. Mai 2007 22:53 schrieb Andy B.:
> Is there any way to debug the mail() function within PHP4 or PHP5?
>
> The following code is not working when called from a browser, but it does
> work from the command line:
>
> <?php
> $to      = '[EMAIL PROTECTED]';
> $subject = 'the subject';
> $message = 'hello.......';
> $headers = 'From: [EMAIL PROTECTED]' . "\r\n" .
>     'Reply-To: [EMAIL PROTECTED]' . "\r\n" .
>     'X-Mailer: PHP/' . phpversion();
>
> if(mail($to, $subject, $message, $headers))
>         echo "IT WORKED";
> else
>         echo "DAMN!!!";
> ?>
>
>
> php and php-cli use the same php.ini file. Php via Apache is launched as a
> module, NOT as CGI!
>
> sendmail_path is correctly set to /usr/sbin/sendmail -t -i
>
> the /var/log/mail.log only shows activity when I try my code via command
> line, so my best guess is that sendmail is never reached when run from the
> browser.
>
> I went a little deeper and modified the sendmail_path to /tmp/test.sh,
> which contains:
>
> #!/bin/bash
> echo "I was used!!" > /tmp/test.log
>
> (chmod 777 /tmp/test.sh)
>
> Again I tried my script from the web and from the command line. Same
> result... command line is fine and generates the test.log file. In the
> browser no log file is created.
>
> I have already made numerous LAMP installations, but I never had this kind
> of mail() issue. This installation is quite simple: standard Apache 2.0
> with php5, php5-mysql, php5-gd, ... This makes it even more frustrating :-(
>
> What am I missing?
>
> Thanks a lot!!
>
> ----
> Andy

--- End Message ---
--- Begin Message ---
Hey all,

I've installed Feisty Fawn on the curmudgeon barber's machine, but it won't get any of the outside packages I've tried to get. I've tried an

apt-get install {package}

...on digikam, kate, gftp, and others. All stuff I had no trouble getting with Edgy.

I checked the sources.list file and it has both universe and multiverse enabled.

Is there something with the FF repositories or something I'm missing?

Thanks,
Skip
--
Skip Evans
Big Sky Penguin, LLC
61 W Broadway
Butte, Montana 59701
406-782-2240

=-=-=-=-=-=-=-=-=-=-=

Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework.

http://phpenguin.bigskypenguin.com

--- End Message ---
--- Begin Message ---
Skip Evans wrote:

> Hey all,
>
> I've installed Feisty Fawn on the curmudgeon barber's machine, but it
> won't get any of the outside packages I've tried to get. I've tried an
>
> apt-get install {package}
>
> ...on digikam, kate, gftp, and others. All stuff I had no trouble
> getting with Edgy.
>
> I checked the sources.list file and it has both universe and
> multiverse enabled.
>
> Is there something with the FF repositories or something I'm missing?
>
> Thanks,
> Skip

Wrong list?
T

--- End Message ---
--- Begin Message ---
Em Sábado 05 Maio 2007 18:01, Skip Evans escreveu:
> Hey all,
>
> I've installed Feisty Fawn on the curmudgeon
> barber's machine, but it won't get any of the
> outside packages I've tried to get. I've tried an
>
> apt-get install {package}
>
> ...on digikam, kate, gftp, and others. All stuff I
> had no trouble getting with Edgy.
>
> I checked the sources.list file and it has both
> universe and multiverse enabled.
>
> Is there something with the FF repositories or
> something I'm missing?
>
> Thanks,
> Skip

First: use aptitude instead apt-get... =]
Second: use an debian-list to debian's questions instead an php-list... =]

HTH

-- 
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
"Religion, ideology, resources, land,
spite, love or "just because"...
No matter how pathetic the reason,
it's enough to start a war. "

Attachment: pgpC7auhvsJsM.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
On 5/5/07, Victor <[EMAIL PROTECTED]> wrote:
<?php
$doc = domxml_new_doc("1.0");
$node = $doc->create_element("para");
$newnode = $doc->append_child($node);
$newnode->set_attribute("align", "left");
?>

I just run the example that is from php manual. But there is some error

------------------------------------------------------------------------------
Warning: domnode::append_child() expects parameter 1 to be object, null
given in C:\AppServ\www\tutorial\test.php on line 4

Fatal error: Call to a member function set_attribute() on a non-object
in C:\AppServ\www\tutorial\test.php on line 5
------------------------------------------------------------------------------


It is very strange....I found that create_element always return
false....nomatter what I do....what example I tried...
Not only create_element return false but also create_coment do so...
Why???

I run php 5.2.2 with AppServ . The version of docmxl is 20626 (I just
call domxml_version() ). OS is Windows XP.

Would someone help me ,please?
Thanks a lot.

Victor.


AFAIK, append_child and create_element are decprecated, they are only
used in PHP4.
You should use appendchild and createelement instead.

try example 498 located here:
http://www.php.net/manual/en/function.dom-domdocument-createelement.php

Tijnema

--- End Message ---

Reply via email to