php-general Digest 24 Oct 2009 08:28:33 -0000 Issue 6407

Topics (messages 299275 through 299283):

Re: regex pattern for extracting URLs
        299275 by: Paul M Foster
        299276 by: Ashley Sheridan

Re: Fedora 11 PHP install problems
        299277 by: Kim Madsen

Re: How to pronounce PHP code over the phone?
        299278 by: Dotan Cohen

Re: php mail() function
        299279 by: James Prentice
        299280 by: kranthi
        299281 by: Paul M Foster

Re: Sessions seems to kill db connection
        299282 by: kranthi
        299283 by: Kim Madsen

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Fri, Oct 23, 2009 at 01:54:40PM -0400, Brad Fuller wrote:

> Thanks Ash you are awesome!

Brad, you're violating list rules. We never say that kind of thing to
Ash *where he can hear it*. Only behind his back. ;-}

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
On Fri, 2009-10-23 at 15:17 -0400, Paul M Foster wrote:

> On Fri, Oct 23, 2009 at 01:54:40PM -0400, Brad Fuller wrote:
> 
> > Thanks Ash you are awesome!
> 
> Brad, you're violating list rules. We never say that kind of thing to
> Ash *where he can hear it*. Only behind his back. ;-}
> 
> Paul
> 
> -- 
> Paul M. Foster
> 


Well, it makes a refreshing change, off list people just want to insult
me :p

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
Ashley Sheridan wrote on 2009-10-23 19:29:
On Fri, 2009-10-23 at 13:29 -0400, Israel Ekpo wrote:

What about the error

libphp5.so: undefined symbol: OnUpdateLong

Are you still observing that error?

[removed a bunch of old posting]
Ashley, you quotefucker :-)

Well, I'm not compiling from the source now, I went back to trying to
use the Fedora repositories (which was the only reason I ended up trying
to compile from source in the first place)

If I'm not mistaken php had to be compiled with "--with-apxs" to use modules in Apache, did you do that?

Regarding the PHPmyAdmin, did you try to give the root user a password? Maybe it's a security feature in PHPmyAdmin. I don't know, havent been using that system since 1999 due to the terrrible handling of "" and null values, which caused severe trouble in an ISP i worked for before we figured out what was going on + i LOVE the tab completion in the MySQL commandline tool

--
Kind regards
Kim Emax - masterminds.dk

--- End Message ---
--- Begin Message ---
> But I think for the OP's purposes, he could simply DEFINE any word he wanted
> at the beginning of the conversation: "Listen up duder. When I say 'de-ref'
> you make hyphen and a greater-than sign. Capiche?". He could just as easily
> say, "Listen up duder. When I say 'arrow-thingy' you make hyphen and a
> greater-than sign. Capiche?"  Problem solved. ;-)
>

That is what was done, but I wanted to know if there was already some
agreed-upon language.


-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

--- End Message ---
--- Begin Message ---
I found the mail server for my ISP (shawmail.vc.shawcable.net) and
edited main.cf in the following manner:

myhostname = shawcable.net
relayhost = [shawmail.vc.shawcable.net]

I still don't receive the mail from the PHP script though. The error
log from /var/log/mail.log is this:

Oct 23 21:00:31 homemade postfix/pickup[7044]: 6CA44A70109: uid=33
from=<www-data>
Oct 23 21:00:31 homemade postfix/cleanup[7107]: 6CA44A70109:
message-id=<20091024040031.6ca44a70...@shawcable.net>
Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109:
from=<www-d...@shawcable.net>, size=527, nrcpt=1 (queue active)
Oct 23 21:00:31 homemade postfix/error[7109]: 6CA44A70109:
to=<x...@gmail.com>, relay=none, delay=0.04, delays=0.03/0/0/0.01,
dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net])
Oct 23 21:00:31 homemade postfix/cleanup[7107]: 75517A7010A:
message-id=<20091024040031.75517a70...@shawcable.net>
Oct 23 21:00:31 homemade postfix/bounce[7110]: 6CA44A70109: sender
non-delivery notification: 75517A7010A
Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: from=<>,
size=2219, nrcpt=1 (queue active)
Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: removed
Oct 23 21:00:31 homemade postfix/error[7109]: 75517A7010A:
to=<www-d...@shawcable.net>, relay=none, delay=0.03,
delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced
([shawmail.vc.shawcable.net])
Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: removed

Have I edited main.cf incorrectly, or are there other values that need
to be edited?
Cheers

On Thu, Oct 22, 2009 at 6:24 PM, James Prentice <prentice....@gmail.com> wrote:
> How would I determine my ISP's SMPT server ID? And do I need to edit
> main.cf in order to use that server?
>
> Also, is there a way to test the script just sending an email locally?
> I tried sending the email to use...@localhost, but the email was still
> not received.
>
>
>
> On Thu, Oct 22, 2009 at 4:15 PM, LinuxManMikeC <linuxmanmi...@gmail.com> 
> wrote:
>> The problem is you won't be trusted to deliver mail directly to most
>> mail servers unless you have a static IP.  Even then thats no
>> guarantee.  What you have to do is relay through your ISP's SMTP
>> server where you're "trusted".  You should also be able to setup PHP
>> to use your ISP's SMTP server and never touch the SMTP service on your
>> local machine (if you don't feel like playing with Postfix).
>>
>> On Thu, Oct 22, 2009 at 3:56 PM, James Prentice <prentice....@gmail.com> 
>> wrote:
>>> I'm trying to use the php mail() function to send a mail within a php
>>> script. This is using PHP 5.2.4 and Ubuntu Hardy Heron linux. The
>>> script runs fine and the return value of the mail function is TRUE,
>>> but the mail is never received. I'm trying to send an email to my
>>> gmail account via the local server on my machine, just to test if this
>>> script works.
>>>
>>> I installed postfix because I read in several places that people have
>>> had good luck with that mail program. From what I can tell, postfix is
>>> working. I can do:
>>>
>>> telnet localhost 25
>>> Trying 127.0.0.1...
>>> Connected to localhost.
>>> Escape character is '^]'.
>>> 220 homemade ESMTP Postfix (Ubuntu)
>>> ehlo localhost
>>> 250-homemade
>>> 250-PIPELINING
>>> 250-SIZE 10240000
>>> 250-VRFY
>>> 250-ETRN
>>> 250-STARTTLS
>>> 250-ENHANCEDSTATUSCODES
>>> 250-8BITMIME
>>> 250 DSN
>>>
>>> After the php script runs, I type 'mailq' and get the result 'mail
>>> queue is empty.' If I check /var/log/mail.log, this is what I see:
>>>
>>> Oct 21 23:54:35 homemade postfix/pickup[5735]: 2A31EA70109: uid=33
>>> from=<www-data>
>>> Oct 21 23:54:35 homemade postfix/cleanup[7997]: 2A31EA70109:
>>> message-id=<20091022065435.2a31ea70...@homemade>
>>> Oct 21 23:54:35 homemade postfix/qmgr[5736]: 2A31EA70109:
>>> from=<www-d...@homemade>, size=499, nrcpt=1 (queue active)
>>> Oct 21 23:54:35 homemade postfix/error[7999]: 2A31EA70109:
>>> to=<x...@gmail.com>, relay=none, delay=0.04, delays=0.03/0/0/0.01,
>>> dsn=5.0.0, status=bounced (gmail.com)
>>> Oct 21 23:54:35 homemade postfix/cleanup[7997]: 3217DA7010A:
>>> message-id=<20091022065435.3217da70...@homemade>
>>> Oct 21 23:54:35 homemade postfix/qmgr[5736]: 3217DA7010A: from=<>,
>>> size=2095, nrcpt=1 (queue active)
>>> Oct 21 23:54:35 homemade postfix/bounce[8000]: 2A31EA70109: sender
>>> non-delivery notification: 3217DA7010A
>>> Oct 21 23:54:35 homemade postfix/qmgr[5736]: 2A31EA70109: removed
>>> Oct 21 23:54:35 homemade postfix/local[8001]: 3217DA7010A:
>>> to=<www-d...@homemade>, relay=local, delay=0.03, delays=0/0.02/0/0.01,
>>> dsn=2.0.0, status=sent (delivered to command: procmail -a
>>> "$EXTENSION")
>>> Oct 21 23:54:35 homemade postfix/qmgr[5736]: 3217DA7010A: removed
>>>
>>> Any ideas? I am new both to php and postfix. Thanks for any help.
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>

--- End Message ---
--- Begin Message ---
i never worked with postfix, but form my experience with hmail server
i can say that you need to relay through a mail account of ISP(not the
server itself)

--- End Message ---
--- Begin Message ---
On Fri, Oct 23, 2009 at 09:11:25PM -0700, James Prentice wrote:

> I found the mail server for my ISP (shawmail.vc.shawcable.net) and
> edited main.cf in the following manner:
> 
> myhostname = shawcable.net
> relayhost = [shawmail.vc.shawcable.net]
> 
> I still don't receive the mail from the PHP script though. The error
> log from /var/log/mail.log is this:
> 
> Oct 23 21:00:31 homemade postfix/pickup[7044]: 6CA44A70109: uid=33
> from=<www-data>
> Oct 23 21:00:31 homemade postfix/cleanup[7107]: 6CA44A70109:
> message-id=<20091024040031.6ca44a70...@shawcable.net>
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109:
> from=<www-d...@shawcable.net>, size=527, nrcpt=1 (queue active)
> Oct 23 21:00:31 homemade postfix/error[7109]: 6CA44A70109:
> to=<x...@gmail.com>, relay=none, delay=0.04, delays=0.03/0/0/0.01,
> dsn=5.0.0, status=bounced ([shawmail.vc.shawcable.net])
> Oct 23 21:00:31 homemade postfix/cleanup[7107]: 75517A7010A:
> message-id=<20091024040031.75517a70...@shawcable.net>
> Oct 23 21:00:31 homemade postfix/bounce[7110]: 6CA44A70109: sender
> non-delivery notification: 75517A7010A
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: from=<>,
> size=2219, nrcpt=1 (queue active)
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 6CA44A70109: removed
> Oct 23 21:00:31 homemade postfix/error[7109]: 75517A7010A:
> to=<www-d...@shawcable.net>, relay=none, delay=0.03,
> delays=0.02/0/0/0.01, dsn=5.0.0, status=bounced
> ([shawmail.vc.shawcable.net])
> Oct 23 21:00:31 homemade postfix/qmgr[7045]: 75517A7010A: removed
> 
> Have I edited main.cf incorrectly, or are there other values that need
> to be edited?

1. Not sure why you have square brackets around the relayhost value.

2. You're getting a bounce from the ISP's mail server, one indicating it
still won't allow relay.

3. I suspect the relayhost name is wrong. This may be the name you find
in the mail headers on messages relayed to you, but I doubt it's the one
you should use to post to. I could be wrong, though.

4. All due respect to Kranthi, but I believe he's wrong about relaying
mail from your webserver to the ISP's mailserver. I believe the ISP's
mailserver doesn't care, as long as the mail comes from your "pipe". You
could probably call yourself "pi...@pepperoni.com" and your ISP would
accept it. It's just the From:. Again, I could be wrong.

5. This would be a lot simpler if you just call Shaw and ask them for
the name of the mailserver, and ask them if it's a problem for you to
post mail from your internal webserver to their mailserver. Then ask
them why such posts might bounce with a 5XX error.

Paul

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
>> Db error: Access denied for user 'www-data'@'localhost' (using password: NO)

>> WTF? I´m not using a user called www-data for MySQL connections, but apache 
>> runs as this user

in the case where $test is true there is an open mysql connection, but
when $test is false there is no open connection is  available. may be
you have opened a connection when $test is true or used a
mysql_close() when $test is false or when $_SESSION['login']['uid'] is
set.

regarding www-data, when mysql_query() fails to find a valid MySql
connection, it tries to open a new connection with mysql.default_user
and mysql.default_password (u can see these values trough phpinfo());
http://php.net/manual/en/function.mysql-connect.php

this used to be the behavior earlier, seems it was changed from PHP > 5.3.0

--- End Message ---
--- Begin Message ---
Hi Kranthi

kranthi wrote on 2009-10-24 07:27:
Db error: Access denied for user 'www-data'@'localhost' (using password: NO)

WTF? I´m not using a user called www-data for MySQL connections, but apache 
runs as this user

in the case where $test is true there is an open mysql connection, but
when $test is false there is no open connection is  available. may be
you have opened a connection when $test is true or used a
mysql_close() when $test is false or when $_SESSION['login']['uid'] is
set.

I think you missed my words about resolving the matter, when you were cutting the quoted text :-)

regarding www-data, when mysql_query() fails to find a valid MySql
connection, it tries to open a new connection with mysql.default_user
and mysql.default_password (u can see these values trough phpinfo());
http://php.net/manual/en/function.mysql-connect.php

Thanks, that explained the www-data user

--
Kind regards
Kim Emax - masterminds.dk

--- End Message ---

Reply via email to