[PHP] Re: Recommendations for PHP debuggers?
Larry Garfield wrote: http://www.zend.com/phpide/ I just tried to install the modular version for my existing Eclipse install. It insists it won't install without feaure org.eclipse.emf (2.2.0). Since it provides no indication of how to get such feature, I haven't been able to give it a serious look. :-) Yeah it took me a while to find all the dependancies myself hense why I said the tarball was easier for takign it for a whirl, but seeing as my own stubornness meant I found all the necessary updates I figured I'd post them ;) I'm sure you'll be able to work it out from here, or incorporate the xml below into your own ~/.eclipse/org.eclipse.platform_3.2.0-mdk/configuration/org.eclipse.update/bookmarks.xml file. ;) ?xml version=1.0 encoding=UTF-8? bookmarks site name=PHP IDE url=http://downloads.zend.com/phpide; web=false selected=false local=false/ site name=EMF Update Manager Site url=http://download.eclipse.org/tools/emf/updates/; web=false selected=false local=false/ site name=GEF url=http://download.eclipse.org/tools/gef/updates/; web=false selected=false local=false/ site name=Visual Editor (JEM) url=http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/tools/ve/updates/1.0; web=false selected=false local=f alse/ site name=Webtools url=http://download.eclipse.org/webtools/updates/; web=false selected=false local=false/ site name=Polarion (Subversive) url=http://www.polarion.org/projects/subversive/download/update-site/; web=false selected=true local=false/ /bookmarks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Emphasizing first letter of string?
Hi, It is getting late, and I do not think I am thinking clearly... What would be the best way to wrap em/em tag around the first letter of a string? I know it has to be a combination of str_replace() and substr(), but due to my level of sleepiness I am having a lot of trouble working this one out... Basically, if a config variable == true I want my script to loop through an array of strings and emphasize the first letter of each string. Make sense? Sorry, I am pretty sleepy... Hmmm, I am betting I will discover the answer as soon as I send this email. :D Anyway, any help would be great! Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Emphasizing first letter of string?
?php foreach ($strings as $key = $string) { $strings[$key] = 'em' . $string[0] . '/em' . substr($string, 1); } ? Micky Hulse wrote: Hi, It is getting late, and I do not think I am thinking clearly... What would be the best way to wrap em/em tag around the first letter of a string? I know it has to be a combination of str_replace() and substr(), but due to my level of sleepiness I am having a lot of trouble working this one out... Basically, if a config variable == true I want my script to loop through an array of strings and emphasize the first letter of each string. Make sense? Sorry, I am pretty sleepy... Hmmm, I am betting I will discover the answer as soon as I send this email. :D Anyway, any help would be great! Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Emphasizing first letter of string?
Micky Hulse wrote: Hi, It is getting late, and I do not think I am thinking clearly... What would be the best way to wrap em/em tag around the first letter of a string? I know it has to be a combination of str_replace() and substr(), but due to my level of sleepiness I am having a lot of trouble working this one out... Basically, if a config variable == true I want my script to loop through an array of strings and emphasize the first letter of each string. Make sense? Sorry, I am pretty sleepy... Hmmm, I am betting I will discover the answer as soon as I send this email. :D Anyway, any help would be great! It sounds like you really need some sleep. $string = hello world; echo em.$string{0}./em.substr($string, 1); David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Emphasizing first letter of string?
David Tulloh wrote: echo em.$string{0}./em.substr($string, 1); I could be mistaken, but I seem to remember reading somewhere that using that syntax to access characters in a string has been removed from PHP6. I suggest you use $string[0] instead. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Emphasizing first letter of string?
Yeah, I do need sleep... Thanks guys for the posts... exactly what I was looking for. Oh, and I did come-up with something similar right after posting: if($configs['access_key'] === true) { $pages[$i][0] = substr_replace($pages[$i][0], 'em'.$pages[$i][0]{0}.'/em', 0, 1); } Thanks again to both of you for the help. :D :: presses send :: :: pushes power button :: :: closes eyes :: zzZZzzZZzz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Emphasizing first letter of string?
Stut wrote: I could be mistaken, but I seem to remember reading somewhere that using that syntax to access characters in a string has been removed from PHP6. I suggest you use $string[0] instead. (Yes, I am sleep-typing!) Hi Stut, Ah, thanks for bringing that up... Changing this: $pages[$i][0]{0} To this: $pages[$i][0][0] Testing now. Thanks. :) Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [solved] Emphasizing first letter of string?
Thanks to you folks, this works even better: if($configs['access_key'] === true) { foreach($pages as $key = $string) { $pages[$key][0] = 'em'.$string[0][0].'/em'.substr($string[0], 1); } } Many thanks, :) ... Now I can sleep. :D Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Overriding core functions
Hi, I want to add some functionality when calling the mysql_query(): function mysql_query($Query) { //do stuff before mysql_query($Query); //do things after } This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter
Re: [PHP] Overriding core functions
Peter Lauri wrote: Hi, I want to add some functionality when calling the mysql_query(): function my_query($Query) { //do stuff before mysql_query($Query); //do things after } // or something like: class PeteDB { var $conn; function PeteDB($db, $usr, $pwd, $etc) { $this-conn = mysql_connect($db, $usr, $pwd, $etc); if (!is_resource($this-conn)) die('db is useless'); // trigger_error() } function query($qry/*, $args*/) { // do stuff $r = mysql_query($qry, $this-conn); // do more stuff return $r; } } /* tada! hint: always use some kind of wrapper for things like db related functions (because it allows for stuff like this and, for instance, makes it alot easier to switch dbs - because you only have to change code in one place, not counting any db-specific sql floating around your app) */ This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
It really looks like I will have to write this myself :( I know it will be good for experience but like someone else has pointed out, I would rather work with someone elses code for the payment parts knowing that it has been totally debugged than getting screwed later on because I missed assigning a value to a variable... Still searching though, tested OSC,ZenCart, Xcart,FishCart, now on to phpshop... Drupal seems good, but kinda large with all the modules out there... a bit intimidating, will keep that as a reserve check I think this is the reason why there are so many carts out there people just get pissed seaching for a simple one which they can use their _own_ page design, and dont find it... then they write one for themselves, see it works very well, decide to go commercial... get requests to add just one more thing and screw it up like all the others..! Cheers! Ryan --- Larry Garfield [EMAIL PROTECTED] wrote: There may be other canned solutions that are not as bad as OSCommerce. It's the only one I've worked with other than Drupal. I've worked with Drupal extensively, but haven't used its ecommerce modules extensively. But yes, I highly recommend OSCommerce as an example of how not to write a PHP application, of any kind. On Monday 21 August 2006 15:18, Gerry D wrote: So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother. Why do you say that, Larry? I may want to get into an app like that because I think one of my clients is ready for it. What are the cons, and what are my options? What are Drupal's limitations? I tried using it for a client last summer, because it was available free on the client's web host. It is extremely rigid. If you want a program that works the way they want and looks kinda like Buy.com with a table-based layout in 3 columns with certain visual effects, it's fine. If you want to change or customize anything, good luck. Nearly everything is hard coded with HTML and presentation PHP and business logic PHP all mixed in together. With a table based layout. Ugh. As for using pre-build vs. rolling your own, the main reason I favor ready-made is the bank hookups. Anytime financial stuff is involved, I'd rather use something someone else already debugged than roll my own. -- Larry GarfieldAIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
There are many payment processing script/classes/examples available that you could use. Just google around for your gateway provider, like PHP and Authorize.net, etc, or go to their site and look for a developer, API or something like that to see if they have done some examples. On 8/22/06, Ryan A [EMAIL PROTECTED] wrote: It really looks like I will have to write this myself :( I know it will be good for experience but like someone else has pointed out, I would rather work with someone elses code for the payment parts knowing that it has been totally debugged than getting screwed later on because I missed assigning a value to a variable... Still searching though, tested OSC,ZenCart, Xcart,FishCart, now on to phpshop... Drupal seems good, but kinda large with all the modules out there... a bit intimidating, will keep that as a reserve check I think this is the reason why there are so many carts out there people just get pissed seaching for a simple one which they can use their _own_ page design, and dont find it... then they write one for themselves, see it works very well, decide to go commercial... get requests to add just one more thing and screw it up like all the others..! Cheers! Ryan --- Larry Garfield [EMAIL PROTECTED] wrote: There may be other canned solutions that are not as bad as OSCommerce. It's the only one I've worked with other than Drupal. I've worked with Drupal extensively, but haven't used its ecommerce modules extensively. But yes, I highly recommend OSCommerce as an example of how not to write a PHP application, of any kind. On Monday 21 August 2006 15:18, Gerry D wrote: So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother. Why do you say that, Larry? I may want to get into an app like that because I think one of my clients is ready for it. What are the cons, and what are my options? What are Drupal's limitations? I tried using it for a client last summer, because it was available free on the client's web host. It is extremely rigid. If you want a program that works the way they want and looks kinda like Buy.com with a table-based layout in 3 columns with certain visual effects, it's fine. If you want to change or customize anything, good luck. Nearly everything is hard coded with HTML and presentation PHP and business logic PHP all mixed in together. With a table based layout. Ugh. As for using pre-build vs. rolling your own, the main reason I favor ready-made is the bank hookups. Anytime financial stuff is involved, I'd rather use something someone else already debugged than roll my own. -- Larry GarfieldAIM: LOLG42 [EMAIL PROTECTED]ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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] Shopping cart
Commercial product that is good http://www.x-cart.com/ On 8/22/06, Ryan A [EMAIL PROTECTED] wrote: It really looks like I will have to write this myself :( I know it will be good for experience but like someone else has pointed out, I would rather work with someone elses code for the payment parts knowing that it has been totally debugged than getting screwed later on because I missed assigning a value to a variable... Still searching though, tested OSC,ZenCart, Xcart,FishCart, now on to phpshop... Drupal seems good, but kinda large with all the modules out there... a bit intimidating, will keep that as a reserve check I think this is the reason why there are so many carts out there people just get pissed seaching for a simple one which they can use their _own_ page design, and dont find it... then they write one for themselves, see it works very well, decide to go commercial... get requests to add just one more thing and screw it up like all the others..! Cheers! Ryan --- Larry Garfield [EMAIL PROTECTED] wrote: There may be other canned solutions that are not as bad as OSCommerce. It's the only one I've worked with other than Drupal. I've worked with Drupal extensively, but haven't used its ecommerce modules extensively. But yes, I highly recommend OSCommerce as an example of how not to write a PHP application, of any kind. On Monday 21 August 2006 15:18, Gerry D wrote: So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother. Why do you say that, Larry? I may want to get into an app like that because I think one of my clients is ready for it. What are the cons, and what are my options? What are Drupal's limitations? I tried using it for a client last summer, because it was available free on the client's web host. It is extremely rigid. If you want a program that works the way they want and looks kinda like Buy.com with a table-based layout in 3 columns with certain visual effects, it's fine. If you want to change or customize anything, good luck. Nearly everything is hard coded with HTML and presentation PHP and business logic PHP all mixed in together. With a table based layout. Ugh. As for using pre-build vs. rolling your own, the main reason I favor ready-made is the bank hookups. Anytime financial stuff is involved, I'd rather use something someone else already debugged than roll my own. -- Larry GarfieldAIM: LOLG42 [EMAIL PROTECTED]ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- 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] [solved] Emphasizing first letter of string?
At 4:29 AM -0700 8/22/06, Micky Hulse wrote: Thanks to you folks, this works even better: if($configs['access_key'] === true) { foreach($pages as $key = $string) { $pages[$key][0] = 'em'.$string[0][0].'/em'.substr($string[0], 1); } } Many thanks, :) ... Now I can sleep. :D Cheers, Micky Micky: Not meaning to wake you, but you might consider removing markup from presentation via css. If so, checkout: http://www.w3schools.com/css/css_pseudo_elements.asp 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] Re: PHP 5, Windows, and MySQL
Hi, I did that but my apache+php still does not recognize the mysql extension. I get no error messages while staring the server but phpInfo does not show the mysql support... php 5.1.4, mysql 5.0.22, apache 2.0.58 On 6/27/06, Jeremy Schreckhise [EMAIL PROTECTED] wrote: Here is the direct download portal for the two corrected crucial .dlls. http://dev.mysql.com/downloads/connector/php/ -Original Message- From: Jeremy Schreckhise [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 10:14 AM To: php-general@lists.php.net Subject: [PHP] Re: PHP 5, Windows, and MySQL I ran into the same problems; here is how I solved them. 1. Install MySQL 5 2. Install PHP 5 3. Modify php.ini extensions directive to point to php_mysql.dll (the one that was packaged with php 5) 4. Here is the tricky one make sure mysql is finding the libmysql.dll packaged WITH MYSQL NOT PHP; 5. net stop mysql 6. net start mysql 7. work hard; play hard -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Monday, June 26, 2006 8:13 PM To: php-general@lists.php.net Subject: [PHP] Re: PHP 5, Windows, and MySQL I've got it running fine on my windows. Mysql 5.0.19 PHP 5.1.4 I just activate php_mysql.dll and php_mysqli.dll. Which versions of php and mysql are you using? Beauford [EMAIL PROTECTED] escreveu na mensagem news:!!AAAYAFzLTDhDwWBHpzgX5w1qDiPigAAAEJiz/MDHLf9Fmsyy [EMAIL PROTECTED] Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
On Tue, 2006-08-22 at 18:39 +0700, Peter Lauri wrote: I want to add some functionality when calling the mysql_query(): Why not simply wrap the mysql_query function in a php function? function query($whatever) { log($whatever); $ret = mysql_query($whatever); //do stuff after return $ret; } --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] --with-openssl on x64
Hello, openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me configure: error: Cannot find OpenSSL's libraries How can I change this? Regards Marten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] --with-openssl on x64
Hmm.. in my system, /usr/lib is a sym link to /usr/lib64... but.. Try this configure option: --with-openssl[=DIR] -B Marten Lehmann wrote: Hello, openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me configure: error: Cannot find OpenSSL's libraries How can I change this? Regards Marten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
On Tue, 2006-08-22 at 05:36 -0700, Ryan A wrote: It really looks like I will have to write this myself :( We need to create a proper one, under a decent licence as a community damnit! Maybe even a generic PEAR object that can be customized/extended to connect to whatever gateway you need to? I can start the project, any volunteers to do some code/docs etc? --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php-general mailing list active?
Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks, David [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
maybe you should resubscribe :) on Tuesday 22 August 2006 16:31, [EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks, David [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php-general mailing list active?
[snip] Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. [/snip] Yes, it is working -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php-general mailing list active?
Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
Check out lists.php.net On 8/22/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
[EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. getting his email addr is easy - but I doubt he is looking forward to your mail asking him to 'fix' the generals mailing list ... would just resubscribe. David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Hey, There are many payment processing script/classes/examples available that you could use. Just google around for your gateway provider, like PHP and Authorize.net, etc, or go to their site and look for a developer, API or something like that to see if they have done some examples. Yeah, i guess thats also an idea, will look into it. Will also need to look into the logic of calculating shipping, something that I have never done in the past. Kind of worked out the logic of customers who bought this also bought... gotto take one step at a time... which breaks down to a problem coz dont have much time to take many steps :( Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Overriding core functions
Yes, of course I can do that. But I was just lazy and wanted to reuse the function mysql_query that I am already using. -Original Message- From: Paul Scott [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:48 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions On Tue, 2006-08-22 at 18:39 +0700, Peter Lauri wrote: I want to add some functionality when calling the mysql_query(): Why not simply wrap the mysql_query function in a php function? function query($whatever) { log($whatever); $ret = mysql_query($whatever); //do stuff after return $ret; } --Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
I believe you can find those out there as well, most of what you need will be available out there, you will be able to find them and then take what you need to work it into your cart, probably would be a good idea to think of all the different pieces and then find the different examples/tutorials/snippets and then see how they fit. On 8/22/06, Ryan A [EMAIL PROTECTED] wrote: Hey, There are many payment processing script/classes/examples available that you could use. Just google around for your gateway provider, like PHP and Authorize.net, etc, or go to their site and look for a developer, API or something like that to see if they have done some examples. Yeah, i guess thats also an idea, will look into it. Will also need to look into the logic of calculating shipping, something that I have never done in the past. Kind of worked out the logic of customers who bought this also bought... gotto take one step at a time... which breaks down to a problem coz dont have much time to take many steps :( Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Overriding core functions
Yes, that could solve it. However, my question was if I can override the core functions :) Similar that I can do Parent::myFunction() in a subclass, I want to do that, but with core functions :) -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:27 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions Peter Lauri wrote: Hi, I want to add some functionality when calling the mysql_query(): function my_query($Query) { //do stuff before mysql_query($Query); //do things after } // or something like: class PeteDB { var $conn; function PeteDB($db, $usr, $pwd, $etc) { $this-conn = mysql_connect($db, $usr, $pwd, $etc); if (!is_resource($this-conn)) die('db is useless'); // trigger_error() } function query($qry/*, $args*/) { // do stuff $r = mysql_query($qry, $this-conn); // do more stuff return $r; } } /* tada! hint: always use some kind of wrapper for things like db related functions (because it allows for stuff like this and, for instance, makes it alot easier to switch dbs - because you only have to change code in one place, not counting any db-specific sql floating around your app) */ This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Another thing to remember is that you dont want to get overwhelmed with all the work when you are going to build your own, a list of 250,000 features will never get done, many have tried, many have failed, so plan what you need to start with and build the other features later. On 8/22/06, Dan McCullough [EMAIL PROTECTED] wrote: I believe you can find those out there as well, most of what you need will be available out there, you will be able to find them and then take what you need to work it into your cart, probably would be a good idea to think of all the different pieces and then find the different examples/tutorials/snippets and then see how they fit. On 8/22/06, Ryan A [EMAIL PROTECTED] wrote: Hey, There are many payment processing script/classes/examples available that you could use. Just google around for your gateway provider, like PHP and Authorize.net, etc, or go to their site and look for a developer, API or something like that to see if they have done some examples. Yeah, i guess thats also an idea, will look into it. Will also need to look into the logic of calculating shipping, something that I have never done in the past. Kind of worked out the logic of customers who bought this also bought... gotto take one step at a time... which breaks down to a problem coz dont have much time to take many steps :( Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
It may be possible to override the core function - I don't actually know. If you just define a new function with the same function it might work OK. The snag I see coming at you like a tonne of bricks is 'how do you call the original function once you have overridden it.'. This like like calling SUPER. in Java. AJ Peter Lauri wrote: Yes, that could solve it. However, my question was if I can override the core functions :) Similar that I can do Parent::myFunction() in a subclass, I want to do that, but with core functions :) -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:27 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions Peter Lauri wrote: Hi, I want to add some functionality when calling the mysql_query(): function my_query($Query) { //do stuff before mysql_query($Query); //do things after } // or something like: class PeteDB { var $conn; function PeteDB($db, $usr, $pwd, $etc) { $this-conn = mysql_connect($db, $usr, $pwd, $etc); if (!is_resource($this-conn)) die('db is useless'); // trigger_error() } function query($qry/*, $args*/) { // do stuff $r = mysql_query($qry, $this-conn); // do more stuff return $r; } } /* tada! hint: always use some kind of wrapper for things like db related functions (because it allows for stuff like this and, for instance, makes it alot easier to switch dbs - because you only have to change code in one place, not counting any db-specific sql floating around your app) */ This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php-general mailing list active?
[EMAIL PROTECTED] wrote: Would someone kindly let me know if there is activity on [EMAIL PROTECTED] I have not gotten posts for a few days now, and I'm having no luck connecting to the help, owner or admin addresses. Thanks Jochem, Thomas, and Jay. Anybody know Wez Furlong's email address? I had this problem once before, and I recall he was the guy who finally figured out what went awry. getting his email addr is easy - but I doubt he is looking forward to your mail asking him to 'fix' the generals mailing list ... would just resubscribe. David Thanks, guys. Problem is I have resubscribed from this address 2 times, and I also tried to subscribe from my gmail account. From this address, I get no response whatsoever. I got a confirmation from my gmail account several hours ago, but have not gotten any list email. I know our admins here at the hospital do something funky with routing between the primary and secondary email servers. That was the problem the last time, and because of bounced emails, this address got placed on a 'bad address' list. I don't have a clue why my gmail account hasn't started to get traffic. But it's funny how we get accustomed to the exchange of ideas and cyber-contact with others. I guess I 'm having some withdrawal. ;-) David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
You can't just define a new function with the same name. The only way I know to literally redefine the function is using the runkit extension - http://pecl.php.net/package/runkit That allows you to rename functions as well as moving them, so you could rename it to something like old_mysql_query() then define your own mysql_query(). Arpad Alex Turner wrote: It may be possible to override the core function - I don't actually know. If you just define a new function with the same function it might work OK. The snag I see coming at you like a tonne of bricks is 'how do you call the original function once you have overridden it.'. This like like calling SUPER. in Java. AJ Peter Lauri wrote: Yes, that could solve it. However, my question was if I can override the core functions :) Similar that I can do Parent::myFunction() in a subclass, I want to do that, but with core functions :) -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:27 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions Peter Lauri wrote: Hi, I want to add some functionality when calling the mysql_query(): function my_query($Query) { //do stuff before mysql_query($Query); //do things after } // or something like: class PeteDB { var $conn; function PeteDB($db, $usr, $pwd, $etc) { $this-conn = mysql_connect($db, $usr, $pwd, $etc); if (!is_resource($this-conn)) die('db is useless'); // trigger_error() } function query($qry/*, $args*/) { // do stuff $r = mysql_query($qry, $this-conn); // do more stuff return $r; } } /* tada! hint: always use some kind of wrapper for things like db related functions (because it allows for stuff like this and, for instance, makes it alot easier to switch dbs - because you only have to change code in one place, not counting any db-specific sql floating around your app) */ This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Overriding core functions
On Tue, 2006-08-22 at 22:19 +0700, Peter Lauri wrote: Yes, of course I can do that. But I was just lazy and wanted to reuse the function mysql_query that I am already using. You could look into the runkit extension. I believe it allows this. At any rate, using mysql_xxx() is veyr low level and locks you into mysql only database. Most developers usually create a layer that wraps their specific database calls so that it's trivial to change and as you say wrap. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
Brad Bonkoski wrote: Some already good workarounds given for this question... BUT. Is it even possible to override a core function? Like I wrote a function called 'exit' and I got a parser error, which leads me to believe it is not even possible to override the core functions. Is this true of ALL PHP functions? -B 'exit' is a language construct like 'echo', so I don't think you'd be able to redefine that even with runkit. Arpad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
--- Paul Scott [EMAIL PROTECTED] wrote: On Tue, 2006-08-22 at 05:36 -0700, Ryan A wrote: It really looks like I will have to write this myself :( We need to create a proper one, under a decent licence as a community damnit! Maybe even a generic PEAR object that can be customized/extended to connect to whatever gateway you need to? I can start the project, any volunteers to do some code/docs etc? --Paul Hey Paul, I need this now more than most people so you can count me in... but first we have to start agreeing on how to do it and what features it will have etc I have done a project that connect to and interacts with the 2checkout gateway so there i can be pretty helpful and maybe documentation but other than that i have no idea if my code is really clean Never did any thing with PEAR other than try its database stuff. Cheers, Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
I believe you can find those out there as well, most of what you need will be available out there, you will be able to find them and then take what you need to work it into your cart, probably would be a good idea to think of all the different pieces and then find the different examples/tutorials/snippets and then see how they fit. Yep, I always count the jigsaw puzzle pieces before i start ;) Cheers! -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
Some already good workarounds given for this question... BUT. Is it even possible to override a core function? Like I wrote a function called 'exit' and I got a parser error, which leads me to believe it is not even possible to override the core functions. Is this true of ALL PHP functions? -B Alex Turner wrote: It may be possible to override the core function - I don't actually know. If you just define a new function with the same function it might work OK. The snag I see coming at you like a tonne of bricks is 'how do you call the original function once you have overridden it.'. This like like calling SUPER. in Java. AJ Peter Lauri wrote: Yes, that could solve it. However, my question was if I can override the core functions :) Similar that I can do Parent::myFunction() in a subclass, I want to do that, but with core functions :) -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 22, 2006 7:27 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] Overriding core functions Peter Lauri wrote: Hi, I want to add some functionality when calling the mysql_query(): function my_query($Query) { //do stuff before mysql_query($Query); //do things after } // or something like: class PeteDB { var $conn; function PeteDB($db, $usr, $pwd, $etc) { $this-conn = mysql_connect($db, $usr, $pwd, $etc); if (!is_resource($this-conn)) die('db is useless'); // trigger_error() } function query($qry/*, $args*/) { // do stuff $r = mysql_query($qry, $this-conn); // do more stuff return $r; } } /* tada! hint: always use some kind of wrapper for things like db related functions (because it allows for stuff like this and, for instance, makes it alot easier to switch dbs - because you only have to change code in one place, not counting any db-specific sql floating around your app) */ This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. /Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
--- Dan McCullough [EMAIL PROTECTED] wrote: Another thing to remember is that you dont want to get overwhelmed with all the work when you are going to build your own, a list of 250,000 features will never get done, many have tried, many have failed, so plan what you need to start with and build the other features later. Good point, I feel into that ditch myself some time back... -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Please sign up for an account and join the project at http://gforge2.uwc.ac.za/projects/phpcart/ I have started a mailing list, which should kick in in a few hours... --Paul On Tue, 2006-08-22 at 08:47 -0700, Ryan A wrote: --- Paul Scott [EMAIL PROTECTED] wrote: On Tue, 2006-08-22 at 05:36 -0700, Ryan A wrote: It really looks like I will have to write this myself :( We need to create a proper one, under a decent licence as a community damnit! Maybe even a generic PEAR object that can be customized/extended to connect to whatever gateway you need to? I can start the project, any volunteers to do some code/docs etc? --Paul Hey Paul, I need this now more than most people so you can count me in... but first we have to start agreeing on how to do it and what features it will have etc I have done a project that connect to and interacts with the 2checkout gateway so there i can be pretty helpful and maybe documentation but other than that i have no idea if my code is really clean Never did any thing with PEAR other than try its database stuff. Cheers, Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Please sign up for an account and join the project at http://gforge2.uwc.ac.za/projects/phpcart/ I have started a mailing list, which should kick in in a few hours... --Paul Hey, Signed up there, but how do i join the project? my username is ryan I think you might also want to change the project name... phpcart is just too common to think that someone else is not using for one of their products. Maybe APC (August php cart :D ) Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
On Tue, 2006-08-22 at 09:22 -0700, Ryan A wrote: Please sign up for an account and join the project at http://gforge2.uwc.ac.za/projects/phpcart/ I have started a mailing list, which should kick in in a few hours... --Paul Hey, Signed up there, but how do i join the project? my username is ryan I think you might also want to change the project name... phpcart is just too common to think that someone else is not using for one of their products. Maybe APC (August php cart :D ) Obviously you don't run the APC op-code cache ;) Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Hey, Signed up there, but how do i join the project? my username is ryan OK I have added you as a project admin. I think you might also want to change the project name... phpcart is just too common to think that someone else is not using for one of their products. The project name and the branding are different things. We will get a designer to pimp it up later ;) Maybe APC (August php cart :D ) Why not just call it opcode cache and be done with it? :) --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] --with-openssl on x64
On Tue, August 22, 2006 8:34 am, Marten Lehmann wrote: openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me configure: error: Cannot find OpenSSL's libraries How can I change this? If passing in the directory to ./configure doesn't work, file a bug report, I guess... And then standard work-around #1 for this is to set up symlinks from where PHP thinks it is to where it really is and go on with life, which might be why the other poster has those symlinks. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP 5, Windows, and MySQL
On Tue, August 22, 2006 8:12 am, mbneto wrote: I did that but my apache+php still does not recognize the mysql extension. I get no error messages while staring the server but phpInfo does not show the mysql support... php 5.1.4, mysql 5.0.22, apache 2.0.58 Check the apache error_log file for error messages after a re-start. Check the phpinfo() output for where your php.ini file should be, and move your php.ini file to that location. Check the extension_dir setting in php.ini, and be sure that directory is READABLE by the Apache User/Group setup in httpd.conf Make sure all parent directories to extension_dir are also readable/executable (or whatever it is on Windoze) so that PHP can read the DLLs. On 6/27/06, Jeremy Schreckhise [EMAIL PROTECTED] wrote: Here is the direct download portal for the two corrected crucial .dlls. http://dev.mysql.com/downloads/connector/php/ -Original Message- From: Jeremy Schreckhise [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 10:14 AM To: php-general@lists.php.net Subject: [PHP] Re: PHP 5, Windows, and MySQL I ran into the same problems; here is how I solved them. 1. Install MySQL 5 2. Install PHP 5 3. Modify php.ini extensions directive to point to php_mysql.dll (the one that was packaged with php 5) 4. Here is the tricky one make sure mysql is finding the libmysql.dll packaged WITH MYSQL NOT PHP; 5. net stop mysql 6. net start mysql 7. work hard; play hard -Original Message- From: João Cândido de Souza Neto [mailto:[EMAIL PROTECTED] Sent: Monday, June 26, 2006 8:13 PM To: php-general@lists.php.net Subject: [PHP] Re: PHP 5, Windows, and MySQL I've got it running fine on my windows. Mysql 5.0.19 PHP 5.1.4 I just activate php_mysql.dll and php_mysqli.dll. Which versions of php and mysql are you using? Beauford [EMAIL PROTECTED] escreveu na mensagem news:!!AAAYAFzLTDhDwWBHpzgX5w1qDiPigAAAEJiz/MDHLf9Fmsyy [EMAIL PROTECTED] Aside from my previous gd problems, here's another problem. It appears that PHP5 (for Windows anyways) does not support MySQL (which in itself is riduculous), but here's my problem. I have a script I just downloaded that works perfectly on Linux/Apche/MySQL/PHP5, but when I run it on Windows 2000 with PHP 4.4 I get a page full of errors. Lets forget about the errors, does anyone have any idea how to get PHP5 and MySQL to work on Windows. I have already tried 100 different variations of things from information I found searching out this problem, but maybe someone has a new idea. If it were me I'd just run this site on Linux, but this is for a friend who wants to use IIS. If your curious the errors are below. Thanks B Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at G:\Websites\Webtest\caalogin\include\database.php:207) in G:\Websites\Webtest\caalogin\include\session.php on line 46 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 207 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in G:\Websites\Webtest\caalogin\include\database.php on line 218 -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Ryan A wrote: Maybe APC (August php cart :D ) How about SPECS - Simple [PHP|Pluggable] E-Commerce System. I have a few thoughts about this idea and will put something together later today. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Overriding core functions
On Tue, August 22, 2006 6:39 am, Peter Lauri wrote: I want to add some functionality when calling the mysql_query(): function mysql_query($Query) { //do stuff before mysql_query($Query); //do things after } This would just be for one project where I want to record all Queries and the result of them, creating an own logging function. I did a lot of Google, but no article that I found that take care of this subject. The only was I know of to over-ride core functions, or, in this case, extension's functions, are to: A) alter PHP source and re-compile B) install the RunKit extension and be prepared for a wild ride PHP simply doesn't have the infrastructure for you to override the mysql_query() function as you want... You'd have to use my_mysql_query() or somesuch, and then always call that instead of the normal mysql_query. You might be able to attack this from the MySQL side of things. MySQL has a query logging facility which might be more amenable to what you want to achieve. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Hey, Hey, Signed up there, but how do i join the project? my username is ryan OK I have added you as a project admin. Thanks I think you might also want to change the project name... phpcart is just too common to think that someone else is not using for one of their products. The project name and the branding are different things. We will get a designer to pimp it up later ;) Maybe APC (August php cart :D ) Why not just call it opcode cache and be done with it? :) OCC - not to bad, i like it. I also have some photoshop talents, so give me a shout there if needed. Cheers, Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Maybe APC (August php cart :D ) Obviously you don't run the APC op-code cache ;) :) you got me there Rob, dont have a clue about it. Sorry if I stepped on anyones toes. Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Pretty much, yeah. And apparently the next thing not to do is to run out and start coding your own shopping cart for general release, as every damn one of them got started that way. :-) On Mon, August 21, 2006 3:18 pm, Gerry D wrote: So if I understand you gentlemen correctly, these pre-builds serve as examples how NOT to do it? Gerry On 8/20/06, Larry Garfield [EMAIL PROTECTED] wrote: On Sunday 20 August 2006 20:17, Gerry D wrote: On 8/19/06, Larry Garfield [EMAIL PROTECTED] wrote: OSCommerce is crap. Don't bother. Why do you say that, Larry? I may want to get into an app like that because I think one of my clients is ready for it. What are the cons, and what are my options? What are Drupal's limitations? I tried using it for a client last summer, because it was available free on the client's web host. It is extremely rigid. If you want a program that works the way they want and looks kinda like Buy.com with a table-based layout in 3 columns with certain visual effects, it's fine. If you want to change or customize anything, good luck. Nearly everything is hard coded with HTML and presentation PHP and business logic PHP all mixed in together. With a table based layout. Ugh. As for using pre-build vs. rolling your own, the main reason I favor ready-made is the bank hookups. Anytime financial stuff is involved, I'd rather use something someone else already debugged than roll my own. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
And if you do NEED those 250,000 features completed in 30 days, you have no choice but to suck it up and use the least-evil of the carts out there. Which brings us back (almost) to the original question... Which pre-packaged PHP shopping cart sucks least? On Tue, August 22, 2006 11:13 am, Ryan A wrote: --- Dan McCullough [EMAIL PROTECTED] wrote: Another thing to remember is that you dont want to get overwhelmed with all the work when you are going to build your own, a list of 250,000 features will never get done, many have tried, many have failed, so plan what you need to start with and build the other features later. Good point, I feel into that ditch myself some time back... -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Maybe APC (August php cart :D ) How about SPECS - Simple [PHP|Pluggable] E-Commerce System. I have a few thoughts about this idea and will put something together later today. -Stut What's in a name? That which we call a rose by :D Not really bothered what its called, even if its crap crab cart or crab crap cart (real tongue twisters eh) Lets get this started and pool ideas / resources and then worry about the name later... so join in Stut, i'm sure if we all pool in we can make something really good. Cheers, Ryan P.S , theres quite a bit of stuff at php classes.org that I think we can salvage for parts. (Just type in cart in the search field) -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] preg_match problem
On Mon, August 21, 2006 2:13 pm, Dave Goodchild wrote: On 21/08/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: hi. I have to check if the script file belongs to any ov form1.php to form6.php files. Need something like: preg_match('/form*.php/', $_SERVER['PHP_SELF']) wher * kan be any number between 1 and 6. Thanks for any help. the pattern is form[1-6]+\.php. Matches form10.php form11.php form12.php ... form16.php form21.php ... Leave out the + sign, which means 1 or more And I have a religious conviction that you oughta use \\. inside of ' or though others find it cluttered. YMMV -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
--- Richard Lynch [EMAIL PROTECTED] wrote: And if you do NEED those 250,000 features completed in 30 days, you have no choice but to suck it up and use the least-evil of the carts out there. Which brings us back (almost) to the original question... Which pre-packaged PHP shopping cart sucks least? Been trying one after the other, although there are many contenters that deserve the prize for which sucks the most still have to sift through the muck to get to which sucks the least...and yes, i know, sorry...not much help. Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
On Tue, August 22, 2006 11:52 am, Robert Cummings wrote: On Tue, 2006-08-22 at 09:22 -0700, Ryan A wrote: Please sign up for an account and join the project at http://gforge2.uwc.ac.za/projects/phpcart/ I have started a mailing list, which should kick in in a few hours... --Paul Hey, Signed up there, but how do i join the project? my username is ryan I think you might also want to change the project name... phpcart is just too common to think that someone else is not using for one of their products. Maybe APC (August php cart :D ) Obviously you don't run the APC op-code cache ;) Guys, don't take this wrong but... How do you think all the other PHP shopping carts got started?... Pretty much the same way. So you really need to spend the next couple months figuring out what they did wrong, why they did that, and how to avoid doing it... :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Shopping cart
Cron for the mailing list has done its magic, so we can move this off the php-general list, i'm sure much to the relief of all those _not_ interested in this lot ;) Please visit http://avoir.uwc.ac.za/mailman/listinfo/phpcart-devel to subscribe. --Paul On Tue, 2006-08-22 at 10:24 -0700, Ryan A wrote: --- Richard Lynch [EMAIL PROTECTED] wrote: And if you do NEED those 250,000 features completed in 30 days, you have no choice but to suck it up and use the least-evil of the carts out there. Which brings us back (almost) to the original question... Which pre-packaged PHP shopping cart sucks least? Been trying one after the other, although there are many contenters that deserve the prize for which sucks the most still have to sift through the muck to get to which sucks the least...and yes, i know, sorry...not much help. Cheers! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT alternate website authentication methods
On 8/18/06, Chris W. Parker [EMAIL PROTECTED] wrote: Ideas: 1. Use flash to allow the user to draw an image. If the original image created during signup is within an acceptable range of the image used to authenticate, let them in. 2. (I saw this somewhere else... don't remember where or what it's called.) Use flash (again) to allow the user to click on an image in certain places. I think it was that you clicked the image in three places and then when you later authenticated you were supposed to click in those same places plus one more (to throw off anyone looking over your shoulder I think). As long as three of the 4 places clicked matched your original points (within a certain tolerance) you were authenticated. These ideas are certainly creative, but I would question their day-to-day usability. They seem to be more simple than traditional passwords to observe and duplicate. Passwords have an advantage of being obscured visually, and difficult (though not impossible) to duplicate through simple observation. The drawn image, unless obscenely complex, would be very prone to visual snooping, since I assume it is being displayed on the user's terminal as it's entered. It would also leave people like myself with absolutely no drawing talent to either a) be unable to reproduce the image I drew the first time or b) use something so simple anyone can do it (did someone say smiley face?). I fail to see the how adding a 4th click to the image helps security. It actually makes it easier to defeat in a brute force hack attempt (4 chances to get 3 proper clicks). Besides, how am I going to write down where I clicked the image on a post-it so I can stick it on my monitor? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php-general mailing list active?
[EMAIL PROTECTED] wrote: I don't have a clue why my gmail account hasn't started to get traffic. But it's funny how we get accustomed to the exchange of ideas and cyber-contact with others. I guess I 'm having some withdrawal. ;-) Why not use gmane? I subscribe to the vast majority of my mailing lists via this service - it's awesome :) Col. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strange mysqli error
Good afternoon. I'm getting a weird mysqli error in my object destructor. Here's an example: ?php $db = new mysqli('localhost', USERNAME, PASSWORD, DATABASE); class Test { function __construct() { global $db; $db-query(SELECT 'test'); print_r($db-error); } function __destruct() { global $db; $db-query(SELECT 'test'); // line 20 print_r($db-error); // line 21 } } $test = new Test(); ? A. On my dev machine (Mac OS X + PHP 5.1.4 + MySQL 5.0.19) I get the following errors EVERY time: Warning: mysqli::query() [function.mysqli-query]: Couldn't fetch mysqli in /Users/richard/Projects/data/private/mgftest.php on line 20 Warning: Test::__destruct() [function.Test---destruct]: Couldn't fetch mysqli in /Users/richard/Projects/data/private/mgftest.php on line 21 B. On my production server (FreeBSD + PHP 5.1.2 + MySQL 5.0.19) I SOMETIMES get the following error: (If I refresh the page repeatedly, sometimes there's an error, sometimes not.) Warning: mysqli::query() [function.query]: Couldn't fetch mysqli in / usr/local/www/data/private/mgftest.php on line 20 C. On a commercial web host (PHP 5.0.4 + MySQL 5.0.22) I NEVER get any errors. There's nothing else in my error logs, $db-errno is 0, and $db-error is empty. Interestingly, I never get any errors from the constructor. Any ideas? Richard --- Richard K. Miller www.richardkmiller.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [solved] Emphasizing first letter of string?
tedd wrote: Not meaning to wake you, but you might consider removing markup from presentation via css. If so, checkout: http://www.w3schools.com/css/css_pseudo_elements.asp Ah, good point! Lol. Looking into that now... all I want is basic access-key support/styling. Thanks for the tip. :) Much appreciated. Cheers, Micky -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Recommendations for PHP debuggers?
On Tuesday 22 August 2006 00:26, Lester Caine wrote: Larry Garfield wrote: I'm watching this thread closely myself, as I'd love something to use at home (on Linux) that doesn't cost what Zend does. :-) Currently I use PHPeclipse, but it is frankly not that good (the code assistance feature is rudimentary at best), and I've not setup the debugger yet. That, and Eclipse itself is just a dog slow memory hog. It would have been nice if PHPEclipse had been given the support it needed to become the 'preferred' PHP addon for Eclipse rather than being kneecapped by Zend who only want to promote their commercial interests. PHPEclipse does it's job well, and is much more feature rich than PDP-IDE. Had a little more support been given then we would have a totally free IDE and would not be waiting for features that still need to be written in PHP-IDE :( I switched to PHPEclipse some time ago, and it does all that I need. I had a debugger working at one time, but now all the 'debugging' is done via inline functions rather than having to knobbly operation with an external tool. I've not had to 'single step' a module for some time ;) Whether it's PHPEclipse or Eclipse itself I don't know, but in ZDE I get code completion for every core function/class and every function/class/method in the current project virtually instantly. It's so rare for me to see any sort of code completion in PHPEclipse that it usually gets in my way more than anything else, and it's keyboard interaction is very intrusive. OK, I know I'm coming from the top so I expect a great deal, but at this point Kate seems like a better option. :-) (I'll try to get the PHP-IDE thing to work again when Ive more time and see how it goes.) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it. -- Thomas Jefferson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] --with-openssl on x64
Marten Lehmann wrote: Hello, openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me configure: error: Cannot find OpenSSL's libraries Just checked ./configure and it had this option: --enable and --with options recognized: --with-libdir=NAME Look for libraries in .../NAME rather than .../lib not sure if that affects *all* options you want to build or you can tell it just openssl: --with-openssl=/usr --with-libdir=/usr/lib64 worth a shot ;) -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] --with-openssl on x64
Chris wrote: Marten Lehmann wrote: Hello, openssl is compiled for x86 on my system, so the libs are in /usr/lib64 rather than /usr/lib. But configure only looks in /usr/lib and gives me configure: error: Cannot find OpenSSL's libraries Just checked ./configure and it had this option: --enable and --with options recognized: --with-libdir=NAME Look for libraries in .../NAME rather than .../lib not sure if that affects *all* options you want to build or you can tell it just openssl: --with-openssl=/usr --with-libdir=/usr/lib64 worth a shot ;) oops that should be: --with-openssl=/usr --with-libdir=lib64 -- Postgresql php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php