php-general Digest 12 Jul 2012 06:37:14 -0000 Issue 7884

2012-07-12 Thread php-general-digest-help
php-general Digest 12 Jul 2012 06:37:14 - Issue 7884 Topics (messages 318425 through 318428): Re: Find match of string if only at end of string 318425 by: Marc Guay 318426 by: tamouse mailing lists 318428 by: marco.behnke.biz Re: [PHP-DEV] SQLite - Unwanted values

php-general Digest 12 Jul 2012 19:09:29 -0000 Issue 7885

2012-07-12 Thread php-general-digest-help
php-general Digest 12 Jul 2012 19:09:29 - Issue 7885 Topics (messages 318429 through 318446): Contribute to PHP 318429 by: Ziad Jammal 318430 by: Matijn Woudt 318431 by: Ziad Jammal 318432 by: Sebastian Krebs 318433 by: Mihamina Rakotomandimby

Re: [PHP] Re: Find match of string if only at end of string

2012-07-12 Thread ma...@behnke.biz
tamouse mailing lists tamouse.li...@gmail.com hat am 11. Juli 2012 um 19:13 geschrieben: On Wed, Jul 11, 2012 at 11:45 AM, Marc Guay marc.g...@gmail.com wrote: Answered it myself (funny how writing out a problem as descriptively as possible makes the brain work better). $end_of_url =

[PHP] Contribute to PHP

2012-07-12 Thread Ziad Jammal
Deal all phpiers, It took me a while before I hit the send key. I have been a php developer for some time and I got certified beginning of this year. I have always wanted to start contributing to php and zend framework, but I am unable to find the right docs, examples, and the how. I know it

Re: [PHP] Contribute to PHP

2012-07-12 Thread Matijn Woudt
On Thu, Jul 12, 2012 at 8:45 AM, Ziad Jammal z...@eljammal.com wrote: Deal all phpiers, It took me a while before I hit the send key. I have been a php developer for some time and I got certified beginning of this year. I have always wanted to start contributing to php and zend framework,

Re: [PHP] Contribute to PHP

2012-07-12 Thread Ziad Jammal
thx Matin and apologies all for my email. I will check with the other list. Regards, Ziad On Jul 12, 2012, at 10:52 AM, Matijn Woudt wrote: On Thu, Jul 12, 2012 at 8:45 AM, Ziad Jammal z...@eljammal.com wrote: Deal all phpiers, It took me a while before I hit the send key. I have been a

Re: [PHP] Contribute to PHP

2012-07-12 Thread Sebastian Krebs
Hi, Nowadays contributing to an OSS-project is (thankfully) often just a matter of creating a github account and sending a pull request. Because you mentioned the ZF, have a look at it's github mirror [1]. There is also a section about contributing in the readme-file. Other projects have similar

Re: [PHP] Contribute to PHP

2012-07-12 Thread Mihamina Rakotomandimby
On 07/12/2012 10:45 AM, Sebastian Krebs wrote: Nowadays contributing to an OSS-project is (thankfully) often just a matter of creating a github account and sending a pull request. Clone, commit, pull, push then send the pull request. Also note that contributing to PHP means contributing to

[PHP] database hell

2012-07-12 Thread Nick Edwards
Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query(Delete from clients where id=$User); All this works good, but, we need, in the delete function to delete from another database

Re: [PHP] database hell

2012-07-12 Thread Gibbs
On 12/07/12 12:29, Nick Edwards wrote: Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query(Delete from clients where id=$User); All this works good, but, we need, in the delete function to delete

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Gibbs li...@danielgibbs.net wrote: On 12/07/12 12:29, Nick Edwards wrote: Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query(Delete from clients where id=$User); All this works

Re: [PHP] database hell

2012-07-12 Thread Stuart Dallas
On 12 Jul 2012, at 12:29, Nick Edwards wrote: We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query(Delete from clients where id=$User); All this works good, but, we need, in the delete function to

RE: [PHP] database hell

2012-07-12 Thread Adam Nicholls
-Original Message- From: Nick Edwards [mailto:nick.z.edwa...@gmail.com] Sent: 12 July 2012 12:30 To: php-general@lists.php.net Subject: [PHP] database hell Hi We have a program that manages users, throughout all database calls created as: $connect =

Re: [PHP] database hell

2012-07-12 Thread Gibbs
On 12/07/12 12:38, Nick Edwards wrote: On 7/12/12, Gibbs li...@danielgibbs.net wrote: On 12/07/12 12:29, Nick Edwards wrote: Hi We have a program that manages users, throughout all database calls created as: $connect = mysql_connect($db_host--other variables); mysql_query(Delete from clients

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Adam Nicholls adam.nicho...@hl.co.uk wrote: -Original Message- From: Nick Edwards [mailto:nick.z.edwa...@gmail.com] Sent: 12 July 2012 12:30 To: php-general@lists.php.net Subject: [PHP] database hell Hi We have a program that manages users, throughout all database

Re: [PHP] database hell

2012-07-12 Thread Nick Edwards
On 7/12/12, Gibbs li...@danielgibbs.net wrote: $connmy=mysql_connect(host,user,pass, TRUE); http://php.net/manual/en/function.mysql-connect.php Thanks, will give that a shot I forgot to add your queries will need the new link too. So mysql_query(DELETE from userprefs where

Re: [PHP] database hell

2012-07-12 Thread ma...@behnke.biz
Nick Edwards nick.z.edwa...@gmail.com hat am 12. Juli 2012 um 14:00 geschrieben: On 7/12/12, Gibbs li...@danielgibbs.net wrote: mysql_query(DELETE from userprefs where clientr='$User', $connmy); Sidenote: And don't forget to validate user input and make use of mysql escape and prepared

Re: [PHP] database hell

2012-07-12 Thread Ashley Sheridan
ma...@behnke.biz ma...@behnke.biz wrote: Nick Edwards nick.z.edwa...@gmail.com hat am 12. Juli 2012 um 14:00 geschrieben: On 7/12/12, Gibbs li...@danielgibbs.net wrote: mysql_query(DELETE from userprefs where clientr='$User', $connmy); Sidenote: And don't forget to validate user input

[PHP] vCard Image

2012-07-12 Thread Floyd Resler
I'm trying to extract the image from a vCard and display it. I'm not having any luck. I saw a sample of putting an image into a vCard via PHP and use base64_encode. So I thought base64_decode would work. However, still no luck. Anyone have any ideas? Thanks! Floyd

[PHP] Reverse DNS testing

2012-07-12 Thread Al
I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER['SERVER_NAME']; //site name shared or not $ip = gethostbyname($host);

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Jim Lucas
On 07/12/2012 11:17 AM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER['SERVER_NAME']; //site name shared or not

Re: [PHP] Reverse DNS testing

2012-07-12 Thread David OBrien
On Jul 12, 2012, at 2:17 PM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host = $_SERVER['SERVER_NAME']; //site name

[PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Dániel
Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there is a controller for managing product items in a webshop, and there are

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Al
On 7/12/2012 3:09 PM, Jim Lucas wrote: On 07/12/2012 11:17 AM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code: $host =

Re: [PHP] Reverse DNS testing

2012-07-12 Thread Al
On 7/12/2012 3:58 PM, David OBrien wrote: On Jul 12, 2012, at 2:17 PM, Al wrote: I want to do a rDNS check on a admin entered host name to insure in-coming mail servers don't reject mail, sent by my app, because the rDNS doesn't exist or doesn't match. Here is the fundamental code:

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 13:21, Simon Dániel simondan...@gmail.com wrote: And I can't do it with the constructor of the inherited class, becouse this way I would overwrite the parent constructor. Just call to the parent constructor from the child: public function __construct() { parent::__construct();

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Daevid Vincent
-Original Message- From: Simon Dániel [mailto:simondan...@gmail.com] Sent: Thursday, July 12, 2012 1:21 PM Subject: [PHP] Entry point of an MVC framework I have started to develop a simple MVC framework. Yeah! Just what PHP needs, another MVC framework NOT. Why are you

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Ashley Sheridan
On Thu, 2012-07-12 at 14:44 -0700, Daevid Vincent wrote: -Original Message- From: Simon Dániel [mailto:simondan...@gmail.com] Sent: Thursday, July 12, 2012 1:21 PM Subject: [PHP] Entry point of an MVC framework I have started to develop a simple MVC framework. Yeah! Just

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Robert Williams
On 7/12/12 14:44, Daevid Vincent dae...@daevid.com wrote: Personally I *hate* frameworks with a passion, but if you're going to use one, then why not just build with one that is already out there and well supported. http://www.phpframeworks.com/ to start with. I wouldn't suggest most people try

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread Simon Griffiths
I totally disagree with this! (more exclamation marks) ! (see) !!! (and some more) ! Learning how to put design patterns into practice in your chosen language is a great skill to have as a programmer. I personally use various frameworks, however the existence of them does not

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Thu, Jul 12, 2012 at 10:21:21PM +0200, Simon Dániel wrote: Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Timmy Sjöstedt
On 07/12/2012 11:44 PM, Daevid Vincent wrote: -Original Message- From: Simon Dániel [mailto:simondan...@gmail.com] Sent: Thursday, July 12, 2012 1:21 PM Subject: [PHP] Entry point of an MVC framework I have started to develop a simple MVC framework. Yeah! Just what PHP needs,

RE: [PHP] Entry point of an MVC framework

2012-07-12 Thread admin
-Original Message- From: Timmy Sjöstedt [mailto:m...@iostream.se] Sent: Thursday, July 12, 2012 6:01 PM To: php-general@lists.php.net Subject: Re: [PHP] Entry point of an MVC framework On 07/12/2012 11:44 PM, Daevid Vincent wrote: -Original Message- From: Simon Dániel

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Timmy Sjöstedt
On 07/12/2012 10:21 PM, Simon Dániel wrote: Hi, I have started to develop a simple MVC framework. I have a base controller class which is abstract and all of the controllers are inherited from that. Every controller contains actions represented by methods. (E. g. there is a controller for

Re: [PHP] vCard Image

2012-07-12 Thread Matijn Woudt
On Thu, Jul 12, 2012 at 5:51 PM, Floyd Resler fres...@adex-intl.com wrote: I'm trying to extract the image from a vCard and display it. I'm not having any luck. I saw a sample of putting an image into a vCard via PHP and use base64_encode. So I thought base64_decode would work. However,

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Thu, Jul 12, 2012 at 02:44:12PM -0700, Daevid Vincent wrote: -Original Message- From: Simon Dániel [mailto:simondan...@gmail.com] Sent: Thursday, July 12, 2012 1:21 PM Subject: [PHP] Entry point of an MVC framework I have started to develop a simple MVC framework. Yeah!

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Paul M Foster
On Fri, Jul 13, 2012 at 12:26:33AM +0200, Timmy Sjöstedt wrote: [snip] The Controllers also doesn't care if the data is stored in MySQL, Postgres, in RAM or on butterflies or anything else, as long as data is returned in an expected format. I can attest that attempting to store data on

Re: [PHP] Entry point of an MVC framework

2012-07-12 Thread Matijn Woudt
On Fri, Jul 13, 2012 at 12:41 AM, Paul M Foster pa...@quillandmouse.com wrote: On Fri, Jul 13, 2012 at 12:26:33AM +0200, Timmy Sjöstedt wrote: [snip] The Controllers also doesn't care if the data is stored in MySQL, Postgres, in RAM or on butterflies or anything else, as long as data is

[PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
Hi all, Strangely PHP seems to let each class have its own layer of private scope for member variables. If a subclass defines a member variable of the same name as one defined in the parent the values are maintained independently in instances of the child class. First off a simple class with a

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Tommy Pham
On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe quickshif...@gmail.com wrote: Hi all, Strangely PHP seems to let each class have its own layer of private scope for member variables. If a subclass defines a member variable of the same name as one defined in the parent the values are maintained

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham tommy...@gmail.com wrote: On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe quickshif...@gmail.com wrote: Hi all, Strangely PHP seems to let each class have its own layer of private scope for member variables. If a subclass defines a member

Re: [PHP] Bazar behavior w/ private member variables

2012-07-12 Thread Nathan Nobbe
On Thu, Jul 12, 2012 at 9:23 PM, Nathan Nobbe quickshif...@gmail.comwrote: On Thu, Jul 12, 2012 at 8:38 PM, Tommy Pham tommy...@gmail.com wrote: On Thu, Jul 12, 2012 at 7:19 PM, Nathan Nobbe quickshif...@gmail.com wrote: Hi all, Strangely PHP seems to let each class have its own layer

[PHP] PDO: extend or encapsulate?

2012-07-12 Thread tamouse mailing lists
It's Friday, so... Yes, it's true, I have just started looking at using PDO instead of mysqli -- a bit behind the times... My question at this stage, is do people tend to extend the PDO class for their own use, or encapsulate it in a class (or do most people use it mostly in procedural code?)