php-general Digest 15 Jun 2010 16:09:17 -0000 Issue 6800
php-general Digest 15 Jun 2010 16:09:17 - Issue 6800 Topics (messages 306147 through 306170): CFP for Surge Scalability Conference 2010 306147 by: Jason Dixon Re: protecting email addresses on a web site 306148 by: Per Jessen 306149 by: Per Jessen 306150 by: cheran krishnamoorthy 306151 by: Ashley Sheridan 306154 by: Ian 306155 by: Ashley Sheridan Re: PHP on command line -- mysql_connect error 306152 by: Ferdi Re: Quick Question 306153 by: Malka Cymbalista export from one server to another 306156 by: Merlin Morgenstern 306157 by: Sándor Tamás 306158 by: Ashley Sheridan 306159 by: Richard Quadling Delete File With Any File Extension 306160 by: Shaun Thornburgh 306161 by: Adrian 306162 by: cheran krishnamoorthy 306163 by: Tanel Tammik 306164 by: Ashley Sheridan Re: Multiple Login in a single PC should not be possible 306165 by: Shreyas Agasthya 306166 by: Ashley Sheridan 306167 by: Karl DeSaulniers 306168 by: Ashley Sheridan Re: [PHP-WEBMASTER] Web Service Problem 306169 by: Richard Quadling 306170 by: Michael Shadle 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--- We're excited to announce Surge, the Scalability and Performance Conference, to be held in Baltimore on Sept 30 and Oct 1, 2010. The event focuses on case studies that demonstrate successes (and failures) in Web applications and Internet architectures. Rasmus Lerdorf will be presenting his PHP Performance Checklist talk at Surge, and our Keynote speakers include John Allspaw and Theo Schlossnagle. We are currently accepting submissions for the Call For Papers through July 9th. You can find more information, including our current list of speakers, online: http://omniti.com/surge/2010 If you've been to Velocity, or wanted to but couldn't afford it, then Surge is just what you've been waiting for. For more information, including CFP, sponsorship of the event, or participating as an exhibitor, please contact us at su...@omniti.com. Thanks, -- Jason Dixon OmniTI Computer Consulting, Inc. jdi...@omniti.com 443.325.1357 x.241 ---End Message--- ---BeginMessage--- David Mehler wrote: Hello, I've got a site that is needing to have two email addresses on it, one for general contact and information and the other for webmaster for site problems. I do not want these addresses to become harvested by spammers yet i want to make it possible for people to email if needed. I can not use javascript for this solution. I wouldn't bother - you won't escape the spammers anyway. :-( -- Per Jessen, Zürich (15.9°C) ---End Message--- ---BeginMessage--- Ashley Sheridan wrote: Unfortunately, you can't get away with just a contact form these days if you're a business, as it's a legal requirement in some countries to have a contact details available, and not just a contact form. Do you have specifics? I've never heard of such a requirement. Notwithstanding Ash's assertion, I would suggest a contact form. The email address is effectively hidden, and you can apply CAPTCHA to the form to cut down on bot spam. It also introduces some discipline on the user, and potentially allows you to categorize inquiries (making it easier to pass them on to the proper person). You can also have a pick list on the form which details which person you'd like the form to be sent to. In general, on contact forms or about us pages, I include some physical address and possibly a phone number. This might satisfy Ash's requirement for contact details. Paul It's not my requirement, it's been a legal requirement in the UK for 3 years now. It's a pretty common EU requirement for anything business related. -- Per Jessen, Zürich (16.0°C) ---End Message--- ---BeginMessage--- You can always convert an email address as image.no one can read but humans. i think this is a simple solution. Regards Cherankrish On Tue, Jun 15, 2010 at 2:50 AM, Paul M Foster pa...@quillandmouse.comwrote: On Mon, Jun 14, 2010 at 01:06:29PM +0100, Ashley Sheridan wrote: On Mon, 2010-06-14 at 08:02 -0400, David Mehler wrote: Hello, I've got a site that is needing to have two email addresses on it, one for general contact and information and the other for webmaster for site problems. I do not want these addresses to become harvested by spammers yet i want to make it possible for people to email if needed. I can not use javascript for this solution. Suggestions appreciated. Thanks. Dave. If Javascript isn't a solution (which I
Re: [PHP] protecting email addresses on a web site
David Mehler wrote: Hello, I've got a site that is needing to have two email addresses on it, one for general contact and information and the other for webmaster for site problems. I do not want these addresses to become harvested by spammers yet i want to make it possible for people to email if needed. I can not use javascript for this solution. I wouldn't bother - you won't escape the spammers anyway. :-( -- Per Jessen, Zürich (15.9°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
Ashley Sheridan wrote: Unfortunately, you can't get away with just a contact form these days if you're a business, as it's a legal requirement in some countries to have a contact details available, and not just a contact form. Do you have specifics? I've never heard of such a requirement. Notwithstanding Ash's assertion, I would suggest a contact form. The email address is effectively hidden, and you can apply CAPTCHA to the form to cut down on bot spam. It also introduces some discipline on the user, and potentially allows you to categorize inquiries (making it easier to pass them on to the proper person). You can also have a pick list on the form which details which person you'd like the form to be sent to. In general, on contact forms or about us pages, I include some physical address and possibly a phone number. This might satisfy Ash's requirement for contact details. Paul It's not my requirement, it's been a legal requirement in the UK for 3 years now. It's a pretty common EU requirement for anything business related. -- Per Jessen, Zürich (16.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
You can always convert an email address as image.no one can read but humans. i think this is a simple solution. Regards Cherankrish On Tue, Jun 15, 2010 at 2:50 AM, Paul M Foster pa...@quillandmouse.comwrote: On Mon, Jun 14, 2010 at 01:06:29PM +0100, Ashley Sheridan wrote: On Mon, 2010-06-14 at 08:02 -0400, David Mehler wrote: Hello, I've got a site that is needing to have two email addresses on it, one for general contact and information and the other for webmaster for site problems. I do not want these addresses to become harvested by spammers yet i want to make it possible for people to email if needed. I can not use javascript for this solution. Suggestions appreciated. Thanks. Dave. If Javascript isn't a solution (which I can understand for accessibility reasons) then the only method I've seen that seems to work is to have the email as an image in the same font style as it would be on the page if it were just text. Facebook uses this to display contact email addresses for people, and I've seen it used elsewhere also. The only other method I've seen is to add in extra characters with a small note to humans to remove them, but I find this quite a messy solution. Unfortunately, you can't get away with just a contact form these days if you're a business, as it's a legal requirement in some countries to have a contact details available, and not just a contact form. Do you have specifics? I've never heard of such a requirement. Notwithstanding Ash's assertion, I would suggest a contact form. The email address is effectively hidden, and you can apply CAPTCHA to the form to cut down on bot spam. It also introduces some discipline on the user, and potentially allows you to categorize inquiries (making it easier to pass them on to the proper person). You can also have a pick list on the form which details which person you'd like the form to be sent to. In general, on contact forms or about us pages, I include some physical address and possibly a phone number. This might satisfy Ash's requirement for contact details. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
On Tue, 2010-06-15 at 13:28 +0530, cheran krishnamoorthy wrote: You can always convert an email address as image.no one can read but humans. i think this is a simple solution. Regards Cherankrish On Tue, Jun 15, 2010 at 2:50 AM, Paul M Foster pa...@quillandmouse.comwrote: On Mon, Jun 14, 2010 at 01:06:29PM +0100, Ashley Sheridan wrote: On Mon, 2010-06-14 at 08:02 -0400, David Mehler wrote: Hello, I've got a site that is needing to have two email addresses on it, one for general contact and information and the other for webmaster for site problems. I do not want these addresses to become harvested by spammers yet i want to make it possible for people to email if needed. I can not use javascript for this solution. Suggestions appreciated. Thanks. Dave. If Javascript isn't a solution (which I can understand for accessibility reasons) then the only method I've seen that seems to work is to have the email as an image in the same font style as it would be on the page if it were just text. Facebook uses this to display contact email addresses for people, and I've seen it used elsewhere also. The only other method I've seen is to add in extra characters with a small note to humans to remove them, but I find this quite a messy solution. Unfortunately, you can't get away with just a contact form these days if you're a business, as it's a legal requirement in some countries to have a contact details available, and not just a contact form. Do you have specifics? I've never heard of such a requirement. Notwithstanding Ash's assertion, I would suggest a contact form. The email address is effectively hidden, and you can apply CAPTCHA to the form to cut down on bot spam. It also introduces some discipline on the user, and potentially allows you to categorize inquiries (making it easier to pass them on to the proper person). You can also have a pick list on the form which details which person you'd like the form to be sent to. In general, on contact forms or about us pages, I include some physical address and possibly a phone number. This might satisfy Ash's requirement for contact details. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'd already mentioned this, and it was deemed not very accessible (what if someone is blind, for example?) Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP on command line -- mysql_connect error
On 14 June 2010 21:58, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2010-06-14 at 21:36 +0530, Ferdi wrote: Hi list, My config is XAMPP 1.7.2 with PHP 5.3.0 I'm trying to run a php script as a cron job. The same script works perfectly from the browser, but fails when I try it from the command line (not yet set it up as cron). I get the following error: PHP Fatal error: Call to undefined function mysql_connect() in /opt/lampp/htdocs/CS/weekly_email_report.php on line 3 I tried using dl('mysql.so') before the mysql_connect, but to no avail, I get: PHP Warning: dl(): Unable to load dynamic library '/usr/lib/php/modules/mysql.so' - /usr/lib/php/modules/mysql.so: cannot open shared object file: No such file or directory in /opt/lampp/htdocs/CS/weekly_email_report.php on line 2 PHP Fatal error: Call to undefined function mysql_connect() in /opt/lampp/htdocs/CS/weekly_email_report.php on line 3 In general many functions that work when the page is accessed from the browser, fail on the command line. I tried setting extension=mysql.so in both the php.ini files (the one used by the web server and the one used by the command line (/etc/php.ini, correct??), though not simultaneously) Any pointers?? TIA Ferdi It sounds that maybe you have two different setups of PHP or that the CLI isn't using the same php.ini as the server module. What happens if you run a phpinfo() from the CLI? Do you get the output you expect? You should see the php.ini location as being the same as the server module. If not, you can pass the location of the php.ini in with the command line arguments. If you have two different installations of PHP (which some people tend to do) then you might need to make sure the right modules are installed on both. Try the ini thing first and see if that fixes the issue. Thanks, Ash http://www.ashleysheridan.co.uk Hi List, When I read Ashley's reply, I figured why not use the other php interpreter? The one the web server uses? It worked :-). Thanks Ashley. Just for academic interest, I have put up the output of phpinfo I get with the command line php interpreter at pastebin. This still does not work, but that's immaterial now. Find it at: http://pastebin.com/XL50eBFm Regards, Ferdi
Re: [PHP] Quick Question
The address to subscribe to the javascript list is http://lists.evolt.org/mailman/listinfo/javascript There is a link there to the archives. -- Malka Cymbalista Webmaster, Weizmann Institute of Science malki.cymbali...@weizmann.ac.il 08-934-3036 On 6/15/2010 at 12:16 AM, in message 513c9a13-7e3a-44e5-a3b3-1e15bb467...@designdrumm.com, Karl DeSaulniers k...@designdrumm.com wrote: Thanks Malka, I was wondering if you had a web page I could go to before I sign up to see some discussions that have taken place. I tried using the lists.evolt.org, but it did not show the javascript section. TIA, Karl On Jun 14, 2010, at 3:20 AM, Malka Cymbalista wrote: javascr...@lists.evolt.org -- Malka Cymbalista Webmaster, Weizmann Institute of Science malki.cymbali...@weizmann.ac.il 08-934-3036 On 6/14/2010 at 2:06 AM, in message 26040320-88f0-4cf3-84ca-2ff81891b...@designdrumm.com, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, I may have asked this before, but can not find any emails about it. Does anyone know of a general-javascript email list like this php list? Hoping someone here can point me in the right direction. TIA Karl DeSaulniers Design Drumm http://designdrumm.com Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: protecting email addresses on a web site
On 14/06/2010 22:51, Ashley Sheridan wrote: snip It's not my requirement, it's been a legal requirement in the UK for 3 years now. http://www.calmdesign.co.uk/articles/Website_legal_requirements/?id=16 Thanks, Ash http://www.ashleysheridan.co.uk Hi, Further to this the actual regulation is here: http://www.opsi.gov.uk/si/si2002/20022013.htm The relevant line from this: 6(c) the details of the service provider, including his electronic mail address, which make it possible to contact him rapidly and communicate with him in a direct and effective manner; It must be stressed that these laws were written before spam became 90%+ of all email communication (2002). So I suspect it could be argued that a contact form can be allowed to bypass your normal email spam checking and is therefore a quicker way to communicate effectively. IANAL ;) Regards Ian -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: protecting email addresses on a web site
On Tue, 2010-06-15 at 09:46 +0100, Ian wrote: On 14/06/2010 22:51, Ashley Sheridan wrote: snip It's not my requirement, it's been a legal requirement in the UK for 3 years now. http://www.calmdesign.co.uk/articles/Website_legal_requirements/?id=16 Thanks, Ash http://www.ashleysheridan.co.uk Hi, Further to this the actual regulation is here: http://www.opsi.gov.uk/si/si2002/20022013.htm The relevant line from this: 6(c) the details of the service provider, including his electronic mail address, which make it possible to contact him rapidly and communicate with him in a direct and effective manner; It must be stressed that these laws were written before spam became 90%+ of all email communication (2002). So I suspect it could be argued that a contact form can be allowed to bypass your normal email spam checking and is therefore a quicker way to communicate effectively. IANAL ;) Regards Ian -- The link you gave is indeed 8 years old, whereas the one I gave is a lot more current (3 years) and well after what you call the period of spam (which really started kicking off big-time before 2002 anyway) Either way, I don't think you can 'argue' with a law if you're a business. A personal website is not under such restrictions, but there are lots a business has to go through, and a business potentially faces more repercussions from breaking laws, however daft or imposing they may be. You could, I guess, claim ignorance, but that doesn't offer much protection on a law that's 3 years old... Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] export from one server to another
HI there, I am thinking about building a partner network where partners can export content to my server which will then be imported. It should be as easy as possible for the partner and not rely on any special php functions. The best way to do this I guess is to deliver them a php file which will create a xml structure that I can import. The problem I have now is, how to transfer this xml-file to my server? Of course I could do this via FTP, but then they need to have FTP enabled inside their php installation. This might scare some partners away. Does anybody have a good suggestion on how to do this? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] export from one server to another
I'd use the POST method in HTTP. With this, on a simple page you can read the XML file, and through the POST method, you can reach it. You can put the XML in a POST variable, but you can also use File input control in HTML to read and upload the file. You don't have to use FTP. SanTa 2010.06.15. 12:00 keltezéssel, Merlin Morgenstern írta: HI there, I am thinking about building a partner network where partners can export content to my server which will then be imported. It should be as easy as possible for the partner and not rely on any special php functions. The best way to do this I guess is to deliver them a php file which will create a xml structure that I can import. The problem I have now is, how to transfer this xml-file to my server? Of course I could do this via FTP, but then they need to have FTP enabled inside their php installation. This might scare some partners away. Does anybody have a good suggestion on how to do this? Thank you for any hint, Merlin smime.p7s Description: S/MIME Cryptographic Signature
Re: [PHP] export from one server to another
On Tue, 2010-06-15 at 12:00 +0200, Merlin Morgenstern wrote: HI there, I am thinking about building a partner network where partners can export content to my server which will then be imported. It should be as easy as possible for the partner and not rely on any special php functions. The best way to do this I guess is to deliver them a php file which will create a xml structure that I can import. The problem I have now is, how to transfer this xml-file to my server? Of course I could do this via FTP, but then they need to have FTP enabled inside their php installation. This might scare some partners away. Does anybody have a good suggestion on how to do this? Thank you for any hint, Merlin You could allow them to upload XML files to your server with a plain upload form. I doubt though that'll you'll convince many people to setup a local PHP installation for the purposes of creating one XML file. Setting up PHP for the first time can be a tricky thing for a lot of people to do. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] export from one server to another
On 15 June 2010 11:00, Merlin Morgenstern merli...@fastmail.fm wrote: HI there, I am thinking about building a partner network where partners can export content to my server which will then be imported. It should be as easy as possible for the partner and not rely on any special php functions. The best way to do this I guess is to deliver them a php file which will create a xml structure that I can import. The problem I have now is, how to transfer this xml-file to my server? Of course I could do this via FTP, but then they need to have FTP enabled inside their php installation. This might scare some partners away. Does anybody have a good suggestion on how to do this? Thank you for any hint, Merlin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php We have just done something similar. We went down the SOAP route as this allows third parties to be able to take our WSDL file (which describes the services we offer) and create their own code from it, essentially wrapping the SOAP comms in a class of language x. I used a slightly modified wsdl2php class from sourceforge to create my client classes for our own service, rather than manually creating them, as a proof of concept. So wsdl2java, wsdl2net (if such things exist) would do a similar job. For us, the biggest advantage of SOAP over say REST was that SOAP is a documented standard (with all its faults). We can supply a single document which is man and machine readable and fully describes our service. Admittedly, we used the Zend SOAP, WSDL and AutoDiscovery classes for all of this, so really, we did VERY little in terms of creating the SOAPy bits. We have an Authentication service and then a series of services which retrieve and supply data. We incorporated version control into all the classes. So, V1 is where we are today. As we increase functionality, we can incorporate a superseded by mechanism, which the end-user can take into account if they so wish. The WSDL file will have the latest info, they can re-generate their classes from the WSDL file and then take advantage of the new functionality. If we find a problem which essentially breaks the contract, we can kill a version. And if if has a superseded by, we are again, automatically informing the client of the newer code. Add to that live (default), test (we think this is what you asked for) and dev (this is where we are at the moment if you really want to see something) requests for a particular version. As dev becomes test, the dev is killed and superseded by the test and then the same for the test - live (with test's not being killed). So. A simple enough setup, but allows us to move at our own pace in terms of further development, allows us to incorporate requests and bespoke requests to meet the needs of our partners ... all good. And it was good fun doing this. Admittedly, there were a few bugs in the Zend code I had to fix (all patches have been supplied but awaiting someone to commit them to the code). Richard. -- - 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] Delete File With Any File Extension
Hi, I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? Thanks _ http://clk.atdmt.com/UKM/go/19780/direct/01/ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
Re: [PHP] Delete File With Any File Extension
Use glob() to get a list of matching afiles nd then unlink() them separately. I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delete File With Any File Extension
You can't use regular expression with unlink directly. have a look on this http://www.phpfreaks.com/forums/index.php?topic=256367.0 http://www.phpfreaks.com/forums/index.php?topic=256367.0Regards Cherankrish On Tue, Jun 15, 2010 at 4:17 PM, Shaun Thornburgh shaunthornbu...@hotmail.com wrote: Hi, I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? Thanks _ http://clk.atdmt.com/UKM/go/19780/direct/01/ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
[PHP] Re: Delete File With Any File Extension
Shaun Thornburgh shaunthornbu...@hotmail.com wrote in message news:bay148-w43caac3698e0134dfacc28ab...@phx.gbl... Hi, I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? Thanks _ http://clk.atdmt.com/UKM/go/19780/direct/01/ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now Hi, use glob() and then unlink with array_walk() Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Delete File With Any File Extension
On Tue, 2010-06-15 at 16:23 +0530, cheran krishnamoorthy wrote: You can't use regular expression with unlink directly. have a look on this http://www.phpfreaks.com/forums/index.php?topic=256367.0 http://www.phpfreaks.com/forums/index.php?topic=256367.0Regards Cherankrish On Tue, Jun 15, 2010 at 4:17 PM, Shaun Thornburgh shaunthornbu...@hotmail.com wrote: Hi, I need to delete a file with any file extension where i know the name of the file, is it possible to use regular expressions with the unlink function? Thanks _ http://clk.atdmt.com/UKM/go/19780/direct/01/ We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now Make sure you don't accidentally delete files you need. Once you've got the list of files with the glob() function as Adrian mentioned, don't just loop through and delete them all, as you could end up removing a file which you really need later. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Multiple Login in a single PC should not be possible
Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl -- Regards, Shreyas Agasthya
Re: [PHP] Multiple Login in a single PC should not be possible
On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Multiple Login in a single PC should not be possible
On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP] Multiple Login in a single PC should not be possible
On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Re: [PHP-WEBMASTER] Web Service Problem
On 15 June 2010 12:44, John john.zaka...@graphicano.com wrote: Really i need help coz i am trying to solve this problem from 4 weeks and i can not so please help me I want to use a web service ( created in ASP.NEt ) in my web site using php coz i will use the result in other php pages. the web service link is: http://196.218.16.133/onlinereservation/service.asmx?WSDL function name: HotelData under HotelsSearch Is there a tool for PHP or any other way to pass string for HotelData and get an XML file containing the result? I tried to learn SOAP in the manual and I can not till now return data from this web service My Code is: ? header(Content-Type: text/plain); $client = new SOAPClient('http://196.218.16.133/OnlineReservationTravelline/service.asmx?WSDL'); try { $params-HotelData = 'HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters'; $result = $client-HotelsSearch($params); //echo $result; } catch (SOAPFault $exception) { print $exception; print htmlspecialchars($client-__getLastRequest()); } var_dump($result); ? Note: the string is ' HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters’ John Zakaria Sabry Senior Web Developer 3 El Nasr Street, EL Nozha EL Gedida, Heliopolis, Cairo, Egypt Phone: +202 262 00 755 - +2 012 551 5551 Fax: +202 262 00 755 Mobile: +2 018 131 91 89 john.zaka...@graphicano.com www.graphicano.com http://pastebin.com/cuXnT9Fb That contains some PHP classes which are based upon the WSDL file. The conversion is with the sourceforge wsdl2php project (with some mods). In YOUR code ... ?php // Include the classes which wrap the SOAP service for you. require_once 'service.php'; try { // Create a new Service (unforuntate name - maybe ReservationSystem or something - Service is VERY generic). $Service = new Service(); // Let's do a tour search. $TourSearchRequest = new TourSearch(); // Populate the TourSearchRequest. $TourSearchRequest-date = '2010/01/01'; // Run the search. $TourSearchResponse = $Service-TourSearch($TourSearchRequest); // Dump the response (expecting it to be of class TourSearchResponse. var_dump($TourSearchResponse); } catch(Exception $ex) { // Dump the exception, taking note of faultstring and faultcode as these are SOAP Server generated errors. var_dump($ex); } ? But this is generating a SOAP exception on the server, so the client code won't help here. [faultstring]=string(96) Server was unable to process request. --- Object reference not set to an instance of an object. [faultcode]=string(11) soap:Server [detail]=string(0) How are you building the WSDL file? By hand? If so, I would recommend learning about using DocBlocks and a tool to auto generate the WSDL file. I use a modified version of Zend's SOAP, WSDL and AutoDiscovery tools to build my WSDL files from my source code. I then use a modified sourceforge's wsdl2php project to convert the wsdl file to normal PHP classes which do all the wrapping of the SOAP comms for me and let's me use normal PHP coding as if all the services were local and not on a remote server. Richard. -- - 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
Re: [PHP] Re: [PHP-WEBMASTER] Web Service Problem
Wso2 is also pretty awesome. I wish soap would just die and be replaced with rest and json. On Jun 15, 2010, at 6:15 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 June 2010 12:44, John john.zaka...@graphicano.com wrote: Really i need help coz i am trying to solve this problem from 4 weeks and i can not so please help me I want to use a web service ( created in ASP.NEt ) in my web site using php coz i will use the result in other php pages. the web service link is: http://196.218.16.133/onlinereservation/service.asmx?WSDL function name: HotelData under HotelsSearch Is there a tool for PHP or any other way to pass string for HotelDataand get an XML file containing the result? I tried to learn SOAP in the manual and I can not till now return data from this web service My Code is: ? header(Content-Type: text/plain); $client = new SOAPClient('http://196.218.16.133/OnlineReservationTravelline/service.asmx?WSDL'); try { $params-HotelData = 'HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters'; $result = $client-HotelsSearch($params); //echo $result; } catch (SOAPFault $exception) { print $exception; print htmlspecialchars($client-__getLastRequest()); } var_dump($result); ? Note: the string is ' HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters’ John Zakaria Sabry Senior Web Developer 3 El Nasr Street, EL Nozha EL Gedida, Heliopolis, Cairo, Egypt Phone: +202 262 00 755 - +2 012 551 5551 Fax: +202 262 00 755 Mobile: +2 018 131 91 89 john.zaka...@graphicano.com www.graphicano.com http://pastebin.com/cuXnT9Fb That contains some PHP classes which are based upon the WSDL file. The conversion is with the sourceforge wsdl2php project (with some mods). In YOUR code ... ?php // Include the classes which wrap the SOAP service for you. require_once 'service.php'; try { // Create a new Service (unforuntate name - maybe ReservationSystem or something - Service is VERY generic). $Service = new Service(); // Let's do a tour search. $TourSearchRequest = new TourSearch(); // Populate the TourSearchRequest. $TourSearchRequest-date = '2010/01/01'; // Run the search. $TourSearchResponse = $Service-TourSearch($TourSearchRequest); // Dump the response (expecting it to be of class TourSearchResponse. var_dump($TourSearchResponse); } catch(Exception $ex) { // Dump the exception, taking note of faultstring and faultcode as these are SOAP Server generated errors. var_dump($ex); } ? But this is generating a SOAP exception on the server, so the client code won't help here. [faultstring]=string(96) Server was unable to process request. --- Object reference not set to an instance of an object. [faultcode]=string(11) soap:Server [detail]=string(0) How are you building the WSDL file? By hand? If so, I would recommend learning about using DocBlocks and a tool to auto generate the WSDL file. I use a modified version of Zend's SOAP, WSDL and AutoDiscovery tools to build my WSDL files from my source code. I then use a modified sourceforge's wsdl2php project to convert the wsdl file to normal PHP classes which do all the wrapping of the SOAP comms for me and let's me use normal PHP coding as if all the services were local and not on a remote server. Richard. -- - 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] protecting email addresses on a web site
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Monday, June 14, 2010 10:52 AM To: Dotan Cohen Cc: HallMarc Websites; David Mehler; php-general Subject: Re: [PHP] protecting email addresses on a web site On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: On 14 June 2010 15:36, HallMarc Websites sa...@hallmarcwebsites.com wrote: Another is a CSS solution where you type the email address backwards and then use the CSS style declaration: style=direction: rtl; unicode-bidi: bidi-override; How does that work with screen readers? How about copy-paste? I don't think there's an accessible way of doing this. Anything that allows a screen reader to speak the email address would also be susceptible to spammers email scrapers. Thanks, Ash http://www.ashleysheridan.co.uk Copy-n-paste just gives you the email address backwards; screen readers, because we are using logical ordering and it is stored in memory the way we expect to read it, will read it correctly. I was not aware that email harvesters used screen readers. Do you have some documentation I could read to get up to speed on this? Marc Hall HallMarc Websites So many spammers, so few bullets... __ Information from ESET Smart Security, version of virus signature database 5199 (20100615) __ 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
[PHP] How could I mix popen() and pcntl_alarm() function ?
Hi, I want to use tail command to tail the file by popen and trigger the function signal() by every 3 secs. Here is my example code: declare(ticks = 1); // Unreachable function function signal($signal) { echo SIGALRM\n; pcntl_alarm(3); } pcntl_signal(SIGALRM, signal); pcntl_alarm(3); $fpcmd = popen(tail -f my.log, 'r'); while (!feof($fpcmd)) { $line = fgets($fpcmd); echo $line; } Unfortunately, the signal() function is never reached. Why ? Could someone help me ? Thanks for your help. - Arron
Re: [PHP] Re: [PHP-WEBMASTER] Web Service Problem
On 15 June 2010 17:07, Michael Shadle mike...@gmail.com wrote: Wso2 is also pretty awesome. I wish soap would just die and be replaced with rest and json. On Jun 15, 2010, at 6:15 AM, Richard Quadling rquadl...@gmail.com wrote: On 15 June 2010 12:44, John john.zaka...@graphicano.com wrote: Really i need help coz i am trying to solve this problem from 4 weeks and i can not so please help me I want to use a web service ( created in ASP.NEt ) in my web site using php coz i will use the result in other php pages. the web service link is: http://196.218.16.133/onlinereservation/service.asmx?WSDL function name: HotelData under HotelsSearch Is there a tool for PHP or any other way to pass string for HotelData and get an XML file containing the result? I tried to learn SOAP in the manual and I can not till now return data from this web service My Code is: ? header(Content-Type: text/plain); $client = new SOAPClient('http://196.218.16.133/OnlineReservationTravelline/service.asmx?WSDL'); try { $params-HotelData = 'HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters'; $result = $client-HotelsSearch($params); //echo $result; } catch (SOAPFault $exception) { print $exception; print htmlspecialchars($client-__getLastRequest()); } var_dump($result); ? Note: the string is ' HotelsParametersCityID388/CityIDUserNameadmin/UserNameUserPasswordadmin/UserPasswordDateFrom6/12/2010/DateFromDateTo6/13/2010/DateToNumberOfRooms2/NumberOfRoomsRoomRoomSerial1/RoomSerialAdults1/AdultsChildChildSerial1/ChildSerialChildAge5/ChildAge/Child/RoomRoomRoomSerial2/RoomSerialAdults2/AdultsChildChildSerial1/ChildSerialChildAge8/ChildAge/ChildChildChildSerial2/ChildSerialChildAge5/ChildAge/Child/RoomCurrencyID162/CurrencyID/HotelsParameters’ John Zakaria Sabry Senior Web Developer 3 El Nasr Street, EL Nozha EL Gedida, Heliopolis, Cairo, Egypt Phone: +202 262 00 755 - +2 012 551 5551 Fax: +202 262 00 755 Mobile: +2 018 131 91 89 john.zaka...@graphicano.com www.graphicano.com http://pastebin.com/cuXnT9Fb That contains some PHP classes which are based upon the WSDL file. The conversion is with the sourceforge wsdl2php project (with some mods). In YOUR code ... ?php // Include the classes which wrap the SOAP service for you. require_once 'service.php'; try { // Create a new Service (unforuntate name - maybe ReservationSystem or something - Service is VERY generic). $Service = new Service(); // Let's do a tour search. $TourSearchRequest = new TourSearch(); // Populate the TourSearchRequest. $TourSearchRequest-date = '2010/01/01'; // Run the search. $TourSearchResponse = $Service-TourSearch($TourSearchRequest); // Dump the response (expecting it to be of class TourSearchResponse. var_dump($TourSearchResponse); } catch(Exception $ex) { // Dump the exception, taking note of faultstring and faultcode as these are SOAP Server generated errors. var_dump($ex); } ? But this is generating a SOAP exception on the server, so the client code won't help here. [faultstring]=string(96) Server was unable to process request. --- Object reference not set to an instance of an object. [faultcode]=string(11) soap:Server [detail]=string(0) How are you building the WSDL file? By hand? If so, I would recommend learning about using DocBlocks and a tool to auto generate the WSDL file. I use a modified version of Zend's SOAP, WSDL and AutoDiscovery tools to build my WSDL files from my source code. I then use a modified sourceforge's wsdl2php project to convert the wsdl file to normal PHP classes which do all the wrapping of the SOAP comms for me and let's me use normal PHP coding as if all the services were local and not on a remote server. Richard. -- - 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 REST is a concept, not a protocol (as I understand it), so you cannot just create a service and supply a contract file. You have to document the service in some other way and then the users have to write all the code. If there was a REST+DocBlock =
RE: [PHP] protecting email addresses on a web site
On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Monday, June 14, 2010 10:52 AM To: Dotan Cohen Cc: HallMarc Websites; David Mehler; php-general Subject: Re: [PHP] protecting email addresses on a web site On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: On 14 June 2010 15:36, HallMarc Websites sa...@hallmarcwebsites.com wrote: Another is a CSS solution where you type the email address backwards and then use the CSS style declaration: style=direction: rtl; unicode-bidi: bidi-override; How does that work with screen readers? How about copy-paste? I don't think there's an accessible way of doing this. Anything that allows a screen reader to speak the email address would also be susceptible to spammers email scrapers. Thanks, Ash http://www.ashleysheridan.co.uk Copy-n-paste just gives you the email address backwards; screen readers, because we are using logical ordering and it is stored in memory the way we expect to read it, will read it correctly. I was not aware that email harvesters used screen readers. Do you have some documentation I could read to get up to speed on this? Marc Hall HallMarc Websites So many spammers, so few bullets... __ Information from ESET Smart Security, version of virus signature database 5199 (20100615) __ The message was checked by ESET Smart Security. http://www.eset.com I didn't say the harvesters used screen readers. I'm saying that if something is in plain text that a screen reader can understand, what's to stop an email address harvester? It's not worth their time to analyse every image (think about where Google is with image searching right now, and they have a lot more resources at their disposal) but it is easy enough to read text in a web page. At a push, it's possible to believe that some might be using rendered CSS to see how an email is rendered. Thing is, it's nigh on impossible to hide an email address. Use it once on a mailing list like this and it's there for the whole world to see on archive listings. I even though that my email wouldn't be found in a .pdf CV I'd made, but thanks to Google it is now! Basically, it might not be worth the effort to hide email addresses, and instead see about setting up spam filtering at the server level. You don't have to download and filter it your end, and it saves on bandwidth. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Multiple Login in a single PC should not be possible
Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript with his site and this program to control his users? Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript with his site and this program to control his users? Karl No, because Java and Javascript are not the same thing at all, and this program doesn't control user logins, it's for analysing MySQL queries, hence its name! Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Multiple Login in a single PC should not be possible
Sent from losPhone On Jun 15, 2010, at 12:37 PM, Karl DeSaulniers k...@designdrumm.com wrote: Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript Oops meant Java with his site and this program to control his users? Karl -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
Sent from losPhone On Jun 15, 2010, at 12:41 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript with his site and this program to control his users? Karl No, because Java and Javascript are not the same thing at all, and this program doesn't control user logins, it's for analysing MySQL queries, hence its name! Thanks, Ash http://www.ashleysheridan.co.uk Ok. I was referring to this. The enhanced MySQL Query Analyzer is available via the latest release of MySQL Enterprise at the Gold and Platinum subscriber levels. The latest release of MySQL Enterprise also includes: Improved Enterprise Monitor security with read-only user role and single sign-on capabilities through LDAP integration Are they talking about single user access to this program? I should have read more before posting. Sry all. Just trying to help. Karl
Re: [PHP] Multiple Login in a single PC should not be possible
On Tue, 2010-06-15 at 12:51 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 12:41 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript with his site and this program to control his users? Karl No, because Java and Javascript are not the same thing at all, and this program doesn't control user logins, it's for analysing MySQL queries, hence its name! Thanks, Ash http://www.ashleysheridan.co.uk Ok. I was referring to this. The enhanced MySQL Query Analyzer is available via the latest release of MySQL Enterprise at the Gold and Platinum subscriber levels. The latest release of MySQL Enterprise also includes: Improved Enterprise Monitor security with read-only user role and single sign-on capabilities through LDAP integration Are they talking about single user access to this program? I should have read more before posting. Sry all. Just trying to help. Karl Yeah, it's access to that software! lol Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Re: [PHP-WEBMASTER] Web Service Problem
On Tue, Jun 15, 2010 at 10:14 AM, Richard Quadling rquadl...@gmail.com wrote: REST is a concept, not a protocol (as I understand it), so you cannot just create a service and supply a contract file. You have to document the service in some other way and then the users have to write all the code. I know it's a concept, but using that concept as the language or data transport and the data format being JSON. I could try to map these to OSI model or TCP/IP model levels but I can't be bothered. I just find SOAP to be too bloated and an annoyance to work with. I mean, technically, a SOAP request is RESTful too since it can use POST or GET... but I don't like to consider it RESTful :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How could I mix popen() and pcntl_alarm() function ?
Chian Hsieh wrote: Hi, I want to use tail command to tail the file by popen and trigger the function signal() by every 3 secs. Here is my example code: declare(ticks = 1); // Unreachable function function signal($signal) { echo SIGALRM\n; pcntl_alarm(3); } pcntl_signal(SIGALRM, signal); pcntl_alarm(3); $fpcmd = popen(tail -f my.log, 'r'); while (!feof($fpcmd)) { $line = fgets($fpcmd); echo $line; } Unfortunately, the signal() function is never reached. Why ? Could someone help me ? Thanks for your help. - Arron What version of PHP are you running? Read: http://php.net/declare I found this at the bottom of the declare page. [quote] The encoding declare value is ignored in PHP 5.3 unless php is compiled with --enable-zend-multibyte. [/quote] Also, doesn't look like you are using the register_tick_function() function. Is it required? Not sure, but their examples show its usage. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Login in a single PC should not be possible
On Jun 15, 2010, at 12:52 PM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 12:51 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 12:41 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 12:37 -0500, Karl DeSaulniers wrote: Sent from losPhone On Jun 15, 2010, at 7:08 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-15 at 07:04 -0500, Karl DeSaulniers wrote: On Jun 15, 2010, at 6:24 AM, Ashley Sheridan wrote: On Tue, 2010-06-15 at 16:52 +0530, Shreyas Agasthya wrote: Karl, Which app are you talking about? Regards, Shreyas On Tue, Jun 15, 2010 at 8:21 AM, Karl DeSaulniers k...@designdrumm.comwrote: Hey, I just found this app that I think will do your single user login. It is a MySQL monitoring app called MySQL Query Analyzer. It has the functionality I think you were looking for. Might be worth a look-see. :)) Hth, Karl I think he means MySQL Query Analyzer, but I'm not sure how that is an answer to the question though! Thanks, Ash http://www.ashleysheridan.co.uk Yes. MySQL Query Analyzer. I read that it has single user login capability. Is that not what you were wanting? Karl DeSaulniers Design Drumm http://designdrumm.com Erm... According to mysql.com it's for Java and .Net (no mention of PHP) and it doesn't look like the source is released, so you can't reverse engineer it, so I don't see how it's an answer to the OP's question. Thanks, Ash http://www.ashleysheridan.co.uk Darn. I missed that part. Well, sry for getting your hopes up. I thought I was on to something. Is there the off chance he could mix JavaScript with his site and this program to control his users? Karl No, because Java and Javascript are not the same thing at all, and this program doesn't control user logins, it's for analysing MySQL queries, hence its name! Thanks, Ash http://www.ashleysheridan.co.uk Ok. I was referring to this. The enhanced MySQL Query Analyzer is available via the latest release of MySQL Enterprise at the Gold and Platinum subscriber levels. The latest release of MySQL Enterprise also includes: Improved Enterprise Monitor security with read-only user role and single sign-on capabilities through LDAP integration Are they talking about single user access to this program? I should have read more before posting. Sry all. Just trying to help. Karl Yeah, it's access to that software! lol Thanks, Ash http://www.ashleysheridan.co.uk Ahhh. My appologies. It was late when I read it. :-/ Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Syntax
[Top-post.] You'll probably have much better luck on the MySQL General list. CC'ed on this email. On Tue, Jun 15, 2010 at 20:58, Jan Reiter the-fal...@gmx.net wrote: Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't exactly a PHP question, but since mysql is the most popular database engine used with php, I figured someone here might have an idea. I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values. Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the image size and AID = 3 always holding a value for the image type) The goal is now to join table A on table B using pid, and selecting the rows based on MULTIPLE attributes. So the result should only contain rows for images, that relate to an attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID = 5 that equals 'jpg'. I know that there is an easy solution to this, doing it in one query and I have the feeling, that I can almost touch it with my fingertips in my mind, but I can't go that final step, if you know what I mean. AND THAT DRIVES ME CRAZY!! I appreciate your thoughts on this. Regards, Jan -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ We now offer SAME-DAY SETUP on a new line of servers! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL Syntax
On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote: Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't exactly a PHP question, but since mysql is the most popular database engine used with php, I figured someone here might have an idea. I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values. Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the image size and AID = 3 always holding a value for the image type) The goal is now to join table A on table B using pid, and selecting the rows based on MULTIPLE attributes. So the result should only contain rows for images, that relate to an attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID = 5 that equals 'jpg'. I know that there is an easy solution to this, doing it in one query and I have the feeling, that I can almost touch it with my fingertips in my mind, but I can't go that final step, if you know what I mean. AND THAT DRIVES ME CRAZY!! I appreciate your thoughts on this. Regards, Jan You'll be looking for something like this (untested): SELECT * FROM a LEFT JOIN b ON (a.pid = b.pid) WHERE (b.aid = 1 AND b.value 100) OR (b.aid = 3 AND b.value = 'jpg') Obviously instead of the * you may have to change to a list of field names to avoid fieldname collision on the two tables. Thanks, Ash http://www.ashleysheridan.co.uk
RE: [PHP] SQL Syntax
Thanks. That was my first attempt, too. Only this will throw out rows, that meet only one of the conditions, too. For example, I would get all pictures that are bigger than 100, regardless of type, and all pictures that are of type jpg, no matter the size. Doing it with a view would be an option, but that would immensely decrease flexibility. I guess I have to keep on cooking my brain on this ;-) I think I did it before, a few years ago when MySQL didn't support views yet, but I can't find that stuff ... @Dan: Thanks for forwarding my mail to the MySQL List! Regards, Jan From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Wednesday, June 16, 2010 3:09 AM To: Jan Reiter Cc: php-general@lists.php.net Subject: Re: [PHP] SQL Syntax On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote: Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't exactly a PHP question, but since mysql is the most popular database engine used with php, I figured someone here might have an idea. I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values. Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the image size and AID = 3 always holding a value for the image type) The goal is now to join table A on table B using pid, and selecting the rows based on MULTIPLE attributes. So the result should only contain rows for images, that relate to an attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID = 5 that equals 'jpg'. I know that there is an easy solution to this, doing it in one query and I have the feeling, that I can almost touch it with my fingertips in my mind, but I can't go that final step, if you know what I mean. AND THAT DRIVES ME CRAZY!! I appreciate your thoughts on this. Regards, Jan You'll be looking for something like this (untested): SELECT * FROM a LEFT JOIN b ON (a.pid = b.pid) WHERE (b.aid = 1 AND b.value 100) OR (b.aid = 3 AND b.value = 'jpg') Obviously instead of the * you may have to change to a list of field names to avoid fieldname collision on the two tables. 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] SQL Syntax
On Wed, 2010-06-16 at 03:23 +0200, Jan Reiter wrote: Thanks. That was my first attempt, too. Only this will throw out rows, that meet only one of the conditions, too. For example, I would get all pictures that are bigger than 100, regardless of type, and all pictures that are of type jpg, no matter the size. Doing it with a view would be an option, but that would immensely decrease flexibility. I guess I have to keep on cooking my brain on this ;-) I think I did it before, a few years ago when MySQL didn't support views yet, but I can't find that stuff ... @Dan: Thanks for forwarding my mail to the MySQL List! Regards, Jan From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Wednesday, June 16, 2010 3:09 AM To: Jan Reiter Cc: php-general@lists.php.net Subject: Re: [PHP] SQL Syntax On Wed, 2010-06-16 at 02:58 +0200, Jan Reiter wrote: Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't exactly a PHP question, but since mysql is the most popular database engine used with php, I figured someone here might have an idea. I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values. Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the image size and AID = 3 always holding a value for the image type) The goal is now to join table A on table B using pid, and selecting the rows based on MULTIPLE attributes. So the result should only contain rows for images, that relate to an attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID = 5 that equals 'jpg'. I know that there is an easy solution to this, doing it in one query and I have the feeling, that I can almost touch it with my fingertips in my mind, but I can't go that final step, if you know what I mean. AND THAT DRIVES ME CRAZY!! I appreciate your thoughts on this. Regards, Jan You'll be looking for something like this (untested): SELECT * FROM a LEFT JOIN b ON (a.pid = b.pid) WHERE (b.aid = 1 AND b.value 100) OR (b.aid = 3 AND b.value = 'jpg') Obviously instead of the * you may have to change to a list of field names to avoid fieldname collision on the two tables. Thanks, Ash http://www.ashleysheridan.co.uk I think maybe your table structure could do with a little work, as it doesn't lend itself to simple queries. It could probably be done the way you need with sub-queries, but as the tables become more populated and more people are triggering the queries, this is going to become very slow. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] SQL Syntax
Hi folks! I'm kind of ashamed to ask a question, as I haven't followed this list very much lately. This isn't exactly a PHP question, but since mysql is the most popular database engine used with php, I figured someone here might have an idea. I have 2 tables. Table A containing 2 fields. A user ID and a picture ID = A(uid,pid) and another table B, containing 3 fields. The picture ID, an attribute ID and a value for that attribute = B(pid,aid,value). Table B contains several rows for a single PID with various AIDs and values. Each AID is unique to a PID. (e.g. AID = 1 always holding the value for the image size and AID = 3 always holding a value for the image type) The goal is now to join table A on table B using pid, and selecting the rows based on MULTIPLE attributes. So the result should only contain rows for images, that relate to an attribute ID = 1 (size) that is bigger than 100 AND!!! an attribute ID = 5 that equals 'jpg'. I know that there is an easy solution to this, doing it in one query and I have the feeling, that I can almost touch it with my fingertips in my mind, but I can't go that final step, if you know what I mean. AND THAT DRIVES ME CRAZY!! I appreciate your thoughts on this. Regards, Jan
Fwd: [PHP] How could I mix popen() and pcntl_alarm() function ?
Hi, my PHP version is PHP 5.2.4-2. I was according to the example in page ( pcntl_alarm() function doc page ) http://www.php.net/manual/en/function.pcntl-alarm.php http://www.php.net/manual/en/function.pcntl-alarm.phpIn that page, the register_tick_function() does not register any function, and it's work on that example in above URI. In my try and error experiment, I think the SIGALRM does not trigger because we called popen() function. Could anyone help ? Thanks - Arron On Wed, Jun 16, 2010 at 2:38 AM, Jim Lucas li...@cmsws.com wrote: Chian Hsieh wrote: Hi, I want to use tail command to tail the file by popen and trigger the function signal() by every 3 secs. Here is my example code: declare(ticks = 1); // Unreachable function function signal($signal) { echo SIGALRM\n; pcntl_alarm(3); } pcntl_signal(SIGALRM, signal); pcntl_alarm(3); $fpcmd = popen(tail -f my.log, 'r'); while (!feof($fpcmd)) { $line = fgets($fpcmd); echo $line; } Unfortunately, the signal() function is never reached. Why ? Could someone help me ? Thanks for your help. - Arron What version of PHP are you running? Read: http://php.net/declare I found this at the bottom of the declare page. [quote] The encoding declare value is ignored in PHP 5.3 unless php is compiled with --enable-zend-multibyte. [/quote] Also, doesn't look like you are using the register_tick_function() function. Is it required? Not sure, but their examples show its usage. -- Jim Lucas A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -- - Chi-An Hsieh -- - Chi-An Hsieh