Re: [PHP] Cost of redirect and site domain switch? Good Practice / Bad Practice / Terrible Practice

2012-08-17 Thread Jonathan Sundquist
Depending on how long you have why not just do an alias? No redirect required. On Fri, Aug 17, 2012 at 2:35 PM, Tristan sunnrun...@gmail.com wrote: So, I need to change from somedomain.com to somenewdomain.com I was thinking of doing this 1) create an alias to the site somenewdomain.com to

Re: [PHP] install PHP 5.4 by RPM

2012-09-25 Thread Jonathan Sundquist
What version of centso are you running? - The cold winds are rising On Sep 24, 2012 10:28 PM, lx lxlenovos...@gmail.com wrote: Hello: I have installed the PHP and Apache by RPM, and the version of rpm packets is: httpd-2.2.3-63.el5.centos.1.x86_64.rpm apr-1.2.7-11.el5_3.1.x86_64.rpm

Re: [PHP] Friday - Return of Brain Teasers

2012-10-05 Thread Jonathan Sundquist
It means we require more cowbell. On Fri, Oct 5, 2012 at 3:34 PM, Steven Staples sstap...@mnsi.net wrote: Subject: [PHP] Friday - Return of Brain Teasers About five-and-a-half years ago, we had a brainteasers thread going on[1]. Last year it was briefly resurrected[2], and both

Re: [PHP] SNMP via PHP

2012-10-15 Thread Jonathan Sundquist
There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials,

Re: [PHP] SNMP via PHP

2012-10-15 Thread Jonathan Sundquist
There appears to be quite a few examples, https://www.google.com/search?q=php+snmp+examplehttps://www.google.com/search?q=php+snmp+exampleaq=0oq=php+snmp+sugexp=chrome,mod=0sourceid=chromeie=UTF-8, and tutorials,

Re: [PHP] how to read emails with php

2012-12-04 Thread Jonathan Sundquist
What does it say when you call imap_errors or imap_last_error? On Tue, Dec 4, 2012 at 10:02 AM, Farzan Dalaee farzan.dal...@gmail.comwrote: i dont have access to log files on server On Azar 14, 1391, at 5:51 PM, Daniel Brown wrote: On Tue, Dec 4, 2012 at 8:10 AM, Farzan Dalaee

Re: [PHP] how to read emails with php

2012-12-04 Thread Jonathan Sundquist
= 'mail.mydomain.net:143/pop3'; $user = 'x...@mydomain.net'; $password = 'myPassword'; $mailbox = {$host}INBOX; $mbx = imap_open($mailbox , $user , $password); $check = imap_check($mbx); On 12/4/12, Jonathan Sundquist jsundqu...@gmail.com wrote: What does it say when you call imap_errors

Re: [PHP] how to read emails with php

2012-12-04 Thread Jonathan Sundquist
service like ssl setting or somthing like that Or this host im using block imap or pop3 access Best Regard Farzan Dalaee On Dec 4, 2012 10:03 PM, Jonathan Sundquist jsundqu...@gmail.com wrote: Try removing the call to the inbox and try getting a list of all the folders using

Re: [PHP] Re: form validation

2012-12-20 Thread Jonathan Sundquist
On Thu, Dec 20, 2012 at 9:34 AM, Jim Giner jim.gi...@albanyhandball.comwrote: If you are using mysql for a db, then you should already be using mysql_real_escape_string in place of addslashes. You should not be using mysql_real_escape_string going forward as it will be deprecated in php

Re: [PHP] date problem

2013-01-03 Thread Jonathan Sundquist
1/3/2012 is in fact less then 9/16/2012. On Thu, Jan 3, 2013 at 3:57 PM, Marc Fromm marc.fr...@wwu.edu wrote: I am comparing to dates. define('WSOFFBEGIN','09/16/2012'); $jes = 01/03/2012; if ( date(m/d/Y, strtotime($jes)) date(m/d/Y, strtotime(WSOFFBEGIN)) ) { $error

Re: [PHP] date problem

2013-01-03 Thread Jonathan Sundquist
Marc, When you take a date and do a strtotime you are converting it to an int which you can compare to each other much easier. So for your above example you would be best doing. define('WSOFFBEGIN','09/16/2012'); $jes = 01/03/2012; if ( strtotime($jes) strtotime(WSOFFBEGIN) ) { $error

Re: [PHP] Strip emails from a document

2013-01-26 Thread Jonathan Sundquist
If you are expecting the email address to always be the same but the first part being different you can create a regular expression to match it that way. Using a regular expression over all is going to be your best bet as shiplu suggested. On Sat, Jan 26, 2013 at 10:54 AM, shiplu

Re: [PHP] Web User Management

2013-01-30 Thread Jonathan Sundquist
For Zend Framework 2, take a look at https://github.com/ZF-Commons/ZfcUser On Wed, Jan 30, 2013 at 10:19 AM, Adolfo Olivera olivera.ado...@gmail.comwrote: You can take a look at the classes from the Zend Framework (they can be used stand alone as well) Thanks Marco, which classes

Re: [PHP] UNLESS Statement Equivalent

2013-03-11 Thread Jonathan Sundquist
Since you already have the return statement with the if statement the else isn't required. If those three statements are true you would exit the call any ways On Mar 11, 2013 4:33 PM, Angela Barone ang...@italian-getaways.com wrote: I'm looking for an 'unless' statement, but as far as I

Re: [PHP] UNLESS Statement Equivalent

2013-03-11 Thread Jonathan Sundquist
`page` = '$page'; $result = mysql_query($query) or die ('Error! -- ' . mysql_error()); On Mon, Mar 11, 2013 at 5:48 PM, Angela Barone ang...@italian-getaways.comwrote: On Mar 11, 2013, at 2:38 PM, Jonathan Sundquist wrote: Since you already have the return statement with the if statement

Re: [PHP] UNLESS Statement Equivalent

2013-03-11 Thread Jonathan Sundquist
Angela, the variable $current_page does not exist. so $curent_page does not equal $saved_page. Also the ! in front of the entire statement means that all of this is false. Since one items is true and not true = false Don't save is echoed out. If you are looking to save the results based on the

Re: [PHP] timezone

2013-04-15 Thread Jonathan Sundquist
On Mon, Apr 15, 2013 at 12:14 PM, Larry Martell larry.mart...@gmail.comwrote: I have a client that has an app the runs with PHP 5.1.6. They want to upgrade to 5.3.3. First issue I ran into, they have a line of code that is: $deftz = date(T); I'm getting this for that line: [Mon Apr 15

Re: [PHP] mongo usage

2013-07-06 Thread Jonathan Sundquist
You commented out the setting of yhe addresses variable On Jul 6, 2013 1:42 PM, Tim Dunphy bluethu...@gmail.com wrote: Hey all, I'm trying to pick up some basic use of MongoDB using PHP. I seem to have hit an early obstacle that I'd like your opinion on. I try to pass an array to the

Re: [PHP] date time problem

2013-10-06 Thread Jonathan Sundquist
This should help you out http://stackoverflow.com/questions/365191/how-to-get-time-difference-in-minutes-in-php On Oct 6, 2013 6:07 PM, Farzan Dalaee farzan.dal...@gmail.com wrote: Its so freaky Best Regards Farzan Dalaee On Oct 7, 2013, at 2:29, Jim Giner jim.gi...@albanyhandball.com