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

2009-10-24 Thread php-general-digest-help
php-general Digest 24 Oct 2009 08:28:33 - 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

php-general Digest 24 Oct 2009 21:01:16 -0000 Issue 6408

2009-10-24 Thread php-general-digest-help
php-general Digest 24 Oct 2009 21:01:16 - Issue 6408 Topics (messages 299284 through 299307): using mysql_close() = best practice? 299284 by: Kim Madsen Re: How to pronounce PHP code over the phone? 299285 by: Kim Madsen 299287 by: Dotan Cohen Re: php mail()

Re: [PHP] Sessions seems to kill db connection

2009-10-24 Thread Kim Madsen
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

[PHP] using mysql_close() = best practice?

2009-10-24 Thread Kim Madsen
Hi PHP closes an open db connection when the script is done. I've read somewhere that in PHP6 this behaviour will dissapear, is this true? In that case using mysql_close() would definetly be best practice in all current scripts, to make it portable. A nice solution would probably be adding

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-24 Thread Kim Madsen
Dotan Cohen wrote on 2009-10-23 22:40: 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

Re: [PHP] php mail() function

2009-10-24 Thread John Black
Paul M Foster wrote: 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

Re: [PHP] How to pronounce PHP code over the phone?

2009-10-24 Thread Dotan Cohen
There is... It's called a Fax ;-) Again, I am interested in knowing the proper terminology for PHP constructs and code. We have a name for a small sweer green fruit from the vine, and we have a name for the alcoholic beverage that is derived from it. Knowing these names helps one communicate

[PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
Hi there, Can anyone recommend an IDE with both subversion and ftp integration? I have played a little with eclipse but find the integrations a little dificult to manage. Idealy I want a local development server with LAMP+svn and then an easy opportunity to publish a site to a production server.

Re: [PHP] IDE with ftp and subversion?

2009-10-24 Thread John Black
Lars Nielsen wrote: Can anyone recommend an IDE with both subversion and ftp integration? I have played a little with eclipse but find the integrations a little dificult to manage. Idealy I want a local development server with LAMP+svn and then an easy opportunity to publish a site to a

Re: [PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
Hi, No I have not tryed that yet. Giving it a shot now! :-) Thanks /Lars lør, 24 10 2009 kl. 12:15 +0200, skrev John Black: Lars Nielsen wrote: Can anyone recommend an IDE with both subversion and ftp integration? I have played a little with eclipse but find the integrations a little

Re: [PHP] IDE with ftp and subversion?

2009-10-24 Thread Lars Nielsen
lør, 24 10 2009 kl. 12:15 +0200, skrev John Black: Lars Nielsen wrote: Can anyone recommend an IDE with both subversion and ftp integration? I have played a little with eclipse but find the integrations a little dificult to manage. Idealy I want a local development server with LAMP+svn

[PHP] Array

2009-10-24 Thread Ron Piggott
The following line gives me an error message when there aren't any values in the array --- how do I accommodate this? Warning: Invalid argument supplied for foreach() foreach ($_SESSION['order'] AS $key = $value ) { -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Array

2009-10-24 Thread Ashley Sheridan
On Sat, 2009-10-24 at 06:57 -0400, Ron Piggott wrote: The following line gives me an error message when there aren't any values in the array --- how do I accommodate this? Warning: Invalid argument supplied for foreach() foreach ($_SESSION['order'] AS $key = $value ) { Do an

[PHP] $_SESSION variables

2009-10-24 Thread Ron Piggott
Instead of doing: $_SESSION['order'][$reference]['quantity'] = 0; Is there a way to get remove that part of the array altogether? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_SESSION variables

2009-10-24 Thread Ashley Sheridan
On Sat, 2009-10-24 at 07:52 -0400, Ron Piggott wrote: Instead of doing: $_SESSION['order'][$reference]['quantity'] = 0; Is there a way to get remove that part of the array altogether? Ron I don't understand your question.. Thanks, Ash http://www.ashleysheridan.co.uk

Re: [PHP] $_SESSION variables

2009-10-24 Thread Ron Piggott
I am programming a shopping cart. So far I have used $_SESSION['order'][$reference]['quantity'] = 0; if the customer changed their mind about buying an item. Is there a way to remove the session variable altogether? Ron -Original Message- From: Ashley Sheridan

Re: [PHP] $_SESSION variables

2009-10-24 Thread Phpster
Unset($_SESSION['order'][$reference]['quantity']); will clear the entire session object Bastien Sent from my iPod On Oct 24, 2009, at 8:01 AM, Ron Piggott ron@actsministries.org wrote: I am programming a shopping cart. So far I have used

Re: [PHP] $_SESSION variables

2009-10-24 Thread Lester Caine
Ron Piggott wrote: Instead of doing: $_SESSION['order'][$reference]['quantity'] = 0; Is there a way to get remove that part of the array altogether? unset? unset($_SESSION['order'][$reference]['quantity']); Can't seem to reach php.net to confirm, but I use it myself ;) -- Lester Caine -

[PHP] curl spider and being a good citizen

2009-10-24 Thread Michael A. Peters
I'm writing a custom search engine for my site, it seemed easier than modifying sphyder (what I currently use) to do what I want especially since sphyder has a lot of stuff that isn't personally of use to me. One of the things I want to do when I index is list external links and check them.

Re: [PHP] Array

2009-10-24 Thread Martin Scotta
On Sat, Oct 24, 2009 at 7:59 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Sat, 2009-10-24 at 06:57 -0400, Ron Piggott wrote: The following line gives me an error message when there aren't any values in the array --- how do I accommodate this? Warning: Invalid argument supplied

Re: [PHP] Array

2009-10-24 Thread Ron Piggott
The code I have so far for orders is below. When a product hasn't been added it does what I want it to --- in giving the message Your shopping cart is empty. When a product is added, but then the user changes their mind I use the following lines of code to remove the selection:

Re: [PHP] Array

2009-10-24 Thread Ron Piggott
AHH. The count() command does the trick. Ron -Original Message- From: Ron Piggott ron.pigg...@actsministries.org Reply-to: ron.pigg...@actsministries.org To: Martin Scotta martinsco...@gmail.com, phps...@gmail.com Cc: a...@ashleysheridan.co.uk, PHP General php-general@lists.php.net

Re: [PHP] Array

2009-10-24 Thread Shawn McKenzie
Ron Piggott wrote: The code I have so far for orders is below. When a product hasn't been added it does what I want it to --- in giving the message Your shopping cart is empty. When a product is added, but then the user changes their mind I use the following lines of code to remove the

Re: [PHP] Array

2009-10-24 Thread Jim Lucas
Ron Piggott wrote: The code I have so far for orders is below. When a product hasn't been added it does what I want it to --- in giving the message Your shopping cart is empty. When a product is added, but then the user changes their mind I use the following lines of code to remove the

Re: [PHP] php mail() function

2009-10-24 Thread James Prentice
Thanks, John. I set up the sasl_passwd file as per your instructions but am still getting status=bounced. I'm wondering, what should the values in main.cf be for 'myhostname' and 'mydestination'? These pages give some info on the Shaw mail servers, but I'm not certain which I should be using:

Re: [PHP] php mail() function

2009-10-24 Thread John Black
James Prentice wrote: Also, I notice that in the mail.log file, the 'from:' value is 'www-d...@homemade'. The actual 'from:' value is provided to the php mail() function via a web form, so should be somebody's email address (e.g. my own in this case). I think PHP will use the apache user and

Re: [PHP] php mail() function

2009-10-24 Thread James Prentice
It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822; www-d...@homemade Arrival-Date:

Re: [PHP] php mail() function

2009-10-24 Thread Per olof Ljungmark
James Prentice wrote: It sends the bounced message to /var/mail/www-data and I get this: --19BE8A70109.1256417846/homemade Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; homemade X-Postfix-Queue-ID: 19BE8A70109 X-Postfix-Sender: rfc822;

[PHP] cannot compile PHP 5.2.11 on Mac OS X 10.6.1

2009-10-24 Thread Mari Masuda
Hi, I am setting up my Mac Book Pro running Mac OS X 10.6.1 as a development environment for Drupal. I already successfully have MySQL 5.1.40 and Apache 2.2.11 up and running. I tried to compile PHP 5.2.11 in the following manner and keep getting an error. Any help would be great!

[PHP] Ubuntu and Apache

2009-10-24 Thread Brian Hazelton
I know this is not quite on topic but I do not know where else to turn. I needed to reinstall ubuntu and now I cannot change myself to be the owner of var www. I had been able to change myself to the owner of it and create, delete and modify any files I wanted before I had to reinstall. Now it

Re: [PHP] Ubuntu and Apache

2009-10-24 Thread Miles Thompson
Brian, You're not doing anything wrong. Apache runs as www-data in Ubuntu, so any file created by Apache will belong to that owner:group. Add yourself to the www-data group and life will become easier. Cheers - Miles On Sat, Oct 24, 2009 at 7:42 PM, Brian Hazelton bdh_2...@comcast.netwrote:

[PHP] How to Get the Sub Classes of a Parent Class

2009-10-24 Thread Raymond Irving
Hello, Does any know of an optimized solution to get all the subclasses for a parent class? __ Raymond Irving

Re: [PHP] php mail() function

2009-10-24 Thread James Prentice
I also suspect that the problem is due to the sender address, but I have tried using the shaw email address for the From: address that's given to the mail() function and it still gets bounced. It seems like the ISP should consider that address valid. On Sat, Oct 24, 2009 at 2:20 PM, Per olof

Re: [PHP] php mail() function

2009-10-24 Thread James Prentice
But it seems like the 'From:' address being given to the PHP mail() function is maybe being ignored, because the error log lists 'www-d...@homemade' as being the sender, rather than listing the shaw address. The snippet from the PHP code: $email = $_POST['email']; ... mail($to, $subject, $msg,