Re: [PHP] Attachment to email from form.
On 26 June 2010 13:14, Gary wrote: > Richard > > Please accept my apology in that my response was sent directly to you and > not the group, I hit 'Reply" instead of 'Reply to Group'. > > Gary No problem. Here is an example of my code using the RMail script from phpguru.org. It was previously known as html_mime_mail5. setSMTPParams ( ini_get('SMTP'), 25, Null, registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN_REQUIRED), registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN), registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_PASSWORD) ); // Set the From header $o_Mail->setHeader('From', '"Richard Quadling" '); // Some other useful headers. // $o_Mail->setHeader('Return-Path', '"Return to me" '); // $o_Mail->setHeader('Return-Receipt-To', '"Delivery Receipt" '); // $o_Mail->setHeader('Disposition-Notification-To', '"Read or Delete Notification" '); // Add the subject. $o_Mail->setSubject($s_Subject); // Add the HTML with a location of the images to be added to the email automatically, rather than relying on internet to provide images // which is blocked by various security levels of Outlook. $o_Mail->setHTML($s_HTMLMessage, 'D:/Global Web Documents/images/'); // Let's add an attachment. // The filename, the mime type, the encoding and the file name to show the attachment as. $o_Mail->addAttachment(new fileAttachment('D:/Uploaded/content.zip', 'application/zip', new Base64Encoding(), 'YourContent.zip')); // If you want to keep copies of your emails, then setCc is the method to use. $o_Mail->setCc('r...@nowhere.co.uk'); // Finally, send the email to the recipients (held in an array to allow for multiple addresses) using SMTP. $o_Mail->send(array('"Your recipient\'s name" '), 'smtp'); ?> -- - 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=ZEND002498&r=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
Re: [PHP] Problem with SOAP and authentication? SoapFault exception: [HTTP] Unauthorized
On 26 June 2010 23:46, robert mena wrote: > Hi, > > I am trying to access a webservice using php's soapclient but I keep getting > the error SoapFault exception: [HTTP] Unauthorized > > If I try using a web browser I can authenticate using the same credentials > used by the php code. > > I've searched but the only mention that I found led to a 'won't fix' bug > registered to php 5.1.6. I am using 5.2.10. > > Any ideas of what may be causing this? Is there a workaround? > > Regards. > Can you show the SoapClient construction you are using? The documentation says that you can supply HTTP authentication [1] ... "For HTTP authentication, the login and password options can be used to supply credentials. For making an HTTP connection through a proxy server, the options proxy_host, proxy_port, proxy_login and proxy_password are also available. For HTTPS client certificate authentication use local_cert and passphrase options. An authentication may be supplied in the authentication option. The authentication method may be either SOAP_AUTHENTICATION_BASIC (default) or SOAP_AUTHENTICATION_DIGEST." There was recent activity on a Soap Authorisation Header bug [2]. If this issue is appropriate, you can try a building your code code from SVN (no win32 snapshots for a LONG time now). Regards, Richard. [1] http://docs.php.net/manual/en/soapclient.soapclient.php [2] http://bugs.php.net/bug.php?id=50976 -- - 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=ZEND002498&r=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
Re: [PHP] Attachment to email from form.
Richard Thank you again for your kind help. Gary "Richard Quadling" wrote in message news:aanlktikwujmpbqijd_ee9mbfpxa92ssexjddng2fg...@mail.gmail.com... > On 26 June 2010 13:14, Gary wrote: >> Richard >> >> Please accept my apology in that my response was sent directly to you and >> not the group, I hit 'Reply" instead of 'Reply to Group'. >> >> Gary > > No problem. > > Here is an example of my code using the RMail script from phpguru.org. > It was previously known as html_mime_mail5. > > // Create a new message. > $o_Mail = new RMail(); > > // As we are going to use SMTP to send the email, we need to know > where to send it. > // On my setup, the SMTP ini setting is what I'll be using. > // You can also supply any SMTP AUTH settings needed here. > $o_Mail->setSMTPParams > ( > ini_get('SMTP'), > 25, > Null, > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN_REQUIRED), > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN), > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_PASSWORD) > ); > > > // Set the From header > $o_Mail->setHeader('From', '"Richard Quadling" '); > > // Some other useful headers. > // $o_Mail->setHeader('Return-Path', '"Return to me" > '); > // $o_Mail->setHeader('Return-Receipt-To', '"Delivery Receipt" > '); > // $o_Mail->setHeader('Disposition-Notification-To', '"Read or Delete > Notification" '); > > // Add the subject. > $o_Mail->setSubject($s_Subject); > > // Add the HTML with a location of the images to be added to the email > automatically, rather than relying on internet to provide images > // which is blocked by various security levels of Outlook. > $o_Mail->setHTML($s_HTMLMessage, 'D:/Global Web Documents/images/'); > > // Let's add an attachment. > // The filename, the mime type, the encoding and the file name to show > the attachment as. > $o_Mail->addAttachment(new fileAttachment('D:/Uploaded/content.zip', > 'application/zip', new Base64Encoding(), 'YourContent.zip')); > > // If you want to keep copies of your emails, then setCc is the method to > use. > $o_Mail->setCc('r...@nowhere.co.uk'); > > // Finally, send the email to the recipients (held in an array to > allow for multiple addresses) using SMTP. > $o_Mail->send(array('"Your recipient\'s name" > '), 'smtp'); > ?> > > > -- > - > 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=ZEND002498&r=213474731 > ZOPA : http://uk.zopa.com/member/RQuadling > > __ Information from ESET Smart Security, version of virus > signature database 5233 (20100628) __ > > The message was checked by ESET Smart Security. > > http://www.eset.com > > > __ Information from ESET Smart Security, version of virus signature database 5233 (20100628) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
fuck no On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > Richard > > Thank you again for your kind help. > > Gary > > > "Richard Quadling" wrote in message > news:aanlktikwujmpbqijd_ee9mbfpxa92ssexjddng2fg...@mail.gmail.com... > > On 26 June 2010 13:14, Gary wrote: > >> Richard > >> > >> Please accept my apology in that my response was sent directly to you > and > >> not the group, I hit 'Reply" instead of 'Reply to Group'. > >> > >> Gary > > > > No problem. > > > > Here is an example of my code using the RMail script from phpguru.org. > > It was previously known as html_mime_mail5. > > > > > // Create a new message. > > $o_Mail = new RMail(); > > > > // As we are going to use SMTP to send the email, we need to know > > where to send it. > > // On my setup, the SMTP ini setting is what I'll be using. > > // You can also supply any SMTP AUTH settings needed here. > > $o_Mail->setSMTPParams > > ( > > ini_get('SMTP'), > > 25, > > Null, > > > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN_REQUIRED), > > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN), > > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_PASSWORD) > > ); > > > > > > // Set the From header > > $o_Mail->setHeader('From', '"Richard Quadling" '); > > > > // Some other useful headers. > > // $o_Mail->setHeader('Return-Path', '"Return to me" > > '); > > // $o_Mail->setHeader('Return-Receipt-To', '"Delivery Receipt" > > '); > > // $o_Mail->setHeader('Disposition-Notification-To', '"Read or Delete > > Notification" '); > > > > // Add the subject. > > $o_Mail->setSubject($s_Subject); > > > > // Add the HTML with a location of the images to be added to the email > > automatically, rather than relying on internet to provide images > > // which is blocked by various security levels of Outlook. > > $o_Mail->setHTML($s_HTMLMessage, 'D:/Global Web Documents/images/'); > > > > // Let's add an attachment. > > // The filename, the mime type, the encoding and the file name to show > > the attachment as. > > $o_Mail->addAttachment(new fileAttachment('D:/Uploaded/content.zip', > > 'application/zip', new Base64Encoding(), 'YourContent.zip')); > > > > // If you want to keep copies of your emails, then setCc is the method to > > use. > > $o_Mail->setCc('r...@nowhere.co.uk'); > > > > // Finally, send the email to the recipients (held in an array to > > allow for multiple addresses) using SMTP. > > $o_Mail->send(array('"Your recipient\'s name" > > '), 'smtp'); > > ?> > > > > > > -- > > - > > 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=ZEND002498&r=213474731 > > ZOPA : http://uk.zopa.com/member/RQuadling > > > > __ Information from ESET Smart Security, version of virus > > signature database 5233 (20100628) __ > > > > The message was checked by ESET Smart Security. > > > > http://www.eset.com > > > > > > > > > > __ Information from ESET Smart Security, version of virus signature > database 5233 (20100628) __ > > The message was checked by ESET Smart Security. > > http://www.eset.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- A Brandon_R Production
Re: [PHP] Attachment to email from form.
On 28 June 2010 13:44, Brandon Rampersad wrote: > fuck no > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > >> Richard >> >> Thank you again for your kind help. >> >> Gary >> >> >> "Richard Quadling" wrote in message >> news:aanlktikwujmpbqijd_ee9mbfpxa92ssexjddng2fg...@mail.gmail.com... >> > On 26 June 2010 13:14, Gary wrote: >> >> Richard >> >> >> >> Please accept my apology in that my response was sent directly to you >> and >> >> not the group, I hit 'Reply" instead of 'Reply to Group'. >> >> >> >> Gary >> > >> > No problem. >> > >> > Here is an example of my code using the RMail script from phpguru.org. >> > It was previously known as html_mime_mail5. >> > >> > > > // Create a new message. >> > $o_Mail = new RMail(); >> > >> > // As we are going to use SMTP to send the email, we need to know >> > where to send it. >> > // On my setup, the SMTP ini setting is what I'll be using. >> > // You can also supply any SMTP AUTH settings needed here. >> > $o_Mail->setSMTPParams >> > ( >> > ini_get('SMTP'), >> > 25, >> > Null, >> > >> registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN_REQUIRED), >> > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_LOGIN), >> > registrySettings_V2::read(registrySettings_V2::REG_SMTP_AUTH_PASSWORD) >> > ); >> > >> > >> > // Set the From header >> > $o_Mail->setHeader('From', '"Richard Quadling" '); >> > >> > // Some other useful headers. >> > // $o_Mail->setHeader('Return-Path', '"Return to me" >> > '); >> > // $o_Mail->setHeader('Return-Receipt-To', '"Delivery Receipt" >> > '); >> > // $o_Mail->setHeader('Disposition-Notification-To', '"Read or Delete >> > Notification" '); >> > >> > // Add the subject. >> > $o_Mail->setSubject($s_Subject); >> > >> > // Add the HTML with a location of the images to be added to the email >> > automatically, rather than relying on internet to provide images >> > // which is blocked by various security levels of Outlook. >> > $o_Mail->setHTML($s_HTMLMessage, 'D:/Global Web Documents/images/'); >> > >> > // Let's add an attachment. >> > // The filename, the mime type, the encoding and the file name to show >> > the attachment as. >> > $o_Mail->addAttachment(new fileAttachment('D:/Uploaded/content.zip', >> > 'application/zip', new Base64Encoding(), 'YourContent.zip')); >> > >> > // If you want to keep copies of your emails, then setCc is the method to >> > use. >> > $o_Mail->setCc('r...@nowhere.co.uk'); >> > >> > // Finally, send the email to the recipients (held in an array to >> > allow for multiple addresses) using SMTP. >> > $o_Mail->send(array('"Your recipient\'s name" >> > '), 'smtp'); >> > ?> >> > >> > >> > -- >> > - >> > 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=ZEND002498&r=213474731 >> > ZOPA : http://uk.zopa.com/member/RQuadling >> > >> > __ Information from ESET Smart Security, version of virus >> > signature database 5233 (20100628) __ >> > >> > The message was checked by ESET Smart Security. >> > >> > http://www.eset.com >> > >> > >> > >> >> >> >> __ Information from ESET Smart Security, version of virus signature >> database 5233 (20100628) __ >> >> The message was checked by ESET Smart Security. >> >> http://www.eset.com >> >> >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > A Brandon_R Production > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) how? -- - 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=ZEND002498&r=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
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: > On 28 June 2010 13:44, Brandon Rampersad wrote: > > fuck no > > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > > > >> Richard > >> > >> Thank you again for your kind help. > >> > >> Gary > >> > >> > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > how? The last email from this Rampersad contained only the word "no". This is the same person who routinely invites the whole list to "chat" with him. My evaluation is that Rampersad is a troll at best. He's being invited to my blacklist. I wouldn't pay attention to him. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql case statement
On Sun, Jun 27, 2010 at 4:08 AM, Tanel Tammik wrote: > Hello, > > how to select only if value is present? > > $query = $db->query("select menus.id, menus.name, > case > when panels.id is not null then '1' > end as hiddenpanel > > from " . \DB_MENUS . " as menus > left join " . \DB_HIDDENPANELS . " as panels on (menus.id = > panels.menu_id) > where menus.id='" . (int)$id . "' > "); > > i would like to select hiddenpanel only if there is a corresponding value in > DB_HIDDENPANELS. At the moment i get NULL if there is no corresponding value > in HIDDENPANELS table! > > Br > Tanel > That's what a LEFT JOIN does - it returns all rows from the LEFT table that match the criteria in the WHERE clause, and then returns any rows from the RIGHT table that happen do match. If you only want rows that exist in both tables, change the join from LEFT (OUTER) JOIN to INNER JOIN. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling wrote: > On 28 June 2010 13:44, Brandon Rampersad wrote: >> f**k no > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) how? Probably because you ignored his latest request to chat. Just guessing, really. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, 2010-06-28 at 09:58 -0400, Andrew Ballard wrote: > On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling wrote: > > On 28 June 2010 13:44, Brandon Rampersad wrote: > >> f**k no > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > > how? > > Probably because you ignored his latest request to chat. Just guessing, > really. > > Andrew > No, he often emails the list with random insults. He's emailed me personally a couple of times too in response to a list email. Normally I'd keep this off list, but as it's been going on for so long, and others have noticed it too, figured his off-list behaviour should be mentioned as well. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] mysql case statement
On Monday 28 June 2010 09:49:55 Andrew Ballard wrote: > On Sun, Jun 27, 2010 at 4:08 AM, Tanel Tammik wrote: > > Hello, > > > > how to select only if value is present? > > > >$query = $db->query("select menus.id, menus.name, > > case > >when panels.id is not null then '1' > >end as hiddenpanel > > > >from " . \DB_MENUS . " as menus > > left join " . \DB_HIDDENPANELS . " as panels on (menus.id = > > panels.menu_id) > >where menus.id='" . (int)$id . "' > >"); > > > > i would like to select hiddenpanel only if there is a corresponding value > > in DB_HIDDENPANELS. At the moment i get NULL if there is no corresponding > > value in HIDDENPANELS table! > > > > Br > > Tanel > > That's what a LEFT JOIN does - it returns all rows from the LEFT table > that match the criteria in the WHERE clause, and then returns any rows > from the RIGHT table that happen do match. If you only want rows that > exist in both tables, change the join from LEFT (OUTER) JOIN to INNER > JOIN. Tanel, we both learned something. I didn't fully understand join myself yet, but I think I do now. but let me ask this if the join wasn't there would an if statement like I mentioned have worked? Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Brandon Rampersad wants to chat
--- Brandon Rampersad wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-b89a7a894d-64536000e2-4urVbjaule33mrAn37NJq9MKldk You'll need to click this link to be able to chat with Brandon Rampersad. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with Brandon Rampersad, visit: http://mail.google.com/mail/a-b89a7a894d-64536000e2-4urVbjaule33mrAn37NJq9MKldk Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into "conversations" - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
I have got one, too. On Mon, Jun 28, 2010 at 7:34 PM, Ashley Sheridan wrote: > On Mon, 2010-06-28 at 09:58 -0400, Andrew Ballard wrote: > > > On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling > wrote: > > > On 28 June 2010 13:44, Brandon Rampersad > wrote: > > >> f**k no > > > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to > adapt) how? > > > > Probably because you ignored his latest request to chat. Just guessing, > really. > > > > Andrew > > > > > No, he often emails the list with random insults. He's emailed me > personally a couple of times too in response to a list email. Normally > I'd keep this off list, but as it's been going on for so long, and > others have noticed it too, figured his off-list behaviour should be > mentioned as well. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > -- Regards, Shreyas Agasthya
Re: [PHP] mysql case statement
On Sunday 27 June 2010 22:12:41 Brandon Rampersad wrote: > no At least smack me and give us an explanation. :-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Monday 28 June 2010 09:25:46 Paul M Foster wrote: > On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: > > On 28 June 2010 13:44, Brandon Rampersad wrote: > > > fuck no > > > > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > > >> Richard > > >> > > >> Thank you again for your kind help. > > >> > > >> Gary > > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > > how? > > The last email from this Rampersad contained only the word "no". This is > the same person who routinely invites the whole list to "chat" with him. > My evaluation is that Rampersad is a troll at best. He's being invited > to my blacklist. I wouldn't pay attention to him. I didn't realize this and I replied to him in that E-Mail. Now I guess there isn't going to be an answer unless someone else does, which now I hope is the case. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 10:04 AM, Ashley Sheridan wrote: > > On Mon, 2010-06-28 at 09:58 -0400, Andrew Ballard wrote: > > On Mon, Jun 28, 2010 at 8:53 AM, Richard Quadling wrote: > > On 28 June 2010 13:44, Brandon Rampersad wrote: > >> f**k no > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > > how? > > Probably because you ignored his latest request to chat. Just guessing, > really. > > Andrew > > > No, he often emails the list with random insults. He's emailed me personally > a couple of times too in response to a list email. Normally I'd keep this off > list, but as it's been going on for so long, and others have noticed it too, > figured his off-list behaviour should be mentioned as well. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > You are right, although my previous post was intended a little more tongue-in-cheek. I just thought perhaps he was an embittered Google Chat evangelist or something. :-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql case statement
On Mon, Jun 28, 2010 at 10:27 AM, David McGlone wrote: > Tanel, we both learned something. I didn't fully understand join myself yet, > but I think I do now. > > but let me ask this if the join wasn't there would an if statement like I > mentioned have worked? > > Blessings, > David M. I think you are confusing a few things. You can't really rely on testing "empty(DB_HIDDENPANELS)" because the value of the constant DB_HIDDENPANELS is most likely a string that was set with an earlier call to define. The OP could have tested for the column value "hiddenpanel" using an if (...) test as you suggeted. However, given that the OP stated he "would like to select hiddenpanel only if there is a corresponding value in DB_HIDDENPANELS," the INNER JOIN will do that at the database query level, so an if (...) then test in PHP isn't really necessary. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql case statement
On Monday 28 June 2010 11:14:53 Andrew Ballard wrote: > On Mon, Jun 28, 2010 at 10:27 AM, David McGlone wrote: > > Tanel, we both learned something. I didn't fully understand join myself > > yet, but I think I do now. > > > > but let me ask this if the join wasn't there would an if statement like I > > mentioned have worked? > > > > Blessings, > > David M. > > I think you are confusing a few things. You can't really rely on > testing "empty(DB_HIDDENPANELS)" because the value of the constant > DB_HIDDENPANELS is most likely a string that was set with an earlier > call to define. The OP could have tested for the column value > "hiddenpanel" using an if (...) test as you suggeted. However, given > that the OP stated he "would like to select hiddenpanel only if there > is a corresponding value in DB_HIDDENPANELS," the INNER JOIN will do > that at the database query level, so an if (...) then test in PHP > isn't really necessary. That is exactly what I was wondering. I haven't got to joins yet, and didn't understand them at all until Richard explained a few minutes ago. I knew my suggestion was a complete shot in the dark and I did feel stupid posting it, but I'm glad now, because I learned something invaluable. Thanks to this list, someday, which I hope is sooner than later, I'll be able to help somebody with complete confidence. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 09:25:46AM -0400, Paul M Foster wrote: > On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: > > > On 28 June 2010 13:44, Brandon Rampersad wrote: > > > fuck no > > > > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > > > > > >> Richard > > >> > > >> Thank you again for your kind help. > > >> > > >> Gary > > >> > > >> > > > > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > > how? > > The last email from this Rampersad contained only the word "no". This is > the same person who routinely invites the whole list to "chat" with him. > My evaluation is that Rampersad is a troll at best. He's being invited > to my blacklist. I wouldn't pay attention to him. I wondered about something and just went back to check. Back on 13 June, this fellow replied to a similar post with a single word. The word was an incendiary racist insult, rhyming with the word "diggers". I was stunned that anyone would do such a thing. And I just confirmed it was this fellow. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, 2010-06-28 at 12:06 -0400, Paul M Foster wrote: > On Mon, Jun 28, 2010 at 09:25:46AM -0400, Paul M Foster wrote: > > > On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: > > > > > On 28 June 2010 13:44, Brandon Rampersad wrote: > > > > fuck no > > > > > > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: > > > > > > > >> Richard > > > >> > > > >> Thank you again for your kind help. > > > >> > > > >> Gary > > > >> > > > >> > > > > > > > > > > > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) > > > how? > > > > The last email from this Rampersad contained only the word "no". This is > > the same person who routinely invites the whole list to "chat" with him. > > My evaluation is that Rampersad is a troll at best. He's being invited > > to my blacklist. I wouldn't pay attention to him. > > I wondered about something and just went back to check. Back on 13 June, > this fellow replied to a similar post with a single word. The word was > an incendiary racist insult, rhyming with the word "diggers". I was > stunned that anyone would do such a thing. And I just confirmed it was > this fellow. > > Paul > > -- > Paul M. Foster > Yes, he did this also to me in a personal reply to a message I'd posted to the list. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 12:10 PM, Ashley Sheridan wrote: > On Mon, 2010-06-28 at 12:06 -0400, Paul M Foster wrote: > >> On Mon, Jun 28, 2010 at 09:25:46AM -0400, Paul M Foster wrote: >> >> > On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: >> > >> > > On 28 June 2010 13:44, Brandon Rampersad >> > > wrote: >> > > > fuck no >> > > > >> > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: >> > > > >> > > >> Richard >> > > >> >> > > >> Thank you again for your kind help. >> > > >> >> > > >> Gary >> > > >> >> > > >> >> > >> > >> > >> > > >> > > Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) >> > > how? >> > >> > The last email from this Rampersad contained only the word "no". This is >> > the same person who routinely invites the whole list to "chat" with him. >> > My evaluation is that Rampersad is a troll at best. He's being invited >> > to my blacklist. I wouldn't pay attention to him. >> >> I wondered about something and just went back to check. Back on 13 June, >> this fellow replied to a similar post with a single word. The word was >> an incendiary racist insult, rhyming with the word "diggers". I was >> stunned that anyone would do such a thing. And I just confirmed it was >> this fellow. >> >> Paul >> >> -- >> Paul M. Foster >> > > > Yes, he did this also to me in a personal reply to a message I'd posted > to the list. > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > I've gotten a few from him as well. Total PITA! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] call_user_func_array how to use on object php >= 5.3
I am working on code that implements a delegate design pattern, this makes use of the call_user_func_array function. I am having trouble with this particular line in PHP 5.3 return call_user_func_array(array($delegate, $methodName), $parameters); $delegate is an object, and not simply the class name in a string. This works in versions of PHP lower than 5.3, but it seems as though the behaviour of this function was changed in 5.3, requiring you to pass the class name, meaning that the method will always be called statically. So my question is, is there any way that I can emulate the functionality of call_user_func_array that was present in PHP < 5.3? I would prefer not to use eval, but would like to retain the ability to call methods within objects dynamically. Sorry if I am not making myself clear, advice and input would be appreciated.
Re: [PHP] call_user_func_array how to use on object php >= 5.3
On Mon, Jun 28, 2010 at 12:39 PM, Shaun Morrow wrote: > I am working on code that implements a delegate design pattern, this makes > use of the call_user_func_array function. > > I am having trouble with this particular line in PHP 5.3 > return call_user_func_array(array($delegate, $methodName), $parameters); > > $delegate is an object, and not simply the class name in a string. > > This works in versions of PHP lower than 5.3, but it seems as though the > behaviour of this function was changed in 5.3, requiring you to pass the > class name, meaning that the method will always be called statically. > > So my question is, is there any way that I can emulate the functionality of > call_user_func_array that was present in PHP < 5.3? > > I would prefer not to use eval, but would like to retain the ability to > call > methods within objects dynamically. > > Sorry if I am not making myself clear, advice and input would be > appreciated. > i never saw anything about a change to call_user_func_array as you describe in php5.3 moreover a quick test shows its working as expected, namely when the first argument of the callback array is an object, not a string naming a class. 5.3.0 string(4) "A::b" -nathan
Re: [PHP] call_user_func_array how to use on object php >= 5.3
On Mon, Jun 28, 2010 at 12:51 PM, Nathan Nobbe wrote: > > > On Mon, Jun 28, 2010 at 12:39 PM, Shaun Morrow wrote: > >> I am working on code that implements a delegate design pattern, this makes >> use of the call_user_func_array function. >> >> I am having trouble with this particular line in PHP 5.3 >> return call_user_func_array(array($delegate, $methodName), $parameters); >> >> $delegate is an object, and not simply the class name in a string. >> >> This works in versions of PHP lower than 5.3, but it seems as though the >> behaviour of this function was changed in 5.3, requiring you to pass the >> class name, meaning that the method will always be called statically. >> >> So my question is, is there any way that I can emulate the functionality >> of >> call_user_func_array that was present in PHP < 5.3? >> >> I would prefer not to use eval, but would like to retain the ability to >> call >> methods within objects dynamically. >> >> Sorry if I am not making myself clear, advice and input would be >> appreciated. >> > > > i never saw anything about a change to call_user_func_array as you describe > in php5.3 moreover a quick test shows its working as expected, namely when > the first argument of the callback array is an object, not a string naming a > class. > > > echo phpversion() . PHP_EOL; > class A { > function b() { > var_dump(__METHOD__); > } > } > > $a = new A(); > ?> > > 5.3.0 > string(4) "A::b" > > -nathan > omg - i chopped off the critical part of the code segment :O here it is in full: -nathan
Re: [PHP] Attachment to email from form.
On 28 June 2010 20:27, Bastien Koert wrote: > On Mon, Jun 28, 2010 at 12:10 PM, Ashley Sheridan > wrote: >> On Mon, 2010-06-28 at 12:06 -0400, Paul M Foster wrote: >> >>> On Mon, Jun 28, 2010 at 09:25:46AM -0400, Paul M Foster wrote: >>> >>> > On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: >>> > >>> > > On 28 June 2010 13:44, Brandon Rampersad >>> > > wrote: >>> > > > fuck no >>> > > > >>> > > > On Mon, Jun 28, 2010 at 8:23 AM, Gary wrote: >>> > > > >>> > > >> Richard >>> > > >> >>> > > >> Thank you again for your kind help. >>> > > >> >>> > > >> Gary >>> > > >> >>> > > >> >>> > >>> > >>> > >>> > > >>> > > Enlightened criticism aside, why not? Or rather (as I'm willing to >>> > > adapt) >>> > > how? >>> > >>> > The last email from this Rampersad contained only the word "no". This is >>> > the same person who routinely invites the whole list to "chat" with him. >>> > My evaluation is that Rampersad is a troll at best. He's being invited >>> > to my blacklist. I wouldn't pay attention to him. >>> >>> I wondered about something and just went back to check. Back on 13 June, >>> this fellow replied to a similar post with a single word. The word was >>> an incendiary racist insult, rhyming with the word "diggers". I was >>> stunned that anyone would do such a thing. And I just confirmed it was >>> this fellow. >>> >>> Paul >>> >>> -- >>> Paul M. Foster >>> >> >> >> Yes, he did this also to me in a personal reply to a message I'd posted >> to the list. >> >> Thanks, >> Ash >> http://www.ashleysheridan.co.uk >> >> >> > > I've gotten a few from him as well. Total PITA! > > Yet, you insist on giving him 15 minutes of fame by emailing back and forth about him. I'd suggest no further emails from anyone with regards to this person, just set up email filters to block anything from that address. Anything else just serves his purpose. Regards Peter -- WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with SOAP and authentication? SoapFault exception: [HTTP] Unauthorized
Hi, I'll have a look. I am using Zend Framework's Zend_Soap_Client which in turn uses SoapClient. I'll try to use SoapClient directly. I am not using https and I am not going through a proxy (using a non standard port). I've tested with another SOAP client (a standalone application called SoapUI) without a problem. Is there anyone using SoapClient (or Zend_Soap_Client) with auth with success? What other library (that does not use SoapClient) could I try? On Mon, Jun 28, 2010 at 6:27 AM, Richard Quadling wrote: > On 26 June 2010 23:46, robert mena wrote: > > Hi, > > > > I am trying to access a webservice using php's soapclient but I keep > getting > > the error SoapFault exception: [HTTP] Unauthorized > > > > If I try using a web browser I can authenticate using the same > credentials > > used by the php code. > > > > I've searched but the only mention that I found led to a 'won't fix' bug > > registered to php 5.1.6. I am using 5.2.10. > > > > Any ideas of what may be causing this? Is there a workaround? > > > > Regards. > > > > Can you show the SoapClient construction you are using? > > The documentation says that you can supply HTTP authentication [1] ... > > "For HTTP authentication, the login and password options can be used > to supply credentials. For making an HTTP connection through a proxy > server, the options proxy_host, proxy_port, proxy_login and > proxy_password are also available. For HTTPS client certificate > authentication use local_cert and passphrase options. An > authentication may be supplied in the authentication option. The > authentication method may be either SOAP_AUTHENTICATION_BASIC > (default) or SOAP_AUTHENTICATION_DIGEST." > > There was recent activity on a Soap Authorisation Header bug [2]. > > If this issue is appropriate, you can try a building your code code > from SVN (no win32 snapshots for a LONG time now). > > Regards, > > Richard. > > [1] http://docs.php.net/manual/en/soapclient.soapclient.php > [2] http://bugs.php.net/bug.php?id=50976 > -- > - > 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=ZEND002498&r=213474731 > ZOPA : http://uk.zopa.com/member/RQuadling >
Re: [PHP] What am I missing here?
Rick Dwyer 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'])); strlen counts the newline so probably should you put a +1. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Brandon Rampersad wants to chat
--- Brandon Rampersad wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-b89a7a894d-92135d717d-ghWMc8mdQtBa8hhz4DGhBvCe8-k You'll need to click this link to be able to chat with Brandon Rampersad. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with Brandon Rampersad, visit: http://mail.google.com/mail/a-b89a7a894d-92135d717d-ghWMc8mdQtBa8hhz4DGhBvCe8-k Gmail offers: - Instant messaging right inside Gmail - Powerful spam protection - Built-in search for finding your messages and a helpful way of organizing emails into "conversations" - No pop-up ads or untargeted banners - just text ads and related information that are relevant to the content of your messages All this, and its yours for free. But wait, there's more! By opening a Gmail account, you also get access to Google Talk, Google's instant messaging service: http://www.google.com/talk/ Google Talk offers: - Web-based chat that you can use anywhere, without a download - A contact list that's synchronized with your Gmail account - Free, high quality PC-to-PC voice calls when you download the Google Talk client We're working hard to add new features and make improvements, so we might also ask for your comments and suggestions periodically. We appreciate your help in making our products even better! Thanks, The Google Team To learn more about Gmail and Google Talk, visit: http://mail.google.com/mail/help/about.html http://www.google.com/talk/about.html (If clicking the URLs in this message does not work, copy and paste them into the address bar of your browser). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php