Re: [PHP] Credit Card encryption
Just wondering: seems there's a bit of a misunderstanding going on here. Are you talking about storing credit card information in a way such that customers can do online transactions without entering that information? Or are you talking about storing this information so your own company can fill in the details on a monthly basis? If 1) then the above points apply and you should not store the data, period. If 2) then I would assume the situation is somewhat different - though, not knowing the laws from the US I wouldn't really know. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
On Tue, Jun 01, 2010 at 09:52:54AM +0200, Peter Lind wrote: Just wondering: seems there's a bit of a misunderstanding going on here. Are you talking about storing credit card information in a way such that customers can do online transactions without entering that information? Or are you talking about storing this information so your own company can fill in the details on a monthly basis? If 1) then the above points apply and you should not store the data, period. If 2) then I would assume the situation is somewhat different - though, not knowing the laws from the US I wouldn't really know. No to #1, yes to #2. As for #1, companies like Godaddy do store this information, so I know it can be safely done. But no, we do #2. If we were doing #1, I would turn this over to some gateway and not save the info. I'm not sure any of this has to do with laws. It has more to do with the PSS and the rules of individual credit card companies (Visa, American Express, etc.). Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
On 1 June 2010 15:58, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Jun 01, 2010 at 09:52:54AM +0200, Peter Lind wrote: Just wondering: seems there's a bit of a misunderstanding going on here. Are you talking about storing credit card information in a way such that customers can do online transactions without entering that information? Or are you talking about storing this information so your own company can fill in the details on a monthly basis? If 1) then the above points apply and you should not store the data, period. If 2) then I would assume the situation is somewhat different - though, not knowing the laws from the US I wouldn't really know. No to #1, yes to #2. As for #1, companies like Godaddy do store this information, so I know it can be safely done. As I noted above: the question is not whether it can be done, the question is whether you want to be the next critter in the limelight because *you* couldn't do it. However, glad to hear you're not looking to do this. That brings up the next question though: what's this got to do with PHP? If I was to store any information like this, I certainly wouldn't code my own storage system with built-in encryption. I would rely on one of the many adequate cryptography programs available, made specifically for encrypting and storing data safely. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] NetBeans Question
At 2:50 AM +0100 5/31/10, Ashley Sheridan wrote: On Mon, 2010-05-31 at 02:46 +0100, Mark Kelly wrote: Yeah, like I mentioned earlier, Dreamweaver is known for having issues with include files, can be slow when working on large projects with lots of files, and is only available for Mac and Windows, which limits it somewhat. Thanks, Ash I won't address anything Brandon has to say, but as far a DW, it's just another bloatware WYSIWYG web-development application. While it has a decent editor and file management system, the bloatware baggage as well as the price tag is more than I have keep up with. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
At 9:24 PM -0400 5/31/10, Paul M Foster wrote: On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote: At 12:36 PM -0400 5/31/10, I wrote: That's Okay, but I'm simply telling you what I KNOW to be true. You may either accept what I have to say, or reject it, but to reply that what I say is Not true is somewhat offensive and confrontational. I hope you didn't mean it that way. :-) My apologies for taking what you said as I did and my reply -- it was wrong of me. I am sure you didn't mean anything offensive. You are correct. I meant no offense. In turn, when I read your post, it appeared that you were making a blanket statement applicable under all conditions, to which I objected. However, reading back over it, you did insert qualifiers. Paul Okay, let's not get a room over this. :-) Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
At 9:21 PM -0400 5/31/10, Paul M Foster wrote: On Mon, May 31, 2010 at 12:36:55PM -0400, tedd wrote: What data are used in credit card transactions are the: name of the card holder, credit card number, expiration date, CCV number, and zip code. I have not dealt with any credit card processors that require the billing address -- they just use the zip code. Additionally, it is up to the client to determine the level of security they want. They *can* require that *all* information be correct before accepting a sale. When you say client in this context, what do you mean? The ultimate customer, the company issuing the credit card, the bank, the merchant The client here would have been my client -- the person who pays me for my service, owns the web site, and is selling product. It is he who has the agreement with the credit card processor and in this case it was a PayPal Merchant service. In the documentation and code PayPal provides there are levels of accessibility/failure you can assign to authorization. You can set it to FAIL if the zip code or CCV are not correct -- however -- it defaults to requiring only the name, expiry date, and credit card number to be correct to PASS. While working on this, I found that the cost for the less secure transaction was higher than for the more secure transaction. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
At 9:52 AM +0200 6/1/10, Peter Lind wrote: Just wondering: seems there's a bit of a misunderstanding going on here. Are you talking about storing credit card information in a way such that customers can do online transactions without entering that information? Or are you talking about storing this information so your own company can fill in the details on a monthly basis? If 1) then the above points apply and you should not store the data, period. If 2) then I would assume the situation is somewhat different - though, not knowing the laws from the US I wouldn't really know. Regards Peter Peter: Yes to the first. I am sure there are all sorts of situations, but in most of the problematic ones I've encountered the clients want to have customers logon and have all their credit card information automatically filled into their forms for purchase. This requires that somewhere on the site all customer's data are kept in a manner that can be accessed and used -- and therein lies the problem. Clients (mine) often think that a web site should be as safe as their brick and mortar operations and as such offer similar services -- namely having a past customer's data waiting and available for immediate purchase without having to brother the customer for it again -- like having a card file. Unfortunately, the security aspects of the web require different thinking -- the web is not brick and mortar, which provides both concern and opportunity. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
On Tue, Jun 01, 2010 at 04:17:21PM +0200, Peter Lind wrote: On 1 June 2010 15:58, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Jun 01, 2010 at 09:52:54AM +0200, Peter Lind wrote: Just wondering: seems there's a bit of a misunderstanding going on here. Are you talking about storing credit card information in a way such that customers can do online transactions without entering that information? Or are you talking about storing this information so your own company can fill in the details on a monthly basis? If 1) then the above points apply and you should not store the data, period. If 2) then I would assume the situation is somewhat different - though, not knowing the laws from the US I wouldn't really know. No to #1, yes to #2. As for #1, companies like Godaddy do store this information, so I know it can be safely done. As I noted above: the question is not whether it can be done, the question is whether you want to be the next critter in the limelight because *you* couldn't do it. However, glad to hear you're not looking to do this. That brings up the next question though: what's this got to do with PHP? If I was to store any information like this, I certainly wouldn't code my own storage system with built-in encryption. I would rely on one of the many adequate cryptography programs available, made specifically for encrypting and storing data safely. It's got to do with PHP because all the code which handles all this customer data, etc., is PHP. (It's all internal to my network.) You could use mcrypt_*() functions to encrypt the credit card numbers, no problem. Some of the methods of encryption possible with mcrypt are very strong. The original question was if there was an alternative to forcing the user who wants to access the CC number to supply a separate password in order to access the information. The apparent answer (given the original constraints) is no, there is no alternative. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Credit Card encryption
On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote: At 9:24 PM -0400 5/31/10, Paul M Foster wrote: On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote: At 12:36 PM -0400 5/31/10, I wrote: That's Okay, but I'm simply telling you what I KNOW to be true. You may either accept what I have to say, or reject it, but to reply that what I say is Not true is somewhat offensive and confrontational. I hope you didn't mean it that way. :-) My apologies for taking what you said as I did and my reply -- it was wrong of me. I am sure you didn't mean anything offensive. You are correct. I meant no offense. In turn, when I read your post, it appeared that you were making a blanket statement applicable under all conditions, to which I objected. However, reading back over it, you did insert qualifiers. Paul Okay, let's not get a room over this. :-) Yes, dear. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regular expression
How to check with regular expression (preg) if string has: 1. only letters 2. only letters and spaces Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Another NetBeans Question
Hi gang: Here's my first NetBeans question: How do you turn off the automatic insertion of quotes when you're editing? For example, when I type div id=content, I end up with div id=content. The editor see's me type a quote and then automatically inserts another quote. I've reviewed all the preferences and don't see a place where I can turn that off. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression
On Tue, Jun 1, 2010 at 11:19 AM, Tanel Tammik keevit...@gmail.com wrote: How to check with regular expression (preg) if string has: 1. only letters 2. only letters and spaces Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php $re1 = '/^[a-zA-Z]+$/'; $re2 = '/^[a-zA-Z ]+$/'; Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] regular expression
On Tue, 2010-06-01 at 18:19 +0300, Tanel Tammik wrote: How to check with regular expression (preg) if string has: 1. only letters 2. only letters and spaces Br Tanel Use preg_match() to find an expression within a string. You can use something like this to grab check if a string contains only letters or numbers: if(preg_match('/^[a-zA-Z0-9]+$/'), $string) { } Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] regular expression
$re1 = '/^[a-z]++$/i'; $re2 = '/^[a-z ]++$/i'; -- - 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] regular expression
On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote: $re1 = '/^[a-z]++$/i'; $re2 = '/^[a-z ]++$/i'; -- - 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 Why the double ++ in the expressions there? Surely one + would match the 1 or more characters that you need and the second one would just be surplus? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] regular expression
On 1 June 2010 16:31, Richard Quadling rquadl...@gmail.com wrote: $re1 = '/^[a-z]++$/i'; ^[a-z]++$ Options: case insensitive; ^ and $ match at line breaks Assert position at the beginning of a line (at beginning of the string or after a line break character) «^» Match a single character in the range between “a” and “z” «[a-z]++» Between one and unlimited times, as many times as possible, without giving back (possessive) «++» Assert position at the end of a line (at the end of the string or before a line break character) «$» $re2 = '/^[a-z ]++$/i'; ^[a-z ]++$ Options: case insensitive; ^ and $ match at line breaks Assert position at the beginning of a line (at beginning of the string or after a line break character) «^» Match a single character present in the list below «[a-z ]++» Between one and unlimited times, as many times as possible, without giving back (possessive) «++» A character in the range between “a” and “z” «a-z» The character “ ” « » Assert position at the end of a line (at the end of the string or before a line break character) «$» -- - 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] Another NetBeans Question
On Tue, Jun 1, 2010 at 11:25 AM, tedd t...@sperling.com wrote: How do you turn off the automatic insertion of quotes when you're editing? For example, when I type div id=content, I end up with div id=content. The editor see's me type a quote and then automatically inserts another quote. I can't find where to turn it off either, but I did notice when you type something like that, when you type in the content in the , when you type the last , it overwrites the end quote, so you don't end up with two. phped works this way too. Helps me at least. -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] regular expression
On 1 June 2010 16:33, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote: $re1 = '/^[a-z]++$/i'; $re2 = '/^[a-z ]++$/i'; -- - 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 Why the double ++ in the expressions there? Surely one + would match the 1 or more characters that you need and the second one would just be surplus? Thanks, Ash http://www.ashleysheridan.co.uk ++ doesn't give back. As there is no need to do any backtracking, this is supposed to be a slight optimization. -- - 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] regular expression
On 1 June 2010 17:33, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote: $re1 = '/^[a-z]++$/i'; $re2 = '/^[a-z ]++$/i'; -- - 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 Why the double ++ in the expressions there? Surely one + would match the 1 or more characters that you need and the second one would just be surplus? Equally important: why have three people already done this persons homework. 5 minutes googling would have answered this ... -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Making a screencast based elearning solution for PHP
Hi, As said in the subject, I am trying to create a screencast based elearning solution for PHP to be distributed for free. I hope PHP.net does not have a problem with it. Just want to confirm that PHP.Net rules and policies do not stop me for making the free courseware. Regards, Naveen Dhanuka -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression
On Tue, 2010-06-01 at 16:35 +0100, Richard Quadling wrote: On 1 June 2010 16:33, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 16:31 +0100, Richard Quadling wrote: $re1 = '/^[a-z]++$/i'; $re2 = '/^[a-z ]++$/i'; -- - 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 Why the double ++ in the expressions there? Surely one + would match the 1 or more characters that you need and the second one would just be surplus? Thanks, Ash http://www.ashleysheridan.co.uk ++ doesn't give back. As there is no need to do any backtracking, this is supposed to be a slight optimization. -- - 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 Ah, I ought to have guessed as it's you! ;) I didn't know about that in regex's, I've learnt something new today! Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Set up MySQL + Apache 2.2.4 on Win XP.
PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas
Re: [PHP] regular expression
On 1 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Ah, I ought to have guessed as it's you! ;) What are you insinuating? -- - 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] Set up MySQL + Apache 2.2.4 on Win XP.
On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] regular expression
On Tue, 2010-06-01 at 17:32 +0100, Richard Quadling wrote: On 1 June 2010 16:38, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Ah, I ought to have guessed as it's you! ;) What are you insinuating? -- - 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 I've never known anyone to optimise code quite as much as you! That's not a bad thing though. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Re: get classname without namespace
On 05/29/2010 03:20 PM, Tanel Tammik wrote: Hi, is there a way to get the called classname without the namespace? ?php //PHP 5.3.x namespace some\where; abstract class ParentClass { public static function name() { return strtolower(get_called_class()); } public static function get_name() { echo 'name: ' . static::name(); } } class ChildClass extends ParentClass { } ChildClass::get_name(); ? the result i need: childclass the result i get: some\where\childclass I would use basename() also is it possible to get the name() into the static variable if only static method is called? ??? Br Tanel -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows.
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP keeps it's web root by default at C:\Program Files\EasyPHP\www (or thereabouts) so you can just create and edit files in here. Ps, use the reply to list (or failing that the reply to all) feature in your email client to keep the messages on list so that other people can see, respond to and benefit from the thread. Ps.ps. please try not to top post. The list rules say that we should all bottom post in order to keep threads logical. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP keeps it's web root by default at C:\Program Files\EasyPHP\www (or thereabouts) so you can just create and edit files in here. Ps, use the reply to list (or failing that the reply to all) feature in your email client to keep the messages on list so that other people can see, respond to and benefit from the thread. Ps.ps. please try not to top post. The list rules say that we should all bottom post in order to keep threads logical. Thanks, Ash http://www.ashleysheridan.co.uk The list is here to help with your questions, and your question might also be the same as somebody else's question, which is where the list archiving helps. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] php accelorator
Hi, Are any of you using any of the php accelorators such as Zend, Ioncube, or any others? Any idea which is the best? -- -Dan Joseph www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry
Re: [PHP] php accelorator
Dan Joseph wrote: Hi, Are any of you using any of the php accelorators such as Zend, Ioncube, or any others? Any idea which is the best? I am partial to eAccelerator for *nixes. And wincache for Windows. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP keeps it's web root by default at C:\Program Files\EasyPHP\www (or thereabouts) so you can just create and edit files in here. Ps, use the reply to list (or failing that the reply to all) feature in your email client to keep the messages on list so that other people can see, respond to and benefit from the thread. Ps.ps. please try not to top post. The list rules say that we should all bottom post in order to keep threads logical. Thanks, Ash http://www.ashleysheridan.co.uk The list is here to help with your questions, and your question might also be the same as somebody else's question, which is where the list archiving helps. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Wed, 2010-06-02 at 00:46 +0530, Shreyas wrote: Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP keeps it's web root by default at C:\Program Files\EasyPHP\www (or thereabouts) so you can just create and edit files in here. Ps, use the reply to list (or failing that the reply to all) feature in your email client to keep the messages on list so that other people can see, respond to and benefit from the thread. Ps.ps. please try not to top post. The list rules say that we should all bottom post in order to keep threads logical. Thanks, Ash http://www.ashleysheridan.co.uk The list is here to help with your questions, and your question might also be the same as somebody else's question, which is where the list
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Ash, Not sure if that would work here. I gave that a shot and there was a port conflict. I actually want to learn how to set PHP environment in bits and pieces without a WAMP. Will see what I can do there. Regards, Shreyas On Wed, Jun 2, 2010 at 12:55 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2010-06-02 at 00:46 +0530, Shreyas wrote: Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP keeps it's web root by default at C:\Program Files\EasyPHP\www (or thereabouts) so you can just create and edit files in here. Ps, use the reply to list (or failing that the reply to all) feature in your email client to keep the messages on list so that other people can see, respond to and benefit from the thread. Ps.ps. please try not to top post. The
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Wed, 2010-06-02 at 01:06 +0530, Shreyas wrote: Ash, Not sure if that would work here. I gave that a shot and there was a port conflict. I actually want to learn how to set PHP environment in bits and pieces without a WAMP. Will see what I can do there. Regards, Shreyas On Wed, Jun 2, 2010 at 12:55 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2010-06-02 at 00:46 +0530, Shreyas wrote: Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use
Re: [PHP] php accelorator
Robert Cummings wrote: Dan Joseph wrote: Hi, Are any of you using any of the php accelorators such as Zend, Ioncube, or any others? Any idea which is the best? I am partial to eAccelerator for *nixes. And wincache for Windows. eAccelerator works fine for me ... on linux and windows ... -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Tried that just now and didn't work. The Java code which talks to the DB has a different username and password than the one installed with EasyPHP. I might be missing something very silly here. Damn me! --Shreyas The On Wed, Jun 2, 2010 at 1:10 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2010-06-02 at 01:06 +0530, Shreyas wrote: Ash, Not sure if that would work here. I gave that a shot and there was a port conflict. I actually want to learn how to set PHP environment in bits and pieces without a WAMP. Will see what I can do there. Regards, Shreyas On Wed, Jun 2, 2010 at 12:55 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2010-06-02 at 00:46 +0530, Shreyas wrote: Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Rather than install the separate components have you looked at a pre-built stack? A lot of people swear by the WAMP install on Windows. For my own experience on Windows, I've found EasyPHP to be an absolute doddle to use, and can have you up and running with all the modules you need within minutes. Thanks, Ash http://www.ashleysheridan.co.uk The editor you use won't matter. EasyPHP installs Apache, MySQL and PHP in one install, and gets it all working together easily on Windows. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas The install should allow you to choose different ports, but as you already have Apache and MySQL installed, have you looked to download the PHP Windows installation file from php.net and run that? It should let you attach it to an existing Apache install, although I'm not familiar with installing PHP this way on a Windows machine. Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas I'm not so good with diagnosing Windows problems these days, haven't used it seriously for a few years now, maybe someone else on the list can help? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas EasyPHP
RE: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
-Original Message- From: Shreyas [mailto:shreya...@gmail.com] Sent: Tuesday, June 01, 2010 10:18 AM To: php-general@lists.php.net Subject: [PHP] Set up MySQL + Apache 2.2.4 on Win XP. PHP'ers, Please do not curse me for this. I am having a tough time to get this up and running. Can someone point me to a document which will help me do configure so that I can start learning and working on PHP ASAP? Please. I have attached the files under consideration. Here is my details : MySQL - 5.x Apache - apache_2.2.4-win32-x86-no_ssl.msi PHP base - C:\PHP Regards, Shreyas I realize that you have used EasyPHP. For others wanting to do this, Bitnami(http://bitnami.org/) has a WAMP stack too. What's nice is if you want to add Postgre, there's a module that installs into the stack too. There are other modules/apps that also integrate into your WAMP stack, so you don't have to have separate apache servers running all those different apps. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session data
I'm having a problem with session data. I have a login setup which holds the user ID and password in the session data once the user has initially logged in. When the user goes to a new page or accesses a pop up window the users session data is validated against a list of IDs and passwords held on the system rather than forcing them to log in each time. As far as I can work out this is fairly standard stuff for this sort of process. It works fine in Firefox but is very inconsistent when used in IE 7. On occasions when a new page is accessed the users is forced to login again. The reason for this appears to be that the variables in which the ID and password are stored don't exist. I have a whole load of trace code which gives me various information and session ID is apparently being picked up correctly. The weird thing is that if you reload the page it will then work correctly. I have tried adding session_write_close as I thought the data was not being written out correctly during the initial login. This code has been developed in eclipse using an Apache web serve and works just fine in this environment. I am trying to deploy it to an IIS serve to which I only have limited access and cant debug it in this environment. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php accelorator
On 06/02/2010 12:35 AM, Dan Joseph wrote: Hi, Are any of you using any of the php accelorators such as Zend, Ioncube, or any others? Any idea which is the best? APC opcode caching works well. -- With warm regards, Sudheer. S Tech stuff: http://techchorus.net Business: http://binaryvibes.co.in -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] session data
On Tue, 2010-06-01 at 21:54 +0100, Colin Finnis wrote: I'm having a problem with session data. I have a login setup which holds the user ID and password in the session data once the user has initially logged in. When the user goes to a new page or accesses a pop up window the users session data is validated against a list of IDs and passwords held on the system rather than forcing them to log in each time. As far as I can work out this is fairly standard stuff for this sort of process. It works fine in Firefox but is very inconsistent when used in IE 7. On occasions when a new page is accessed the users is forced to login again. The reason for this appears to be that the variables in which the ID and password are stored don't exist. I have a whole load of trace code which gives me various information and session ID is apparently being picked up correctly. The weird thing is that if you reload the page it will then work correctly. I have tried adding session_write_close as I thought the data was not being written out correctly during the initial login. This code has been developed in eclipse using an Apache web serve and works just fine in this environment. I am trying to deploy it to an IIS serve to which I only have limited access and cant debug it in this environment. Do you have an example of the code you're using, like a bare bones script? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Wed, 2010-06-02 at 01:41 +0530, Shreyas wrote: Tried that just now and didn't work. The Java code which talks to the DB has a different username and password than the one installed with EasyPHP. I might be missing something very silly here. Damn me! --Shreyas The On Wed, Jun 2, 2010 at 1:10 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2010-06-02 at 01:06 +0530, Shreyas wrote: Ash, Not sure if that would work here. I gave that a shot and there was a port conflict. I actually want to learn how to set PHP environment in bits and pieces without a WAMP. Will see what I can do there. Regards, Shreyas On Wed, Jun 2, 2010 at 12:55 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2010-06-02 at 00:46 +0530, Shreyas wrote: Thanks, Ash. I was able to set things up with EasyPHP 3.0. I had to uninstall my MySQL and Apache to get this work. I have to figure out how I can ask my java code to look at a separate instance of MYSQL while the EasyPHP's instance runs too. Anyone has encountered this before? Regards, Shreyas On Tue, Jun 1, 2010 at 10:58 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:54 +0530, Shreyas wrote: Alright! Point duly noted. I only did not want to spam the list with my very rudimentary questions. On Tue, Jun 1, 2010 at 10:33 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 22:29 +0530, Shreyas wrote: You have been of great help, Ash. I just did some progress and I typed in http://localhost and I see the easyphp page. Do you know how I can write my own apps now? On Tue, Jun 1, 2010 at 10:26 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:24 +0530, Shreyas wrote: I did and I miserably failed. I feel like giving up on learning PHP now with all these set-up now. Aaah! I have uninstalled MySQL now and trying to see how it goes. ---Shreyas On Tue, Jun 1, 2010 at 10:16 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:13 +0530, Shreyas wrote: Got it! I already have MySQL and Apache installed for another Java project and now it tells me certain ports are used. Where can I look up for answers like these? --Shreyas On Tue, Jun 1, 2010 at 10:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-06-01 at 22:02 +0530, Shreyas wrote: Ash, Thanks for the quick reply. I am downloading Easyphp 3.0 right now and see how it goes. But just to understand how this all works, will it work with Eclipse, too? I am using Ganymede. Regards, Shreyas On Tue, Jun 1, 2010 at 9:55 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-01 at 21:47 +0530, Shreyas wrote: PHP'ers, Please do not curse me for this. I am
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
You can consider XAMPP. (www.apachefriends.org/en/xampp.html) It has everything in it. Mysql server, Apache server, PHPMyAdmin, PHP, Perl and an FTP server Just install it and its configured. Just put your files in htdocs and they will be up and running. I use this to package my intranet php application. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Wed, 2010-06-02 at 04:48 +0700, shiplu wrote: You can consider XAMPP. (www.apachefriends.org/en/xampp.html) It has everything in it. Mysql server, Apache server, PHPMyAdmin, PHP, Perl and an FTP server Just install it and its configured. Just put your files in htdocs and they will be up and running. I use this to package my intranet php application. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) He's got that much (with the exception of the FTP server) up and running with EasyPHP. The issue he has now is getting his existing Java app to use the MySQL server from EasyPHP to avoid conflicting ports from the two MySQL systems installed. It can be run all as one with different users, and might be better now asking a MySQL list, unless anyone on here knows an easier way? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Since I have another Java app running and points to the same port 3306, when I tried to configure with EasyPHP, I had a conflict. How about configuring EasyPHP at a different port? In that ways, EasyPHP's MYSQL and my external MySQL will never have a conflicting situation. Does that make sense? --Shreyas On Wed, Jun 2, 2010 at 3:25 AM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2010-06-02 at 04:48 +0700, shiplu wrote: You can consider XAMPP. (www.apachefriends.org/en/xampp.html) It has everything in it. Mysql server, Apache server, PHPMyAdmin, PHP, Perl and an FTP server Just install it and its configured. Just put your files in htdocs and they will be up and running. I use this to package my intranet php application. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) He's got that much (with the exception of the FTP server) up and running with EasyPHP. The issue he has now is getting his existing Java app to use the MySQL server from EasyPHP to avoid conflicting ports from the two MySQL systems installed. It can be run all as one with different users, and might be better now asking a MySQL list, unless anyone on here knows an easier way? Thanks, Ash http://www.ashleysheridan.co.uk -- Regards, Shreyas
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
On Wed, Jun 2, 2010 at 5:32 AM, Shreyas shreya...@gmail.com wrote: Since I have another Java app running and points to the same port 3306, when I tried to configure with EasyPHP, I had a conflict. How about configuring EasyPHP at a different port? In that ways, EasyPHP's MYSQL and my external MySQL will never have a conflicting situation. Does that make sense? --Shreyas locate my.cnf file. Its in your mysql directory. And your mysql directory is somewhere in wamp install directory. Open the file with notepad/wordpad and change the port number. Its written just like this, port= 3306 Change is to port= 3307 or whatever port you like. Then restart mysql. But remember, all you php app need to connect mysql through that 3307 port which is not standard. So mysql_connect() functions params should be tweaked. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
Re: [PHP] Set up MySQL + Apache 2.2.4 on Win XP.
Right, Shilpu. I'll try that. What would be the exact installer which will let me have the MySQL Server and the Query browser? I know this is the wrong forum but I am just giving it a shot. When I do Start - All Programs - MYSQL, I used to get only above options. I have lost the installer and the actual MySQL website has quite a lot of things. --Shreyas On Wed, Jun 2, 2010 at 4:08 AM, shiplu shiplu@gmail.com wrote: On Wed, Jun 2, 2010 at 5:32 AM, Shreyas shreya...@gmail.com wrote: Since I have another Java app running and points to the same port 3306, when I tried to configure with EasyPHP, I had a conflict. How about configuring EasyPHP at a different port? In that ways, EasyPHP's MYSQL and my external MySQL will never have a conflicting situation. Does that make sense? --Shreyas locate my.cnf file. Its in your mysql directory. And your mysql directory is somewhere in wamp install directory. Open the file with notepad/wordpad and change the port number. Its written just like this, port= 3306 Change is to port= 3307 or whatever port you like. Then restart mysql. But remember, all you php app need to connect mysql through that 3307 port which is not standard. So mysql_connect() functions params should be tweaked. Shiplu Mokadd.im My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- Regards, Shreyas
[PHP] RE: JSON RPC with SSL and .pem certificates? [SOLVED]
-Original Message- From: Daevid Vincent [mailto:dae...@daevid.com] Sent: Thursday, May 27, 2010 4:48 PM To: 'php-general@lists.php.net' Subject: JSON RPC with SSL and .pem certificates? Anyone have a good example or routine or library or something that will use JSON-RPC client and SSL .pem certs? All the code I've found out there is pretty dated or unkept or lacks one or more of those requirements. http://jsonrpcphp.org/ is about as close as I could find, but it doesn't use SSL and hasn't been touched since 2007. Well, I just hacked together some cURL and this is working pretty good for our needs. Maybe it will help someone else. YMMV. #!/usr/bin/php -q ?php error_reporting(E_ALL ~E_NOTICE); ### ## USER DEFINED PARAMETERS ### define('JSONRPC_SERVER', https://IP_ADDRESS:PORT;); ### ### ### $OPTION['debug'] = false; //loop through our arguments and see what the user selected for ($i = 1; $i $_SERVER[argc]; $i++) { switch($_SERVER[argv][$i]) { case -v: case --version: echo $_SERVER['argv'][0]. v2010-05-28 02:15 PM\n; exit; break; case --debug: $OPTION['debug'] = true; break; case -?: case -h: case --help: ? Usage: ?php echo $_SERVER['argv'][0]; ? option --help, -help, -h, or -? options, to get this help. --version to return the version of this file. --debug to turn on output debugging. ?php exit; break; } } //parse arguments $params = array('foo'=bar,'myid'=69); $result = cURL_POST_JSON('some_method', $params); var_dump($result); exit(\n); ### ### F U N C T I O N S ### ### ### ### /** * Send a POST JSON-RPC method posting to a URL using cURL libraries. * * @paramstring $method the remote method to call * @paramstring $parameters the data to send in ?key=value format * @access public * @return array or false * @date 2010-05-27 */ function cURL_POST_JSON($method, $parameters) { global $OPTION; $url = JSONRPC_SERVER; if ($OPTION['debug']) echo \nURL = .$url.\n; if ($OPTION['debug']) echo \nmethod = .$method.\n; if ($OPTION['debug']) { echo \nparameters = \n; var_dump($parameters); } $request = array( 'method' = $method, 'params' = $parameters, 'id' = md5(date('c')) ); $request = json_encode($request); if ($OPTION['debug']) echo \nrequest = .$request.\n; $PASS = false; // create a new curl resource $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSLCERT, './YOUR_Certificate.pem'); curl_setopt($ch, CURLOPT_SSLCERTTYPE, PEM); curl_setopt($ch, CURLOPT_SSLKEY, './YOUR_Private.pem'); curl_setopt($ch, CURLOPT_SSLKEYTYPE, PEM); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true); //VERIFYPEER is false because otherwise we get this: //cURL error: SSL certificate problem, verify that the CA cert is OK. Details: //error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt($ch, CURLOPT_HEADER, false); //FALSE to exclude the header from the output (otherwise it screws up json_decode) curl_setopt($ch, CURLOPT_NOBODY, false); //FALSE because we want the body too curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // get the response as a string from curl_exec(), rather than echoing it curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); // don't use a cached version of the url //curl_setopt($ch, CURLOPT_TIMEOUT, 4); $returnData = curl_exec($ch); if (curl_errno($ch)) print \n\ncURL error: .curl_error($ch).\n\n; $httpcode = curl_getinfo($ch,
Re: [PHP] RE: JSON RPC with SSL and .pem certificates? [SOLVED]
On Tue, Jun 1, 2010 at 8:41 PM, Daevid Vincent dae...@daevid.com wrote: -Original Message- From: Daevid Vincent [mailto:dae...@daevid.com] Sent: Thursday, May 27, 2010 4:48 PM To: 'php-general@lists.php.net' Subject: JSON RPC with SSL and .pem certificates? Anyone have a good example or routine or library or something that will use JSON-RPC client and SSL .pem certs? All the code I've found out there is pretty dated or unkept or lacks one or more of those requirements. http://jsonrpcphp.org/ is about as close as I could find, but it doesn't use SSL and hasn't been touched since 2007. Well, I just hacked together some cURL and this is working pretty good for our needs. Maybe it will help someone else. YMMV. #!/usr/bin/php -q ?php error_reporting(E_ALL ~E_NOTICE); ### ## USER DEFINED PARAMETERS ### define('JSONRPC_SERVER', https://IP_ADDRESS:PORT;); ### ### ### $OPTION['debug'] = false; //loop through our arguments and see what the user selected for ($i = 1; $i $_SERVER[argc]; $i++) { switch($_SERVER[argv][$i]) { case -v: case --version: echo $_SERVER['argv'][0]. v2010-05-28 02:15 PM\n; exit; break; case --debug: $OPTION['debug'] = true; break; case -?: case -h: case --help: ? Usage: ?php echo $_SERVER['argv'][0]; ? option --help, -help, -h, or -? options, to get this help. --version to return the version of this file. --debug to turn on output debugging. ?php exit; break; } } //parse arguments $params = array('foo'=bar,'myid'=69); $result = cURL_POST_JSON('some_method', $params); var_dump($result); exit(\n); ### ### F U N C T I O N S ### ### ### ### /** * Send a POST JSON-RPC method posting to a URL using cURL libraries. * * @paramstring $method the remote method to call * @paramstring $parameters the data to send in ?key=value format * @access public * @return array or false * @date 2010-05-27 */ function cURL_POST_JSON($method, $parameters) { global $OPTION; $url = JSONRPC_SERVER; if ($OPTION['debug']) echo \nURL = .$url.\n; if ($OPTION['debug']) echo \nmethod = .$method.\n; if ($OPTION['debug']) { echo \nparameters = \n; var_dump($parameters); } $request = array( 'method' = $method, 'params' = $parameters, 'id' = md5(date('c')) ); $request = json_encode($request); if ($OPTION['debug']) echo \nrequest = .$request.\n; $PASS = false; // create a new curl resource $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSLCERT, './YOUR_Certificate.pem'); curl_setopt($ch, CURLOPT_SSLCERTTYPE, PEM); curl_setopt($ch, CURLOPT_SSLKEY, './YOUR_Private.pem'); curl_setopt($ch, CURLOPT_SSLKEYTYPE, PEM); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true); //VERIFYPEER is false because otherwise we get this: //cURL error: SSL certificate problem, verify that the CA cert is OK. Details: //error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $request); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); curl_setopt($ch, CURLOPT_HEADER, false); //FALSE to exclude the header from the output (otherwise it screws up json_decode) curl_setopt($ch, CURLOPT_NOBODY, false); //FALSE because we want the body too curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // get the response as a string from curl_exec(), rather than echoing it curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); // don't use a cached version of the url //curl_setopt($ch, CURLOPT_TIMEOUT, 4); $returnData = curl_exec($ch);
Re: [PHP] Credit Card encryption
I store CC # in plain text on my custom ecommerse website script so i can compare it with others. That way it's easier to convert to different hashes when i decide to integrate an encryption system. So far i havent had any problems. On Tue, Jun 1, 2010 at 11:15 AM, Paul M Foster pa...@quillandmouse.comwrote: On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote: At 9:24 PM -0400 5/31/10, Paul M Foster wrote: On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote: At 12:36 PM -0400 5/31/10, I wrote: That's Okay, but I'm simply telling you what I KNOW to be true. You may either accept what I have to say, or reject it, but to reply that what I say is Not true is somewhat offensive and confrontational. I hope you didn't mean it that way. :-) My apologies for taking what you said as I did and my reply -- it was wrong of me. I am sure you didn't mean anything offensive. You are correct. I meant no offense. In turn, when I read your post, it appeared that you were making a blanket statement applicable under all conditions, to which I objected. However, reading back over it, you did insert qualifiers. Paul Okay, let's not get a room over this. :-) Yes, dear. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- A Brandon_R Production
Re: [PHP] Credit Card encryption
Is this a joke? Better hope your merchant provider isn't lookin... On Jun 1, 2010, at 7:17 PM, Brandon Rampersad brandon.add...@gmail.com wrote: I store CC # in plain text on my custom ecommerse website script so i can compare it with others. That way it's easier to convert to different hashes when i decide to integrate an encryption system. So far i havent had any problems. On Tue, Jun 1, 2010 at 11:15 AM, Paul M Foster pa...@quillandmouse.com wrote: On Tue, Jun 01, 2010 at 10:42:11AM -0400, tedd wrote: At 9:24 PM -0400 5/31/10, Paul M Foster wrote: On Mon, May 31, 2010 at 05:06:23PM -0400, tedd wrote: At 12:36 PM -0400 5/31/10, I wrote: That's Okay, but I'm simply telling you what I KNOW to be true. You may either accept what I have to say, or reject it, but to reply that what I say is Not true is somewhat offensive and confrontational. I hope you didn't mean it that way. :-) My apologies for taking what you said as I did and my reply -- it was wrong of me. I am sure you didn't mean anything offensive. You are correct. I meant no offense. In turn, when I read your post, it appeared that you were making a blanket statement applicable under all conditions, to which I objected. However, reading back over it, you did insert qualifiers. Paul Okay, let's not get a room over this. :-) Yes, dear. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- A Brandon_R Production -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression
Hi Tanel, 1. only letters $str = 'helloworld'; if(preg_match(/^[a-zA-Z]*$/,$str)) echo only letters; else echo failed; 2. only letters and spaces $str = 'hello world'; if(preg_match(/^[a-zA-Z\s]*$/,$str)) echo only letters and spaces; else echo failed; Regards Peter.M Tanel Tammik wrote: How to check with regular expression (preg) if string has: 1. only letters 2. only letters and spaces Br Tanel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php