[PHP] Re: dynamically naming PHP vars on the fly?
On Wed, 5 Aug 2009 16:17:26 -0600, Govinda wrote: > I want to do this: > (I am just assuming it won't work; I haven't even tried it yet) > > $var1='apple'; > $Fruit_$var1="organic"; > echo "$Fruit_apple"; // I want this to return "organic" > > Or how are you guys dynamically naming PHP vars on the fly? Others have mentioned variable variables. While I have used those, I tend to prefer arrays: $var1 = 'apple'; $fruits[$var1] = 'organic'; echo $fruits[$var1]; /Nisse -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, 2009-08-06 at 02:55 +0200, Ralph Deffke wrote: > why do u stick to php 6? > > i would recommend www.scribd.com and have a search on PHP. there are books > on beginners for php5 and articles of the difference to php 6. > > a very usefull site by the way, made me stopping buying books. loads of > material on IT stuff. > > ralph > ralph_def...@yahoo.de > > wrote in message > news:43bda83e-2383-48a8-87ca-4408244fa...@fannullone.us... > > Has anyone read this book by Larry Ullman yet? If so, what do you > > think about it? I'm looking for a well-rounded book that covers PHP > > for e-commerce websites and from what little I've been able to find > > online, it looks pretty good. Or would you recommend another book? > > > > I know that no book has all the answers - I just want something in my > > hands to read. However, I've bought a few Perl books that were a > > waste of money, so this time, I thought I'd ask first. > > > > Thanks, > > Frank > > > I'd focus on PHP 5 more than 6 just now, as the majority of hosting companies out there are still only offering PHP 5 installations. Learning 6 without learning 5 could lead you into some very interesting conversations with clients! Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy
On Thu, 2009-08-06 at 09:24 +1000, Clancy wrote: > On Wed, 5 Aug 2009 09:25:20 -0400, phps...@gmail.com (Bastien Koert) wrote: > > >On Wed, Aug 5, 2009 at 8:02 AM, Ashley Sheridan > >wrote: > >> On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: > >>> Thank you to all of you who have commented on this query. > >>> > >>> On the subject of comments, I feel that Larry Garfield settled this query > >>> by pointing out > >>> that halving the size of a particular document gave a barely noticeable > >>> increase in speed. > >>> Paul Foster pointed out the problem of maintenance, but if, as I do, you > >>> do your > >>> development in-house, and then upload the working copies of the program, > >>> it would be > >>> possible to strip out comments when you upload it. If you were really > >>> paranoid, this could > >>> have the advantage that if somebody managed to steal your code from the > >>> server it would be > >>> that much harder for them to understand. On the other hand the process of > >>> stripping out > >>> the comments could potentially introduce new bugs, and I think this > >>> consideration would > >>> outweigh anything else. > >>> > >>> I have recently come to the conclusion that I should never consider > >>> anything completed > >>> until I have analysed the HTML code for an actual page. It is amazing how > >>> badly mangled > >>> tables and the like can be without producing any visible effect on the > >>> page, and on > >>> several occasions I have found PHP error messages which were mixed up > >>> with the HTML in > >>> such a way that they were not displayed at all. On at least one occasion > >>> this gave me the > >>> clue to an otherwise baffling bug. > >>> > >>> I have also discovered that the process of analysing the HTML is made > >>> substantially > >>> simpler by inserting HTML comments into the output; e.g. instead of > >>> > >>> Echo ''; > >>> write > >>> ?> > >>> > >>> >>> > >>> > >>> >>> > >>> Unfortunately, for HTML readability, it is highly desirable not to indent > >>> the code, and if > >>> you are trying to have nicely indented braces, this makes the PHP code > >>> that much harder to > >>> interpret. > >>> > >>> And on the question of functions there is some virtue (primarily from the > >>> point of view of > >>> maintenance) in not having individual files too large, so while it seems > >>> to be the general > >>> consensus that splitting up functions into groups to give smaller files > >>> will probably slow > >>> things down a bit, if they can be grouped into sets which are only loaded > >>> in particular > >>> circumstances this would be worth doing. > >>> > >>> > >> Nested tables are the devils playthings! > > I must be the devil, then. I enjoy playing with them. And if they're done > right they > seem to work on every system I have tried them on. Granted Dreamweaver > design mode gets > its knickers in a knot if you nest them more than about 4 deep. > > >> > >> Thanks, > >> Ash > >> http://www.ashleysheridan.co.uk > >> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > > > >I would agree there...we have an app that allows users to create forms > >dynamically with a left and right panel section along with some full > >width plug-in. At a minimum this is built with three nested tables. > >Here's the really rotten part, the VP (original dev for the display > >code) screwed a table close up somewhere. A bug they found literally > >minutes before it when to prod at a client site, instead of giving me > >15 minutes to trace it down, they wrapped the entire table structure > >in another table to make it look pretty. > > Clearly he didn't verify the HTML before he released the original version. ;-) > > > >Drives me mental as it produces lots a visual screw up when a certain > >pattern in the form elements is created > > That's the joy of HTML errors - often the output will appear normal until you > make some > minor, and apparently irrelevant, change, when it all goes haywire. > > That's not the only point. If you're on a slow connection you'll notice the issue. Some browsers only start displaying the page once all the layout data has been loaded. I've seen some sites with nesting levels of 7 tables deep sometimes, and that's just a mess. I'm also unsure how text/speech/Braille browsers deal with complex table sites too. And tables shouldn't be used for layout, use CSS instead!... Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy
as it comes to this point I can recomment an O'reilly book "High Performance Web Sites, essential knowledge for frontend engineers" if u read that book ur eyes will grow and u will not bother about php comments, ralph "Ashley Sheridan" wrote in message news:1249543712.3358.104.ca...@localhost... > On Thu, 2009-08-06 at 09:24 +1000, Clancy wrote: > > On Wed, 5 Aug 2009 09:25:20 -0400, phps...@gmail.com (Bastien Koert) wrote: > > > > >On Wed, Aug 5, 2009 at 8:02 AM, Ashley Sheridan wrote: > > >> On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: > > >>> Thank you to all of you who have commented on this query. > > >>> > > >>> On the subject of comments, I feel that Larry Garfield settled this query by pointing out > > >>> that halving the size of a particular document gave a barely noticeable increase in speed. > > >>> Paul Foster pointed out the problem of maintenance, but if, as I do, you do your > > >>> development in-house, and then upload the working copies of the program, it would be > > >>> possible to strip out comments when you upload it. If you were really paranoid, this could > > >>> have the advantage that if somebody managed to steal your code from the server it would be > > >>> that much harder for them to understand. On the other hand the process of stripping out > > >>> the comments could potentially introduce new bugs, and I think this consideration would > > >>> outweigh anything else. > > >>> > > >>> I have recently come to the conclusion that I should never consider anything completed > > >>> until I have analysed the HTML code for an actual page. It is amazing how badly mangled > > >>> tables and the like can be without producing any visible effect on the page, and on > > >>> several occasions I have found PHP error messages which were mixed up with the HTML in > > >>> such a way that they were not displayed at all. On at least one occasion this gave me the > > >>> clue to an otherwise baffling bug. > > >>> > > >>> I have also discovered that the process of analysing the HTML is made substantially > > >>> simpler by inserting HTML comments into the output; e.g. instead of > > >>> > > >>> Echo ''; > > >>> write > > >>> ?> > > >>> > > >>> > >>> > > >>> > > >>> > >>> > > >>> Unfortunately, for HTML readability, it is highly desirable not to indent the code, and if > > >>> you are trying to have nicely indented braces, this makes the PHP code that much harder to > > >>> interpret. > > >>> > > >>> And on the question of functions there is some virtue (primarily from the point of view of > > >>> maintenance) in not having individual files too large, so while it seems to be the general > > >>> consensus that splitting up functions into groups to give smaller files will probably slow > > >>> things down a bit, if they can be grouped into sets which are only loaded in particular > > >>> circumstances this would be worth doing. > > >>> > > >>> > > >> Nested tables are the devils playthings! > > > > I must be the devil, then. I enjoy playing with them. And if they're done right they > > seem to work on every system I have tried them on. Granted Dreamweaver design mode gets > > its knickers in a knot if you nest them more than about 4 deep. > > > > >> > > >> Thanks, > > >> Ash > > >> http://www.ashleysheridan.co.uk > > >> > > >> > > >> -- > > >> PHP General Mailing List (http://www.php.net/) > > >> To unsubscribe, visit: http://www.php.net/unsub.php > > >> > > >> > > > > > >I would agree there...we have an app that allows users to create forms > > >dynamically with a left and right panel section along with some full > > >width plug-in. At a minimum this is built with three nested tables. > > >Here's the really rotten part, the VP (original dev for the display > > >code) screwed a table close up somewhere. A bug they found literally > > >minutes before it when to prod at a client site, instead of giving me > > >15 minutes to trace it down, they wrapped the entire table structure > > >in another table to make it look pretty. > > > > Clearly he didn't verify the HTML before he released the original version. ;-) > > > > > >Drives me mental as it produces lots a visual screw up when a certain > > >pattern in the form elements is created > > > > That's the joy of HTML errors - often the output will appear normal until you make some > > minor, and apparently irrelevant, change, when it all goes haywire. > > > > > That's not the only point. If you're on a slow connection you'll notice > the issue. Some browsers only start displaying the page once all the > layout data has been loaded. I've seen some sites with nesting levels of > 7 tables deep sometimes, and that's just a mess. I'm also unsure how > text/speech/Braille browsers deal with complex table sites too. > > And tables shouldn't be used for layout, use CSS instead!... > > Thanks, > Ash > http://www.ashleysheridan.co.uk > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy
On Thu, 2009-08-06 at 12:05 +0200, Ralph Deffke wrote: > as it comes to this point I can recomment an O'reilly book "High Performance > Web Sites, essential knowledge for frontend engineers" > > if u read that book ur eyes will grow and u will not bother about php > comments, > > ralph > > > "Ashley Sheridan" wrote in message > news:1249543712.3358.104.ca...@localhost... > > On Thu, 2009-08-06 at 09:24 +1000, Clancy wrote: > > > On Wed, 5 Aug 2009 09:25:20 -0400, phps...@gmail.com (Bastien Koert) > wrote: > > > > > > >On Wed, Aug 5, 2009 at 8:02 AM, Ashley > Sheridan wrote: > > > >> On Wed, 2009-08-05 at 21:49 +1000, Clancy wrote: > > > >>> Thank you to all of you who have commented on this query. > > > >>> > > > >>> On the subject of comments, I feel that Larry Garfield settled this > query by pointing out > > > >>> that halving the size of a particular document gave a barely > noticeable increase in speed. > > > >>> Paul Foster pointed out the problem of maintenance, but if, as I do, > you do your > > > >>> development in-house, and then upload the working copies of the > program, it would be > > > >>> possible to strip out comments when you upload it. If you were > really paranoid, this could > > > >>> have the advantage that if somebody managed to steal your code from > the server it would be > > > >>> that much harder for them to understand. On the other hand the > process of stripping out > > > >>> the comments could potentially introduce new bugs, and I think this > consideration would > > > >>> outweigh anything else. > > > >>> > > > >>> I have recently come to the conclusion that I should never consider > anything completed > > > >>> until I have analysed the HTML code for an actual page. It is > amazing how badly mangled > > > >>> tables and the like can be without producing any visible effect on > the page, and on > > > >>> several occasions I have found PHP error messages which were mixed > up with the HTML in > > > >>> such a way that they were not displayed at all. On at least one > occasion this gave me the > > > >>> clue to an otherwise baffling bug. > > > >>> > > > >>> I have also discovered that the process of analysing the HTML is > made substantially > > > >>> simpler by inserting HTML comments into the output; e.g. instead of > > > >>> > > > >>> Echo ''; > > > >>> write > > > >>> ?> > > > >>> > > > >>> > > >>> > > > >>> > > > >>> > > >>> > > > >>> Unfortunately, for HTML readability, it is highly desirable not to > indent the code, and if > > > >>> you are trying to have nicely indented braces, this makes the PHP > code that much harder to > > > >>> interpret. > > > >>> > > > >>> And on the question of functions there is some virtue (primarily > from the point of view of > > > >>> maintenance) in not having individual files too large, so while it > seems to be the general > > > >>> consensus that splitting up functions into groups to give smaller > files will probably slow > > > >>> things down a bit, if they can be grouped into sets which are only > loaded in particular > > > >>> circumstances this would be worth doing. > > > >>> > > > >>> > > > >> Nested tables are the devils playthings! > > > > > > I must be the devil, then. I enjoy playing with them. And if they're > done right they > > > seem to work on every system I have tried them on. Granted Dreamweaver > design mode gets > > > its knickers in a knot if you nest them more than about 4 deep. > > > > > > >> > > > >> Thanks, > > > >> Ash > > > >> http://www.ashleysheridan.co.uk > > > >> > > > >> > > > >> -- > > > >> PHP General Mailing List (http://www.php.net/) > > > >> To unsubscribe, visit: http://www.php.net/unsub.php > > > >> > > > >> > > > > > > > >I would agree there...we have an app that allows users to create forms > > > >dynamically with a left and right panel section along with some full > > > >width plug-in. At a minimum this is built with three nested tables. > > > >Here's the really rotten part, the VP (original dev for the display > > > >code) screwed a table close up somewhere. A bug they found literally > > > >minutes before it when to prod at a client site, instead of giving me > > > >15 minutes to trace it down, they wrapped the entire table structure > > > >in another table to make it look pretty. > > > > > > Clearly he didn't verify the HTML before he released the original > version. ;-) > > > > > > > >Drives me mental as it produces lots a visual screw up when a certain > > > >pattern in the form elements is created > > > > > > That's the joy of HTML errors - often the output will appear normal > until you make some > > > minor, and apparently irrelevant, change, when it all goes haywire. > > > > > > > > That's not the only point. If you're on a slow connection you'll notice > > the issue. Some browsers only start displaying the page once all the > > layout data has been loaded. I've seen some sites with nesting levels of > > 7 tables deep sometimes, and that's just a mess. I'm also unsure
RE: [PHP] Warning: OutsourcingRoom.com
> > > Well, I try not to give out my details to too many people each month, > > > and this month they were beat to it by a nice fellow in Nigeria who I'm > > > helping out by letting him put some money into my account. Hello Ash, Could that be termed as "aiding and abetting" that 'nice fellow from Nigeria'?. Let me know your term for it and while you're at it, could you not spend the money? Cheers. Alugo Abdulazeez Greetings from Nigeria. _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
RE: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
From: sono...@fannullone.us > Has anyone read this book by Larry Ullman yet? If so, what do you > think about it? I'm looking for a well-rounded book that covers PHP > for e-commerce websites and from what little I've been able to find > online, it looks pretty good. Or would you recommend another book? Like all books with MySQL in the title, I'm waiting for it to be translated into PostgreSQL. We used to have MySQL in our systems, but when they changed to the per-server license fee structure we had to change to PostgreSQL. Two proposals we had in progress for distributed systems would have ended up with 80% of the price being passed through as fees to MySQL AB. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Warning: OutsourcingRoom.com
On Thu, Aug 6, 2009 at 8:20 AM, abdulazeez alugo wrote: > >> > > Well, I try not to give out my details to too many people each month, >> > > and this month they were beat to it by a nice fellow in Nigeria who I'm >> > > helping out by letting him put some money into my account. > > Hello Ash, > Could that be termed as "aiding and abetting" that 'nice fellow from > Nigeria'?. Let me know your term for it and while you're at it, could you not > spend the money? > Cheers. > > Alugo Abdulazeez > Greetings from Nigeria. > I believe the term you are looking for is "fraud victim." I also believe Ash was being quite facetious. :-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
hi there, u want help? break down ur question to the point, none is going to downlod unknown zips searching for the spot. its fun to help, but its for free, so make it easier for us to help u u r lucky that i'm sick at the moment and a bit bored, but anyway i'm not downloading a zip. however, the most common error for newbies on that issue is, that thex don't pay attention to the fact that a browser treats a picture as a separate file to download. u can store pictures in a databas, and a blob field in mysql is the right thing, however u have to have a little php scrip, however with a .png extention to get the browser displaying the picture. u have to tell apache that a .png (or jpeg, gif etc) extention is to be parsed by the php interpreter where u then can place ur database retrival of the picture. in that script u then have to make shure ur are sending the right header out. to give u all the details is worth some time and time is money. the amount of documentation to figure out the details is not small. start with some w3c and rfc standard to get the clue. regards ralph ralph_def...@yahoo.de "nashrul" wrote in message news:24839092.p...@talk.nabble.com... > > I am new to php... > I try to make a php page that displays form submitted data and image. There > are 3 php files, > tampil_tamu_admin.php, edit_tamu.php and display_img.php. > The user lists are displayed in the tampil_tamu_admin.php, and when the user > clicks one record, it shows edit page (edit_tamu.php) that display user data > and picture. (edit_tamu.php file includes img tag that calls display_img.php > with user id) > The problem is the user data is displayed but the image is not displayed... > How can I display this image ? > > The codes are attached > > Thanks http://www.nabble.com/file/p24839092/guest-book.rar guest-book.rar > http://www.nabble.com/file/p24839092/guest-book.zip guest-book.zip > -- > View this message in context: http://www.nabble.com/Displaying-user-data-and-picture-tp24839092p24839092.html > Sent from the PHP - General mailing list archive at Nabble.com. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
http://php.net/header take a look at the comments sections, there are a lot of examples of how to send an image to a browser, only think that instead of a file your are using a blob database field On Thu, Aug 6, 2009 at 10:45 AM, Ralph Deffke wrote: > hi there, > > u want help? break down ur question to the point, none is going to downlod > unknown zips searching for the spot. > > its fun to help, but its for free, so make it easier for us to help u > > u r lucky that i'm sick at the moment and a bit bored, but anyway i'm not > downloading a zip. > > however, the most common error for newbies on that issue is, that thex don't > pay attention to the fact that a browser treats a picture as a separate file > to download. u can store pictures in a databas, and a blob field in mysql is > the right thing, however u have to have a little php scrip, however with a > .png extention to get the browser displaying the picture. > > u have to tell apache that a .png (or jpeg, gif etc) extention is to be > parsed by the php interpreter where u then can place ur database retrival of > the picture. in that script u then have to make shure ur are sending the > right header out. > > to give u all the details is worth some time and time is money. the amount > of documentation to figure out the details is not small. start with some w3c > and rfc standard to get the clue. > > regards > ralph > ralph_def...@yahoo.de > > > "nashrul" wrote in message > news:24839092.p...@talk.nabble.com... >> >> I am new to php... >> I try to make a php page that displays form submitted data and image. > There >> are 3 php files, >> tampil_tamu_admin.php, edit_tamu.php and display_img.php. >> The user lists are displayed in the tampil_tamu_admin.php, and when the > user >> clicks one record, it shows edit page (edit_tamu.php) that display user > data >> and picture. (edit_tamu.php file includes img tag that calls > display_img.php >> with user id) >> The problem is the user data is displayed but the image is not > displayed... >> How can I display this image ? >> >> The codes are attached >> >> Thanks http://www.nabble.com/file/p24839092/guest-book.rar guest-book.rar >> http://www.nabble.com/file/p24839092/guest-book.zip guest-book.zip >> -- >> View this message in context: > http://www.nabble.com/Displaying-user-data-and-picture-tp24839092p24839092.html >> Sent from the PHP - General mailing list archive at Nabble.com. >> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
At 5:34 PM -0700 8/5/09, sono...@fannullone.us wrote: Has anyone read this book by Larry Ullman yet? If so, what do you think about it? I'm looking for a well-rounded book that covers PHP for e-commerce websites and from what little I've been able to find online, it looks pretty good. Or would you recommend another book? I know that no book has all the answers - I just want something in my hands to read. However, I've bought a few Perl books that were a waste of money, so this time, I thought I'd ask first. Thanks, Frank I found that all of Larry Ullman books are good. From a beginners point of view, you might want to buy some of his earlier books -- you should get a better price for a used version. That way you can work your way up to php 6. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] navigation include not functioning
At 10:00 AM -0700 8/5/09, Allen McCabe wrote: -snip- If this sounds like something you are familiar with (former issues and whatnot) please let me know what I'm doing wrong. Try this: http://sperling.com/examples/include-demo/ If you follow what's given there, you'll be further along on includes. After that, you can try smart navigation: http://sperling.com/examples/smart-menu/ HTH's, 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] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, Aug 6, 2009 at 11:32 AM, tedd wrote: > At 5:34 PM -0700 8/5/09, sono...@fannullone.us wrote: >> >> Has anyone read this book by Larry Ullman yet? If so, what do you >> think about it? I'm looking for a well-rounded book that covers PHP for >> e-commerce websites and from what little I've been able to find online, it >> looks pretty good. Or would you recommend another book? >> >> I know that no book has all the answers - I just want something in >> my hands to read. However, I've bought a few Perl books that were a waste >> of money, so this time, I thought I'd ask first. >> >> Thanks, >> Frank > > I found that all of Larry Ullman books are good. > > From a beginners point of view, you might want to buy some of his earlier > books -- you should get a better price for a used version. That way you can > work your way up to php 6. > > Cheers, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Does no one see the inherent issues in buying a book about a not-feature-complete version of the language? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)
At 7:44 PM -0700 8/5/09, Michael A. Peters wrote: Miller, Terion wrote: Shawn you know repeatedly have been nothing but an asshole to me on this list, I have said before I'm not a php programmer, I was a front end designer, need graphics , need a css layout...see meneed backend programming..I'm trying... Stop being such a egomaniacal dickhead, a social life may do you good. If your job description does not include php development, and they are asking you to do it, then ask them to pay for the necessary books for you to learn PHP or do not accept the assignment, pointing out that you are not a PHP developer. If you job description includes php development, then you need to know what you are doing. Yeah, that's a bit like your employer saying "Here's a gun, shoot the bad guys." First, you don't know how to shoot a gun and second you don't know who the bad guys are. That's a recipe for disaster. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
At 11:41 AM -0400 8/6/09, Eddie Drapkin wrote: Does no one see the inherent issues in buying a book about a not-feature-complete version of the language? They are cheaper. Plus, if you're trying to learn the basics, old books have some value. They are not totally worthless. I often reference back to old books. Of course, that's my opinion. Your opinion obviously differs. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
because this is to start with the baby figuring out about a family :-) ralph_def...@yahoo.de "Eddie Drapkin" wrote in message news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... On Thu, Aug 6, 2009 at 11:32 AM, tedd wrote: > At 5:34 PM -0700 8/5/09, sono...@fannullone.us wrote: >> >> Has anyone read this book by Larry Ullman yet? If so, what do you >> think about it? I'm looking for a well-rounded book that covers PHP for >> e-commerce websites and from what little I've been able to find online, it >> looks pretty good. Or would you recommend another book? >> >> I know that no book has all the answers - I just want something in >> my hands to read. However, I've bought a few Perl books that were a waste >> of money, so this time, I thought I'd ask first. >> >> Thanks, >> Frank > > I found that all of Larry Ullman books are good. > > From a beginners point of view, you might want to buy some of his earlier > books -- you should get a better price for a used version. That way you can > work your way up to php 6. > > Cheers, > > tedd > > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Does no one see the inherent issues in buying a book about a not-feature-complete version of the language? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
"Eddie Drapkin" wrote in message news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... > > Does no one see the inherent issues in buying a book about a > not-feature-complete version of the language? PHP 6 does not exist yet, and no hosting companies provide it as an option, so describing existing versions of PHP as "not-feature-complete" is a bit premature. As the book is simply an update to his original version which was published in 2003, and again in 2005, it is about using PHP and MySQL to build a dynamic web site, and as such every version is still perfectly valid and useful to the novice programmer. This not a book which is supposed to describe every possible feature within the PHP language as it is not necessary to use every possible feature in order to build a dynamic website. -- Tony Marston http://www.tonymarston.net http://www.radicore.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, Aug 6, 2009 at 12:24 PM, Tony Marston wrote: > > "Eddie Drapkin" wrote in message > news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... > >> >> Does no one see the inherent issues in buying a book about a >> not-feature-complete version of the language? > > PHP 6 does not exist yet, and no hosting companies provide it as an option, > so describing existing versions of PHP as "not-feature-complete" is a bit > premature. > > As the book is simply an update to his original version which was published > in 2003, and again in 2005, it is about using PHP and MySQL to build a > dynamic web site, and as such every version is still perfectly valid and > useful to the novice programmer. > > This not a book which is supposed to describe every possible feature within > the PHP language as it is not necessary to use every possible feature in > order to build a dynamic website. > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I meant that PHP6 was "not feature-complete" in that the "spec" of PHP6 will change before it's released. We don't know at this point what will or will not be included in PHP6 and writing a book about an incomplete version of the language seems silly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, Aug 6, 2009 at 1:59 PM, Eddie Drapkin wrote: > On Thu, Aug 6, 2009 at 12:24 PM, Tony > Marston wrote: > > > > "Eddie Drapkin" wrote in message > > news:68de37340908060841x129a9096w6c0907f85614c...@mail.gmail.com... > > > >> > >> Does no one see the inherent issues in buying a book about a > >> not-feature-complete version of the language? > > > > PHP 6 does not exist yet, and no hosting companies provide it as an > option, > > so describing existing versions of PHP as "not-feature-complete" is a bit > > premature. > > > > As the book is simply an update to his original version which was > published > > in 2003, and again in 2005, it is about using PHP and MySQL to build a > > dynamic web site, and as such every version is still perfectly valid and > > useful to the novice programmer. > > > > This not a book which is supposed to describe every possible feature > within > > the PHP language as it is not necessary to use every possible feature in > > order to build a dynamic website. > > > > -- > > Tony Marston > > http://www.tonymarston.net > > http://www.radicore.org > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > I meant that PHP6 was "not feature-complete" in that the "spec" of > PHP6 will change before it's released. We don't know at this point > what will or will not be included in PHP6 and writing a book about an > incomplete version of the language seems silly. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > That probably seems silly to you... but there are authors (and editors) who thinks writing a book about the last version of PHP is a good business, and don't care if the language is full featured or even "released" It is up to you to read the book or not. -- Martin Scotta
Re: [PHP] Warning: OutsourcingRoom.com
Hey guys, Did some digging... looks like the host for http://outsourcingroom.com is http://hosting.ua/. Also, outsourcingroom looks to be owned by http://www.cbsystematics.com. The host for this company website is http://parking.ru. Hopefully this information can be of use to someone a little more legal-eagle than myself. Nate n...@grapepudding.com On Thu, Aug 6, 2009 at 8:05 AM, Andrew Ballard wrote: > On Thu, Aug 6, 2009 at 8:20 AM, abdulazeez alugo > wrote: > > > >> > > Well, I try not to give out my details to too many people each > month, > >> > > and this month they were beat to it by a nice fellow in Nigeria who > I'm > >> > > helping out by letting him put some money into my account. > > > > Hello Ash, > > Could that be termed as "aiding and abetting" that 'nice fellow from > Nigeria'?. Let me know your term for it and while you're at it, could you > not spend the money? > > Cheers. > > > > Alugo Abdulazeez > > Greetings from Nigeria. > > > > I believe the term you are looking for is "fraud victim." > > I also believe Ash was being quite facetious. :-) > > Andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
[PHP] curl_exec not hit server
Hi, I use the following code to call third party web service: curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_TIMEOUT, 120); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSLVERSION, 3); curl_setopt($ch, CURLOPT_SSLCERT, $loc); curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $password); curl_setopt($ch, CURLOPT_HTTPHEADER, $this->_httpHeaders); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_xmlData); $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $xmlResponseData = curl_exec($ch); But for a specific API, curl_exec() returns true but there was no hit on their server (as verified by contact in that company from server log) Can someone provide hint ? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: dynamically naming PHP vars on the fly?
Others have mentioned variable variables. While I have used those, I tend to prefer arrays: $var1 = 'apple'; $fruits[$var1] = 'organic'; echo $fruits[$var1]; /Nisse ah, yes, I see that too, now. Thanks for reminding me about arrays. (You must be quite adept at arrays. ) (And to give you credit Nisse, I ended up going with your solution ('knock on wood'.. it is not all done yet) from the other php-db list (building an array from data returned from the 3 union all selects- query).) -G
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, 2009-08-06 at 17:24 +0100, Tony Marston wrote: > PHP 6 does not exist yet, Funny, that's not what the PHP site says: http://snaps.php.net/ Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] curl_exec not hit server
Can you tell us anything about the cert on the host? Is it self signed, is it expired, etc? A hip-shot: try turning off VERIFYPEER and VERIFYHOST. Jerry Wilborn jerrywilb...@gmail.com On Thu, Aug 6, 2009 at 1:33 PM, Ted Yu wrote: > > Hi, > I use the following code to call third party web service: > curl_setopt($ch, CURLOPT_URL, $url); > curl_setopt($ch, CURLOPT_TIMEOUT, 120); > curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); > curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); > curl_setopt($ch, CURLOPT_SSLVERSION, 3); > curl_setopt($ch, CURLOPT_SSLCERT, $loc); > curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $password); > curl_setopt($ch, CURLOPT_HTTPHEADER, $this->_httpHeaders); > curl_setopt($ch, CURLOPT_POST, 1); > curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_xmlData); > $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > > $xmlResponseData = curl_exec($ch); > > But for a specific API, curl_exec() returns true but there was no hit on > their server (as verified by contact in that company from server log) > > Can someone provide hint ? > > Thanks > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] curl_exec not hit server
Forgot to mention that there're other APIs on their server which I can call successfully. I did try turning off the two options below but result was the same. --- On Thu, 8/6/09, Jerry Wilborn wrote: > From: Jerry Wilborn > Subject: Re: [PHP] curl_exec not hit server > To: "Ted Yu" > Cc: php-general@lists.php.net > Date: Thursday, August 6, 2009, 12:02 PM > Can you tell us anything about the > cert on the host? Is it self signed, is it expired, etc? A > hip-shot: try turning off VERIFYPEER and VERIFYHOST. > > Jerry Wilborn > jerrywilb...@gmail.com > > > > > On Thu, Aug 6, 2009 at 1:33 PM, > Ted Yu > wrote: > > > > Hi, > > I use the following code to call third party web service: > > curl_setopt($ch, CURLOPT_URL, $url); > > curl_setopt($ch, CURLOPT_TIMEOUT, 120); > > curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); > > curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); > > curl_setopt($ch, CURLOPT_SSLVERSION, 3); > > curl_setopt($ch, CURLOPT_SSLCERT, $loc); > > curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $password); > > curl_setopt($ch, CURLOPT_HTTPHEADER, > $this->_httpHeaders); > > curl_setopt($ch, CURLOPT_POST, 1); > > curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_xmlData); > > $ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > > > > $xmlResponseData = curl_exec($ch); > > > > But for a specific API, curl_exec() returns true but there > was no hit on their server (as verified by contact in that > company from server log) > > > > Can someone provide hint ? > > > > Thanks > > > > > > > > > > -- > > 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] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
Don't be so pedantic. PHP 6 does not exist in a live, production-ready version. It is still under development and has not even reached the beta stage. Anyone who writes a book which documents the features of PHP 6 is being very premature as those features may change at any moment. The features will not be frozen until the first GA release. -- Tony Marston http://www.tonymarston.net http://www.radicore.org "Ashley Sheridan" wrote in message news:1249585209.2818.0.ca...@localhost... > On Thu, 2009-08-06 at 17:24 +0100, Tony Marston wrote: >> PHP 6 does not exist yet, > > Funny, that's not what the PHP site says: > > http://snaps.php.net/ > > Thanks, > Ash > http://www.ashleysheridan.co.uk > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Trying to create a comment function
I was trying some new things with php today, and was commenting above each little bit to better see what was working and/or displaying versus what was not. My comment delineator consisted of the following: [code] echo ' this is a comment displayed in html '; [/code] Then I decided to create a cool function to write that code for me every time I wanted to write a comment formatted in HTML, so to write a comment saying "this is a comment", I would call a function: [code] comment("this is a comment"); [/code] It was working wonderfully, until I wanted to display "test of $newComment" as a comment. [code] comment("test of $newComment"); [/code] This rendered a comment that said "test of ". So I added a \ before the $ to make it display properly, but I was wondering if there was a way that the function could work so that it will display anything you type within the quotes in comment(" "). Here is my original code for the function comment() : [code=function comment()] function comment($commentText = "empty comment") { echo 'Comment:'; echo ''. $newComment .''; } [/code] This would return gray text in 2 lines, Comment: then a line return with the comment the developer put within the comment() function call in italics. After noticing that I MUST escape the dollar sign for it to display a function name in a comment, I tried the following: [code] function comment($commentText = "empty comment") { $healthy = "\$"; $yummy = "$"; $newComment = str_replace($healthy, $yummy, $commentText); echo 'Comment:'; echo ''. $newComment .''; } [/code] This still does not produce the desired results, I still have to escape the $ when I call the comment() function for the variable name to display. Again, not a big deal, but I don't want this to beat me. Anyone have any ideas? Additionally, when I try to echo $newComment, nothing shows on the screen. Is this because variables are reset or set to null, or cleared at the end of a function in which they are used?
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, 2009-08-06 at 20:16 +0100, Tony Marston wrote: > Don't be so pedantic. PHP 6 does not exist in a live, production-ready > version. It is still under development and has not even reached the beta > stage. Anyone who writes a book which documents the features of PHP 6 is > being very premature as those features may change at any moment. The > features will not be frozen until the first GA release. > > -- > Tony Marston > http://www.tonymarston.net > http://www.radicore.org > > "Ashley Sheridan" wrote in message > news:1249585209.2818.0.ca...@localhost... > > On Thu, 2009-08-06 at 17:24 +0100, Tony Marston wrote: > >> PHP 6 does not exist yet, > > > > Funny, that's not what the PHP site says: > > > > http://snaps.php.net/ > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > What I'm trying to say is that writing a book is not premature, as the feature list is likely not to change much, if at all. So what makes you think it is premature of the authors? Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Trying to create a comment function
Allen, Local variables are indeed cleared at the end of a function, see http://www.php.net/manual/en/language.variables.scope.php for more information. Furthermore, there are numerous ways to use variables within a string, the simplest method is the one that you described by enclosing your variable within your double quoted string. However, you could also use brackets within your string in addition to concatting your string with your variables such as: echo "this is some string" . $variable; I hope this helps. However before asking these sorts of questions of the list, you might want to refresh your memory using the PHP Language Reference, http://www.php.net/manual/en/langref.php. All the information listed above, is also listed there, and explained in significantly more detail. -Original Message- From: Allen McCabe [mailto:allenmcc...@gmail.com] Sent: Thursday, August 06, 2009 3:20 PM To: phpList Cc: ollisso; Martin Scotta Subject: [PHP] Trying to create a comment function I was trying some new things with php today, and was commenting above each little bit to better see what was working and/or displaying versus what was not. My comment delineator consisted of the following: [code] echo ' this is a comment displayed in html '; [/code] Then I decided to create a cool function to write that code for me every time I wanted to write a comment formatted in HTML, so to write a comment saying "this is a comment", I would call a function: [code] comment("this is a comment"); [/code] It was working wonderfully, until I wanted to display "test of $newComment" as a comment. [code] comment("test of $newComment"); [/code] This rendered a comment that said "test of ". So I added a \ before the $ to make it display properly, but I was wondering if there was a way that the function could work so that it will display anything you type within the quotes in comment(" "). Here is my original code for the function comment() : [code=function comment()] function comment($commentText = "empty comment") { echo 'Comment:'; echo ''. $newComment .''; } [/code] This would return gray text in 2 lines, Comment: then a line return with the comment the developer put within the comment() function call in italics. After noticing that I MUST escape the dollar sign for it to display a function name in a comment, I tried the following: [code] function comment($commentText = "empty comment") { $healthy = "\$"; $yummy = "$"; $newComment = str_replace($healthy, $yummy, $commentText); echo 'Comment:'; echo ''. $newComment .''; } [/code] This still does not produce the desired results, I still have to escape the $ when I call the comment() function for the variable name to display. Again, not a big deal, but I don't want this to beat me. Anyone have any ideas? Additionally, when I try to echo $newComment, nothing shows on the screen. Is this because variables are reset or set to null, or cleared at the end of a function in which they are used? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
On Thu, Aug 6, 2009 at 3:22 PM, Ashley Sheridan wrote: > On Thu, 2009-08-06 at 20:16 +0100, Tony Marston wrote: >> Don't be so pedantic. PHP 6 does not exist in a live, production-ready >> version. It is still under development and has not even reached the beta >> stage. Anyone who writes a book which documents the features of PHP 6 is >> being very premature as those features may change at any moment. The >> features will not be frozen until the first GA release. >> >> -- >> Tony Marston >> http://www.tonymarston.net >> http://www.radicore.org >> >> "Ashley Sheridan" wrote in message >> news:1249585209.2818.0.ca...@localhost... >> > On Thu, 2009-08-06 at 17:24 +0100, Tony Marston wrote: >> >> PHP 6 does not exist yet, >> > >> > Funny, that's not what the PHP site says: >> > >> > http://snaps.php.net/ >> > >> > Thanks, >> > Ash >> > http://www.ashleysheridan.co.uk >> > >> >> >> > What I'm trying to say is that writing a book is not premature, as the > feature list is likely not to change much, if at all. So what makes you > think it is premature of the authors? > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I'd be surprised if the feature stays the same at all. Just take a look at http://wiki.php.net/summits/pdmnotesmay09 and see what they're cooking up. Like I said before, PHP6 isn't feature-complete, and I don't suspect it's near it either, so it's definitely way premature to write a book on PHP6 and silly to buy one. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
You all are speaking about the same... But there is a good point you all are missing... It has non sense to read a book about php6... but what about to sell a php6 book? Hey! we are up to today! All the php5 book's are outdated. That's probably what editors thought when they decide to edit that book. Anyway... I'll like to read a book of how php6 was born, what was the challenges, and how the community have worked to get this product in the market. There must be someone that has anything to say about this? That'll be a very interesant book to read On Thu, Aug 6, 2009 at 4:33 PM, Eddie Drapkin wrote: > On Thu, Aug 6, 2009 at 3:22 PM, Ashley Sheridan > wrote: > > On Thu, 2009-08-06 at 20:16 +0100, Tony Marston wrote: > >> Don't be so pedantic. PHP 6 does not exist in a live, production-ready > >> version. It is still under development and has not even reached the beta > >> stage. Anyone who writes a book which documents the features of PHP 6 is > >> being very premature as those features may change at any moment. The > >> features will not be frozen until the first GA release. > >> > >> -- > >> Tony Marston > >> http://www.tonymarston.net > >> http://www.radicore.org > >> > >> "Ashley Sheridan" wrote in message > >> news:1249585209.2818.0.ca...@localhost... > >> > On Thu, 2009-08-06 at 17:24 +0100, Tony Marston wrote: > >> >> PHP 6 does not exist yet, > >> > > >> > Funny, that's not what the PHP site says: > >> > > >> > http://snaps.php.net/ > >> > > >> > Thanks, > >> > Ash > >> > http://www.ashleysheridan.co.uk > >> > > >> > >> > >> > > What I'm trying to say is that writing a book is not premature, as the > > feature list is likely not to change much, if at all. So what makes you > > think it is premature of the authors? > > > > Thanks, > > Ash > > http://www.ashleysheridan.co.uk > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > I'd be surprised if the feature stays the same at all. Just take a > look at http://wiki.php.net/summits/pdmnotesmay09 and see what they're > cooking up. Like I said before, PHP6 isn't feature-complete, and I > don't suspect it's near it either, so it's definitely way premature to > write a book on PHP6 and silly to buy one. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta
Re: [PHP] Trying to create a comment function
> > [code] > > comment("test of $newComment"); > > [/code] > > This rendered a comment that said "test of ". > > So I added a \ before the $ to make it display properly, but I was wondering > if there was a way that the function could work so that it will display > anything you type within the quotes in comment(" "). > If you want the string to be rendered as it is without variable replacements you can use single quotes, like this: comment('test of $newComment'); That will render exactly this: test of $newComment Hope that helps you. Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
Ralph Deffke wrote: and a blob field in mysql is the right thing, however u have to have a little php scrip, however with a .png extention to get the browser displaying the picture. What is the advantage to storing an image in the database opposed to as a flat file? It seems to me it would require an extra database call, which could be cached but the cache would then grow to a monster size for sites with a lot of images. Flat file involves a filesystem call, the disk arm has to move, but files on the server that have recently been read are still in the servers memory cache (at least with Linux) and do not require disk arm movement. Database calls that are not cached also require disk arm movement. I ask not to criticize the procedure, but to find out if it is really worth it. My web app does not store images in the web root so php already is invoked to open the file, read it, sometimes manipulate it (add a server side watermark), and then send it. It reads the data from flat file. I don't have any data blobs in my database - which makes incremental backups easier - I use rsync for files and do a nightly mysql dump. Except for the first of the month, the diff of that nights backup compared to first of month is saved to flat file for rsync. Binary blobs in the database would likely mean I have to change my backup protocol, but if it really is advantageous, I'd do it. I do store information about the images in the database, but that's rather small and easily cached by APC w/o needing to allocate too much memory to APC. Add data blobs and the cache would explode in size. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
Eddie Drapkin wrote: Does no one see the inherent issues in buying a book about a not-feature-complete version of the language? Technically no version of php is feature complete until the next major release. php 5.2.10 has stuff 5.2.5 didn't, 5.3.0 has stuff 5.2.x didn't, etc. But yeah, I agree. Develop for php 6 now and almost no one can use your code on a production server. However, knowing the direction php is going may allow you to code for php 5.x in such a way that make migration to php 6 that takes full advantage of php 6 easier. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Trying to create a comment function (RESOLVED)
Asher and Jonathan, Thank you for your input. Having single quotes around what I wanted to comment worked to display a variable name. And Asher, I am constantly scanning the php.net manual, and only after I could not find what I was looking for did I resort to php-general list. I am a novice at php, and I don't quite have the familiarity with terms and such to always find what I'm looking for, or the experience to always know I have indeed found what I was looking for. I am learning php vis php.net, a PHP and MySQL for Dummies book, and you fine people on the php-general list. Additionally, I need things spelled out for me for them to stick, and I don't have the luxury of asking someone for help who can show in person like some have had the fortune to have handy when they were learning. I imagine that there are many who learned as I am, however, seeing as how scripting and coding is by definition a pioneering endeavour. Thank you all for the tons of help you have provided, and please bear with me as I learn. My goal by asking questions of you all is not to get out of doing any work or research, it's to get myself over the little hangups so I can proceed with the learning process. Stay tuned for more 'newbie' questions! On Thu, Aug 6, 2009 at 1:01 PM, Jonathan Tapicer wrote: > > > > [code] > > > > comment("test of $newComment"); > > > > [/code] > > > > This rendered a comment that said "test of ". > > > > So I added a \ before the $ to make it display properly, but I was > wondering > > if there was a way that the function could work so that it will display > > anything you type within the quotes in comment(" "). > > > > If you want the string to be rendered as it is without variable > replacements you can use single quotes, like this: > > comment('test of $newComment'); > > That will render exactly this: > > test of $newComment > > Hope that helps you. > > Jonathan >
AW: [PHP] Displaying user data and picture
I did mean, if u want to store a image in the database it would be a blob field, a blob field is a indifidual file in the database anyway, I mean if i would do that type of design i would store the path to the image file in the database and give the browser the path to it for download. however there are some reasonable reasons to store a image in the database. 1. if u have no access to write files to the disk this is the case in most free hosting services they give u php and mysql and thats it 2. if u want some access control to the image, e.g. login controlled. server admins dont like u playing arround with the htaccess file 3. its easy in those and other cases 4. image directores are public, and apear in search engines Von: Michael A. Peters An: Ralph Deffke CC: php-general@lists.php.net Gesendet: Donnerstag, den 6. August 2009, 23:02:55 Uhr Betreff: Re: [PHP] Displaying user data and picture Ralph Deffke wrote: > and a blob field in mysql is > the right thing, however u have to have a little php scrip, however with a > .png extention to get the browser displaying the picture. What is the advantage to storing an image in the database opposed to as a flat file? It seems to me it would require an extra database call, which could be cached but the cache would then grow to a monster size for sites with a lot of images. Flat file involves a filesystem call, the disk arm has to move, but files on the server that have recently been read are still in the servers memory cache (at least with Linux) and do not require disk arm movement. Database calls that are not cached also require disk arm movement. I ask not to criticize the procedure, but to find out if it is really worth it. My web app does not store images in the web root so php already is invoked to open the file, read it, sometimes manipulate it (add a server side watermark), and then send it. It reads the data from flat file. I don't have any data blobs in my database - which makes incremental backups easier - I use rsync for files and do a nightly mysql dump. Except for the first of the month, the diff of that nights backup compared to first of month is saved to flat file for rsync. Binary blobs in the database would likely mean I have to change my backup protocol, but if it really is advantageous, I'd do it. I do store information about the images in the database, but that's rather small and easily cached by APC w/o needing to allocate too much memory to APC. Add data blobs and the cache would explode in size.
Re: [PHP] Displaying user data and picture
On Thu, Aug 6, 2009 at 5:02 PM, Michael A. Peters wrote: > Ralph Deffke wrote: >> >> and a blob field in mysql is >> the right thing, however u have to have a little php scrip, however with a >> .png extention to get the browser displaying the picture. > > What is the advantage to storing an image in the database opposed to as a > flat file? > > It seems to me it would require an extra database call, which could be > cached but the cache would then grow to a monster size for sites with a lot > of images. > > Flat file involves a filesystem call, the disk arm has to move, but files on > the server that have recently been read are still in the servers memory > cache (at least with Linux) and do not require disk arm movement. Database > calls that are not cached also require disk arm movement. > > I ask not to criticize the procedure, but to find out if it is really worth > it. > > My web app does not store images in the web root so php already is invoked > to open the file, read it, sometimes manipulate it (add a server side > watermark), and then send it. It reads the data from flat file. > > I don't have any data blobs in my database - which makes incremental backups > easier - I use rsync for files and do a nightly mysql dump. Except for the > first of the month, the diff of that nights backup compared to first of > month is saved to flat file for rsync. Binary blobs in the database would > likely mean I have to change my backup protocol, but if it really is > advantageous, I'd do it. > > I do store information about the images in the database, but that's rather > small and easily cached by APC w/o needing to allocate too much memory to > APC. Add data blobs and the cache would explode in size. > This is a very old, sometimes hotly debated question. Google around a bit and you'll find lots of discussion on the pros and cons of each approach. It usually comes down to a design decision (or developer preference) trying to balance the benefits from both approaches. Sometimes you'll even find hybrid solutions that try to get the best of both worlds. Sometime, you don't have much of choice, though. For instance, some of the sites I manage are split, with the administrative interface on a private intranet hosted on a server that is almost totally isolated from the public-facing web servers that use the same information. In this case, network policy prohibits us from mapping a common location that both machines could access. Since the network policy is unlikely to change, and since both systems have access to the database, that is the easiest place store images and/or documents that need to be accessible to both. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Pattern Matching
I need some assistance in pattern matching. I want allow the admin user to enter a pattern to be matched in my order form editor. When someone then places an order I want to do a match based on that pattern. Some of the examples I thought for the patterns are: - must be numeric and 8 digits AA - must be alpha and 6 characters #A? - must be alphanumeric any length ##-A#A - must have two numbers, a dash, a letter, a number, and a letter I'm sure regular expressions are the answers but I am not well-versed in those at all and I'm not sure how to make the above patterns work in or even they are the best examples to use. Any help would be greatly appreciated. Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
> I don't have any data blobs in my database - which makes incremental > backups easier - I use rsync for files and do a nightly mysql dump. > Except for the first of the month, the diff of that nights backup > compared to first of month is saved to flat file for rsync. Binary blobs > in the database would likely mean I have to change my backup protocol, > but if it really is advantageous, I'd do it. This is just an aside but are you aware of the '--hex-blob' argument to mysqldump? It causes binary data to be dumped as a hexadecimal string: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_hex-blob It's space-greedy (every byte in your original data requires two bytes in the dump file) but it seems like it would be compatible with your mysqldump/diff approach. Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Pattern Matching
here you have the regexp's = \d{8} AA = \w{6} #A? = [\w\d]* (change the * for + to require at least 1 character) ##-A#A = \d\d-\w\d\w wrote: > I need some assistance in pattern matching. I want allow the admin user to > enter a pattern to be matched in my order form editor. When someone then > places an order I want to do a match based on that pattern. Some of the > examples I thought for the patterns are: > - must be numeric and 8 digits > AA - must be alpha and 6 characters > #A? - must be alphanumeric any length > ##-A#A - must have two numbers, a dash, a letter, a number, and a letter > > I'm sure regular expressions are the answers but I am not well-versed in > those at all and I'm not sure how to make the above patterns work in or even > they are the best examples to use. Any help would be greatly appreciated. > > Thanks! > Floyd > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Martin Scotta
[PHP] Re: Pattern Matching
> I need some assistance in pattern matching. I want allow the admin user > to enter a pattern to be matched in my order form editor. When someone > then places an order I want to do a match based on that pattern. Will your admin users know how to use regular expressions? If not, can you reasonably anticipate the kinds of patterns the admins might want to create, ahead of time? Or do you need to give them a really flexible way to build any sort of pattern they please? Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Pattern Matching
this side for shure is for help, lets u play arround with regex http://gskinner.com/RegExr/ ralph ralph_def...@yahoo.de "Floyd Resler" wrote in message news:50fc5ab0-ee8b-4ac2-b982-9262a3977...@adex-intl.com... > I need some assistance in pattern matching. I want allow the admin > user to enter a pattern to be matched in my order form editor. When > someone then places an order I want to do a match based on that > pattern. Some of the examples I thought for the patterns are: > - must be numeric and 8 digits > AA - must be alpha and 6 characters > #A? - must be alphanumeric any length > ##-A#A - must have two numbers, a dash, a letter, a number, and a letter > > I'm sure regular expressions are the answers but I am not well-versed > in those at all and I'm not sure how to make the above patterns work > in or even they are the best examples to use. Any help would be > greatly appreciated. > > Thanks! > Floyd > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
On Aug 6, 2009, at 5:02 PM, "Michael A. Peters" wrote: Ralph Deffke wrote: and a blob field in mysql is the right thing, however u have to have a little php scrip, however with a .png extention to get the browser displaying the picture. What is the advantage to storing an image in the database opposed to as a flat file? It seems to me it would require an extra database call, which could be cached but the cache would then grow to a monster size for sites with a lot of images. Flat file involves a filesystem call, the disk arm has to move, but files on the server that have recently been read are still in the servers memory cache (at least with Linux) and do not require disk arm movement. Database calls that are not cached also require disk arm movement. I ask not to criticize the procedure, but to find out if it is really worth it. My web app does not store images in the web root so php already is invoked to open the file, read it, sometimes manipulate it (add a server side watermark), and then send it. It reads the data from flat file. I don't have any data blobs in my database - which makes incremental backups easier - I use rsync for files and do a nightly mysql dump. Except for the first of the month, the diff of that nights backup compared to first of month is saved to flat file for rsync. Binary blobs in the database would likely mean I have to change my backup protocol, but if it really is advantageous, I'd do it. I do store information about the images in the database, but that's rather small and easily cached by APC w/o needing to allocate too much memory to APC. Add data blobs and the cache would explode in size. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I can tell you from painful persoanl experience that most database tend to start having performance issues after 7-10gb of files are stored in the table. Horrendous access times start to have big impacts on the application. We moved all of our clients to file based storage an just keep the link in the table. This also reduced the size of the backups as well Bastien Sent from my iPod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
Ben Dunlap wrote: I don't have any data blobs in my database - which makes incremental backups easier - I use rsync for files and do a nightly mysql dump. Except for the first of the month, the diff of that nights backup compared to first of month is saved to flat file for rsync. Binary blobs in the database would likely mean I have to change my backup protocol, but if it really is advantageous, I'd do it. This is just an aside but are you aware of the '--hex-blob' argument to mysqldump? It causes binary data to be dumped as a hexadecimal string: http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_hex-blob It's space-greedy (every byte in your original data requires two bytes in the dump file) but it seems like it would be compatible with your mysqldump/diff approach. Ben No I wasn't aware of it. I'll keep it in mind if I ever do start keeping binary blobs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy
On Thu, 06 Aug 2009 08:28:32 +0100, a...@ashleysheridan.co.uk (Ashley Sheridan) wrote: ... >> >> Nested tables are the devils playthings! >> >> I must be the devil, then. I enjoy playing with them. And if they're done >> right they >> seem to work on every system I have tried them on. Granted Dreamweaver >> design mode gets >> its knickers in a knot if you nest them more than about 4 deep. >> ... >> >> That's the joy of HTML errors - often the output will appear normal until >> you make some >> minor, and apparently irrelevant, change, when it all goes haywire. >> >> >That's not the only point. If you're on a slow connection you'll notice >the issue. Some browsers only start displaying the page once all the >layout data has been loaded. I've seen some sites with nesting levels of >7 tables deep sometimes, and that's just a mess. I'm also unsure how >text/speech/Braille browsers deal with complex table sites too. I once watched a blind man go through one of my sites. I was apprehensive because I had no made no attempt to achieve compatibility, and had not bothered with any alt = '' declarations. The images were all in their own tables, and they all had titles, and he said that because of this the site was relatively good. > >And tables shouldn't be used for layout, use CSS instead!... I was talking to another web designer last night. He started life as a designer, and said that he liked CSS because it was written by designers. On the other hand I started life as a programmer (well I really started life as an engineer), and I find CSS hard to understand, and harder to write. I can readily produce what I want with tables, but I have no idea how I could achieve many of the results I get with CSS alone. How, for example, could I otherwise achieved the following effect, which displays an image with a border slightly darker than the background, and with the title and subtitle inside the border? Yanni Nx Sally Riordan Scholarship, 2007- (And the thing that really astounds me about CSS is that they never thought of putting in constants. Instead of being able to specify a set of colours, and then simply quote them in the CSS whenever they are needed, I have to specify them in PHP, and then encode them into the CSS every time I use them, which is a real pain in the . The total lack of diagnostics is another real pain.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
Hi all. I monitor this list and occasionally contribute as an amateur so please forgive a question that might seem terribly obvious to those in the know. I'm confused about all this PHP 6 talk. Until now I thought I was right up there, because I worked with PHP 5.29 and was ready to upgrade to 5.3. How does it happen that PHP 5.3 has just been released, but books already exist about PHP 6 ? I searched google and so on, but still can't really work out how the PHP development cycle works. Given that PHP 6 exists, does that mean I'm "behind the times" working with 5.29 or 5.3? I only just figured out that I can get the internet on my *computer*. Up until now I'd just been accessing it with a pencil and paper but the computer version is so much better! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
Angus Mann wrote: Hi all. I monitor this list and occasionally contribute as an amateur so please forgive a question that might seem terribly obvious to those in the know. I'm confused about all this PHP 6 talk. Until now I thought I was right up there, because I worked with PHP 5.29 and was ready to upgrade to 5.3. How does it happen that PHP 5.3 has just been released, but books already exist about PHP 6 ? I searched google and so on, but still can't really work out how the PHP development cycle works. Given that PHP 6 exists, does that mean I'm "behind the times" working with 5.29 or 5.3? I only just figured out that I can get the internet on my *computer*. Up until now I'd just been accessing it with a pencil and paper but the computer version is so much better! PHP is open source software. The development branch (what will be released as php 6) is thus open to the public. It will be quite some time before php 6 becomes common on production servers, even after it becomes the stable branch. php 5.3 is the current _stable_ release, but few if any production servers actually run it - you are much more likely to find php 5.2.x or php 5.1.x on current production servers. Red Hat Enterprise Linux, for example, ships with php 5.1.x branch - though the next version of RHEL will likely have php 5.2.x (but probably will NOT have php 5.3.x and certainly not php 6). Hope that helps. btw, what's this getting the internet on your computer bit. Are you telling me my IBM punch cards are outdated? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
Thanks to the OP for the interest in the book and to everyone else for their input. So here's what happened, from the writer/horse's mouth: It was time to write an update to the book because the second edition had been out for 3+ years or so, I think. It wasn't a money-making effort (i.e., get people to buy another copy) but rather a touch-up to make sure it's current enough. I had to make some decisions about what versions to support; the previous edition supported both PHP 4 and 5. PHP 6 was more than 50% complete at the time I started writing it and I thought the Unicode support was a pretty big deal, this being an ever-increasing global web...marketplace...blah...blah...blah. So I wanted to start thinking along those lines and as I didn't know when the fourth edition of the book would be written, I thought I'd get an early jump on PHP 6. Yes, PHP 6 wasn't nearly finalized at the time and no hosting companies were using it, but many hosting companies are still using PHP 4 and PHP 6 *is* available for playing around with. So that was my reasoning. In the end, only a bit more than one chapter _requires_ PHP 6 and I do like looking a bit into the future of Web development and PHP. Also, as I don't discuss OOP in this book (gasp!, I leave that to my more advanced PHP book because a decent discussion of OOP requires at least 150 pages and I'd need to cut out more important topics to include it in this book), some of the features being discussed in PHP 6 weren't problematic for the book one way or the other (like namespaces, which ended up on PHP 5.3). Again, the Unicode support was my main thinking. Two years later, had I known PHP 6 still wouldn't be out, I probably wouldn't have touched it at all and I do feel a bit sheepish about having a book out there on PHP 6 when PHP 6 isn't out there (for production purposes), but these things do happen to books, particularly with open-source projects that have no need to adhere to deadlines. Still, I would like to think that at worst, 10% of the material isn't usable today on production servers but still has a philosophical benefit. To atone for my prematurity, I do try to support the book as much as possible, I try to talk about all this versioning stuff in publish ways (like on the Amazon page for the book), and I don't think there's anything wrong with someone buying the second edition if they're a bit concerned about the PHP 6 thing. (In theory, I guess someone could, um, buy another writer's book, but I prefer to plead ignorance of such outcomes.) We--the publisher and I--also did consciously change the title of the book from "PHP and MySQL for Dynamic..." to "PHP 6 and MySQL 5 for Dynamic..." to indicate the distinctions being made. Sorry for the length, but I hope that helps. And thanks again. Larry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Radio buttons problem
> This should work: > > > > > Yes, that works. But should I manually maintain the number in the bracket? Is there anyway so that it can be automatically maintained? Because my app allows to delete entries arbitrarily. For instance, consider this layout (+ is insert button, - is delete): entry1 +/- entry2 +/- entry3 +/- entry1 has sex[0] field, entry2 has sex[1] and so on. If entry2 is deleted, then I have to change all sex fields in entries below entry2 which is a waste of time. -- View this message in context: http://www.nabble.com/Radio-buttons-problem-tp24786766p24858699.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] "PHP 6 and MySQL 5 for Dynamic Web Sites" Book
> > btw, what's this getting the internet on your computer bit. > Are you telling me my IBM punch cards are outdated? > > [HallMarc Websites] OMG I had forgotten all about cards! I used Hewlett-Packard __ Information from ESET Smart Security, version of virus signature database 4313 (20090806) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP programming strategy
On Fri, 2009-08-07 at 11:06 +1000, Clancy wrote: > On Thu, 06 Aug 2009 08:28:32 +0100, a...@ashleysheridan.co.uk (Ashley > Sheridan) wrote: > > ... > >> >> Nested tables are the devils playthings! > >> > >> I must be the devil, then. I enjoy playing with them. And if they're > >> done right they > >> seem to work on every system I have tried them on. Granted Dreamweaver > >> design mode gets > >> its knickers in a knot if you nest them more than about 4 deep. > >> > ... > >> > >> That's the joy of HTML errors - often the output will appear normal until > >> you make some > >> minor, and apparently irrelevant, change, when it all goes haywire. > >> > >> > >That's not the only point. If you're on a slow connection you'll notice > >the issue. Some browsers only start displaying the page once all the > >layout data has been loaded. I've seen some sites with nesting levels of > >7 tables deep sometimes, and that's just a mess. I'm also unsure how > >text/speech/Braille browsers deal with complex table sites too. > > I once watched a blind man go through one of my sites. I was apprehensive > because I had no > made no attempt to achieve compatibility, and had not bothered with any alt = > '' > declarations. The images were all in their own tables, and they all had > titles, and he > said that because of this the site was relatively good. > > > >And tables shouldn't be used for layout, use CSS instead!... > > I was talking to another web designer last night. He started life as a > designer, and said > that he liked CSS because it was written by designers. On the other hand I > started life > as a programmer (well I really started life as an engineer), and I find CSS > hard to > understand, and harder to write. I can readily produce what I want with > tables, but I > have no idea how I could achieve many of the results I get with CSS alone. > > How, for example, could I otherwise achieved the following effect, which > displays an image > with a border slightly darker than the background, and with the title and > subtitle inside > the border? > > > > > > Yanni Nx > Sally Riordan Scholarship, 2007- > > > > > (And the thing that really astounds me about CSS is that they never thought > of putting in > constants. Instead of being able to specify a set of colours, and then simply > quote them > in the CSS whenever they are needed, I have to specify them in PHP, and then > encode them > into the CSS every time I use them, which is a real pain in the . The > total lack of > diagnostics is another real pain.) > > Well, your above example would just become: Yanni Nx Sally Riordan Scholarship, 2007- Notice how the amount of code has dropped immediately! From there, you can use CSS to target whatever element you need to within the .pfm class. The images on your site would not had had titles if you'd omitted alt tags. Where would the browser find them from to display to a blind person? True, CSS does not have constants, but that is why you create them to cascade, so that elements inherit features from their parents. A bit like classes in programming, where everything is either inherited from the parent object (tag) or overridden with a new style. Also, if you're looking for diagnostics, give Firebug a try, as it really excels at this sort of thing. You can change styles on the fly from within the browser window, without needing to refresh the page! Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Radio buttons problem
you will have to manually maintain the number in the bracket. but you can try using a template engine like smarty, and use a for loop to take care of the numbers in the brackets -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Radio buttons problem
> you will have to manually maintain the number in the bracket. but you > can try using a template engine like smarty, and use a for loop to > take care of the numbers in the brackets Well.. the entries are inserted / deleted dynamically using JavaScript (to avoid unnecessary refresh). Why can't it be a multidimensional array? something like sex[][], first bracket denotes for which entry this field is, second is for which choice is chosen. -- View this message in context: http://www.nabble.com/Radio-buttons-problem-tp24786766p24859548.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Displaying user data and picture
not a good place to discuss the merits and demerits of binary blobs. is it ? now coming back to the question. Firebug firefox addon, and http live headers firefox addon will be of help to you in this case. You have tag(or something similar) i suppose... try opening that src link in a new browser window. For the application to work, you should see the picture of the user in the new window if there are any php errors in that file, correct them before you proceed. if you see some arbitrary data(without any php warnings or notices) but not the image that means you did not set header("Content-type:..') in display_img.php >> however with a .png extention to get the browser displaying the picture. thats not required as long as you have correct Content-type header Kranthi. On Fri, Aug 7, 2009 at 05:38, Michael A. Peters wrote: > Ben Dunlap wrote: >>> >>> I don't have any data blobs in my database - which makes incremental >>> backups easier - I use rsync for files and do a nightly mysql dump. >>> Except for the first of the month, the diff of that nights backup >>> compared to first of month is saved to flat file for rsync. Binary blobs >>> in the database would likely mean I have to change my backup protocol, >>> but if it really is advantageous, I'd do it. >> >> This is just an aside but are you aware of the '--hex-blob' argument to >> mysqldump? It causes binary data to be dumped as a hexadecimal string: >> >> >> http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_hex-blob >> >> It's space-greedy (every byte in your original data requires two bytes in >> the >> dump file) but it seems like it would be compatible with your >> mysqldump/diff >> approach. >> >> Ben >> > > No I wasn't aware of it. > I'll keep it in mind if I ever do start keeping binary blobs. > > -- > 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