From randalrust at gmail.com Wed Jul 6 09:33:09 2011 From: randalrust at gmail.com (Randal Rust) Date: Wed, 6 Jul 2011 09:33:09 -0400 Subject: [nycphp-talk] Issues with File Permissions Message-ID: We have a site where if we create a folder or file on the server the Owner/Group is one name (foo/foo) and if we use the CMS the Owner/Group is another (bar/bar). Typically, we set folder permissions to 0777 so that we don't have to open and close directories for uploading files. However, a hacker uploaded a couple of files to one of these directories last week, so I am trying to add code that uses chmod() to properly open and close directories. The issue I'm running into is that this only works through the CMS if the Owner/Group of the directory or file is bar/bar. I'm trying to figure out what my options are here. Here are a couple of possibilities: 1. Use bar/bar to create a duplicate directory, copy all of the files from the original directory to the new one, delete the old directory, rename the new one. Essentially this makes everything owned by bar/bar. 2. See if tech support can change the Owner/Group on the server for the entire directory. I am not very savvy with this sort of thing, so shell access is really beyond my skill set. Is it possible to change these settings via SFTP? Or is there a way via PHP to change the Owner/Group that I am accessing the files as? -- Randal Rust R.Squared Communications www.r2communications.com www.facebook.com/r2communications 614-370-0036 From chsnyder at gmail.com Wed Jul 6 10:51:47 2011 From: chsnyder at gmail.com (Chris Snyder) Date: Wed, 6 Jul 2011 10:51:47 -0400 Subject: [nycphp-talk] Issues with File Permissions In-Reply-To: References: Message-ID: On Wed, Jul 6, 2011 at 9:33 AM, Randal Rust wrote: > We have a site where if we create a folder or file on the server the > Owner/Group is one name (foo/foo) and if we use the CMS the > Owner/Group is another (bar/bar). > > Typically, we set folder permissions to 0777 so that we don't have to > open and close directories for uploading files. However, a hacker > uploaded a couple of files to one of these directories last week, so I > am trying to add code that uses chmod() to properly open and close > directories. > > The issue I'm running into is that this only works through the CMS if > the Owner/Group of the directory or file is bar/bar. > > I'm trying to figure out what my options are here. The rules are that only root can change ownership of a file. So group id is the only one you have to play with here. A user can change the group id of a file to any group they are a member of. In this case, I'd set folder ownership to foo:bar and folder permissions to 770. Your host will need to do that for you if foo is not a member of the bar group. Also, you won't be able to manually manage the files if you aren't a member of bar. From ms at stackware.com Thu Jul 7 09:11:32 2011 From: ms at stackware.com (ms at stackware.com) Date: Thu, 07 Jul 2011 09:11:32 -0400 Subject: [nycphp-talk] set allow_url_fopen outside of php.ini? Message-ID: <20110707091132.54114d3c7kfni2kg@webmail.stackware.com> I am in a situation where I need allow_url_fopen to be on, but it is off and I have no access to php.ini (which, according to the docs, is the only place where it can be set). Does anybody have any ideas about how I can either work around this or set it? -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From rainelemental at gmail.com Thu Jul 7 09:42:47 2011 From: rainelemental at gmail.com (Federico Ulfo) Date: Thu, 7 Jul 2011 09:42:47 -0400 Subject: [nycphp-talk] set allow_url_fopen outside of php.ini? In-Reply-To: <20110707091132.54114d3c7kfni2kg@webmail.stackware.com> References: <20110707091132.54114d3c7kfni2kg@webmail.stackware.com> Message-ID: You should ask to your provider... and just give a try with an .htaccess config, not sure, but it might work php_value allow_url_fopen = On -- Federico Ulfo ? Certified Developer Google & PHP On Thu, Jul 7, 2011 at 9:11 AM, wrote: > I am in a situation where I need allow_url_fopen to be on, but it is off > and I have no access to php.ini (which, according to the docs, is the only > place where it can be set). Does anybody have any ideas about how I can > either work around this or set it? > > -- > ================= > Michael Southwell > Vice President, Education > NYPHP TRAINING: http://nyphp.com/Training/**Indepth > ______________________________**_________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/**mailman/listinfo/talk > > http://www.nyphp.org/Show-**Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmarscher at beaffinitive.com Thu Jul 7 10:14:06 2011 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Thu, 7 Jul 2011 10:14:06 -0400 Subject: [nycphp-talk] set allow_url_fopen outside of php.ini? In-Reply-To: References: <20110707091132.54114d3c7kfni2kg@webmail.stackware.com> Message-ID: > On Thu, Jul 7, 2011 at 9:11 AM, wrote: > I am in a situation where I need allow_url_fopen to be on, but it is off and I have no access to php.ini (which, according to the docs, is the only place where it can be set). Does anybody have any ideas about how I can either work around this or set it? On Jul 7, 2011, at 9:42 AM, Federico Ulfo wrote: > You should ask to your provider... and just give a try with an .htaccess config, not sure, but it might work > php_value allow_url_fopen = On .htaccess is a good suggestion. Otherwise, perhaps the curl extension is installed and you can workaround to use that instead? -Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: From afischer at smith.edu Thu Jul 7 10:39:20 2011 From: afischer at smith.edu (Aaron Fischer) Date: Thu, 07 Jul 2011 10:39:20 -0400 Subject: [nycphp-talk] Book recommendation for JS/AJAX? Message-ID: <4E158CD8020000A400011263@gwsmtp1.smith.edu> Hey guys, I'd like to spruce up my html/php pages with more dynamic elements and JS/AJAX/JQUERY/JSON type stuff. My stuff has been mostly html and php to date, only played with javascript a little. However, I see value in adding more dynamic elements to my pages (showing/hiding div content, calls to php from the page without reloading, etc.). I'm looking for a book that will cover the basics and get me up and running, but also has room to grow and get into more intermediate/advanced stuff. Any thoughts or recommendations would be most appreciated. -Aaron -------------- next part -------------- An HTML attachment was scrubbed... URL: From dorgan at donaldorgan.com Thu Jul 7 11:08:08 2011 From: dorgan at donaldorgan.com (Donald J. Organ IV) Date: Thu, 7 Jul 2011 11:08:08 -0400 (EDT) Subject: [nycphp-talk] Book recommendation for JS/AJAX? In-Reply-To: <4E158CD8020000A400011263@gwsmtp1.smith.edu> Message-ID: <3858946.1453.1310051288537.JavaMail.root@mail.twoguyshosting.com> Look into a jquery book....Its the easiest way to go because it deals with the individual brower issues internally.... ----- Original Message ----- From: "Aaron Fischer" To: talk at lists.nyphp.org Sent: Thursday, July 7, 2011 10:39:20 AM Subject: [nycphp-talk] Book recommendation for JS/AJAX? Hey guys, I'd like to spruce up my html/php pages with more dynamic elements and JS/AJAX/JQUERY/JSON type stuff. My stuff has been mostly html and php to date, only played with javascript a little. However, I see value in adding more dynamic elements to my pages (showing/hiding div content, calls to php from the page without reloading, etc.). I'm looking for a book that will cover the basics and get me up and running, but also has room to grow and get into more intermediate/advanced stuff. Any thoughts or recommendations would be most appreciated. -Aaron _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony at tinkertownlabs.com Thu Jul 7 11:30:17 2011 From: anthony at tinkertownlabs.com (Anthony Wlodarski) Date: Thu, 07 Jul 2011 11:30:17 -0400 Subject: [nycphp-talk] Book recommendation for JS/AJAX? In-Reply-To: <4E158CD8020000A400011263@gwsmtp1.smith.edu> References: <4E158CD8020000A400011263@gwsmtp1.smith.edu> Message-ID: <4E15D109.30504@tinkertownlabs.com> JavaScript The Definitive Guide: http://lmgtfy.com/?q=JavaScript+The+Definitive+Guide This is the only book I would trust. It covers jQuery as well in the later chapters (6th edition only). On top of that it is an excellent resource to read if you are delving into Node.js and want to learn more about closures, callback functions, and real inner workings of EMCA script and how it applies to client side as well as server programming. -Anthony On 07/07/2011 10:39 AM, Aaron Fischer wrote: > Hey guys, > I'd like to spruce up my html/php pages with more dynamic elements and > JS/AJAX/JQUERY/JSON type stuff. My stuff has been mostly html and php > to date, only played with javascript a little. However, I see value > in adding more dynamic elements to my pages (showing/hiding div > content, calls to php from the page without reloading, etc.). > I'm looking for a book that will cover the basics and get me up and > running, but also has room to grow and get into more > intermediate/advanced stuff. > Any thoughts or recommendations would be most appreciated. > -Aaron > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation -- Anthony Wlodarski Lead Software Engineer Get2Know.me (http://www.get2know.me) Office: 646-285-0500 x217 Fax: 646-285-0400 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Fri Jul 8 09:49:11 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 09:49:11 -0400 Subject: [nycphp-talk] Wordpress & Ajax Message-ID: <8B12E3462BAA4C9B97712314248232DF@michelePC> Does anyone know if Wordpress has any ajax features build in or do I have to add it? Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Fri Jul 8 09:50:59 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 09:50:59 -0400 Subject: [nycphp-talk] jquery Message-ID: <03E62740078949A481710C2F6350EBAB@michelePC> When was jquery added to work press? There?s my ajax. Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From sbritton at gmail.com Fri Jul 8 09:55:25 2011 From: sbritton at gmail.com (Stephen Britton) Date: Fri, 8 Jul 2011 09:55:25 -0400 Subject: [nycphp-talk] jquery In-Reply-To: <03E62740078949A481710C2F6350EBAB@michelePC> References: <03E62740078949A481710C2F6350EBAB@michelePC> Message-ID: Several years. Since WP 2.5 -2.6? On Jul 8, 2011 9:51 AM, "Margaret Waldman" wrote: > When was jquery added to work press? There?s my ajax. > > Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From dsteplight at gmail.com Fri Jul 8 11:20:44 2011 From: dsteplight at gmail.com (Darryle Steplight) Date: Fri, 8 Jul 2011 11:20:44 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <8B12E3462BAA4C9B97712314248232DF@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> Message-ID: Hi Margaret, I'm sure there are some WP plugins out there that use ajax to work but it's not too difficult to create your own solutions. What types of ajax features do you want to create? On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman wrote: > Does anyone know if Wordpress has any ajax features build in or do I have to > add it? > > Margaret Michele Waldman > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---------------------------------------------- "May the Source be with you." From mmwaldman at nyc.rr.com Fri Jul 8 11:35:04 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 11:35:04 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC> Message-ID: <6E5C23DEC7704452B300A6F640B79FF7@michelePC> Darryle, I see the file showcase.js in the themes/js directory uses jquery, which means jquery must be included, which means it should have ajax functionality. And, don't worry about the details of my project. That's my problem. :-) Margaret -----Original Message----- From: Darryle Steplight Sent: Friday, July 08, 2011 11:20 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Wordpress & Ajax Hi Margaret, I'm sure there are some WP plugins out there that use ajax to work but it's not too difficult to create your own solutions. What types of ajax features do you want to create? On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman wrote: > Does anyone know if Wordpress has any ajax features build in or do I have > to > add it? > > Margaret Michele Waldman > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---------------------------------------------- "May the Source be with you." _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From dsteplight at gmail.com Fri Jul 8 11:41:44 2011 From: dsteplight at gmail.com (Darryle Steplight) Date: Fri, 8 Jul 2011 11:41:44 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <6E5C23DEC7704452B300A6F640B79FF7@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> Message-ID: Hey Margaret, 1. Just because a file uses jquery that doesn't mean it has ajax functionality. You still have to make the ajax call on your own if the showcase.js file isn't doing so. 2. I'm not worried about the details of your project. I was going to help you and provide a solution on how I used my own jquery ajax solution for my own wordpress project, but like you so professionally said it "that's your problem". Good luck. On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman wrote: > Darryle, > > I see the file showcase.js in the themes/js directory uses jquery, which > means jquery must be included, which means it should have ajax > functionality. ?And, don't worry about the details of my project. ?That's my > problem. ?:-) > > Margaret > > -----Original Message----- From: Darryle Steplight > Sent: Friday, July 08, 2011 11:20 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hi Margaret, > ? ?I'm sure there are some WP plugins out there that use ajax to > work but it's not too difficult to create your own solutions. What > types of ajax features do you want to create? > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > wrote: >> >> Does anyone know if Wordpress has any ajax features build in or do I have >> to >> add it? >> >> Margaret Michele Waldman >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > > -- > ---------------------------------------------- > "May the Source be with you." > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---------------------------------------------- "May the Source be with you." From jontas at gmail.com Fri Jul 8 12:11:37 2011 From: jontas at gmail.com (Jon Tascher) Date: Fri, 8 Jul 2011 12:11:37 -0400 Subject: [nycphp-talk] Wordpress & Ajax Message-ID: See: http://codex.wordpress.org/AJAX On Fri, Jul 8, 2011 at 12:00 PM, wrote: > Send talk mailing list submissions to > talk at lists.nyphp.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.nyphp.org/mailman/listinfo/talk > or, via email, send a message with subject or body 'help' to > talk-request at lists.nyphp.org > > You can reach the person managing the list at > talk-owner at lists.nyphp.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of talk digest..." > > > Today's Topics: > > 1. Wordpress & Ajax (Margaret Waldman) > 2. jquery (Margaret Waldman) > 3. Re: jquery (Stephen Britton) > 4. Re: Wordpress & Ajax (Darryle Steplight) > 5. Re: Wordpress & Ajax (Margaret Waldman) > 6. Re: Wordpress & Ajax (Darryle Steplight) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Fri, 8 Jul 2011 09:49:11 -0400 > From: "Margaret Waldman" > To: "NYPHP Talk" > Subject: [nycphp-talk] Wordpress & Ajax > Message-ID: <8B12E3462BAA4C9B97712314248232DF at michelePC> > Content-Type: text/plain; charset="iso-8859-1" > > Does anyone know if Wordpress has any ajax features build in or do I have > to add it? > > Margaret Michele Waldman > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.nyphp.org/pipermail/talk/attachments/20110708/ae758ba0/attachment-0001.html > > > > ------------------------------ > > Message: 2 > Date: Fri, 8 Jul 2011 09:50:59 -0400 > From: "Margaret Waldman" > To: "NYPHP Talk" > Subject: [nycphp-talk] jquery > Message-ID: <03E62740078949A481710C2F6350EBAB at michelePC> > Content-Type: text/plain; charset="utf-8" > > When was jquery added to work press? There?s my ajax. > > Margaret Michele Waldman > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.nyphp.org/pipermail/talk/attachments/20110708/da881f4f/attachment-0001.html > > > > ------------------------------ > > Message: 3 > Date: Fri, 8 Jul 2011 09:55:25 -0400 > From: Stephen Britton > To: NYPHP Talk > Subject: Re: [nycphp-talk] jquery > Message-ID: > > > Content-Type: text/plain; charset="windows-1252" > > Several years. Since WP 2.5 -2.6? > On Jul 8, 2011 9:51 AM, "Margaret Waldman" wrote: > > When was jquery added to work press? There?s my ajax. > > > > Margaret Michele Waldman > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://lists.nyphp.org/pipermail/talk/attachments/20110708/c7a586b4/attachment-0001.html > > > > ------------------------------ > > Message: 4 > Date: Fri, 8 Jul 2011 11:20:44 -0400 > From: Darryle Steplight > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Hi Margaret, > I'm sure there are some WP plugins out there that use ajax to > work but it's not too difficult to create your own solutions. What > types of ajax features do you want to create? > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > wrote: > > Does anyone know if Wordpress has any ajax features build in or do I have > to > > add it? > > > > Margaret Michele Waldman > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > > > > -- > ---------------------------------------------- > "May the Source be with you." > > > ------------------------------ > > Message: 5 > Date: Fri, 8 Jul 2011 11:35:04 -0400 > From: "Margaret Waldman" > To: "NYPHP Talk" > Subject: Re: [nycphp-talk] Wordpress & Ajax > Message-ID: <6E5C23DEC7704452B300A6F640B79FF7 at michelePC> > Content-Type: text/plain; format=flowed; charset="iso-8859-1"; > reply-type=original > > Darryle, > > I see the file showcase.js in the themes/js directory uses jquery, which > means jquery must be included, which means it should have ajax > functionality. And, don't worry about the details of my project. That's > my > problem. :-) > > Margaret > > -----Original Message----- > From: Darryle Steplight > Sent: Friday, July 08, 2011 11:20 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hi Margaret, > I'm sure there are some WP plugins out there that use ajax to > work but it's not too difficult to create your own solutions. What > types of ajax features do you want to create? > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > wrote: > > Does anyone know if Wordpress has any ajax features build in or do I have > > to > > add it? > > > > Margaret Michele Waldman > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > > > > -- > ---------------------------------------------- > "May the Source be with you." > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > > > ------------------------------ > > Message: 6 > Date: Fri, 8 Jul 2011 11:41:44 -0400 > From: Darryle Steplight > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > Message-ID: > > > Content-Type: text/plain; charset=ISO-8859-1 > > Hey Margaret, > 1. Just because a file uses jquery that doesn't mean it has > ajax functionality. You still have to make the ajax call on your own > if the showcase.js file isn't doing so. > 2. I'm not worried about the details of your project. I was > going to help you and provide a solution on how I used my own jquery > ajax solution for my own wordpress project, but like you so > professionally said it "that's your problem". Good luck. > > On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman > wrote: > > Darryle, > > > > I see the file showcase.js in the themes/js directory uses jquery, which > > means jquery must be included, which means it should have ajax > > functionality. ?And, don't worry about the details of my project. ?That's > my > > problem. ?:-) > > > > Margaret > > > > -----Original Message----- From: Darryle Steplight > > Sent: Friday, July 08, 2011 11:20 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Wordpress & Ajax > > > > Hi Margaret, > > ? ?I'm sure there are some WP plugins out there that use ajax to > > work but it's not too difficult to create your own solutions. What > > types of ajax features do you want to create? > > > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > > wrote: > >> > >> Does anyone know if Wordpress has any ajax features build in or do I > have > >> to > >> add it? > >> > >> Margaret Michele Waldman > >> _______________________________________________ > >> New York PHP Users Group Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> > >> http://www.nyphp.org/Show-Participation > >> > > > > > > > > -- > > ---------------------------------------------- > > "May the Source be with you." > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > _______________________________________________ > > New York PHP Users Group Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > > > http://www.nyphp.org/Show-Participation > > > > > > -- > ---------------------------------------------- > "May the Source be with you." > > > ------------------------------ > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > End of talk Digest, Vol 57, Issue 3 > *********************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan.horning at planetnoc.com Fri Jul 8 12:25:08 2011 From: dan.horning at planetnoc.com (Dan Horning) Date: Fri, 08 Jul 2011 12:25:08 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> Message-ID: <4E172F64.1090602@planetnoc.com> Margaret, This list exists to help php developers connect and create solutions - we have some very deeply involved members that can answer some deep questions - hopefully next time you ask a question on here you're able to share details of what you are trying to do - chances are someone here has already solved it or can take your project from a week to a day with their answers. Intellectual Property and Confidentiality often get in the way of speed and growth but if a client is willing to pay you more then it's sometimes worthwhile. hope you find the answer to your need! On 7/8/2011 11:41 AM, Darryle Steplight wrote: > Hey Margaret, > 1. Just because a file uses jquery that doesn't mean it has > ajax functionality. You still have to make the ajax call on your own > if the showcase.js file isn't doing so. > 2. I'm not worried about the details of your project. I was > going to help you and provide a solution on how I used my own jquery > ajax solution for my own wordpress project, but like you so > professionally said it "that's your problem". Good luck. > > On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman wrote: >> Darryle, >> >> I see the file showcase.js in the themes/js directory uses jquery, which >> means jquery must be included, which means it should have ajax >> functionality. And, don't worry about the details of my project. That's my >> problem. :-) >> >> Margaret -- -- Dan Horning American Digital Services - Where you are only limited by imagination. dan.horning at planetnoc.com :: http://www.americandigitalservices.com 1-518-444-0213 x502 . toll free 1-800-863-3854 . fax 1-888-474-6133 PO Box 746, Troy, NY 12181 -------------- next part -------------- A non-text attachment was scrubbed... Name: dan_horning.vcf Type: text/x-vcard Size: 277 bytes Desc: not available URL: From mmwaldman at nyc.rr.com Fri Jul 8 13:35:37 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 13:35:37 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> Message-ID: It crossed my mind that it may not be the full jquery library. I'll find out when I go to test my code. -----Original Message----- From: Darryle Steplight Sent: Friday, July 08, 2011 11:41 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Wordpress & Ajax Hey Margaret, 1. Just because a file uses jquery that doesn't mean it has ajax functionality. You still have to make the ajax call on your own if the showcase.js file isn't doing so. 2. I'm not worried about the details of your project. I was going to help you and provide a solution on how I used my own jquery ajax solution for my own wordpress project, but like you so professionally said it "that's your problem". Good luck. On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman wrote: > Darryle, > > I see the file showcase.js in the themes/js directory uses jquery, which > means jquery must be included, which means it should have ajax > functionality. And, don't worry about the details of my project. That's > my > problem. :-) > > Margaret > > -----Original Message----- From: Darryle Steplight > Sent: Friday, July 08, 2011 11:20 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hi Margaret, > I'm sure there are some WP plugins out there that use ajax to > work but it's not too difficult to create your own solutions. What > types of ajax features do you want to create? > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > wrote: >> >> Does anyone know if Wordpress has any ajax features build in or do I have >> to >> add it? >> >> Margaret Michele Waldman >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > > -- > ---------------------------------------------- > "May the Source be with you." > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---------------------------------------------- "May the Source be with you." _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From mmwaldman at nyc.rr.com Fri Jul 8 13:41:00 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 13:41:00 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> Message-ID: <0820F5D24C2443A39C4E452F80099E81@michelePC> This is what I found: ./wp-includes/js/jquery/jquery.query.js ./wp-includes/js/jquery/jquery.form.js ./wp-includes/js/jquery/jquery.color.dev.js ./wp-includes/js/jquery/jquery.table-hotkeys.js ./wp-includes/js/jquery/jquery.serialize-object.js ./wp-includes/js/jquery/jquery.hotkeys.dev.js ./wp-includes/js/jquery/jquery.color.js ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js ./wp-includes/js/jquery/jquery.form.dev.js ./wp-includes/js/jquery/jquery.schedule.js ./wp-includes/js/jquery/jquery.hotkeys.js ./wp-includes/js/jquery/jquery.js ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js ./wp-includes/js/imgareaselect/jquery.imgareaselect.js ./wp-includes/js/jcrop/jquery.Jcrop.js ./wp-includes/js/jcrop/jquery.Jcrop.dev.js A grep on ajax on the jquery.js file spewed out lotsa code. Looks like I'll be good. -----Original Message----- From: Darryle Steplight Sent: Friday, July 08, 2011 11:41 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Wordpress & Ajax Hey Margaret, 1. Just because a file uses jquery that doesn't mean it has ajax functionality. You still have to make the ajax call on your own if the showcase.js file isn't doing so. 2. I'm not worried about the details of your project. I was going to help you and provide a solution on how I used my own jquery ajax solution for my own wordpress project, but like you so professionally said it "that's your problem". Good luck. On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman wrote: > Darryle, > > I see the file showcase.js in the themes/js directory uses jquery, which > means jquery must be included, which means it should have ajax > functionality. And, don't worry about the details of my project. That's > my > problem. :-) > > Margaret > > -----Original Message----- From: Darryle Steplight > Sent: Friday, July 08, 2011 11:20 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hi Margaret, > I'm sure there are some WP plugins out there that use ajax to > work but it's not too difficult to create your own solutions. What > types of ajax features do you want to create? > > On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman > wrote: >> >> Does anyone know if Wordpress has any ajax features build in or do I have >> to >> add it? >> >> Margaret Michele Waldman >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > > -- > ---------------------------------------------- > "May the Source be with you." > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -- ---------------------------------------------- "May the Source be with you." _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From ms at stackware.com Fri Jul 8 14:13:16 2011 From: ms at stackware.com (Michael Southwell) Date: Fri, 08 Jul 2011 14:13:16 -0400 Subject: [nycphp-talk] set allow_url_fopen outside of php.ini? In-Reply-To: References: <20110707091132.54114d3c7kfni2kg@webmail.stackware.com> Message-ID: <4E1748BC.7080303@stackware.com> On 7/7/2011 10:14, Rob Marscher wrote: > .htaccess is a good suggestion. Otherwise, perhaps the curl extension is > installed and you can workaround to use that instead? with some dancing around, that does it. Thanks! -- ================= Michael Southwell Vice President, Education NYPHP TRAINING: http://nyphp.com/Training/Indepth From lorband at optonline.net Fri Jul 8 14:37:15 2011 From: lorband at optonline.net (lorband at optonline.net) Date: Fri, 08 Jul 2011 18:37:15 +0000 (GMT) Subject: [nycphp-talk] Book recommendation for JS/AJAX? In-Reply-To: <4E158CD8020000A400011263@gwsmtp1.smith.edu> References: <4E158CD8020000A400011263@gwsmtp1.smith.edu> Message-ID: I also recommend JavaScript The Definitive Guide by David Flanagan. Loretta Bandera ----- Original Message ----- From: Aaron Fischer Date: Thursday, July 7, 2011 11:47 am Subject: [nycphp-talk] Book recommendation for JS/AJAX? To: talk at lists.nyphp.org > Hey guys, > > I'd like to spruce up my html/php pages with more dynamic > elements and JS/AJAX/JQUERY/JSON type stuff. My stuff has been > mostly html and php to date, only played with javascript a > little. However, I see value in adding more dynamic elements to > my pages (showing/hiding div content, calls to php from the page > without reloading, etc.). > > I'm looking for a book that will cover the basics and get me up > and running, but also has room to grow and get into more > intermediate/advanced stuff. > > Any thoughts or recommendations would be most appreciated. > > -Aaron > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ka at kacomputerconsulting.com Fri Jul 8 17:16:12 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Fri, 08 Jul 2011 17:16:12 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <0820F5D24C2443A39C4E452F80099E81@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> Message-ID: <4E17739C.5070709@kacomputerconsulting.com> Margaret, Your best bet for jQuery AJAX is to use the $.ajax function to route your asynchronous communications. All you need to do is include the main jQuery file and then define your $.ajax function(s) wherever appropriate. The function has inbuilt success & error methods which capture your returned stuff from PHP and allow you to pass it through into the DOM. See here for comprehensive documentation: http://api.jquery.com/jQuery.ajax/ Kristina On 7/8/2011 1:41 PM, Margaret Waldman wrote: > This is what I found: > ./wp-includes/js/jquery/jquery.query.js > ./wp-includes/js/jquery/jquery.form.js > ./wp-includes/js/jquery/jquery.color.dev.js > ./wp-includes/js/jquery/jquery.table-hotkeys.js > ./wp-includes/js/jquery/jquery.serialize-object.js > ./wp-includes/js/jquery/jquery.hotkeys.dev.js > ./wp-includes/js/jquery/jquery.color.js > ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js > ./wp-includes/js/jquery/jquery.form.dev.js > ./wp-includes/js/jquery/jquery.schedule.js > ./wp-includes/js/jquery/jquery.hotkeys.js > ./wp-includes/js/jquery/jquery.js > ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js > ./wp-includes/js/imgareaselect/jquery.imgareaselect.js > ./wp-includes/js/jcrop/jquery.Jcrop.js > ./wp-includes/js/jcrop/jquery.Jcrop.dev.js > > A grep on ajax on the jquery.js file spewed out lotsa code. Looks > like I'll be good. > > -----Original Message----- From: Darryle Steplight > Sent: Friday, July 08, 2011 11:41 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hey Margaret, > 1. Just because a file uses jquery that doesn't mean it has > ajax functionality. You still have to make the ajax call on your own > if the showcase.js file isn't doing so. > 2. I'm not worried about the details of your project. I was > going to help you and provide a solution on how I used my own jquery > ajax solution for my own wordpress project, but like you so > professionally said it "that's your problem". Good luck. > > On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman > wrote: >> Darryle, >> >> I see the file showcase.js in the themes/js directory uses jquery, which >> means jquery must be included, which means it should have ajax >> functionality. And, don't worry about the details of my project. >> That's my >> problem. :-) >> >> Margaret >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:20 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hi Margaret, >> I'm sure there are some WP plugins out there that use ajax to >> work but it's not too difficult to create your own solutions. What >> types of ajax features do you want to create? >> >> On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman >> wrote: >>> >>> Does anyone know if Wordpress has any ajax features build in or do I >>> have >>> to >>> add it? >>> >>> Margaret Michele Waldman >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> >> >> >> -- >> ---------------------------------------------- >> "May the Source be with you." >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > From evdo.hsdpa at gmail.com Fri Jul 8 17:19:54 2011 From: evdo.hsdpa at gmail.com (Robert Kim App and Facebook Marketing) Date: Fri, 8 Jul 2011 14:19:54 -0700 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <4E17739C.5070709@kacomputerconsulting.com> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> Message-ID: HAH! This is exactly what I'm dealing with right now. Thanks Kristina!! On Fri, Jul 8, 2011 at 2:16 PM, Kristina Anderson wrote: > Margaret, > > Your best bet for jQuery AJAX is to use the $.ajax function to route your > asynchronous communications. ?All you need to do is include the main jQuery > file and then define your $.ajax function(s) wherever appropriate. ?The > function has inbuilt success & error methods which capture your returned > stuff from PHP and allow you to pass it through into the DOM. > > See here for comprehensive documentation: > http://api.jquery.com/jQuery.ajax/ > > Kristina > > On 7/8/2011 1:41 PM, Margaret Waldman wrote: >> >> This is what I found: >> ./wp-includes/js/jquery/jquery.query.js >> ./wp-includes/js/jquery/jquery.form.js >> ./wp-includes/js/jquery/jquery.color.dev.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.js >> ./wp-includes/js/jquery/jquery.serialize-object.js >> ./wp-includes/js/jquery/jquery.hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.color.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.form.dev.js >> ./wp-includes/js/jquery/jquery.schedule.js >> ./wp-includes/js/jquery/jquery.hotkeys.js >> ./wp-includes/js/jquery/jquery.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.js >> ./wp-includes/js/jcrop/jquery.Jcrop.js >> ./wp-includes/js/jcrop/jquery.Jcrop.dev.js >> >> A grep on ajax on the jquery.js file spewed out lotsa code. ?Looks like >> I'll be good. >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:41 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hey Margaret, >> ? ? ?1. Just because a file uses jquery that doesn't mean it has >> ajax functionality. You still have to make the ajax call on your own >> if the showcase.js file isn't doing so. >> ? ? ?2. I'm not worried about ?the details of your project. I was >> going to help you and provide a solution on how I used my own jquery >> ajax solution for my own wordpress project, but like you so >> professionally said it "that's your problem". ?Good luck. >> >> On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman >> wrote: >>> >>> Darryle, >>> >>> I see the file showcase.js in the themes/js directory uses jquery, which -- Robert Q Kim http://sparkah.com/2010/07/29/experienced-iphone-app-developer-los-angeles-how-to-tell-if-youre-going-to-get-burnt/ 2611 S Coast Highway San Diego, CA 92007 310 598 1606 From ka at kacomputerconsulting.com Fri Jul 8 17:40:11 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Fri, 08 Jul 2011 17:40:11 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> Message-ID: <4E17793B.7010806@kacomputerconsulting.com> YVW Robert. Be aware of "gotchas" such as that JSON is the default $data type and its syntax is very unforgiving. What gets returned as the $msg is whatever text is generated by your PHP file. So if you do an AJAX POST to a PHP script that prints out "This AJAX stuff really is easy" that text will get passed right back into your success method and you can dump it into a div or whatever you need to do. On 7/8/2011 5:19 PM, Robert Kim App and Facebook Marketing wrote: > HAH! This is exactly what I'm dealing with right now. Thanks Kristina!! > > On Fri, Jul 8, 2011 at 2:16 PM, Kristina Anderson > wrote: >> Margaret, >> >> Your best bet for jQuery AJAX is to use the $.ajax function to route your >> asynchronous communications. All you need to do is include the main jQuery >> file and then define your $.ajax function(s) wherever appropriate. The >> function has inbuilt success& error methods which capture your returned >> stuff from PHP and allow you to pass it through into the DOM. >> >> See here for comprehensive documentation: >> http://api.jquery.com/jQuery.ajax/ >> >> Kristina >> >> On 7/8/2011 1:41 PM, Margaret Waldman wrote: >>> This is what I found: >>> ./wp-includes/js/jquery/jquery.query.js >>> ./wp-includes/js/jquery/jquery.form.js >>> ./wp-includes/js/jquery/jquery.color.dev.js >>> ./wp-includes/js/jquery/jquery.table-hotkeys.js >>> ./wp-includes/js/jquery/jquery.serialize-object.js >>> ./wp-includes/js/jquery/jquery.hotkeys.dev.js >>> ./wp-includes/js/jquery/jquery.color.js >>> ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js >>> ./wp-includes/js/jquery/jquery.form.dev.js >>> ./wp-includes/js/jquery/jquery.schedule.js >>> ./wp-includes/js/jquery/jquery.hotkeys.js >>> ./wp-includes/js/jquery/jquery.js >>> ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js >>> ./wp-includes/js/imgareaselect/jquery.imgareaselect.js >>> ./wp-includes/js/jcrop/jquery.Jcrop.js >>> ./wp-includes/js/jcrop/jquery.Jcrop.dev.js >>> >>> A grep on ajax on the jquery.js file spewed out lotsa code. Looks like >>> I'll be good. >>> >>> -----Original Message----- From: Darryle Steplight >>> Sent: Friday, July 08, 2011 11:41 AM >>> To: NYPHP Talk >>> Subject: Re: [nycphp-talk] Wordpress& Ajax >>> >>> Hey Margaret, >>> 1. Just because a file uses jquery that doesn't mean it has >>> ajax functionality. You still have to make the ajax call on your own >>> if the showcase.js file isn't doing so. >>> 2. I'm not worried about the details of your project. I was >>> going to help you and provide a solution on how I used my own jquery >>> ajax solution for my own wordpress project, but like you so >>> professionally said it "that's your problem". Good luck. >>> >>> On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman >>> wrote: >>>> Darryle, >>>> >>>> I see the file showcase.js in the themes/js directory uses jquery, which > > From mkfmncom at gmail.com Fri Jul 8 19:16:06 2011 From: mkfmncom at gmail.com (Matt Kaufman) Date: Fri, 8 Jul 2011 19:16:06 -0400 Subject: [nycphp-talk] jquery In-Reply-To: References: <03E62740078949A481710C2F6350EBAB@michelePC> Message-ID: Lol, Yup the Ajax is hiding there in the Work Press, .... Apparently. On Fri, Jul 8, 2011 at 9:55 AM, Stephen Britton wrote: > Several years. Since WP 2.5 -2.6? > > On Jul 8, 2011 9:51 AM, "Margaret Waldman" wrote: >> When was jquery added to work press? There?s my ajax. >> >> Margaret Michele Waldman > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mmwaldman at nyc.rr.com Fri Jul 8 19:31:37 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Fri, 8 Jul 2011 19:31:37 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <4E17739C.5070709@kacomputerconsulting.com> References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> Message-ID: <68C1C769F4524CAD921BE8314D620DE9@michelePC> I was going to use $.ajax, but I thought $.post looked prettier. What I'm doing with this is very simple. It's just return and success/failure code via xml. -----Original Message----- From: Kristina Anderson Sent: Friday, July 08, 2011 5:16 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Wordpress & Ajax Margaret, Your best bet for jQuery AJAX is to use the $.ajax function to route your asynchronous communications. All you need to do is include the main jQuery file and then define your $.ajax function(s) wherever appropriate. The function has inbuilt success & error methods which capture your returned stuff from PHP and allow you to pass it through into the DOM. See here for comprehensive documentation: http://api.jquery.com/jQuery.ajax/ Kristina On 7/8/2011 1:41 PM, Margaret Waldman wrote: > This is what I found: > ./wp-includes/js/jquery/jquery.query.js > ./wp-includes/js/jquery/jquery.form.js > ./wp-includes/js/jquery/jquery.color.dev.js > ./wp-includes/js/jquery/jquery.table-hotkeys.js > ./wp-includes/js/jquery/jquery.serialize-object.js > ./wp-includes/js/jquery/jquery.hotkeys.dev.js > ./wp-includes/js/jquery/jquery.color.js > ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js > ./wp-includes/js/jquery/jquery.form.dev.js > ./wp-includes/js/jquery/jquery.schedule.js > ./wp-includes/js/jquery/jquery.hotkeys.js > ./wp-includes/js/jquery/jquery.js > ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js > ./wp-includes/js/imgareaselect/jquery.imgareaselect.js > ./wp-includes/js/jcrop/jquery.Jcrop.js > ./wp-includes/js/jcrop/jquery.Jcrop.dev.js > > A grep on ajax on the jquery.js file spewed out lotsa code. Looks like > I'll be good. > > -----Original Message----- From: Darryle Steplight > Sent: Friday, July 08, 2011 11:41 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Hey Margaret, > 1. Just because a file uses jquery that doesn't mean it has > ajax functionality. You still have to make the ajax call on your own > if the showcase.js file isn't doing so. > 2. I'm not worried about the details of your project. I was > going to help you and provide a solution on how I used my own jquery > ajax solution for my own wordpress project, but like you so > professionally said it "that's your problem". Good luck. > > On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman > wrote: >> Darryle, >> >> I see the file showcase.js in the themes/js directory uses jquery, which >> means jquery must be included, which means it should have ajax >> functionality. And, don't worry about the details of my project. That's >> my >> problem. :-) >> >> Margaret >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:20 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hi Margaret, >> I'm sure there are some WP plugins out there that use ajax to >> work but it's not too difficult to create your own solutions. What >> types of ajax features do you want to create? >> >> On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman >> wrote: >>> >>> Does anyone know if Wordpress has any ajax features build in or do I >>> have >>> to >>> add it? >>> >>> Margaret Michele Waldman >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> >> >> >> -- >> ---------------------------------------------- >> "May the Source be with you." >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From ka at kacomputerconsulting.com Fri Jul 8 20:12:25 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Fri, 08 Jul 2011 20:12:25 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <68C1C769F4524CAD921BE8314D620DE9@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> Message-ID: <4E179CE9.2070007@kacomputerconsulting.com> $.post is easier to configure but has less flexibility. If it has all the functionality that you need for the specific instance you have, that works!! K On 7/8/2011 7:31 PM, Margaret Waldman wrote: > I was going to use $.ajax, but I thought $.post looked prettier. What > I'm doing with this is very simple. It's just return and > success/failure code via xml. > > -----Original Message----- From: Kristina Anderson > Sent: Friday, July 08, 2011 5:16 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Margaret, > > Your best bet for jQuery AJAX is to use the $.ajax function to route > your asynchronous communications. All you need to do is include the > main jQuery file and then define your $.ajax function(s) wherever > appropriate. The function has inbuilt success & error methods which > capture your returned stuff from PHP and allow you to pass it through > into the DOM. > > See here for comprehensive documentation: > http://api.jquery.com/jQuery.ajax/ > > Kristina > > On 7/8/2011 1:41 PM, Margaret Waldman wrote: >> This is what I found: >> ./wp-includes/js/jquery/jquery.query.js >> ./wp-includes/js/jquery/jquery.form.js >> ./wp-includes/js/jquery/jquery.color.dev.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.js >> ./wp-includes/js/jquery/jquery.serialize-object.js >> ./wp-includes/js/jquery/jquery.hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.color.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.form.dev.js >> ./wp-includes/js/jquery/jquery.schedule.js >> ./wp-includes/js/jquery/jquery.hotkeys.js >> ./wp-includes/js/jquery/jquery.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.js >> ./wp-includes/js/jcrop/jquery.Jcrop.js >> ./wp-includes/js/jcrop/jquery.Jcrop.dev.js >> >> A grep on ajax on the jquery.js file spewed out lotsa code. Looks >> like I'll be good. >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:41 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hey Margaret, >> 1. Just because a file uses jquery that doesn't mean it has >> ajax functionality. You still have to make the ajax call on your own >> if the showcase.js file isn't doing so. >> 2. I'm not worried about the details of your project. I was >> going to help you and provide a solution on how I used my own jquery >> ajax solution for my own wordpress project, but like you so >> professionally said it "that's your problem". Good luck. >> >> On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman >> wrote: >>> Darryle, >>> >>> I see the file showcase.js in the themes/js directory uses jquery, >>> which >>> means jquery must be included, which means it should have ajax >>> functionality. And, don't worry about the details of my project. >>> That's my >>> problem. :-) >>> >>> Margaret >>> >>> -----Original Message----- From: Darryle Steplight >>> Sent: Friday, July 08, 2011 11:20 AM >>> To: NYPHP Talk >>> Subject: Re: [nycphp-talk] Wordpress & Ajax >>> >>> Hi Margaret, >>> I'm sure there are some WP plugins out there that use ajax to >>> work but it's not too difficult to create your own solutions. What >>> types of ajax features do you want to create? >>> >>> On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman >>> wrote: >>>> >>>> Does anyone know if Wordpress has any ajax features build in or do >>>> I have >>>> to >>>> add it? >>>> >>>> Margaret Michele Waldman >>>> _______________________________________________ >>>> New York PHP Users Group Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> >>>> http://www.nyphp.org/Show-Participation >>>> >>> >>> >>> >>> -- >>> ---------------------------------------------- >>> "May the Source be with you." >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> >> >> > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mmwaldman at nyc.rr.com Sat Jul 9 00:24:44 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sat, 9 Jul 2011 00:24:44 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <4E179CE9.2070007@kacomputerconsulting.com> References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com><68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> Message-ID: You can do this with $.post var jqxhr = $.post("example.php", function() { alert("success"); }) .success(function() { alert("second success"); }) .error(function() { alert("error"); }) .complete(function() { alert("complete"); }); I'll just through in an .error to $(div.formDiv).html("Access Failed. Please, contact us if you are seeing this message."); Anyway, I better stop because this is a php forum. Anyone know of a good javascript forum, I have a question about processing the xml in jquery returned from post. I know how to process it with straight javascript. -----Original Message----- From: Kristina Anderson Sent: Friday, July 08, 2011 8:12 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Wordpress & Ajax $.post is easier to configure but has less flexibility. If it has all the functionality that you need for the specific instance you have, that works!! K On 7/8/2011 7:31 PM, Margaret Waldman wrote: > I was going to use $.ajax, but I thought $.post looked prettier. What I'm > doing with this is very simple. It's just return and success/failure code > via xml. > > -----Original Message----- From: Kristina Anderson > Sent: Friday, July 08, 2011 5:16 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Margaret, > > Your best bet for jQuery AJAX is to use the $.ajax function to route > your asynchronous communications. All you need to do is include the > main jQuery file and then define your $.ajax function(s) wherever > appropriate. The function has inbuilt success & error methods which > capture your returned stuff from PHP and allow you to pass it through > into the DOM. > > See here for comprehensive documentation: > http://api.jquery.com/jQuery.ajax/ > > Kristina > > On 7/8/2011 1:41 PM, Margaret Waldman wrote: >> This is what I found: >> ./wp-includes/js/jquery/jquery.query.js >> ./wp-includes/js/jquery/jquery.form.js >> ./wp-includes/js/jquery/jquery.color.dev.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.js >> ./wp-includes/js/jquery/jquery.serialize-object.js >> ./wp-includes/js/jquery/jquery.hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.color.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.form.dev.js >> ./wp-includes/js/jquery/jquery.schedule.js >> ./wp-includes/js/jquery/jquery.hotkeys.js >> ./wp-includes/js/jquery/jquery.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.js >> ./wp-includes/js/jcrop/jquery.Jcrop.js >> ./wp-includes/js/jcrop/jquery.Jcrop.dev.js >> >> A grep on ajax on the jquery.js file spewed out lotsa code. Looks like >> I'll be good. >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:41 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hey Margaret, >> 1. Just because a file uses jquery that doesn't mean it has >> ajax functionality. You still have to make the ajax call on your own >> if the showcase.js file isn't doing so. >> 2. I'm not worried about the details of your project. I was >> going to help you and provide a solution on how I used my own jquery >> ajax solution for my own wordpress project, but like you so >> professionally said it "that's your problem". Good luck. >> >> On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman >> wrote: >>> Darryle, >>> >>> I see the file showcase.js in the themes/js directory uses jquery, which >>> means jquery must be included, which means it should have ajax >>> functionality. And, don't worry about the details of my project. >>> That's my >>> problem. :-) >>> >>> Margaret >>> >>> -----Original Message----- From: Darryle Steplight >>> Sent: Friday, July 08, 2011 11:20 AM >>> To: NYPHP Talk >>> Subject: Re: [nycphp-talk] Wordpress & Ajax >>> >>> Hi Margaret, >>> I'm sure there are some WP plugins out there that use ajax to >>> work but it's not too difficult to create your own solutions. What >>> types of ajax features do you want to create? >>> >>> On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman >>> wrote: >>>> >>>> Does anyone know if Wordpress has any ajax features build in or do I >>>> have >>>> to >>>> add it? >>>> >>>> Margaret Michele Waldman >>>> _______________________________________________ >>>> New York PHP Users Group Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> >>>> http://www.nyphp.org/Show-Participation >>>> >>> >>> >>> >>> -- >>> ---------------------------------------------- >>> "May the Source be with you." >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> >> >> > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From mmwaldman at nyc.rr.com Sat Jul 9 00:32:46 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sat, 9 Jul 2011 00:32:46 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC><6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com><68C1C769F4524CAD921BE8314D620DE9@michelePC><4E179CE9.2070007@kacomputerconsulting.com> Message-ID: <3865048AB5EA47FA9336C98E0C3DE692@michelePC> found it: jQuery.parseXML( data ) -----Original Message----- From: Margaret Waldman Sent: Saturday, July 09, 2011 12:24 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Wordpress & Ajax You can do this with $.post var jqxhr = $.post("example.php", function() { alert("success"); }) .success(function() { alert("second success"); }) .error(function() { alert("error"); }) .complete(function() { alert("complete"); }); I'll just through in an .error to $(div.formDiv).html("Access Failed. Please, contact us if you are seeing this message."); Anyway, I better stop because this is a php forum. Anyone know of a good javascript forum, I have a question about processing the xml in jquery returned from post. I know how to process it with straight javascript. -----Original Message----- From: Kristina Anderson Sent: Friday, July 08, 2011 8:12 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Wordpress & Ajax $.post is easier to configure but has less flexibility. If it has all the functionality that you need for the specific instance you have, that works!! K On 7/8/2011 7:31 PM, Margaret Waldman wrote: > I was going to use $.ajax, but I thought $.post looked prettier. What I'm > doing with this is very simple. It's just return and success/failure code > via xml. > > -----Original Message----- From: Kristina Anderson > Sent: Friday, July 08, 2011 5:16 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Margaret, > > Your best bet for jQuery AJAX is to use the $.ajax function to route > your asynchronous communications. All you need to do is include the > main jQuery file and then define your $.ajax function(s) wherever > appropriate. The function has inbuilt success & error methods which > capture your returned stuff from PHP and allow you to pass it through > into the DOM. > > See here for comprehensive documentation: > http://api.jquery.com/jQuery.ajax/ > > Kristina > > On 7/8/2011 1:41 PM, Margaret Waldman wrote: >> This is what I found: >> ./wp-includes/js/jquery/jquery.query.js >> ./wp-includes/js/jquery/jquery.form.js >> ./wp-includes/js/jquery/jquery.color.dev.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.js >> ./wp-includes/js/jquery/jquery.serialize-object.js >> ./wp-includes/js/jquery/jquery.hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.color.js >> ./wp-includes/js/jquery/jquery.table-hotkeys.dev.js >> ./wp-includes/js/jquery/jquery.form.dev.js >> ./wp-includes/js/jquery/jquery.schedule.js >> ./wp-includes/js/jquery/jquery.hotkeys.js >> ./wp-includes/js/jquery/jquery.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.dev.js >> ./wp-includes/js/imgareaselect/jquery.imgareaselect.js >> ./wp-includes/js/jcrop/jquery.Jcrop.js >> ./wp-includes/js/jcrop/jquery.Jcrop.dev.js >> >> A grep on ajax on the jquery.js file spewed out lotsa code. Looks like >> I'll be good. >> >> -----Original Message----- From: Darryle Steplight >> Sent: Friday, July 08, 2011 11:41 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Wordpress & Ajax >> >> Hey Margaret, >> 1. Just because a file uses jquery that doesn't mean it has >> ajax functionality. You still have to make the ajax call on your own >> if the showcase.js file isn't doing so. >> 2. I'm not worried about the details of your project. I was >> going to help you and provide a solution on how I used my own jquery >> ajax solution for my own wordpress project, but like you so >> professionally said it "that's your problem". Good luck. >> >> On Fri, Jul 8, 2011 at 11:35 AM, Margaret Waldman >> wrote: >>> Darryle, >>> >>> I see the file showcase.js in the themes/js directory uses jquery, which >>> means jquery must be included, which means it should have ajax >>> functionality. And, don't worry about the details of my project. That's >>> my >>> problem. :-) >>> >>> Margaret >>> >>> -----Original Message----- From: Darryle Steplight >>> Sent: Friday, July 08, 2011 11:20 AM >>> To: NYPHP Talk >>> Subject: Re: [nycphp-talk] Wordpress & Ajax >>> >>> Hi Margaret, >>> I'm sure there are some WP plugins out there that use ajax to >>> work but it's not too difficult to create your own solutions. What >>> types of ajax features do you want to create? >>> >>> On Fri, Jul 8, 2011 at 9:49 AM, Margaret Waldman >>> wrote: >>>> >>>> Does anyone know if Wordpress has any ajax features build in or do I >>>> have >>>> to >>>> add it? >>>> >>>> Margaret Michele Waldman >>>> _______________________________________________ >>>> New York PHP Users Group Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> >>>> http://www.nyphp.org/Show-Participation >>>> >>> >>> >>> >>> -- >>> ---------------------------------------------- >>> "May the Source be with you." >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> >> >> > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From rmarscher at beaffinitive.com Sat Jul 9 09:53:48 2011 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Sat, 9 Jul 2011 09:53:48 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> Message-ID: On Jul 9, 2011, at 12:24 AM, "Margaret Waldman" wrote: > Anyone know of a good javascript forum, I have a question about processing the xml in jquery returned from post. I know how to process it with straight javascript. I don't think jquery provides any utilities for handling XML. You might find a plugin that does it - but there's no reason not to use straight javascript if you know something that works. I don't have a javascript forum to recommend. It could be worthy of a special nyphp-js list here since javascript and php go pretty hand in hand these days and I'm sure many people here are experts in javascript in addition to php. Or actually, I think we have a nyphp-frontend list already. I guess the only problem is those special lists don't see the same amount of activity as the nyphp-talk list. From rmarscher at beaffinitive.com Sat Jul 9 09:56:06 2011 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Sat, 9 Jul 2011 09:56:06 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <3865048AB5EA47FA9336C98E0C3DE692@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> <3865048AB5EA47FA9336C98E0C3DE692@michelePC> Message-ID: <5A23E52E-DD8E-4DAB-A1EE-669ADF07B5B5@beaffinitive.com> On Jul 9, 2011, at 12:32 AM, "Margaret Waldman" wrote: > found it: > > jQuery.parseXML( data ) Whoops, missed this. Ha. I stand corrected. :) From ka at kacomputerconsulting.com Sat Jul 9 10:04:55 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sat, 09 Jul 2011 10:04:55 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> Message-ID: <4E186007.9050905@kacomputerconsulting.com> Let's face it, there is NO other list anywhere that can hope to measure up to the NY-PHP list. Kristina On 7/9/2011 9:53 AM, Rob Marscher wrote: > On Jul 9, 2011, at 12:24 AM, "Margaret Waldman" wrote: > >> Anyone know of a good javascript forum, I have a question about processing the xml in jquery returned from post. I know how to process it with straight javascript. > I don't think jquery provides any utilities for handling XML. You might find a plugin that does it - but there's no reason not to use straight javascript if you know something that works. > > I don't have a javascript forum to recommend. It could be worthy of a special nyphp-js list here since javascript and php go pretty hand in hand these days and I'm sure many people here are experts in javascript in addition to php. Or actually, I think we have a nyphp-frontend list already. I guess the only problem is those special lists don't see the same amount of activity as the nyphp-talk list. > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mmwaldman at nyc.rr.com Sat Jul 9 17:24:07 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sat, 9 Jul 2011 17:24:07 -0400 Subject: [nycphp-talk] curl Message-ID: What is a curl return error of 400? Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sat Jul 9 17:24:55 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sat, 9 Jul 2011 17:24:55 -0400 Subject: [nycphp-talk] curl In-Reply-To: References: Message-ID: Thank you in advanced. From: Margaret Waldman Sent: Saturday, July 09, 2011 5:24 PM To: NYPHP Talk Subject: [nycphp-talk] curl What is a curl return error of 400? Margaret Michele Waldman -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From ka at kacomputerconsulting.com Sat Jul 9 18:44:02 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sat, 09 Jul 2011 18:44:02 -0400 Subject: [nycphp-talk] curl In-Reply-To: References: Message-ID: <4E18D9B2.8020909@kacomputerconsulting.com> 400 sounds like a server response code not a cURL error code... HTTP response code 400 is a syntax error in your HTTP request. K On 7/9/2011 5:24 PM, Margaret Waldman wrote: > Thank you in advanced. > *From:* Margaret Waldman > *Sent:* Saturday, July 09, 2011 5:24 PM > *To:* NYPHP Talk > *Subject:* [nycphp-talk] curl > What is a curl return error of 400? > Margaret Michele Waldman > > ------------------------------------------------------------------------ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sat Jul 9 19:10:31 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sat, 9 Jul 2011 19:10:31 -0400 Subject: [nycphp-talk] curl In-Reply-To: <4E18D9B2.8020909@kacomputerconsulting.com> References: <4E18D9B2.8020909@kacomputerconsulting.com> Message-ID: Thank you. I?m getting 201 now. I?m tired. It?s nap time. From: Kristina Anderson Sent: Saturday, July 09, 2011 6:44 PM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] curl 400 sounds like a server response code not a cURL error code... HTTP response code 400 is a syntax error in your HTTP request. K On 7/9/2011 5:24 PM, Margaret Waldman wrote: Thank you in advanced. From: Margaret Waldman Sent: Saturday, July 09, 2011 5:24 PM To: NYPHP Talk Subject: [nycphp-talk] curl What is a curl return error of 400? Margaret Michele Waldman ------------------------------------------------------------------------------ _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkfmncom at gmail.com Sat Jul 9 19:36:18 2011 From: mkfmncom at gmail.com (Matt Kaufman) Date: Sat, 9 Jul 2011 23:36:18 +0000 Subject: [nycphp-talk] curl In-Reply-To: References: <4E18D9B2.8020909@kacomputerconsulting.com> Message-ID: == Memorize Now == - 1xx: Informational - Request received, continuing process - 2xx: Success - The action was successfully received, understood, and accepted - 3xx: Redirection - Further action must be taken in order to complete the request - 4xx: Client Error - The request contains bad syntax or cannot be fulfilled - 5xx: Server Error - The server failed to fulfill an apparently == And Know Soon!! :) == Status-Code = "100" ; Section 10.1.1: Continue | "101" ; Section 10.1.2: Switching Protocols | "200" ; Section 10.2.1: OK | "201" ; Section 10.2.2: Created | "202" ; Section 10.2.3: Accepted | "203" ; Section 10.2.4: Non-Authoritative Information | "204" ; Section 10.2.5: No Content | "205" ; Section 10.2.6: Reset Content | "206" ; Section 10.2.7: Partial Content | "300" ; Section 10.3.1: Multiple Choices | "301" ; Section 10.3.2: Moved Permanently | "302" ; Section 10.3.3: Found | "303" ; Section 10.3.4: See Other | "304" ; Section 10.3.5: Not Modified | "305" ; Section 10.3.6: Use Proxy | "307" ; Section 10.3.8: Temporary Redirect | "400" ; Section 10.4.1: Bad Request | "401" ; Section 10.4.2: Unauthorized | "402" ; Section 10.4.3: Payment Required | "403" ; Section 10.4.4: Forbidden | "404" ; Section 10.4.5: Not Found | "405" ; Section 10.4.6: Method Not Allowed | "406" ; Section 10.4.7: Not Acceptable | "407" ; Section 10.4.8: Proxy Authentication Required | "408" ; Section 10.4.9: Request Time-out | "409" ; Section 10.4.10: Conflict | "410" ; Section 10.4.11: Gone | "411" ; Section 10.4.12: Length Required | "412" ; Section 10.4.13: Precondition Failed | "413" ; Section 10.4.14: Request Entity Too Large | "414" ; Section 10.4.15: Request-URI Too Large | "415" ; Section 10.4.16: Unsupported Media Type | "416" ; Section 10.4.17: Requested range not satisfiable | "417" ; Section 10.4.18: Expectation Failed | "500" ; Section 10.5.1: Internal Server Error | "501" ; Section 10.5.2: Not Implemented | "502" ; Section 10.5.3: Bad Gateway | "503" ; Section 10.5.4: Service Unavailable | "504" ; Section 10.5.5: Gateway Time-out | "505" ; Section 10.5.6: HTTP Version not supported On Sat, Jul 9, 2011 at 11:10 PM, Margaret Waldman wrote: > Thank you.? I?m getting 201 now.? I?m tired.? It?s nap time. > > From: Kristina Anderson > Sent: Saturday, July 09, 2011 6:44 PM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] curl > > 400 sounds like a server response code not a cURL error code... > > HTTP response code 400 is a syntax error in your HTTP request. > > K > > On 7/9/2011 5:24 PM, Margaret Waldman wrote: > > Thank you in advanced. > > From: Margaret Waldman > Sent: Saturday, July 09, 2011 5:24 PM > To: NYPHP Talk > Subject: [nycphp-talk] curl > > What is a curl return error of 400? > > Margaret Michele Waldman > ________________________________ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > ________________________________ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mkfmncom at gmail.com Sat Jul 9 19:37:12 2011 From: mkfmncom at gmail.com (Matt Kaufman) Date: Sat, 9 Jul 2011 23:37:12 +0000 Subject: [nycphp-talk] curl In-Reply-To: References: <4E18D9B2.8020909@kacomputerconsulting.com> Message-ID: Oh, PS and 201 means that you probably achieved what you were trying to do ;) So no wonder you are tired.... 10.2.2 201 Created The request has been fulfilled and resulted in a new resource being created. The newly created resource can be referenced by the URI(s) returned in the entity of the response, with the most specific URI for the resource given by a Location header field. The response SHOULD include an entity containing a list of resource characteristics and location(s) from which the user or user agent can choose the one most appropriate. The entity format is specified by the media type given in the Content-Type header field. The origin server MUST create the resource before returning the 201 status code. If the action cannot be carried out immediately, the server SHOULD respond with 202 (Accepted) response instead. A 201 response MAY contain an ETag response header field indicating the current value of the entity tag for the requested variant just created, see section 14.19. On Sat, Jul 9, 2011 at 11:36 PM, Matt Kaufman wrote: > == Memorize Now == > ? ? ?- 1xx: Informational - Request received, continuing process > > ? ? ?- 2xx: Success - The action was successfully received, > ? ? ? ?understood, and accepted > > ? ? ?- 3xx: Redirection - Further action must be taken in order to > ? ? ? ?complete the request > > ? ? ?- 4xx: Client Error - The request contains bad syntax or cannot > ? ? ? ?be fulfilled > > ? ? ?- 5xx: Server Error - The server failed to fulfill an apparently > > == And Know Soon!! :) == > ? ? Status-Code ? ?= > ? ? ? ? ? ?"100" ?; Section 10.1.1: Continue > ? ? ? ? ?| "101" ?; Section 10.1.2: Switching Protocols > ? ? ? ? ?| "200" ?; Section 10.2.1: OK > ? ? ? ? ?| "201" ?; Section 10.2.2: Created > ? ? ? ? ?| "202" ?; Section 10.2.3: Accepted > ? ? ? ? ?| "203" ?; Section 10.2.4: Non-Authoritative Information > ? ? ? ? ?| "204" ?; Section 10.2.5: No Content > ? ? ? ? ?| "205" ?; Section 10.2.6: Reset Content > ? ? ? ? ?| "206" ?; Section 10.2.7: Partial Content > ? ? ? ? ?| "300" ?; Section 10.3.1: Multiple Choices > ? ? ? ? ?| "301" ?; Section 10.3.2: Moved Permanently > ? ? ? ? ?| "302" ?; Section 10.3.3: Found > ? ? ? ? ?| "303" ?; Section 10.3.4: See Other > ? ? ? ? ?| "304" ?; Section 10.3.5: Not Modified > ? ? ? ? ?| "305" ?; Section 10.3.6: Use Proxy > ? ? ? ? ?| "307" ?; Section 10.3.8: Temporary Redirect > ? ? ? ? ?| "400" ?; Section 10.4.1: Bad Request > ? ? ? ? ?| "401" ?; Section 10.4.2: Unauthorized > ? ? ? ? ?| "402" ?; Section 10.4.3: Payment Required > ? ? ? ? ?| "403" ?; Section 10.4.4: Forbidden > ? ? ? ? ?| "404" ?; Section 10.4.5: Not Found > ? ? ? ? ?| "405" ?; Section 10.4.6: Method Not Allowed > ? ? ? ? ?| "406" ?; Section 10.4.7: Not Acceptable > ? ? ? ? ?| "407" ?; Section 10.4.8: Proxy Authentication Required > ? ? ? ? ?| "408" ?; Section 10.4.9: Request Time-out > ? ? ? ? ?| "409" ?; Section 10.4.10: Conflict > ? ? ? ? ?| "410" ?; Section 10.4.11: Gone > ? ? ? ? ?| "411" ?; Section 10.4.12: Length Required > ? ? ? ? ?| "412" ?; Section 10.4.13: Precondition Failed > ? ? ? ? ?| "413" ?; Section 10.4.14: Request Entity Too Large > ? ? ? ? ?| "414" ?; Section 10.4.15: Request-URI Too Large > ? ? ? ? ?| "415" ?; Section 10.4.16: Unsupported Media Type > ? ? ? ? ?| "416" ?; Section 10.4.17: Requested range not satisfiable > ? ? ? ? ?| "417" ?; Section 10.4.18: Expectation Failed > ? ? ? ? ?| "500" ?; Section 10.5.1: Internal Server Error > ? ? ? ? ?| "501" ?; Section 10.5.2: Not Implemented > ? ? ? ? ?| "502" ?; Section 10.5.3: Bad Gateway > ? ? ? ? ?| "503" ?; Section 10.5.4: Service Unavailable > ? ? ? ? ?| "504" ?; Section 10.5.5: Gateway Time-out > ? ? ? ? ?| "505" ?; Section 10.5.6: HTTP Version not supported > > > On Sat, Jul 9, 2011 at 11:10 PM, Margaret Waldman wrote: >> Thank you.? I?m getting 201 now.? I?m tired.? It?s nap time. >> >> From: Kristina Anderson >> Sent: Saturday, July 09, 2011 6:44 PM >> To: talk at lists.nyphp.org >> Subject: Re: [nycphp-talk] curl >> >> 400 sounds like a server response code not a cURL error code... >> >> HTTP response code 400 is a syntax error in your HTTP request. >> >> K >> >> On 7/9/2011 5:24 PM, Margaret Waldman wrote: >> >> Thank you in advanced. >> >> From: Margaret Waldman >> Sent: Saturday, July 09, 2011 5:24 PM >> To: NYPHP Talk >> Subject: [nycphp-talk] curl >> >> What is a curl return error of 400? >> >> Margaret Michele Waldman >> ________________________________ >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> ________________________________ >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > From ka at kacomputerconsulting.com Sat Jul 9 19:53:10 2011 From: ka at kacomputerconsulting.com (Kristina Anderson) Date: Sat, 09 Jul 2011 19:53:10 -0400 Subject: [nycphp-talk] curl In-Reply-To: References: <4E18D9B2.8020909@kacomputerconsulting.com> Message-ID: <4E18E9E6.3010603@kacomputerconsulting.com> Thanks Matt, here's a handy little format she can print out and tape to her desk :-) On 7/9/2011 7:36 PM, Matt Kaufman wrote: > == Memorize Now == > - 1xx: Informational - Request received, continuing process > > - 2xx: Success - The action was successfully received, > understood, and accepted > > - 3xx: Redirection - Further action must be taken in order to > complete the request > > - 4xx: Client Error - The request contains bad syntax or cannot > be fulfilled > > - 5xx: Server Error - The server failed to fulfill an apparently > > == And Know Soon!! :) == > Status-Code = > "100" ; Section 10.1.1: Continue > | "101" ; Section 10.1.2: Switching Protocols > | "200" ; Section 10.2.1: OK > | "201" ; Section 10.2.2: Created > | "202" ; Section 10.2.3: Accepted > | "203" ; Section 10.2.4: Non-Authoritative Information > | "204" ; Section 10.2.5: No Content > | "205" ; Section 10.2.6: Reset Content > | "206" ; Section 10.2.7: Partial Content > | "300" ; Section 10.3.1: Multiple Choices > | "301" ; Section 10.3.2: Moved Permanently > | "302" ; Section 10.3.3: Found > | "303" ; Section 10.3.4: See Other > | "304" ; Section 10.3.5: Not Modified > | "305" ; Section 10.3.6: Use Proxy > | "307" ; Section 10.3.8: Temporary Redirect > | "400" ; Section 10.4.1: Bad Request > | "401" ; Section 10.4.2: Unauthorized > | "402" ; Section 10.4.3: Payment Required > | "403" ; Section 10.4.4: Forbidden > | "404" ; Section 10.4.5: Not Found > | "405" ; Section 10.4.6: Method Not Allowed > | "406" ; Section 10.4.7: Not Acceptable > | "407" ; Section 10.4.8: Proxy Authentication Required > | "408" ; Section 10.4.9: Request Time-out > | "409" ; Section 10.4.10: Conflict > | "410" ; Section 10.4.11: Gone > | "411" ; Section 10.4.12: Length Required > | "412" ; Section 10.4.13: Precondition Failed > | "413" ; Section 10.4.14: Request Entity Too Large > | "414" ; Section 10.4.15: Request-URI Too Large > | "415" ; Section 10.4.16: Unsupported Media Type > | "416" ; Section 10.4.17: Requested range not satisfiable > | "417" ; Section 10.4.18: Expectation Failed > | "500" ; Section 10.5.1: Internal Server Error > | "501" ; Section 10.5.2: Not Implemented > | "502" ; Section 10.5.3: Bad Gateway > | "503" ; Section 10.5.4: Service Unavailable > | "504" ; Section 10.5.5: Gateway Time-out > | "505" ; Section 10.5.6: HTTP Version not supported > > > On Sat, Jul 9, 2011 at 11:10 PM, Margaret Waldman wrote: >> Thank you. I?m getting 201 now. I?m tired. It?s nap time. >> >> From: Kristina Anderson >> Sent: Saturday, July 09, 2011 6:44 PM >> To: talk at lists.nyphp.org >> Subject: Re: [nycphp-talk] curl >> >> 400 sounds like a server response code not a cURL error code... >> >> HTTP response code 400 is a syntax error in your HTTP request. >> >> K >> >> On 7/9/2011 5:24 PM, Margaret Waldman wrote: >> >> Thank you in advanced. >> >> From: Margaret Waldman >> Sent: Saturday, July 09, 2011 5:24 PM >> To: NYPHP Talk >> Subject: [nycphp-talk] curl >> >> What is a curl return error of 400? >> >> Margaret Michele Waldman >> ________________________________ >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> ________________________________ >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mkfmncom at gmail.com Sat Jul 9 20:11:49 2011 From: mkfmncom at gmail.com (Matt Kaufman) Date: Sun, 10 Jul 2011 00:11:49 +0000 Subject: [nycphp-talk] curl In-Reply-To: <4E18E9E6.3010603@kacomputerconsulting.com> References: <4E18D9B2.8020909@kacomputerconsulting.com> <4E18E9E6.3010603@kacomputerconsulting.com> Message-ID: :). On Sat, Jul 9, 2011 at 11:53 PM, Kristina Anderson wrote: > Thanks Matt, here's a handy little format she can print out and tape to her > desk :-) > > > On 7/9/2011 7:36 PM, Matt Kaufman wrote: >> >> == Memorize Now == >> ? ? ? - 1xx: Informational - Request received, continuing process >> >> ? ? ? - 2xx: Success - The action was successfully received, >> ? ? ? ? understood, and accepted >> >> ? ? ? - 3xx: Redirection - Further action must be taken in order to >> ? ? ? ? complete the request >> >> ? ? ? - 4xx: Client Error - The request contains bad syntax or cannot >> ? ? ? ? be fulfilled >> >> ? ? ? - 5xx: Server Error - The server failed to fulfill an apparently >> >> == And Know Soon!! :) == >> ? ? ?Status-Code ? ?= >> ? ? ? ? ? ? "100" ?; Section 10.1.1: Continue >> ? ? ? ? ? | "101" ?; Section 10.1.2: Switching Protocols >> ? ? ? ? ? | "200" ?; Section 10.2.1: OK >> ? ? ? ? ? | "201" ?; Section 10.2.2: Created >> ? ? ? ? ? | "202" ?; Section 10.2.3: Accepted >> ? ? ? ? ? | "203" ?; Section 10.2.4: Non-Authoritative Information >> ? ? ? ? ? | "204" ?; Section 10.2.5: No Content >> ? ? ? ? ? | "205" ?; Section 10.2.6: Reset Content >> ? ? ? ? ? | "206" ?; Section 10.2.7: Partial Content >> ? ? ? ? ? | "300" ?; Section 10.3.1: Multiple Choices >> ? ? ? ? ? | "301" ?; Section 10.3.2: Moved Permanently >> ? ? ? ? ? | "302" ?; Section 10.3.3: Found >> ? ? ? ? ? | "303" ?; Section 10.3.4: See Other >> ? ? ? ? ? | "304" ?; Section 10.3.5: Not Modified >> ? ? ? ? ? | "305" ?; Section 10.3.6: Use Proxy >> ? ? ? ? ? | "307" ?; Section 10.3.8: Temporary Redirect >> ? ? ? ? ? | "400" ?; Section 10.4.1: Bad Request >> ? ? ? ? ? | "401" ?; Section 10.4.2: Unauthorized >> ? ? ? ? ? | "402" ?; Section 10.4.3: Payment Required >> ? ? ? ? ? | "403" ?; Section 10.4.4: Forbidden >> ? ? ? ? ? | "404" ?; Section 10.4.5: Not Found >> ? ? ? ? ? | "405" ?; Section 10.4.6: Method Not Allowed >> ? ? ? ? ? | "406" ?; Section 10.4.7: Not Acceptable >> ? ? ? ? ? | "407" ?; Section 10.4.8: Proxy Authentication Required >> ? ? ? ? ? | "408" ?; Section 10.4.9: Request Time-out >> ? ? ? ? ? | "409" ?; Section 10.4.10: Conflict >> ? ? ? ? ? | "410" ?; Section 10.4.11: Gone >> ? ? ? ? ? | "411" ?; Section 10.4.12: Length Required >> ? ? ? ? ? | "412" ?; Section 10.4.13: Precondition Failed >> ? ? ? ? ? | "413" ?; Section 10.4.14: Request Entity Too Large >> ? ? ? ? ? | "414" ?; Section 10.4.15: Request-URI Too Large >> ? ? ? ? ? | "415" ?; Section 10.4.16: Unsupported Media Type >> ? ? ? ? ? | "416" ?; Section 10.4.17: Requested range not satisfiable >> ? ? ? ? ? | "417" ?; Section 10.4.18: Expectation Failed >> ? ? ? ? ? | "500" ?; Section 10.5.1: Internal Server Error >> ? ? ? ? ? | "501" ?; Section 10.5.2: Not Implemented >> ? ? ? ? ? | "502" ?; Section 10.5.3: Bad Gateway >> ? ? ? ? ? | "503" ?; Section 10.5.4: Service Unavailable >> ? ? ? ? ? | "504" ?; Section 10.5.5: Gateway Time-out >> ? ? ? ? ? | "505" ?; Section 10.5.6: HTTP Version not supported >> >> >> On Sat, Jul 9, 2011 at 11:10 PM, Margaret Waldman >> ?wrote: >>> >>> Thank you. ?I?m getting 201 now. ?I?m tired. ?It?s nap time. >>> >>> From: Kristina Anderson >>> Sent: Saturday, July 09, 2011 6:44 PM >>> To: talk at lists.nyphp.org >>> Subject: Re: [nycphp-talk] curl >>> >>> 400 sounds like a server response code not a cURL error code... >>> >>> HTTP response code 400 is a syntax error in your HTTP request. >>> >>> K >>> >>> On 7/9/2011 5:24 PM, Margaret Waldman wrote: >>> >>> Thank you in advanced. >>> >>> From: Margaret Waldman >>> Sent: Saturday, July 09, 2011 5:24 PM >>> To: NYPHP Talk >>> Subject: [nycphp-talk] curl >>> >>> What is a curl return error of 400? >>> >>> Margaret Michele Waldman >>> ________________________________ >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >>> ________________________________ >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >>> _______________________________________________ >>> New York PHP Users Group Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> >>> http://www.nyphp.org/Show-Participation >>> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > From mmwaldman at nyc.rr.com Sun Jul 10 05:09:24 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 05:09:24 -0400 Subject: [nycphp-talk] largest interger Message-ID: Does anyone know the largest integer in php? Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sun Jul 10 05:11:51 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 05:11:51 -0400 Subject: [nycphp-talk] largest interger In-Reply-To: References: Message-ID: <68713195D7134BEFBC2D74398947F8EC@michelePC> I found 2147483647 in the documentation, but I saw larger numbers working. Hum. From: Margaret Waldman Sent: Sunday, July 10, 2011 5:09 AM To: NYPHP Talk Subject: [nycphp-talk] largest interger Does anyone know the largest integer in php? Margaret Michele Waldman -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sun Jul 10 09:26:09 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 09:26:09 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <4E186007.9050905@kacomputerconsulting.com> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> <4E186007.9050905@kacomputerconsulting.com> Message-ID: <3E172EC251CA4175BED10BF72A780763@michelePC> Well how about a nyphp-talk(javascript) list for php programmers who develop in javascript, too? -----Original Message----- From: Kristina Anderson Sent: Saturday, July 09, 2011 10:04 AM To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] Wordpress & Ajax Let's face it, there is NO other list anywhere that can hope to measure up to the NY-PHP list. Kristina On 7/9/2011 9:53 AM, Rob Marscher wrote: > On Jul 9, 2011, at 12:24 AM, "Margaret Waldman" > wrote: > >> Anyone know of a good javascript forum, I have a question about >> processing the xml in jquery returned from post. I know how to process >> it with straight javascript. > I don't think jquery provides any utilities for handling XML. You might > find a plugin that does it - but there's no reason not to use straight > javascript if you know something that works. > > I don't have a javascript forum to recommend. It could be worthy of a > special nyphp-js list here since javascript and php go pretty hand in hand > these days and I'm sure many people here are experts in javascript in > addition to php. Or actually, I think we have a nyphp-frontend list > already. I guess the only problem is those special lists don't see the > same amount of activity as the nyphp-talk list. > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation From sbritton at gmail.com Sun Jul 10 09:33:35 2011 From: sbritton at gmail.com (Stephen Britton) Date: Sun, 10 Jul 2011 09:33:35 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <3E172EC251CA4175BED10BF72A780763@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> <4E186007.9050905@kacomputerconsulting.com> <3E172EC251CA4175BED10BF72A780763@michelePC> Message-ID: Why? There is already a mailing list - NYPHP SIG: Front End that covers JavaScript / jQuery /JSON. You can join at nyphp.org On Sun, Jul 10, 2011 at 9:26 AM, Margaret Waldman wrote: > Well how about a nyphp-talk(javascript) list for php programmers who > develop in javascript, too? > > > -----Original Message----- From: Kristina Anderson > Sent: Saturday, July 09, 2011 10:04 AM > > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Let's face it, there is NO other list anywhere that can hope to measure > up to the NY-PHP list. > > Kristina > > On 7/9/2011 9:53 AM, Rob Marscher wrote: > >> On Jul 9, 2011, at 12:24 AM, "Margaret Waldman" >> wrote: >> >> Anyone know of a good javascript forum, I have a question about >>> processing the xml in jquery returned from post. I know how to process it >>> with straight javascript. >>> >> I don't think jquery provides any utilities for handling XML. You might >> find a plugin that does it - but there's no reason not to use straight >> javascript if you know something that works. >> >> I don't have a javascript forum to recommend. It could be worthy of a >> special nyphp-js list here since javascript and php go pretty hand in hand >> these days and I'm sure many people here are experts in javascript in >> addition to php. Or actually, I think we have a nyphp-frontend list already. >> I guess the only problem is those special lists don't see the same amount of >> activity as the nyphp-talk list. >> ______________________________**_________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/**mailman/listinfo/talk >> >> http://www.nyphp.org/Show-**Participation >> >> > ______________________________**_________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/**mailman/listinfo/talk > > http://www.nyphp.org/Show-**Participation > ______________________________**_________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/**mailman/listinfo/talk > > http://www.nyphp.org/Show-**Participation > -- Stephen Britton Technology Consultant sbritton at gmail.com ph: 914-661-0040 -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Sun Jul 10 09:56:30 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 09:56:30 -0400 Subject: [nycphp-talk] cookies and experiation Message-ID: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at cyberxdesigns.com Sun Jul 10 10:05:06 2011 From: hans at cyberxdesigns.com (Hans C. Kaspersetz) Date: Sun, 10 Jul 2011 10:05:06 -0400 Subject: [nycphp-talk] Wordpress & Ajax In-Reply-To: <3E172EC251CA4175BED10BF72A780763@michelePC> References: <8B12E3462BAA4C9B97712314248232DF@michelePC> <6E5C23DEC7704452B300A6F640B79FF7@michelePC> <0820F5D24C2443A39C4E452F80099E81@michelePC> <4E17739C.5070709@kacomputerconsulting.com> <68C1C769F4524CAD921BE8314D620DE9@michelePC> <4E179CE9.2070007@kacomputerconsulting.com> <4E186007.9050905@kacomputerconsulting.com> <3E172EC251CA4175BED10BF72A780763@michelePC> Message-ID: <922C42B0-8FB0-418E-980B-B5815E3461CD@cyberxdesigns.com> The NYPHP frontend covers the JavaScript topics. Hans Kaspersetz Cyber X Designs hans at cyberxdesigns.com http://cyberxdesigns.com Sent from my iPhone On Jul 10, 2011, at 9:26 AM, "Margaret Waldman" wrote: > Well how about a nyphp-talk(javascript) list for php programmers who develop in javascript, too? > > -----Original Message----- From: Kristina Anderson > Sent: Saturday, July 09, 2011 10:04 AM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] Wordpress & Ajax > > Let's face it, there is NO other list anywhere that can hope to measure > up to the NY-PHP list. > > Kristina > > On 7/9/2011 9:53 AM, Rob Marscher wrote: >> On Jul 9, 2011, at 12:24 AM, "Margaret Waldman" wrote: >> >>> Anyone know of a good javascript forum, I have a question about processing the xml in jquery returned from post. I know how to process it with straight javascript. >> I don't think jquery provides any utilities for handling XML. You might find a plugin that does it - but there's no reason not to use straight javascript if you know something that works. >> >> I don't have a javascript forum to recommend. It could be worthy of a special nyphp-js list here since javascript and php go pretty hand in hand these days and I'm sure many people here are experts in javascript in addition to php. Or actually, I think we have a nyphp-frontend list already. I guess the only problem is those special lists don't see the same amount of activity as the nyphp-talk list. >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation From mmwaldman at nyc.rr.com Sun Jul 10 10:11:16 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 10:11:16 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: <78211BBA935845BF8034C99E6B33566F@michelePC> My calcs/prog show 2147483647 really is the biggest int From: Margaret Waldman Sent: Sunday, July 10, 2011 9:56 AM To: NYPHP Talk Subject: [nycphp-talk] cookies and experiation I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at jimyi.com Sun Jul 10 10:44:03 2011 From: jim at jimyi.com (Jim Yi) Date: Sun, 10 Jul 2011 10:44:03 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: > I wanted to create a cookie that basically never expires. > > time() + x > > We can live to say 100 or so, so say 125 years expiration would be good. > > time() + 3944700000 > > But that number is too big. > > Intval says on a 32 bit machine max is 2147483647. > > So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 > > 2147483647 = 68 years but because I?m adding time it grows bigger than the > bigger integer > > But I really can only do this 2147483647 - time() = 837178076 26 years > > But php wasn?t crapping out on 290000000 + time(), so what really is the > biggest integer > > Time today = 1310305571 > Time tomorrow = 1310391971 > Next year will be = 1341863171 (42 years) > In 20 years will be = 1372420841 (52 years) > > So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years > > The numbers don?t look quite right but at time increases the life time you > can extend in ints decreases. > > So, instead of just adding a value to time, I should > > $newLife = 2147483647 - time(); > > setcookie(?name?, ?val?, time() + newLife); > > I?m sure by the time, time() grows to be so big that this formula is an > issue, integers will be big enough to handle it? > > Anyway, does anyone know the real max size of an integer? Cause it ain?t > 2147483647 like the docs say for a 32 bit machine. > > Margaret Michele Waldman > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Sun Jul 10 11:31:46 2011 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sun, 10 Jul 2011 11:31:46 -0400 Subject: [nycphp-talk] largest interger In-Reply-To: <68713195D7134BEFBC2D74398947F8EC@michelePC> References: <68713195D7134BEFBC2D74398947F8EC@michelePC> Message-ID: <20110710153145.GA8473@panix.com> Hi: > I found 2147483647 in the documentation, but I saw larger numbers > working. Hum. It's platform/operating system dependent. Things tend to get hairy over 2^53. There's bcmath if you need big numbers or significant precision. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From mmwaldman at nyc.rr.com Sun Jul 10 12:09:46 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 12:09:46 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: <9E428F2CA3BF46CE864FF34B9CD73038@michelePC> I?ve thought of all of this ... - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies Thanks for PHP_INT_MAX. From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: wlEmoticon-smile[1].png Type: image/png Size: 1041 bytes Desc: not available URL: From mmwaldman at nyc.rr.com Sun Jul 10 12:11:39 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 12:11:39 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: <572F3777AD634ABDBCEB47ACE8DAC21D@michelePC> well not of brower specific, but I?ve had several computers crash so I?m fully aware that most no one will be using that cookie in 68 years. lol From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: wlEmoticon-smile[1].png Type: image/png Size: 1041 bytes Desc: not available URL: From mmwaldman at nyc.rr.com Sun Jul 10 12:13:56 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Sun, 10 Jul 2011 12:13:56 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: Jim, I used the at 386 from ?90-?04. I even put Windows ?95 on it and surfed the web. Granted it was slowed than you can imagine ... From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Sun Jul 10 21:14:18 2011 From: ioplex at gmail.com (Michael B Allen) Date: Sun, 10 Jul 2011 21:14:18 -0400 Subject: [nycphp-talk] Google Rank Amateur Message-ID: I just found a major mistake in one of my websites. The Google rank for the primary page has always been inexplicably horrible. Then I found out that Google decreases the ranking of a page if it contains content that is largely duplicated elsewhere such as on an adjacent page. Turns out that index.html was just a symbolic link to the page with a bad rank. Meaning Google was indexing the same exact page through two slightly different URLs. I now generate the pages separately with one containing (which unfortunately has to be index.html because the other page has good external links) so hopefully that will clear up any penalty for duplicate content. Anyway, if anyone knows of other Google rank pitfalls to avoid, I would be delighted to hear about them. Mike From rmarscher at beaffinitive.com Sun Jul 10 22:47:53 2011 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Sun, 10 Jul 2011 22:47:53 -0400 Subject: [nycphp-talk] Google Rank Amateur In-Reply-To: References: Message-ID: <5C5CB168-A3A2-4BD7-B14F-727C69F8793F@beaffinitive.com> On Jul 10, 2011, at 9:14 PM, Michael B Allen wrote: > Meaning Google was indexing the same exact page > through two slightly different URLs. > > I now generate the pages separately with one containing name="robots" content="noindex"/> (which unfortunately has to be > index.html because the other page has good external links) so > hopefully that will clear up any penalty for duplicate content. Take a look at and put that in all of your pages with the same content. http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html From jcampbell1 at gmail.com Sun Jul 10 22:57:47 2011 From: jcampbell1 at gmail.com (John Campbell) Date: Sun, 10 Jul 2011 22:57:47 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: The reason you cannot add 125 years is the 2038 problem. A simple solution is to set the expiration date to Jan 1, 2038. http://en.wikipedia.org/wiki/Year_2038_problem -jc On Sun, Jul 10, 2011 at 12:13 PM, Margaret Waldman wrote: > Jim, I used the at 386 from ?90-?04. I even put Windows ?95 on it and > surfed the web. Granted it was slowed than you can imagine ... > > *From:* Jim Yi > *Sent:* Sunday, July 10, 2011 10:44 AM > *To:* NYPHP Talk > *Subject:* Re: [nycphp-talk] cookies and experiation > > PHP has some useful predefined constants, particularly PHP_INT_MAX in > this case (http://php.net/manual/en/reserved.constants.php). What you > should really be doing while setting the cookie is ignoring time() > completely, and just set the expiration time to the maximum size of an > integer. > > setcookie(?name?, ?val?, PHP_INT_MAX); > > This way, the cookie expires in 2038 for everyone, which is the furthest > expiration you can set anyway. > > On a more theoretical note, there really isn't a need to set a cookie's > expiration date beyond, let's say 5 years. For that cookie to even still be > alive, you have to hope that the user: > - is using the same computer for five years > - has never reformatted the hard drive or re-installed a fresh OS > - has never switched browsers > - has never cleared their cookies > > I'd say a combination of all of the above is extremely rare, and I can't > really think of a good use-case where a cookie would still be useful 5 years > from now, given that the internet is constantly evolving. > > --- > Jim Yi > > > On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: > >> I wanted to create a cookie that basically never expires. >> >> time() + x >> >> We can live to say 100 or so, so say 125 years expiration would be good. >> >> time() + 3944700000 >> >> But that number is too big. >> >> Intval says on a 32 bit machine max is 2147483647. >> >> So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 >> >> 2147483647 = 68 years but because I?m adding time it grows bigger than >> the bigger integer >> >> But I really can only do this 2147483647 - time() = 837178076 26 years >> >> But php wasn?t crapping out on 290000000 + time(), so what really is the >> biggest integer >> >> Time today = 1310305571 >> Time tomorrow = 1310391971 >> Next year will be = 1341863171 (42 years) >> In 20 years will be = 1372420841 (52 years) >> >> So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years >> >> The numbers don?t look quite right but at time increases the life time you >> can extend in ints decreases. >> >> So, instead of just adding a value to time, I should >> >> $newLife = 2147483647 - time(); >> >> setcookie(?name?, ?val?, time() + newLife); >> >> I?m sure by the time, time() grows to be so big that this formula is an >> issue, integers will be big enough to handle it? >> >> Anyway, does anyone know the real max size of an integer? Cause it ain?t >> 2147483647 like the docs say for a 32 bit machine. >> >> Margaret Michele Waldman >> >> _______________________________________________ >> New York PHP Users Group Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> >> http://www.nyphp.org/Show-Participation >> > > ------------------------------ > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcampbell1 at gmail.com Sun Jul 10 23:07:59 2011 From: jcampbell1 at gmail.com (John Campbell) Date: Sun, 10 Jul 2011 23:07:59 -0400 Subject: [nycphp-talk] Google Rank Amateur In-Reply-To: References: Message-ID: Your "solution" will make things worse with google. There is no "duplicate" content pentalty, but there is a "scraper" penalty, and I doubt that is being applied in your case. "noindex" tells google that you have a page that customers can and should see, but the googlebot specifically doesn't have permission to view it. That is not likely to help your cause with google. The best solution, is to 301 redirect to the canonical page. If you can't do that, then use Rob's suggestion of wrote: > I just found a major mistake in one of my websites. The Google rank > for the primary page has always been inexplicably horrible. Then I > found out that Google decreases the ranking of a page if it contains > content that is largely duplicated elsewhere such as on an adjacent > page. Turns out that index.html was just a symbolic link to the page > with a bad rank. Meaning Google was indexing the same exact page > through two slightly different URLs. > > I now generate the pages separately with one containing name="robots" content="noindex"/> (which unfortunately has to be > index.html because the other page has good external links) so > hopefully that will clear up any penalty for duplicate content. > > Anyway, if anyone knows of other Google rank pitfalls to avoid, I > would be delighted to hear about them. > > Mike > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Mon Jul 11 00:04:43 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Mon, 11 Jul 2011 00:04:43 -0400 Subject: [nycphp-talk] Hans is going to kill me Message-ID: <87A5A6F1489F491FBDD87763BD282A7B@michelePC> Party at my house. I finished my project after working all weekend. No. I?m not drinking. Woohoo! Thanks to all those who help especially Jim for saved me for having a hard-coded value in my code. Margaret Michele Waldman -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Mon Jul 11 00:05:47 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Mon, 11 Jul 2011 00:05:47 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: <7FAEC169E5F647D4AF9A81C77212287B@michelePC> I guess I reinvented the wheel. Hey, John. From: John Campbell Sent: Sunday, July 10, 2011 10:57 PM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation The reason you cannot add 125 years is the 2038 problem. A simple solution is to set the expiration date to Jan 1, 2038. http://en.wikipedia.org/wiki/Year_2038_problem -jc On Sun, Jul 10, 2011 at 12:13 PM, Margaret Waldman wrote: Jim, I used the at 386 from ?90-?04. I even put Windows ?95 on it and surfed the web. Granted it was slowed than you can imagine ... From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation ------------------------------------------------------------------------------ _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmwaldman at nyc.rr.com Mon Jul 11 00:43:57 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Mon, 11 Jul 2011 00:43:57 -0400 Subject: [nycphp-talk] cookies and experiation In-Reply-To: References: <0B6ECA7F976B43C4B39E706B725DDA8A@michelePC> Message-ID: So will the world come to an end or will it just weed out the big boys from the little boys? Now, I know I?m in trouble. I finally saw Hans message. From: John Campbell Sent: Sunday, July 10, 2011 10:57 PM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation The reason you cannot add 125 years is the 2038 problem. A simple solution is to set the expiration date to Jan 1, 2038. http://en.wikipedia.org/wiki/Year_2038_problem -jc On Sun, Jul 10, 2011 at 12:13 PM, Margaret Waldman wrote: Jim, I used the at 386 from ?90-?04. I even put Windows ?95 on it and surfed the web. Granted it was slowed than you can imagine ... From: Jim Yi Sent: Sunday, July 10, 2011 10:44 AM To: NYPHP Talk Subject: Re: [nycphp-talk] cookies and experiation PHP has some useful predefined constants, particularly PHP_INT_MAX in this case (http://php.net/manual/en/reserved.constants.php). What you should really be doing while setting the cookie is ignoring time() completely, and just set the expiration time to the maximum size of an integer. setcookie(?name?, ?val?, PHP_INT_MAX); This way, the cookie expires in 2038 for everyone, which is the furthest expiration you can set anyway. On a more theoretical note, there really isn't a need to set a cookie's expiration date beyond, let's say 5 years. For that cookie to even still be alive, you have to hope that the user: - is using the same computer for five years - has never reformatted the hard drive or re-installed a fresh OS - has never switched browsers - has never cleared their cookies I'd say a combination of all of the above is extremely rare, and I can't really think of a good use-case where a cookie would still be useful 5 years from now, given that the internet is constantly evolving. --- Jim Yi On Sun, Jul 10, 2011 at 9:56 AM, Margaret Waldman wrote: I wanted to create a cookie that basically never expires. time() + x We can live to say 100 or so, so say 125 years expiration would be good. time() + 3944700000 But that number is too big. Intval says on a 32 bit machine max is 2147483647. So 2147483647 ? time() = 4294967294, which is bigger than 2147483647 2147483647 = 68 years but because I?m adding time it grows bigger than the bigger integer But I really can only do this 2147483647 - time() = 837178076 26 years But php wasn?t crapping out on 290000000 + time(), so what really is the biggest integer Time today = 1310305571 Time tomorrow = 1310391971 Next year will be = 1341863171 (42 years) In 20 years will be = 1372420841 (52 years) So, 2147483647 ? time in 20 year (1372420841) = 775062806 approx 23 years The numbers don?t look quite right but at time increases the life time you can extend in ints decreases. So, instead of just adding a value to time, I should $newLife = 2147483647 - time(); setcookie(?name?, ?val?, time() + newLife); I?m sure by the time, time() grows to be so big that this formula is an issue, integers will be big enough to handle it? Anyway, does anyone know the real max size of an integer? Cause it ain?t 2147483647 like the docs say for a 32 bit machine. Margaret Michele Waldman _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation ------------------------------------------------------------------------------ _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------------------------------------------------------------------------- _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From afischer at smith.edu Mon Jul 11 12:28:21 2011 From: afischer at smith.edu (Aaron Fischer) Date: Mon, 11 Jul 2011 12:28:21 -0400 Subject: [nycphp-talk] Book recommendation for JS/AJAX? In-Reply-To: <4E15D109.30504@tinkertownlabs.com> References: <4E158CD8020000A400011263@gwsmtp1.smith.edu> <4E15D109.30504@tinkertownlabs.com> Message-ID: <4E1AEC65020000A400011499@gwsmtp1.smith.edu> Looks great, thanks, just ordered the 6th edition. Can't wait for it to arrive! -Aaron >>> Anthony Wlodarski 7/7/2011 11:30 AM >>> JavaScript The Definitive Guide: http://lmgtfy.com/?q=JavaScript+The+Definitive+Guide This is the only book I would trust. It covers jQuery as well in the later chapters (6th edition only). On top of that it is an excellent resource to read if you are delving into Node.js and want to learn more about closures, callback functions, and real inner workings of EMCA script and how it applies to client side as well as server programming. -Anthony On 07/07/2011 10:39 AM, Aaron Fischer wrote: Hey guys, I'd like to spruce up my html/php pages with more dynamic elements and JS/AJAX/JQUERY/JSON type stuff. My stuff has been mostly html and php to date, only played with javascript a little. However, I see value in adding more dynamic elements to my pages (showing/hiding div content, calls to php from the page without reloading, etc.). I'm looking for a book that will cover the basics and get me up and running, but also has room to grow and get into more intermediate/advanced stuff. Any thoughts or recommendations would be most appreciated. -Aaron _______________________________________________ New York PHP Users Group Community Talk Mailing Listhttp://lists.nyphp.org/mailman/listinfo/talkhttp://www.nyphp.org/Show-Participation -- Anthony Wlodarski Lead Software Engineer Get2Know.me (http://www.get2know.me) Office: 646-285-0500 x217 Fax: 646-285-0400 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ioplex at gmail.com Mon Jul 11 14:31:54 2011 From: ioplex at gmail.com (Michael B Allen) Date: Mon, 11 Jul 2011 14:31:54 -0400 Subject: [nycphp-talk] Google Rank Amateur In-Reply-To: <5C5CB168-A3A2-4BD7-B14F-727C69F8793F@beaffinitive.com> References: <5C5CB168-A3A2-4BD7-B14F-727C69F8793F@beaffinitive.com> Message-ID: On Sun, Jul 10, 2011 at 10:47 PM, Rob Marscher wrote: > On Jul 10, 2011, at 9:14 PM, Michael B Allen wrote: >> Meaning Google was indexing the same exact page >> through two slightly different URLs. >> >> I now generate the pages separately with one containing > name="robots" content="noindex"/> (which unfortunately has to be >> index.html because the other page has good external links) so >> hopefully that will clear up any penalty for duplicate content. > > Take a look at and put that in all of your pages with the same content. > > http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html Hi Rob and James, This is very informative. I have replaced the meta tag with . Hopefully that will clear things up. Thanks, Mike From mmwaldman at nyc.rr.com Tue Jul 12 17:37:36 2011 From: mmwaldman at nyc.rr.com (Margaret Waldman) Date: Tue, 12 Jul 2011 17:37:36 -0400 Subject: [nycphp-talk] Off the topic Message-ID: Not for nothing by if the documentation at http://code.google.com/apis/youtube/js_api_reference.html was right. I would have gotten a filling that I badly needed. I still can make it to the gym. Now, I can finally eat. Why do you have to go to: http://efreedom.com/Question/1-1080031/Ytplayer-Defined-Using-SWFObject-Method-Include-Chromeless-Youtube-Video-Site to get the correct code? Margaret Michele Waldman Sovereign Sites LLC 646-499-5004 -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Fri Jul 15 06:39:11 2011 From: davidalanroth at gmail.com (David Roth) Date: Fri, 15 Jul 2011 06:39:11 -0400 Subject: [nycphp-talk] Reading/writing id3v2 tags from MP3 files in PHP? Message-ID: <8C27A898-6D78-4525-A6C5-8C9A4DD4F02E@gmail.com> Anyone have recommendations for reading/writing id3v2 .mp3 files from PHP? Thanks! David Roth From david at davidmintz.org Fri Jul 15 09:55:48 2011 From: david at davidmintz.org (David Mintz) Date: Fri, 15 Jul 2011 09:55:48 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable Message-ID: Pondering how to approach a situation where the application needs to count on a certain string to be in certain database rows in order to know what to do. Without going into excruciating detail, let me ask if you think there are cases where it's good practice to basically hard-code in some rows of a table certain data that your application needs, and somehow mark them as immutable -- at the application level, stop the user from touching them. Other rows in the same table would be fair game -- they can add, modify and delete. Comments? -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Fri Jul 15 10:04:43 2011 From: david at davidmintz.org (David Mintz) Date: Fri, 15 Jul 2011 10:04:43 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: Message-ID: On Fri, Jul 15, 2011 at 9:59 AM, Philip Camilleri < philip.camilleri at gmail.com> wrote: > hi David, > > simply put -- No! > > It's not quite good design, and you risk having several issues down the > road. Better to split the table in two (even though from a normalized design > perspective, that's not quite right -- however, you give yourself a lot more > flexibility, and then can either create a view joining both tables, or just > join in your queries). > > Phil. > Well, I'm not totally convinced, and I haven't described my scenario in any detail to try to convince you. But it's food for thought that I will duly consider. Whenever I see myself getting too fancy, Occam's Razor makes me skeptical of my own thinking. And I do have the Razor here hovering over my shoulder. -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From rainelemental at gmail.com Fri Jul 15 10:06:20 2011 From: rainelemental at gmail.com (federico ulfo) Date: Fri, 15 Jul 2011 10:06:20 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: Message-ID: <-7103764178445111681@unknownmsgid> Yes, is called permission and it make sense, same as file system there can be users that have limited access on some contents Sent from my iPhone On Jul 15, 2011, at 9:55 AM, David Mintz wrote: Pondering how to approach a situation where the application needs to count on a certain string to be in certain database rows in order to know what to do. Without going into excruciating detail, let me ask if you think there are cases where it's good practice to basically hard-code in some rows of a table certain data that your application needs, and somehow mark them as immutable -- at the application level, stop the user from touching them. Other rows in the same table would be fair game -- they can add, modify and delete. Comments? -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From rainelemental at gmail.com Fri Jul 15 10:11:58 2011 From: rainelemental at gmail.com (federico ulfo) Date: Fri, 15 Jul 2011 10:11:58 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: Message-ID: <4915597584532030020@unknownmsgid> It's simple just add a permission table :) linked to the content table and to the users and to the groups: Permission ( permission_id, content_id, users_id, group_id, permission ) Also normalization is not always necessary in my experience I found faster and easier sometimes to just "brake the law" and keep all info on a single table, not elegant but if works better/faster why not? My 2 cents Sent from my iPhone On Jul 15, 2011, at 10:04 AM, David Mintz wrote: On Fri, Jul 15, 2011 at 9:59 AM, Philip Camilleri < philip.camilleri at gmail.com> wrote: > hi David, > > simply put -- No! > > It's not quite good design, and you risk having several issues down the > road. Better to split the table in two (even though from a normalized design > perspective, that's not quite right -- however, you give yourself a lot more > flexibility, and then can either create a view joining both tables, or just > join in your queries). > > Phil. > Well, I'm not totally convinced, and I haven't described my scenario in any detail to try to convince you. But it's food for thought that I will duly consider. Whenever I see myself getting too fancy, Occam's Razor makes me skeptical of my own thinking. And I do have the Razor here hovering over my shoulder. -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ _______________________________________________ New York PHP Users Group Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk http://www.nyphp.org/Show-Participation -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramons at gmx.net Fri Jul 15 10:38:07 2011 From: ramons at gmx.net (David Krings) Date: Fri, 15 Jul 2011 10:38:07 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: Message-ID: <4E2050CF.9040703@gmx.net> On 7/15/2011 9:55 AM, David Mintz wrote: > Pondering how to approach a situation where the application needs to count on > a certain string to be in certain database rows in order to know what to do. > Without going into excruciating detail, let me ask if you think there are > cases where it's good practice to basically hard-code in some rows of a table > certain data that your application needs, and somehow mark them as immutable > -- at the application level, stop the user from touching them. Other rows in > the same table would be fair game -- they can add, modify and delete. > > Comments? > Why not simply add a second table, one that is free game and one that is set to read-only. They will have the same structure and technically the same function, but the permissions are different. May not be the best approach, but strikes me to be better than mushing it all into one table. Or is there a technical need for this? Then again, if those records are never to be changed by users, why have them in the database to begin with. Some may disagree, but I think that anything static has no place in a database. Put it in flat file somewhere or if it truely is never to change hard code it. David From rainelemental at gmail.com Fri Jul 15 10:40:02 2011 From: rainelemental at gmail.com (Federico Ulfo) Date: Fri, 15 Jul 2011 10:40:02 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: <4E2050CF.9040703@gmx.net> References: <4E2050CF.9040703@gmx.net> Message-ID: totally no, how you get a complete query of both? You should merge them and order the ID, and it's very performance killing. Just use the filesystem solution, a permission flag, that's pretty easy right? -- Federico Ulfo ? Certified Developer Google & PHP On Fri, Jul 15, 2011 at 10:38 AM, David Krings wrote: > On 7/15/2011 9:55 AM, David Mintz wrote: > >> Pondering how to approach a situation where the application needs to count >> on >> a certain string to be in certain database rows in order to know what to >> do. >> Without going into excruciating detail, let me ask if you think there are >> cases where it's good practice to basically hard-code in some rows of a >> table >> certain data that your application needs, and somehow mark them as >> immutable >> -- at the application level, stop the user from touching them. Other rows >> in >> the same table would be fair game -- they can add, modify and delete. >> >> Comments? >> >> > Why not simply add a second table, one that is free game and one that is > set to read-only. They will have the same structure and technically the same > function, but the permissions are different. May not be the best approach, > but strikes me to be better than mushing it all into one table. Or is there > a technical need for this? > Then again, if those records are never to be changed by users, why have > them in the database to begin with. Some may disagree, but I think that > anything static has no place in a database. Put it in flat file somewhere or > if it truely is never to change hard code it. > > > David > > ______________________________**_________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/**mailman/listinfo/talk > > http://www.nyphp.org/Show-**Participation > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Fri Jul 15 11:30:08 2011 From: david at davidmintz.org (David Mintz) Date: Fri, 15 Jul 2011 11:30:08 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: <4E2050CF.9040703@gmx.net> Message-ID: I hesitate to bore you with my details, but -- you can stop reading if it gets too boring. The application will manage judiciary interpreters (yeah, same project for the past 8 years or so) in the office where i work ( as a court interpreter; code monkey isn't in my formal job description at all (-: ). There's an entity called an "event." Its attributes include: date, time, language_id, event_type_id, location_id, and so forth. Naturally, there's a related table called event_types for storing the kinds of things we do: plea; sentencing; arraignment; attorney/client interview; etc. There's much more to be said about the db design, but I'll skip it. event_types have an attribute "in_court? which is boolean. Things are either in-court, or they are ancillary events like attorney-client interviews. (This is important; the suits in Washington require federal courts to report interpreter usage based on such things). Fast forward to the user interface for creating/editing events. I want to intelligently guess the default location based on the event type. (A judge has a default courtroom usually, though in some cases not: some have only a default courthouse. My locations model supports one level of nesting. A courtroom is in a courthouse but both are locations.) Now we come to some Javascript: an event handler that fires when the change event on the "judge" select element happens. This handler looks at the event_type to decide whether to set the location controls to that judge's default courtroom, or not. I will have already loaded a JSON data structure that tells me if an event_type is in_court or out. (There's much more: e.g., I get the judge's default location info via xhr and cache it; so first I look in the cache to see if it's already there. Yesterday I created a flow chart on a large marker board to get a clearer picture in my mind, and confirmed the obvious: it seems complicated because it is complicated.) The plot thickens if the event_type is out of court. if it's out, it's usually still in a courthouse, so I want to leave what a call the parent location (the building, basically) consistent with the judge's default. Unless the event_type is of type "probation interview" which is almost invariably held outside any courthouse: those happen in jails and US probation offices. Therefore, if the user selects "probation interview" I don't want to default to any location, but make her choose (note my PC use of what I call the counter-sexist "she." Actually everyone is my office is female except me, so the odds are that the user is indeed a she (-:). So, should my JS code examine the currently selected event_type option to see if it matches the string "probation interview?" That would do fine, unless a user with admin privileges decides to edit the name of that particular event_type beyond recognition and breaks my javascript. Hence my conclusion that this application needs to have certain event_types -- I think of them as "core" event types -- that are loaded into the database at setup time and are never messed with again. There's a logical business basis for that: there are certain kinds of courtroom events that you are absolutely going to need, so why not get them in there up front. Thereafter, users at a certain privilege level can add other event types as needed -- occasionally some new exotic thing may arise; edit them when they decide they spelled it wrong; delete them (if the event_type has no related rows and they change their mind). I don't think it makes sense to have two different tables, as in "basic" event_types that ship with the app, and "custom" that the user creates. That would make for torture when it comes time to figure out which table you need events to JOIN with. btw I have seen db designs in which you had a column for a foreign key, and another column to tell you which damn table to FK pointed to. Obviously this is for myisam or similar, not db-level FK relationships. I think that's a bad idea and don't wanna do that (again (-: ) Better, it seems, is to somehow mark my sacred rows as such. At the UI level I simply won't provide a way to edit them. At the model level I will throw an exception if they try to update|delete them. So I'm planning to add a boolean "mutable" to my event_types for that purpose. (Pseudo-boolean, if you will, since this is MySQL). PS: My weapons of choice are MySQL, Zend Framework, and JQuery. When it's all done, this will be far and away the most ass-kicking federal court interpreter management application known to humankind. Comments? -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dcech at phpwerx.net Fri Jul 15 11:43:14 2011 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 15 Jul 2011 11:43:14 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: <4E2050CF.9040703@gmx.net> Message-ID: <4E206012.2080004@phpwerx.net> It sounds like you really just need to change the way in_court is used, having multiple options instead of just yes/no. Then your javascript can key off that and your users can create any event types they require and specify where they take place. Dan On 7/15/2011 11:30 AM, David Mintz wrote: > I hesitate to bore you with my details, but -- you can stop reading if it > gets too boring. > > The application will manage judiciary interpreters (yeah, same project for > the past 8 years or so) in the office where i work ( as a court interpreter; > code monkey isn't in my formal job description at all (-: ). > > There's an entity called an "event." Its attributes include: date, time, > language_id, event_type_id, location_id, and so forth. Naturally, there's a > related table called event_types for storing the kinds of things we do: > plea; sentencing; arraignment; attorney/client interview; etc. There's much > more to be said about the db design, but I'll skip it. > > event_types have an attribute "in_court? which is boolean. Things are either > in-court, or they are ancillary events like attorney-client interviews. > (This is important; the suits in Washington require federal courts to report > interpreter usage based on such things). > > Fast forward to the user interface for creating/editing events. I want to > intelligently guess the default location based on the event type. (A judge > has a default courtroom usually, though in some cases not: some have only a > default courthouse. My locations model supports one level of nesting. A > courtroom is in a courthouse but both are locations.) > > Now we come to some Javascript: an event handler that fires when the change > event on the "judge" select element happens. This handler looks at the > event_type to decide whether to set the location controls to that judge's > default courtroom, or not. I will have already loaded a JSON data structure > that tells me if an event_type is in_court or out. (There's much more: e.g., > I get the judge's default location info via xhr and cache it; so first I > look in the cache to see if it's already there. Yesterday I created a flow > chart on a large marker board to get a clearer picture in my mind, and > confirmed the obvious: it seems complicated because it is complicated.) > > The plot thickens if the event_type is out of court. if it's out, it's > usually still in a courthouse, so I want to leave what a call the parent > location (the building, basically) consistent with the judge's default. > Unless the event_type is of type "probation interview" which is almost > invariably held outside any courthouse: those happen in jails and US > probation offices. Therefore, if the user selects "probation interview" I > don't want to default to any location, but make her choose (note my PC use > of what I call the counter-sexist "she." Actually everyone is my office is > female except me, so the odds are that the user is indeed a she (-:). > > So, should my JS code examine the currently selected event_type option to > see if it matches the string "probation interview?" That would do fine, > unless a user with admin privileges decides to edit the name of that > particular event_type beyond recognition and breaks my javascript. Hence my > conclusion that this application needs to have certain event_types -- I > think of them as "core" event types -- that are loaded into the database at > setup time and are never messed with again. There's a logical business basis > for that: there are certain kinds of courtroom events that you are > absolutely going to need, so why not get them in there up front. Thereafter, > users at a certain privilege level can add other event types as needed -- > occasionally some new exotic thing may arise; edit them when they decide > they spelled it wrong; delete them (if the event_type has no related rows > and they change their mind). > > I don't think it makes sense to have two different tables, as in "basic" > event_types that ship with the app, and "custom" that the user creates. That > would make for torture when it comes time to figure out which table you need > events to JOIN with. btw I have seen db designs in which you had a column > for a foreign key, and another column to tell you which damn table to FK > pointed to. Obviously this is for myisam or similar, not db-level FK > relationships. I think that's a bad idea and don't wanna do that (again (-: > ) > > Better, it seems, is to somehow mark my sacred rows as such. At the UI level > I simply won't provide a way to edit them. At the model level I will throw > an exception if they try to update|delete them. So I'm planning to add a > boolean "mutable" to my event_types for that purpose. (Pseudo-boolean, if > you will, since this is MySQL). > > PS: My weapons of choice are MySQL, Zend Framework, and JQuery. When it's > all done, this will be far and away the most ass-kicking federal court > interpreter management application known to humankind. > > Comments? > > > > > > > _______________________________________________ > New York PHP Users Group Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > http://www.nyphp.org/Show-Participation From david at davidmintz.org Fri Jul 15 11:44:48 2011 From: david at davidmintz.org (David Mintz) Date: Fri, 15 Jul 2011 11:44:48 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: <4E206012.2080004@phpwerx.net> References: <4E2050CF.9040703@gmx.net> <4E206012.2080004@phpwerx.net> Message-ID: On Fri, Jul 15, 2011 at 11:43 AM, Dan Cech wrote: > It sounds like you really just need to change the way in_court is used, > having multiple options instead of just yes/no. > > Then your javascript can key off that and your users can create any event > types they require and specify where they take place. OMG! That does sound promising! Your check for $25,000 for consulting services rendered is in the mail. Thanks! -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidmintz.org Fri Jul 15 12:09:17 2011 From: david at davidmintz.org (David Mintz) Date: Fri, 15 Jul 2011 12:09:17 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: <4E2050CF.9040703@gmx.net> <4E206012.2080004@phpwerx.net> Message-ID: On Fri, Jul 15, 2011 at 11:44 AM, David Mintz wrote: > > > On Fri, Jul 15, 2011 at 11:43 AM, Dan Cech wrote: > >> It sounds like you really just need to change the way in_court is used, >> having multiple options instead of just yes/no. >> >> Then your javascript can key off that and your users can create any event >> types they require and specify where they take place. > > > OMG! That does sound promising! > In my previous description of the case, for brevity's sake I lied about in_court being boolean. There already is 1, 0 and -1. To the application -1 means "not applicable" and it's for one thing we interpreters sometimes do -- translate written documents -- which really isn't "in" or "out," and which per the business requirements is counted differently from all the rest. If I were to have another value signifying "usually even further 'out', like off-site" that would seem appropriate from one point of view but it smells a little funny. The location is not and shouldn't be tightly bound to the event_type; rather, it's an attribute of the event. I made the mistake of coupling the what with the where in my last iteration of this project, and it came back to bite me. Looks litke there needs to be some pain however I slice it; the model is complex because the reality it models is complex. But Dan's approach feels like it's the right track, so many thanks again -- to all. -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Sat Jul 16 01:29:11 2011 From: davidalanroth at gmail.com (David Roth) Date: Sat, 16 Jul 2011 01:29:11 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable Message-ID: Hold on there a second, what makes you think Dan should take a pay cut! :-) David Roth On Fri, Jul 15, 2011 at 11:43 AM, Dan Cech wrote: > It sounds like you really just need to change the way in_court is used, > having multiple options instead of just yes/no. > > Then your javascript can key off that and your users can create any event > types they require and specify where they take place. OMG! That does sound promising! Your check for $25,000 for consulting services rendered is in the mail. Thanks! -- David Mintz From nick.ilyin at gmail.com Wed Jul 20 11:08:42 2011 From: nick.ilyin at gmail.com (Nick Ilyin) Date: Wed, 20 Jul 2011 11:08:42 -0400 Subject: [nycphp-talk] Reading/writing id3v2 tags from MP3 files in PHP? In-Reply-To: <8C27A898-6D78-4525-A6C5-8C9A4DD4F02E@gmail.com> References: <8C27A898-6D78-4525-A6C5-8C9A4DD4F02E@gmail.com> Message-ID: Hi David, PHP has ID3 functions. Here's where you can find it in the reference manual: http://php.net/id3 Cheers! Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From rukbat at webdingers.com Sat Jul 23 21:30:33 2011 From: rukbat at webdingers.com (Rukbat) Date: Sat, 23 Jul 2011 21:30:33 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: References: <4E2050CF.9040703@gmx.net> Message-ID: <4E2B75B9.30709@gmail.com> On 7/15/2011 11:30 AM, David Mintz wrote: > I hesitate to bore you with my details, but -- you can stop reading if > it gets too boring. > So, should my JS code examine the currently selected event_type option > to see if it matches the string "probation interview?" Have you thought about giving event_type a few different edit levels (in a single field - edit_level). That way you can edit anything (your level would be 1 higher than the highest level in the table). Each event has a level the user has to be in order to be able to edit it. Default level is the level of the user creating it. Some users would have higher levels, since they understand the data (or can make your life miserable). If I understand the problem, that should work. If it won't work, I don't understand the problem. Which wouldn't be unusual - it's about 90 degrees, the end of a long day of debugging and "hello" is a major undertaking right now. But I run into this sort of thing a few times a day (I write a lot of web pages), and I usually just brute-force it. Elegant is nice, but sometimes it just has to work, and it has to work now. Once it's working and out there, you can play with it on a local server and code it so that the flow chart looks nice. From david at davidmintz.org Mon Jul 25 09:39:55 2011 From: david at davidmintz.org (David Mintz) Date: Mon, 25 Jul 2011 09:39:55 -0400 Subject: [nycphp-talk] db design/ app logic: making certain rows immutable In-Reply-To: <4E2B75B9.30709@gmail.com> References: <4E2050CF.9040703@gmx.net> <4E2B75B9.30709@gmail.com> Message-ID: On Sat, Jul 23, 2011 at 9:30 PM, Rukbat wrote: > On 7/15/2011 11:30 AM, David Mintz wrote: > >> I hesitate to bore you with my details, but -- you can stop reading if it >> gets too boring. >> > > > So, should my JS code examine the currently selected event_type option to >> see if it matches the string "probation interview?" >> > > Have you thought about giving event_type a few different edit levels (in a > single field - edit_level). That way you can edit anything (your level > would be 1 higher than the highest level in the table). Each event has a > level the user has to be in order to be able to edit it. Default level is > the level of the user creating it. Some users would have higher levels, > since they understand the data (or can make your life miserable).[...] > Thanks for the suggestion. I was considering solutions tending in that direction, then realized (thanks to a nudge from D. Cech) what I really needed was slightly more fine-grained metadata about each of my OPTION elements. I ended up tweaking my database design and using css class attributes to mark my OPTIONs as belonging to this or that category. Kind of like, . Maybe what I really need is HTML5 custom attributes, but I think this will do for now. -- David Mintz http://davidmintz.org/ It ain't over: http://www.healthcare-now.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From davidalanroth at gmail.com Thu Jul 28 08:19:16 2011 From: davidalanroth at gmail.com (David Roth) Date: Thu, 28 Jul 2011 08:19:16 -0400 Subject: [nycphp-talk] Reading/writing id3v2 tags from MP3 files in PHP? Message-ID: <665AF97C-9EB2-4C47-A08B-EEB427FF152A@gmail.com> Hi Nick. Thanks for the reply. It turns out for writing tags, those PHP routines don't support v2 which I needed. Now for the gory details. :-) However, I did find a solution that worked. There is a command line Linux utility called id3v2 which I installed on CentOS. I ended up writing a PHP program which wrote a shell script to handle the passing of the data needed for the parameters to id3v2. Then I ran the shell script. I did want to get the program length of each MP3 to write this to a MySQL database, so I did use PHP's shell_exec with command line mp3info to get the program runtime. The other thing I learned about this is that iTunes uses a later version of id3v2 (id3v2.2), so you can't write all the tags it uses with the id3v2 software although it can read it. And to convert them to podcast files which remember the position and to skip during shuffle, that actually had to be done in iTunes itself. Apparently that is a function of iTunes and likely stored in its own XML file. Luckily, the user can select multiple MP3 files after they have been imported to iTunes and globally change them to do this. All this helped make an archive of old radio shows much more enjoyable to use. David Roth > Hi David, > > PHP has ID3 functions. Here's where you can find it in the reference > manual: http://php.net/id3 > > Cheers! > > Nick From beef at psyop.tv Thu Jul 28 09:13:53 2011 From: beef at psyop.tv (Wellington Fan) Date: Thu, 28 Jul 2011 09:13:53 -0400 Subject: [nycphp-talk] East Village Tech Meetup #2 Message-ID: Anyone going? It's tonight, 7pm: http://www.meetup.com/EastVillageTechies/events/25349121/ -- wellington -------------- next part -------------- An HTML attachment was scrubbed... URL: From mutazmusa at gmail.com Sat Jul 30 18:48:43 2011 From: mutazmusa at gmail.com (Mutaz Musa) Date: Sat, 30 Jul 2011 18:48:43 -0400 Subject: [nycphp-talk] Usernames with whitespace Message-ID: Hi folks, What are your thoughts on allowing usernames with spaces, e.g. "john smith". They're often disallowed and I was wondering on your thoughts as to why that might be. One reason I can think of is to avoid confusingly similar usernames, e.g. "john smith" and "john smith" (2 spaces) In those cases wouldn't collapsing multiple spaces into a single space be a more conservative solution than disallowing the character entirely? Mutaz