php-general Digest 16 Dec 2009 15:07:26 -0000 Issue 6491
php-general Digest 16 Dec 2009 15:07:26 - Issue 6491 Topics (messages 300543 through 300548): Re: file_get_contents ($file) works -- file_get_contents ($url) returns false 300543 by: René Fournier 300546 by: Richard Quadling Re: Highlighting image map on load 300544 by: leledumbo 300545 by: Kim Madsen Re: Class not functioning 300547 by: Wouter van Vliet / Interpotential Re: PHP + ODBC 300548 by: Philip Thompson Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route all my calls through a local proxy. This was the code I had ... ?php // Define the default, system-wide context. $r_default_context = stream_context_get_default( array( 'http' = array( // All HTTP requests are passed through the local NTLM proxy server on port 8080. 'proxy' = 'tcp://127.0.0.1:8080', 'request_fulluri' = True, ), ) ); // Though we said system wide, some extensions need a little coaxing. libxml_set_streams_context($r_default_context); Now, you may not see this in your code, but may be in a script which is loaded via auto_prepend_file. Wish it were, but my test code is bare bones. I would also suggest running something like WireShark at the same time as your script. See if there is ANY traffic over the wire. Do the cURL and file_get_contents() code generate identical requests? cURL -- both PHP and command-line -- fetches files and URLs (remote and local) w/o issues. file_get_contents() fetches files, but fails on all URLs (remote and local). This is why I believe the problem lies with the machine's configuration and not the Firewall. It's pretty confounding, isn't it? I'm not sure what to do at this point. ...Rene ---End Message--- ---BeginMessage--- 2009/12/16 René Fournier m...@renefournier.com: On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route all my calls through a local proxy. This was the code I had ... ?php // Define the default, system-wide context. $r_default_context = stream_context_get_default( array( 'http' = array( // All HTTP requests are passed through the local NTLM proxy server on port 8080. 'proxy' = 'tcp://127.0.0.1:8080', 'request_fulluri' = True, ), ) ); // Though we said system wide, some extensions need a little coaxing. libxml_set_streams_context($r_default_context); Now, you may not see this in your code, but may be in a script which is loaded via auto_prepend_file. Wish it were, but my test code is bare bones. I would also suggest running something like WireShark at the same time as your script. See if there is ANY traffic over the wire. Do the cURL and file_get_contents() code generate identical requests? cURL -- both PHP and command-line -- fetches files and URLs (remote and local) w/o issues. file_get_contents() fetches files, but fails on all URLs (remote and local). This is why I believe the problem lies with the machine's configuration and not the Firewall. It's pretty confounding, isn't it? I'm not sure what to do at this point. ...Rene But by using something like WireShark you can see exactly what requests ARE being made. You may be getting a redirect reply which is failing or something daft. Anything really. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling ---End Message--- ---BeginMessage--- I'm not sure if you can use CSS alone to highlight, but if you can, just give the area a class as you output it with PHP That's the problem, area itself isn't visible, so giving a CSS class won't highlight it. -- View this message in context: http://old.nabble.com/Highlighting-image-map-on-load-tp26777088p26807008.html Sent from the PHP - General mailing list archive at Nabble.com. ---End Message--- ---BeginMessage--- leledumbo wrote on 2009-12-14 13:37: I have image map with dynamic circle areas whose coordinates stored in database. I'd like to colorize these areas so that it's obvious to see them. Most solutions I found on the net
php-general Digest 17 Dec 2009 03:47:27 -0000 Issue 6492
php-general Digest 17 Dec 2009 03:47:27 - Issue 6492 Topics (messages 300549 through 300554): Re: MySQL Appeal from Monty 300549 by: Philip Thompson 300552 by: Yousif Masoud 300553 by: Philip Thompson Re: PHP + ODBC 300550 by: Andrew Ballard 300551 by: Philip Thompson [JOB] Senior LAMP Developer needed immediately in Seattle, WA or Lake Forest, CA 300554 by: Daevid Vincent Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On Dec 15, 2009, at 6:03 AM, Ashley Sheridan wrote: On Tue, 2009-12-15 at 02:53 +, Joseph Masoud wrote: On 14 Dec 2009, at 22:01, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-12-14 at 15:59 -0600, Philip Thompson wrote: On Dec 14, 2009, at 12:51 AM, Lester Caine wrote: Lenin wrote: You might also like this: Come on Monty - Lukas Smith http://bit.ly/5lmwwD I've been watching some of this debate with interest, but I'll stay with a database that has none of the baggage that MySQL has always had, and IS currently replacing Oracle in many large sites :) -- Lester Caine - G8HFL Do share your db of interest... (and please don't say MSSQL). ~Philip MSSQL has nearly brought me to tears and could have easily made me bald through hair pulling! I have to say, I do like MySQL, it's very flexible and fast, and being able to choose different storage engines for different tables in the same DB is brilliant! I really don't think there's anything to overly worry about from Oracle, as the two DB's have different audiences. Thanks, Ash http://www.ashleysheridan.co.uk Unfortunately, I do not share your optimism. I believe that Oracle taking over MySQL would be a disaster of epic proportions. The different audiences theory has been bought up several times but I haven't [to date] seen a sound justification for it. Oracle wants everyone to use ... Oracle, I can't see how this different audiences theory is going to make Oracle promote MySQL, perhaps someone can tell me? I don't think the EU would be able to do anything about it. The powerful companies almost always get what they want. I don't think Monty wouldn't be doing this unless he felt that something [put mildly] bad is coming. What has happened, has happened. Trying to figure out who is to blame for this mess is pointless. Ideally, It would be nice if Oracle took its claws off MySQL and found another project to ruin. Note: I am *not* trying to spread FUD I've always been led to believe that you go with MySQL if you want speed, Oracle if you want data integrity. I know they both handle each one admirably, but Oracle is known more for guarding the data against mishaps and MySQL is known more for performance. I just think it may be a little early to be condemning Oracle yet, we should wait a little to at least see what stance they have on the whole thing. And before you ask, no I have no connection to Oracle, I'm an avid MySQL fan! Thanks, Ash http://www.ashleysheridan.co.uk Let's not forget one of the biggest decisions on why people choose MySQL over Oracle/MSSQL it's way cheap. So cheap they're nearly giving it away. Oh wait! They ARE giving it away. You start to piss people off whenever you take away their working, free option. Also by being open source, you have plenty of people that have the opportunity to work with it. The biggest reason I haven't messed with Oracle (except in college for my db class) is that it's expensive. Don't underestimate how cheap people are. There's your different audience. ~Philip---End Message--- ---BeginMessage--- On Wed, Dec 16, 2009 at 3:14 PM, Philip Thompson philthath...@gmail.comwrote: On Dec 15, 2009, at 6:03 AM, Ashley Sheridan wrote: On Tue, 2009-12-15 at 02:53 +, Joseph Masoud wrote: On 14 Dec 2009, at 22:01, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-12-14 at 15:59 -0600, Philip Thompson wrote: On Dec 14, 2009, at 12:51 AM, Lester Caine wrote: Lenin wrote: You might also like this: Come on Monty - Lukas Smith http://bit.ly/5lmwwD I've been watching some of this debate with interest, but I'll stay with a database that has none of the baggage that MySQL has always had, and IS currently replacing Oracle in many large sites :) -- Lester Caine - G8HFL Do share your db of interest... (and please don't say MSSQL). ~Philip MSSQL has nearly brought me to tears and could have easily made me bald through hair pulling! I have to say, I do like MySQL, it's very flexible
Re: [PHP] Highlighting image map on load
leledumbo wrote on 2009-12-14 13:37: I have image map with dynamic circle areas whose coordinates stored in database. I'd like to colorize these areas so that it's obvious to see them. Most solutions I found on the net highlights the area on mouse hover, while my needs is to do it once when the window is loaded. Any idea? I would say that you should do the following: 1. make a css class, that gives you the highlights you want. 2. put a div with position:absolute over the image where you want the class to take effect 3. use a javascript to draw the circle in the div. If you look at for instance the nifty and niftycube solutiona, they're working with an inner and an outer color, so the outer should be transparent and the inner you css class. And my guess is that this has already been made before, so google for a javascript solution that fits your needs. Happy hacking. -- Kind regards Kim Emax - masterminds.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false
2009/12/16 René Fournier m...@renefournier.com: On 2009-12-15, at 11:55 PM, Richard Quadling wrote: Do you have a default stream context defined for the http stream? Nope. A _LONG_ time ago, when I was using a firewall with NTLM authentication (which PHP doesn't deal with), I had to route all my calls through a local proxy. This was the code I had ... ?php // Define the default, system-wide context. $r_default_context = stream_context_get_default( array( 'http' = array( // All HTTP requests are passed through the local NTLM proxy server on port 8080. 'proxy' = 'tcp://127.0.0.1:8080', 'request_fulluri' = True, ), ) ); // Though we said system wide, some extensions need a little coaxing. libxml_set_streams_context($r_default_context); Now, you may not see this in your code, but may be in a script which is loaded via auto_prepend_file. Wish it were, but my test code is bare bones. I would also suggest running something like WireShark at the same time as your script. See if there is ANY traffic over the wire. Do the cURL and file_get_contents() code generate identical requests? cURL -- both PHP and command-line -- fetches files and URLs (remote and local) w/o issues. file_get_contents() fetches files, but fails on all URLs (remote and local). This is why I believe the problem lies with the machine's configuration and not the Firewall. It's pretty confounding, isn't it? I'm not sure what to do at this point. ...Rene But by using something like WireShark you can see exactly what requests ARE being made. You may be getting a redirect reply which is failing or something daft. Anything really. -- - Richard Quadling Standing on the shoulders of some very clever giants! EE : http://www.experts-exchange.com/M_248814.html 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] Class not functioning
Allen, Before you go with my static-approach, please do consider Shawn's registry pattern suggestion. That's pretty sweet too ;-). A little response to your long text, before I help you fix the bug. A static property is basically the same as a regular property on an object. Only difference is that they are not reset when the class is instantiated into an object. They are just there. Now, about your bug. The syntax for referencing a static property is a bit weird - which has to do with the existence of class constants, which might have set you off. Notifier::notifyQueue would reference a class constant. The [] syntax is not valid here, since a constant is - you got it: constant. And thus cannot be changed. Notifier::$notifyQ[] = 'div ... /div'; references the static property. But... since notifyQ is a proptected static property, it is very unlikealy that you'll ever actually write Notifier::$notifyQ. You add to this queue from within the class itself, so therefore self::$notifyQ is a lot better. Does that answer your question? Btw; Shawn; Assuming that your Registry class holds objects, there is no need have the ampersand in front of the get method or $object argument. Objects are *always* references. And you might want to look at the __get, __set and __isset magic. Wouter 2009/12/16 Allen McCabe allenmcc...@gmail.com Wouter, Implementing your static idea was pretty easy, I was already referencing Notifier with the :: operator in my other methods, however I am running into trouble assigning new values to the static array. I am getting a syntax error, unexpected '[' on this line of my Notifier class: Notifier::notifyQ[] = 'div class='.$message; . . . Any ideas why this is causing an error? (note: I did try using $this-Notifier, and it said I cannot do what-not to a non-object, can't remember the exact message at the moment) On Tue, Dec 15, 2009 at 2:30 PM, Wouter van Vliet / Interpotential pub...@interpotential.com wrote: Allen, The short answer (but don't follow this): ?php class Meetgreet { public function deleteSingle($id, $number) { // do something global $Notify; $Notify-addToQ( .. ); } } ? The long(er) answer: I assume your Notifier object functions as singleton? Ie; accross your entire application, there is only one instance of that class? Why not go-static? That is, to my experience, the sweetest way to make something globally accessible - without making something global. Like so ?php class Notifier { protected static $queue = Array(); // make sure it can't be instantiated private constructer __construct() { } public static function addToQ( $arg, $anotherArg) { self::$queue[] = $arg.' - '.$anotherArg; } } // and then from within any method anywhere, call Notifier::addToQ('foo', 'bar'); ? Does that work for you? Regards, Wouter (ps. call me a purist, but a function defined in a class is no longer called a function, but a *method*) 2009/12/15 Allen McCabe allenmcc...@gmail.com Hey all (and Nirmalya, thanks for the help!), I have a question that I just can't seem to find via Google. I want to be able to add messages to a qeue whenever my classes complete (or fail to complete) specific functions. I think have a call within my html to my Notifier class to print all qeued messages (via a function 'printQ'). How do I access a globally instantiated class from within another class? Example: ?php // INSTANTIATE $Meetgreet = new Meetgreet; $Notify = new Notifier; ... ... $Meetgreet-deleteSingle($id, 1); // This completes a function within Meetgreet class. That function needs to be able to use the Notifier function addtoQ(), how would this be accomplished? ? ... ... ?php $Notify-printQ() ? On Mon, Dec 14, 2009 at 6:07 PM, Nirmalya Lahiri nirmalyalah...@yahoo.comwrote: --- On Tue, 12/15/09, Allen McCabe allenmcc...@gmail.com wrote: From: Allen McCabe allenmcc...@gmail.com Subject: [PHP] Class not functioning To: phpList php-general@lists.php.net Date: Tuesday, December 15, 2009, 6:17 AM Hey everyone, I just delved into classes recently and have been having moderate success so far. I have a puzzler though. I have the following class decalred and instantiated: class Notify { var $q = array(); public function addtoQ($string, $class) { $message = 'span class='. $class .''. $string .'/span'; $this-q[] = $message; } public function printQ() { if (isset($q)) { echo 'p align=center class=notification'; foreach($this-q as $msg) { echo $msg .\n; } echo '/p'; } return; } function __destruct() { if (isset($q)) { unset($this-q); } } } // END CLASS Notify And in my script, I call it like so: $Notif = new Notify; I have run other statements in other
Re: [PHP] PHP + ODBC
On Dec 15, 2009, at 9:50 AM, Richard Quadling wrote: 2009/12/15 Philip Thompson philthath...@gmail.com: On Dec 14, 2009, at 8:47 PM, James McLean wrote: On Tue, Dec 15, 2009 at 10:03 AM, Philip Thompson philthath...@gmail.com wrote: My head hurts from hitting it on my desk all day, so I thought I'd turn to a fresher set of eyes. The issue I'm having is getting PHP to connect ODBC. I can get it to work using isql from the command line. Can you verify my settings: [snipped] I've tried the above DSNs and many other versions of it ad nauseum. The specific error I'm getting is... [unixODBC][Driver Manager]Data source name not found, and no default driver specified. I really have searched high and low for a solution, but to no avail. Any thoughts? Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. I was just testing first with a MySQL connection to get it working (I don't have the MSSQL credentials yet). Turned out I was VERY close with my solution, which a coworker figured out this morning. The [ODBC Data Sources] entry for MySQL needed to specified correctly in /etc/odbc.ini. [ODBC Data Sources] MySQL = MySQL [MySQL] Description... Driver... I could have sworn I tried that, but who knows Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You can use a DNS-string too ... odbc_pconnect(Driver={SQL Server Native Client 10.0};Server={$s_Server};Database={$s_DB};MARS_Connection=Yes;, $s_User, $s_Pswd, SQL_CUR_USE_DRIVER); I'm actually using a combination of the DSN*-string and the odbc.ini settings. Thank you! ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Appeal from Monty
On Dec 15, 2009, at 6:03 AM, Ashley Sheridan wrote: On Tue, 2009-12-15 at 02:53 +, Joseph Masoud wrote: On 14 Dec 2009, at 22:01, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-12-14 at 15:59 -0600, Philip Thompson wrote: On Dec 14, 2009, at 12:51 AM, Lester Caine wrote: Lenin wrote: You might also like this: Come on Monty - Lukas Smith http://bit.ly/5lmwwD I've been watching some of this debate with interest, but I'll stay with a database that has none of the baggage that MySQL has always had, and IS currently replacing Oracle in many large sites :) -- Lester Caine - G8HFL Do share your db of interest... (and please don't say MSSQL). ~Philip MSSQL has nearly brought me to tears and could have easily made me bald through hair pulling! I have to say, I do like MySQL, it's very flexible and fast, and being able to choose different storage engines for different tables in the same DB is brilliant! I really don't think there's anything to overly worry about from Oracle, as the two DB's have different audiences. Thanks, Ash http://www.ashleysheridan.co.uk Unfortunately, I do not share your optimism. I believe that Oracle taking over MySQL would be a disaster of epic proportions. The different audiences theory has been bought up several times but I haven't [to date] seen a sound justification for it. Oracle wants everyone to use ... Oracle, I can't see how this different audiences theory is going to make Oracle promote MySQL, perhaps someone can tell me? I don't think the EU would be able to do anything about it. The powerful companies almost always get what they want. I don't think Monty wouldn't be doing this unless he felt that something [put mildly] bad is coming. What has happened, has happened. Trying to figure out who is to blame for this mess is pointless. Ideally, It would be nice if Oracle took its claws off MySQL and found another project to ruin. Note: I am *not* trying to spread FUD I've always been led to believe that you go with MySQL if you want speed, Oracle if you want data integrity. I know they both handle each one admirably, but Oracle is known more for guarding the data against mishaps and MySQL is known more for performance. I just think it may be a little early to be condemning Oracle yet, we should wait a little to at least see what stance they have on the whole thing. And before you ask, no I have no connection to Oracle, I'm an avid MySQL fan! Thanks, Ash http://www.ashleysheridan.co.uk Let's not forget one of the biggest decisions on why people choose MySQL over Oracle/MSSQL it's way cheap. So cheap they're nearly giving it away. Oh wait! They ARE giving it away. You start to piss people off whenever you take away their working, free option. Also by being open source, you have plenty of people that have the opportunity to work with it. The biggest reason I haven't messed with Oracle (except in college for my db class) is that it's expensive. Don't underestimate how cheap people are. There's your different audience. ~Philip
Re: [PHP] PHP + ODBC
On Tue, Dec 15, 2009 at 10:13 AM, Philip Thompson philthath...@gmail.com wrote: On Dec 14, 2009, at 8:47 PM, James McLean wrote: Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. Is there any chance that you have to work with fields that will return more than 4k of text? If so, you may have problems with ODBC. I can't remember if I ever used odbc_connect() and its related functions with SQL Server (I mostly use it to read Excel spreadsheets), but I know we couldn't use PDO (with either the PDO_MSSQL or PDO_ODBC drivers) because of a limit on TEXTSIZE that we couldn't get around. On our older stuff, we're still using the mssql library, but on our newer stuff we're using the SQL Server Driver for PHP. It connects via ODBC, but it is the best library I've found for working with SQL Server in PHP. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP + ODBC
On Dec 16, 2009, at 9:22 AM, Andrew Ballard wrote: On Tue, Dec 15, 2009 at 10:13 AM, Philip Thompson philthath...@gmail.com wrote: On Dec 14, 2009, at 8:47 PM, James McLean wrote: Why not just use the built in MySQL libraries or PDO? Oh, that would be my preference. However, the database that I really need to connect to is an MSSQL one and the allowed connection type is ODBC. Is there any chance that you have to work with fields that will return more than 4k of text? If so, you may have problems with ODBC. I can't remember if I ever used odbc_connect() and its related functions with SQL Server (I mostly use it to read Excel spreadsheets), but I know we couldn't use PDO (with either the PDO_MSSQL or PDO_ODBC drivers) because of a limit on TEXTSIZE that we couldn't get around. On our older stuff, we're still using the mssql library, but on our newer stuff we're using the SQL Server Driver for PHP. It connects via ODBC, but it is the best library I've found for working with SQL Server in PHP. Andrew So, instead of using odbc_* functions, just use the mssql_* functions? ~Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Appeal from Monty
On Wed, Dec 16, 2009 at 3:14 PM, Philip Thompson philthath...@gmail.comwrote: On Dec 15, 2009, at 6:03 AM, Ashley Sheridan wrote: On Tue, 2009-12-15 at 02:53 +, Joseph Masoud wrote: On 14 Dec 2009, at 22:01, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-12-14 at 15:59 -0600, Philip Thompson wrote: On Dec 14, 2009, at 12:51 AM, Lester Caine wrote: Lenin wrote: You might also like this: Come on Monty - Lukas Smith http://bit.ly/5lmwwD I've been watching some of this debate with interest, but I'll stay with a database that has none of the baggage that MySQL has always had, and IS currently replacing Oracle in many large sites :) -- Lester Caine - G8HFL Do share your db of interest... (and please don't say MSSQL). ~Philip MSSQL has nearly brought me to tears and could have easily made me bald through hair pulling! I have to say, I do like MySQL, it's very flexible and fast, and being able to choose different storage engines for different tables in the same DB is brilliant! I really don't think there's anything to overly worry about from Oracle, as the two DB's have different audiences. Thanks, Ash http://www.ashleysheridan.co.uk Unfortunately, I do not share your optimism. I believe that Oracle taking over MySQL would be a disaster of epic proportions. The different audiences theory has been bought up several times but I haven't [to date] seen a sound justification for it. Oracle wants everyone to use ... Oracle, I can't see how this different audiences theory is going to make Oracle promote MySQL, perhaps someone can tell me? I don't think the EU would be able to do anything about it. The powerful companies almost always get what they want. I don't think Monty wouldn't be doing this unless he felt that something [put mildly] bad is coming. What has happened, has happened. Trying to figure out who is to blame for this mess is pointless. Ideally, It would be nice if Oracle took its claws off MySQL and found another project to ruin. Note: I am *not* trying to spread FUD I've always been led to believe that you go with MySQL if you want speed, Oracle if you want data integrity. I know they both handle each one admirably, but Oracle is known more for guarding the data against mishaps and MySQL is known more for performance. I just think it may be a little early to be condemning Oracle yet, we should wait a little to at least see what stance they have on the whole thing. And before you ask, no I have no connection to Oracle, I'm an avid MySQL fan! Thanks, Ash http://www.ashleysheridan.co.uk Let's not forget one of the biggest decisions on why people choose MySQL over Oracle/MSSQL it's way cheap. So cheap they're nearly giving it away. Oh wait! They ARE giving it away. You start to piss people off whenever you take away their working, free option. Also by being open source, you have plenty of people that have the opportunity to work with it. The biggest reason I haven't messed with Oracle (except in college for my db class) is that it's expensive. Don't underestimate how cheap people are. There's your different audience. ~Philip Your rant has been repeated so many times that it is becoming like a corporate mantra. Some of the biggest software companies in the world use open source software (which is free as in free beer). Are companies that use Linux or FreeBSD as their server software cheap? For the remainder of my argument, I will assume that your assertions only apply to database servers (I'm not sure why you've chosen to single them out). It is disheartening that developers who decide to use open source software are castigated as cheap. Well in my case, I like to know what's under the bonnet. That's just me, not a generalization and I emphasize that I am not speaking on behalf of anyone. The tenets of a successful argument include a viable theory substantiated by reliable and independently verifiable facts (none of which exist in your rant). I will, nevertheless, try to make sense of your logic [in my own mind[. I think you are making 2 assertions and then clumsily using them to prove your claim. Assertion 1: It is inconvenient when a successful, widely adopted and very convenient open source solution is taken away from the community (I am aware that there are no explicit plans to kill the project, but this is my perception based on how Oracle treated InnoDB). True. This is not only inconvenient, it is rude, immoral and very selfish. Now, you tell me who's being cheap? Developers who implement MySQL (for whatever reason) or Oracle by viciously going after businesses that are happily using MySQL? Assertion 2: People who implement Open Source Software are tawdry. This is absurd. Period. Cost is one of the more important factors when choosing a software solution to implement,
Re: [PHP] MySQL Appeal from Monty
On Dec 16, 2009, at 1:48 PM, Yousif Masoud wrote: On Wed, Dec 16, 2009 at 3:14 PM, Philip Thompson philthath...@gmail.com wrote: On Dec 15, 2009, at 6:03 AM, Ashley Sheridan wrote: On Tue, 2009-12-15 at 02:53 +, Joseph Masoud wrote: On 14 Dec 2009, at 22:01, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2009-12-14 at 15:59 -0600, Philip Thompson wrote: On Dec 14, 2009, at 12:51 AM, Lester Caine wrote: Lenin wrote: You might also like this: Come on Monty - Lukas Smith http://bit.ly/5lmwwD I've been watching some of this debate with interest, but I'll stay with a database that has none of the baggage that MySQL has always had, and IS currently replacing Oracle in many large sites :) -- Lester Caine - G8HFL Do share your db of interest... (and please don't say MSSQL). ~Philip MSSQL has nearly brought me to tears and could have easily made me bald through hair pulling! I have to say, I do like MySQL, it's very flexible and fast, and being able to choose different storage engines for different tables in the same DB is brilliant! I really don't think there's anything to overly worry about from Oracle, as the two DB's have different audiences. Thanks, Ash http://www.ashleysheridan.co.uk Unfortunately, I do not share your optimism. I believe that Oracle taking over MySQL would be a disaster of epic proportions. The different audiences theory has been bought up several times but I haven't [to date] seen a sound justification for it. Oracle wants everyone to use ... Oracle, I can't see how this different audiences theory is going to make Oracle promote MySQL, perhaps someone can tell me? I don't think the EU would be able to do anything about it. The powerful companies almost always get what they want. I don't think Monty wouldn't be doing this unless he felt that something [put mildly] bad is coming. What has happened, has happened. Trying to figure out who is to blame for this mess is pointless. Ideally, It would be nice if Oracle took its claws off MySQL and found another project to ruin. Note: I am *not* trying to spread FUD I've always been led to believe that you go with MySQL if you want speed, Oracle if you want data integrity. I know they both handle each one admirably, but Oracle is known more for guarding the data against mishaps and MySQL is known more for performance. I just think it may be a little early to be condemning Oracle yet, we should wait a little to at least see what stance they have on the whole thing. And before you ask, no I have no connection to Oracle, I'm an avid MySQL fan! Thanks, Ash http://www.ashleysheridan.co.uk Let's not forget one of the biggest decisions on why people choose MySQL over Oracle/MSSQL it's way cheap. So cheap they're nearly giving it away. Oh wait! They ARE giving it away. You start to piss people off whenever you take away their working, free option. Also by being open source, you have plenty of people that have the opportunity to work with it. The biggest reason I haven't messed with Oracle (except in college for my db class) is that it's expensive. Don't underestimate how cheap people are. There's your different audience. ~Philip Your rant has been repeated so many times that it is becoming like a corporate mantra. Some of the biggest software companies in the world use open source software (which is free as in free beer). Are companies that use Linux or FreeBSD as their server software cheap? For the remainder of my argument, I will assume that your assertions only apply to database servers (I'm not sure why you've chosen to single them out). It is disheartening that developers who decide to use open source software are castigated as cheap. Well in my case, I like to know what's under the bonnet. That's just me, not a generalization and I emphasize that I am not speaking on behalf of anyone. The tenets of a successful argument include a viable theory substantiated by reliable and independently verifiable facts (none of which exist in your rant). I will, nevertheless, try to make sense of your logic [in my own mind[. I think you are making 2 assertions and then clumsily using them to prove your claim. Assertion 1: It is inconvenient when a successful, widely adopted and very convenient open source solution is taken away from the community (I am aware that there are no explicit plans to kill the project, but this is my perception based on how Oracle treated InnoDB). True. This is not only inconvenient, it is rude, immoral and very selfish. Now, you tell me who's being cheap? Developers who implement MySQL (for whatever reason) or Oracle by viciously going after businesses that are happily using MySQL? Assertion 2: People who implement Open Source Software are
[PHP] [JOB] Senior LAMP Developer needed immediately in Seattle, WA or Lake Forest, CA
Hey guys, I've been on this list since 1997, wow, 12 years! Anyways, we've been desperately trying to find a talented LAMP developers/Linux admin. We've got recruiters hunting, but all the candidates are sub-par and it's wasting a lot of my/our time. It seems that many people CLAIM to be LAMP devs, but when you actually quiz them, they fail horribly. Or they don't know their way around a Linux system, if it doesn't have a pretty GUI. So, I apologize if this is not allowed on the list, but I don't see a job list (http://www.php.net/mailing-lists.php maybe there should be? ) Since I'm going to be working directly with this person, I figured I'd just take the bull by the horns and post here to find someone with skills amongst my fellow PHPriends. I'm not a recruiter, just a worker-bee here at PAC and want to find another developer that I can be sure will take pride in their work and get things done and not dump it all on my lap. So with that, here is the job description. If you're in the Bothell, WA (Seattle) area or the Lake Forest, CA (Irvine/OC) area, and are interested in a 6-month contract to perm job, let me know. BTW, everyone starts as a contractor here, myself included. It's an easy way to test someone and not have to worry about firing them if they turn out to suck. I was offered my perm position after only 3 months, as were my two co-workers. This is an immediate ASAP opening. - 8 - 8 --- We are looking to hire an MTS III, Software AKA: a Senior LAMP Developer Panasonic Avionics Corporation is the world's leading supplier of in-flight entertainment and communication systems. Headquartered in Lake Forest, California, Panasonic Avionics Corporation maintains corporate and engineering offices in Bothell, Washington; The position can be filled at either location. http://www.panasonic.aero/Contacts/Contact.aspx Core responsibilities are to design and develop software for the LAMP stack. You will be part of a small and agile software development team and must be able to work using Internet collaboration tools, such as instant messaging, CVS/SourceForge, Wiki, Bug trackers, etc. You should be familiar with the Linux environment from a command line. The chosen candidate will be responsible for developing and maintaining the current customer facing ground-application suite and future applications which support our IFE (In-Flight Entertainment) system. Duties include: * Design and implement database-driven reports from a database with 1 Billion rows * Design and develop web applications in PHP, MySQL, JavaScript, jQuery, DHTML, CSS, XML * Design and optimize SQL databases (with a focus on mySQL, but some Oracle and MSSQL) * Perform complex SQL JOINs and SUB SELECTS (no functions, triggers or procedures needed currently) * Be familiar with mySQL CLI tools and commands (such as EXPLAIN, SHOW, DESCRIBE, mytop, etc.) * Monitor mySQL replication/clusters (Master/Slaves) and basic DBA skills related to uptime thereof * Enhance software to reduce operating time or improve efficiency (ie. mySQL slowlog, reduce JOINs, etc.) * Develop system architecture and design including software, hardware, communications and interface requirements * Prepare, review, and evaluate documentation, specifications, test plans and procedures * Conducts analysis to define, analyze and allocate requirements * Budget time and make accurate estimates for task completion * Prepares program-level/code documentation and self-documenting code (ie. Wiki, PHPDoc) * Basic Ubuntu server maintenance, security and knowledge required (CLI only, no GUI) * Python experience is a definite plus * Eventually creating Unit Tests and User Acceptance Tests (UAT) * Engage in Pair Programming and Code Reviews Qualifications: * Applicant must be able to effectively communicate on a technical level with hardware and software engineering personnel. The position does not require the communication skills set required to communicate with external customers. * Applicant must be capable of solving complex software problems, trouble-shoot code, and provide very creative input on user interface designs. EDUCATION: BS Computer Science, or equivalent and 8 years of experience. WORK EXPERIENCE: 8+ years of software development experience. Being a small team, we need senior level people, not newbies. SOFTWARE SKILLS: Must be very experienced with PHP and familiar with web development pitfalls such as browser incompatibilities/quirks and CSS/JS discrepancies. PHP and SQL optimization tricks and techniques appreciated. Feel free to send me your resumes for review and then I'll send worthy candidates to my boss to schedule a more formal interview. (Send them to the email below please, not my personal one I used to post this from -- I like to keep things organized, plus it'll be a test to see how well you follow directions *wink*) Sorry, there is no relocation offered.
[PHP] A strange question about mysql_close()
I want to ask a strange question. As we know, if we connect a mysql database in the same host twice with the same username, we won't get two new link, but two handle to only one link. Then, if I close one of them, whether the other one will be closed together? I wrote two pieces of code. The first is like this ?php $db1 = mysql_connect($host, $username, $pwd); $db2 = mysql_connect($host, $username, $pwd); $sql = 'show databases'; mysql_close($db1); $res = mysql_query($sql, $db2); $a = mysql_fetch_row($res); print_r($a); ? Then the output of the $db2 is correct. So the $db2 isn't closed together with the $db1. But when I add a line among the code, the result is different ?php $db1 = mysql_connect($host, $username, $pwd); $db2 = mysql_connect($host, $username, $pwd); $sql = 'show databases'; mysql_close($db1); $db1 = true; //a new line $res = mysql_query($sql, $db2); $a = mysql_fetch_row($res); print_r($a); ? Then the output is wrong. The PHP tell me that the link is not a valid one. I don't know how an assignment operation for the $db1 can close the $db2. Could someone help me. I'll appreciate your help.
[PHP] Tracking the progress of download
Hello to all! Who knows how to track the progress of the download using PHP and JavaScript? I have a script that downloads file from net to the server, and I want to the process including the speed to the clientside. How can I do that? Best regards, Sam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] A PHP-driven script to determine if the environment is configured correctly (checklist)
Dear list, e-Greetings, I've developed some PHP-driven web applications. These applications will be installed on different linux-based servers (typically Debian and Redhat). Usually, after I copy the files to the server, they DO NOT WORK, so I spend hours to debug the problem. Problems are very funny, for example, the program is giving strange errors, and it is not working because short_open_tags are off ! I decided to write a PHP script to check if server's configuration meets my requirements. - checking whether some php extensions are loaded, eg. MCrypt. - checking wheather short_open_tags is ON - checking whether mod_rewrite is enabled - etc. Here's my question: - How do you check if .htaccess is working, *** via php code *** ? It's easy to check if .htaccess exists (@php: file_exists), but how to make sure if .htaccess is working?! - How do you check if AllowOverride is set to All in apache's configuration? Please let me know what do you think. Thank you in advance. -behzad
Re: [PHP] A PHP-driven script to determine if the environment is configured correctly (checklist)
Здравствуйте, AmirBehzad. Вы писали 17 декабря 2009 г., 17:46:59: Dear list, e-Greetings, I've developed some PHP-driven web applications. These applications will be installed on different linux-based servers (typically Debian and Redhat). Usually, after I copy the files to the server, they DO NOT WORK, so I spend hours to debug the problem. Problems are very funny, for example, the program is giving strange errors, and it is not working because short_open_tags are off ! I decided to write a PHP script to check if server's configuration meets my requirements. - checking whether some php extensions are loaded, eg. MCrypt. - checking wheather short_open_tags is ON - checking whether mod_rewrite is enabled - etc. Here's my question: - How do you check if .htaccess is working, *** via php code *** ? It's easy to check if .htaccess exists (@php: file_exists), but how to make sure if .htaccess is working?! - How do you check if AllowOverride is set to All in apache's configuration? Please let me know what do you think. Thank you in advance. -behzad Make sure that you did your scripts executable(chmod +x) You can check .htaccess that way: create .htaccess if folder with script, override some directive thru it, like php's max execution time. thencreatephpscript,getphp value that you've changed(max_execution_time), compare to the value you gave in .htaccess, if values are the same, .htaccess is working! -- Sam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php