php-general Digest 21 Jun 2010 06:58:21 -0000 Issue 6808
php-general Digest 21 Jun 2010 06:58:21 - Issue 6808 Topics (messages 306275 through 306281): Re: Encrypt and Decript email using PHP 306275 by: Adam Richardson function within a class function 306276 by: Rick Pasotto 306277 by: Rick Pasotto Re: Seeking developer for short term project 306278 by: Dev Job 306280 by: Manuel Lemos not receiving mail from list 306279 by: Rick Pasotto Re: What am I missing here? 306281 by: Simcha Younger 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 -- ---BeginMessage--- On Sun, Jun 20, 2010 at 12:46 PM, saeed ahmed saeed@gmail.com wrote: hello friends, Is there a way to send an encrypted email from server-side PHP, and then decrypt it using an email client such as Outlook? regards saeed http://saeed05.wordpress.com If you use a standard such as s/mime, then yes: http://en.wikipedia.org/wiki/S/MIME http://www.php.net/manual/en/function.openssl-pkcs7-encrypt.php http://deb-tech.spaces.live.com/blog/cns!49551AC4A11853DE!1021.entry http://support.apple.com/kb/TA22353 Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com ---End Message--- ---BeginMessage--- Within a class function I have defined another function for use with the usort() function. How do I reference it? When it's not part of a class usort($arr,cmp) works fine but when it's within a class function I get this error: PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? -- Memory is like an orgasm. It's a lot better if you don't have to fake it. -- Seymour Cray (on virtual memory) Rick Pasottor...@niof.nethttp://www.niof.net ---End Message--- ---BeginMessage--- On Sun, Jun 20, 2010 at 08:47:53PM -0400, Brandon Rampersad wrote: $this-usort(); self::usort(); On Sun, Jun 20, 2010 at 7:45 PM, Rick Pasotto r...@niof.net wrote: Within a class function I have defined another function for use with the usort() function. How do I reference it? When it's not part of a class usort($arr,cmp) works fine but when it's within a class function I get this error: PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? Forgive my ignorance but I have absolutely no idea what you're trying to tell me. usort() is part of the language so when, why, how does it become an object of some class? -- We have rights, as individuals, to give as much of our own money as we please to charity; but as members of Congress we have no right so to appropriate a dollar of public money. -- David Crockett Rick Pasottor...@niof.nethttp://www.niof.net ---End Message--- ---BeginMessage--- Just wanted to let everyone know that we will be finishing up with interview this week in order to make a decision. So, if anyone is interested, please let me know so we can discuss the project further. U.S. and UK solo developers (no teams) please. Thanks! On Mon, Jun 14, 2010 at 12:46 PM, Dev Job job4d...@gmail.com wrote: Our company is looking to hire a PHP Developer for a short term project. We're currently in the last couple weeks of the interview phase to narrow down our options. We are looking for a developer that is comfortable working with existing code as well as creating new code. You must be skilled in PHP and MySQL in addition to HTML and javascript. Experience in jQuery is a plus! We're looking for candidates from the U.S. and UK only right now. If you meet the requirements and are intersted, please respond with a resume and contact information. We'll be making a decision in the next couple weeks, so please respond soon! ---End Message--- ---BeginMessage--- Hello, on 06/21/2010 12:04 AM Dev Job said the following: Just wanted to let everyone know that we will be finishing up with interview this week in order to make a decision. So, if anyone is interested, please let me know so we can discuss the project further. U.S. and UK solo developers (no teams) please. You may want to also post it in the PHP jobs section in the PHPClasses.org site. Thousands of PHP developers have signed up to get jobs offers like yours. It is free for non-urgent jobs. http://www.phpclasses.org/jobs/ -- Regards, Manuel Lemos Find and post PHP jobs http://www.phpclasses.org/jobs/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ ---End Message--- ---BeginMessage--- This evening I sent two emails to the list but have not received either of them back. Checking my logs I see that the last email I got was dated
php-general Digest 22 Jun 2010 01:43:39 -0000 Issue 6809
php-general Digest 22 Jun 2010 01:43:39 - Issue 6809 Topics (messages 306282 through 306301): Re: function within a class function 306282 by: Pete Ford 306283 by: Richard Quadling 306285 by: Gary . Website content question 306284 by: Ernie Kemp 306286 by: Shreyas Agasthya 306287 by: Ernie Kemp 306288 by: Ernie Kemp 306289 by: Ashley Sheridan 306290 by: Ernie Kemp 306291 by: Ashley Sheridan 306295 by: Ernie Kemp 306301 by: Hans à hlin PHP Active Directory? 306292 by: David Stoltz 306293 by: Ashley Sheridan 306294 by: Nathan Nobbe 306296 by: David Stoltz 306297 by: Nathan Nobbe 306298 by: David Stoltz fetching DB entries 306299 by: Ashley Sheridan 306300 by: larry.garfieldtech.com 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 -- ---BeginMessage--- On 21/06/10 00:45, Rick Pasotto wrote: Within a class function I have defined another function for use with the usort() function. How do I reference it? When it's not part of a class usort($arr,cmp) works fine but when it's within a class function I get this error: PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? you need to use an array to describe the callback function: class Foo { public function cmp($a,$b) { // do comparison and return result } } then $foo = new Foo(); usort($arr,Array($foo,'cmp')); I think that's right - doesn't the manual describe this sort of thing about using callback functions that are class members? -- Peter Ford, Developer phone: 01580 89 fax: 01580 893399 Justcroft International Ltd. www.justcroft.com Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom Registered in England and Wales: 2297906 Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS ---End Message--- ---BeginMessage--- On 21 June 2010 00:45, Rick Pasotto r...@niof.net wrote: Within a class function I have defined another function for use with the usort() function. How do I reference it? When it's not part of a class usort($arr,cmp) works fine but when it's within a class function I get this error: PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? -- Memory is like an orgasm. It's a lot better if you don't have to fake it. -- Seymour Cray (on virtual memory) Rick Pasotto r...@niof.net http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ?php class foo { public $array = array(3,2,1); private function cmp($a, $b) { return $a === $b ? 0 : ($a $b ? -1 : 1); } public function bar() { usort($this-array, array($this, 'cmp')); } } $baz = new foo(); $baz-bar(); print_r($baz-array); or ?php class foo { public $array = array(3,2,1); public function bar() { usort($this-array, function($a, $b) { return $a === $b ? 0 : ($a $b ? -1 : 1); }); } } $baz = new foo(); $baz-bar(); print_r($baz-array); if you have closures available to you. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling ---End Message--- ---BeginMessage--- On Mon, Jun 21, 2010 at 10:49 AM, Pete Ford wrote: On 21/06/10 00:45, Rick Pasotto wrote: I think that's right - doesn't the manual describe this sort of thing about using callback functions that are class members? Yes. http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback ---End Message--- ---BeginMessage--- This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website
Re: [PHP] What am I missing here?
On Sat, 19 Jun 2010 13:21:02 -0400 Rick Dwyer rpdw...@earthlink.net wrote: Hello List. I am completely at a loss for why the line of code below returns the desired value: $PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRI PT_NAME']), strlen($_SERVER['REQUEST_URI'])); BUT, putting the same line of code on 1 line fails to return anything: $PATH_INFO= substr($_SERVER['REQUEST_URI'],strlen($_SERVER['SCRIPT_NAME']), strlen($_SERVER['REQUEST_URI'])); --Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php It looks like since you broke your key in the first line, the value returned is 0, since the key 'SRI PT_NAME' does not exist. When you fixed this, SCRIPT_NAME was the same length as REQUEST_URI so nothing was returned. look at the documentation on substr, you need to fix you parameters. -- Simcha Younger sim...@syounger.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function within a class function
On 21 June 2010 00:45, Rick Pasotto r...@niof.net wrote: Within a class function I have defined another function for use with the usort() function. How do I reference it? When it's not part of a class usort($arr,cmp) works fine but when it's within a class function I get this error: PHP Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION Is it not in the scope of the class function? -- Memory is like an orgasm. It's a lot better if you don't have to fake it. -- Seymour Cray (on virtual memory) Rick Pasotto r...@niof.net http://www.niof.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ?php class foo { public $array = array(3,2,1); private function cmp($a, $b) { return $a === $b ? 0 : ($a $b ? -1 : 1); } public function bar() { usort($this-array, array($this, 'cmp')); } } $baz = new foo(); $baz-bar(); print_r($baz-array); or ?php class foo { public $array = array(3,2,1); public function bar() { usort($this-array, function($a, $b) { return $a === $b ? 0 : ($a $b ? -1 : 1); }); } } $baz = new foo(); $baz-bar(); print_r($baz-array); if you have closures available to you. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Website content question
This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.php and all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie
Re: [PHP] Re: function within a class function
On Mon, Jun 21, 2010 at 10:49 AM, Pete Ford wrote: On 21/06/10 00:45, Rick Pasotto wrote: I think that's right - doesn't the manual describe this sort of thing about using callback functions that are class members? Yes. http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website content question
Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP’d the file over to web hosting server template location. Through wordpress “administrator” I added my file called homepage.php. I FTP’d my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpand all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it’s not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie -- Regards, Shreyas Agasthya
RE: [PHP] Website content question
So sorry about the link, in too much of a hurry. My server site is http://digitalbiz4u.com/wordpress/ I used ?php /* Template Name: Home Page */ in my Homepage.php program. They very much. .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie -- Regards, Shreyas Agasthya No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/20/10 14:36:00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Website content question
Just as a follow up I'm including a link to a test site that I wish to have the wordpress to be able to change the content, but I'm unable to have wordpress use my includes. I must be putting them in the wrong places so need some help with this. Thanks, .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie -- Regards, Shreyas Agasthya No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/20/10 14:36:00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Website content question
On Mon, 2010-06-21 at 10:04 -0400, Ernie Kemp wrote: Just as a follow up I'm including a link to a test site that I wish to have the wordpress to be able to change the content, but I'm unable to have wordpress use my includes. I must be putting them in the wrong places so need some help with this. Thanks, .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie -- Regards, Shreyas Agasthya No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/20/10 14:36:00 There are guides online to creating Wordpress templates. Have you tried editing an existing template first rather than create one from scratch? It's how I've always made them. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] Website content question
Need to use the template http://www.digitalbiz4u.com/site_flash/ . Thanks, /Ernie From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: June-21-10 10:09 AM To: Ernie Kemp Cc: 'Shreyas Agasthya'; 'PHP General List' Subject: RE: [PHP] Website content question On Mon, 2010-06-21 at 10:04 -0400, Ernie Kemp wrote: Just as a follow up I'm including a link to a test site that I wish to have the wordpress to be able to change the content, but I'm unable to have wordpress use my includes. I must be putting them in the wrong places so need some help with this. Thanks, .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie -- Regards, Shreyas Agasthya No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/20/10 14:36:00 There are guides online to creating Wordpress templates. Have you tried editing an existing template first rather than create one from scratch? It's how I've always made them. Thanks, Ash http://www.ashleysheridan.co.uk No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/21/10 02:36:00
RE: [PHP] Website content question
On Mon, 2010-06-21 at 10:40 -0400, Ernie Kemp wrote: Need to use the template http://www.digitalbiz4u.com/site_flash/ . Thanks, /Ernie From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: June-21-10 10:09 AM To: Ernie Kemp Cc: 'Shreyas Agasthya'; 'PHP General List' Subject: RE: [PHP] Website content question On Mon, 2010-06-21 at 10:04 -0400, Ernie Kemp wrote: Just as a follow up I'm including a link to a test site that I wish to have the wordpress to be able to change the content, but I'm unable to have wordpress use my includes. I must be putting them in the wrong places so need some help with this. Thanks, .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie You can still do that, just convert an existing template. You've still not shown us the code you're using, so we can't really help you in the way you want. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] PHP Active Directory?
Folks, I'm trying to validate an email address which is entered in a form field against our Active Directory. I'm using some PHP scripting supplied by http://phpad.sunyday.net/ but it's not working, and the site doesn't seem to be supported anymore. Does anyone have any good method of doing this? Thanks for any info. -Dave
Re: [PHP] PHP Active Directory?
On Mon, 2010-06-21 at 10:59 -0400, David Stoltz wrote: Folks, I'm trying to validate an email address which is entered in a form field against our Active Directory. I'm using some PHP scripting supplied by http://phpad.sunyday.net/ but it's not working, and the site doesn't seem to be supported anymore. Does anyone have any good method of doing this? Thanks for any info. -Dave Have you looked at the LDAP functions? http://php.net/manual/en/ref.ldap.php Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP Active Directory?
On Mon, Jun 21, 2010 at 8:59 AM, David Stoltz dsto...@shh.org wrote: Folks, I'm trying to validate an email address which is entered in a form field against our Active Directory. Does anyone have any good method of doing this? try the adLDAP class - its the chronic http://adldap.sourceforge.net/ -nathan
RE: [PHP] Website content question
Resolved. The paths are: wordpress- flash Ø CSS Ø Js Wordpress/mytheme - your custom template files Thanks, /Ernie From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: June-21-10 10:43 AM To: Ernie Kemp Cc: 'Shreyas Agasthya'; 'PHP General List' Subject: RE: [PHP] Website content question On Mon, 2010-06-21 at 10:40 -0400, Ernie Kemp wrote: Need to use the template http://www.digitalbiz4u.com/site_flash/ . Thanks, /Ernie From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: June-21-10 10:09 AM To: Ernie Kemp Cc: 'Shreyas Agasthya'; 'PHP General List' Subject: RE: [PHP] Website content question On Mon, 2010-06-21 at 10:04 -0400, Ernie Kemp wrote: Just as a follow up I'm including a link to a test site that I wish to have the wordpress to be able to change the content, but I'm unable to have wordpress use my includes. I must be putting them in the wrong places so need some help with this. Thanks, .../Ernie -Original Message- From: Shreyas Agasthya [mailto:shreya...@gmail.com] Sent: June-21-10 8:59 AM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Ernie, I am sure you know none of us could have accessed the link that you have given there. Can you let us know what code you have written so that one of us can guide you? As a broad pitch, your php code has to be either in ?php ? or ? ? I would wait for your code and other to probe a little more. Regards, Shreyas On Mon, Jun 21, 2010 at 5:11 PM, Ernie Kemp ernie.k...@sympatico.ca wrote: This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP'd the file over to web hosting server template location. Through wordpress administrator I added my file called homepage.php. I FTP'd my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpan d all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it's not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie You can still do that, just convert an existing template. You've still not shown us the code you're using, so we can't really help you in the way you want. Thanks, Ash http://www.ashleysheridan.co.uk No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/21/10 02:36:00
RE: [PHP] PHP Active Directory?
Awesome – thanks – BTW, what does “it’s the chronic” mean? From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Monday, June 21, 2010 11:27 AM To: David Stoltz Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Active Directory? On Mon, Jun 21, 2010 at 8:59 AM, David Stoltz dsto...@shh.org wrote: Folks, I'm trying to validate an email address which is entered in a form field against our Active Directory. Does anyone have any good method of doing this? try the adLDAP class - its the chronic http://adldap.sourceforge.net/ -nathan
Re: [PHP] PHP Active Directory?
On Mon, Jun 21, 2010 at 9:42 AM, David Stoltz dsto...@shh.org wrote: Awesome – thanks – BTW, what does “it’s the chronic” mean? listen to some dr. dre or come visit me in denver, co :) -nathan
RE: [PHP] PHP Active Directory?
Lol – ok…I guess it’s comparable to “it’s the bomb”…. Thanks ;-) From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Monday, June 21, 2010 11:46 AM To: David Stoltz Cc: php-general@lists.php.net Subject: Re: [PHP] PHP Active Directory? On Mon, Jun 21, 2010 at 9:42 AM, David Stoltz dsto...@shh.org wrote: Awesome – thanks – BTW, what does “it’s the chronic” mean? listen to some dr. dre or come visit me in denver, co :) -nathan
[PHP] fetching DB entries
Hi All, This is just a bit of a 'throw it out to the masses' sort of question to see what people might recommend. At the moment, if I am retrieving a single record from the DB, my code looks like this: $query = SELECT * FROM table WHERE id=1; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { return $row; } Now, aside from the actual SQL involved, is this efficient? Would it gain me anything if I used mysql_result() statements instead, or would that only be efficient if there were a small number of fields I was retrieving data for? Should I use something else entirely? I've not got to the testing this myself, as I figured something like this might be common knowledge for all of you who are better than me at optimisation. Is it even an issue if I'm only retrieving a single record in this manner (I always make my id field in a table the primary key, so it means I won't ever be retrieving more than one record) Thanks in advance for any input you guys have! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] fetching DB entries
Performance-wise, SELECT * is slower than specifying fields (marginally). If you just want a single field then mysql_result() will be faster, but if you want multiple fields mysql_fetch_* is your best bet. As far as the PHP goes, if you know there will be only a single record I'd suggest using: if ($row = mysql_fetch_array($result)) { // Do stuff } As then you get an automatic not found else condition you can use. That should be the same performance as the while, but get you the extra information. That said, you really shouldn't be using ext/mysql anymore. Use either ext/mysqli or PDO. Better APIs, more secure, faster, and actually maintained. --Larry Garfield On 6/21/10 1:31 PM, Ashley Sheridan wrote: Hi All, This is just a bit of a 'throw it out to the masses' sort of question to see what people might recommend. At the moment, if I am retrieving a single record from the DB, my code looks like this: $query = SELECT * FROM table WHERE id=1; $result = mysql_query($query); while($row = mysql_fetch_array($result)) { return $row; } Now, aside from the actual SQL involved, is this efficient? Would it gain me anything if I used mysql_result() statements instead, or would that only be efficient if there were a small number of fields I was retrieving data for? Should I use something else entirely? I've not got to the testing this myself, as I figured something like this might be common knowledge for all of you who are better than me at optimisation. Is it even an issue if I'm only retrieving a single record in this manner (I always make my id field in a table the primary key, so it means I won't ever be retrieving more than one record) Thanks in advance for any input you guys have! Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website content question
Did you include the necessary php code? ** Hans Åhlin Tel: +46761488019 icq: 275232967 http://www.kronan-net.com/ irc://irc.freenode.net:6667 - TheCoin ** 2010/6/21 Ernie Kemp ernie.k...@sympatico.ca This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP’d the file over to web hosting server template location. Through wordpress “administrator” I added my file called homepage.php. I FTP’d my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.phpand all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it’s not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie
RE: [PHP] Website content question
I did put the PHP code. It kind of working. From: ahlin.h...@gmail.com [mailto:ahlin.h...@gmail.com] On Behalf Of Hans Åhlin Sent: June-21-10 9:43 PM To: Ernie Kemp Cc: PHP General List Subject: Re: [PHP] Website content question Did you include the necessary php code? ** Hans Åhlin Tel: +46761488019 icq: 275232967 http://www.kronan-net.com/ irc://irc.freenode.net:6667 - TheCoin ** 2010/6/21 Ernie Kemp ernie.k...@sympatico.ca Error! Filename not specified. This is not a direct PHP question but I will be using PHP in the website. I go to the php list because the wordpress forum does not respond to my questions and I know some of you have a lot of expertise in other areas than PHP. I wish to a my own pages to a theme. I created pages on my PC and added the code at the top of the page for wordpress to use the page for a template page. I than FTP’d the file over to web hosting server template location. Through wordpress “administrator” I added my file called homepage.php. I FTP’d my CSS, images, js and flash folders over to the template location. Went to load the website http://localhost/Michael-8701/site_flash/wordpress/wp-content/homepage.php and all I got was the html code displayed. I tried moving the folder around but same results. Read some docs on this but it’s not clear to me why this will not work. Please help this is new to me and I need to get over this wall. Thanks, /Ernie No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.829 / Virus Database: 271.1.1/2952 - Release Date: 06/21/10 14:36:00