php-general Digest 8 Nov 2010 11:29:56 -0000 Issue 7027
php-general Digest 8 Nov 2010 11:29:56 - Issue 7027 Topics (messages 309367 through 309368): Re: Shopping cart question 309367 by: Nathan Nobbe Re: Newbie looking for a project 309368 by: Ashim Kapoor Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- On Fri, Nov 5, 2010 at 5:51 PM, Tommy Pham tommy...@gmail.com wrote: -Original Message- From: Nathan Nobbe [mailto:quickshif...@gmail.com] Sent: Friday, November 05, 2010 11:40 AM To: Jack Cc: PHP Subject: Re: [PHP] Shopping cart question On Fri, Nov 5, 2010 at 12:30 PM, Jack jacklistm...@gmail.com wrote: Hello All, I'm looking to build a DB with items that are considered more of a catalog on one side of a website, and then provide those same items including the same images, descriptions etc. to a shopping cart. I don't want to re-invent all of the basic shopping cart functionality and I'm not sure I want to use something like OScommerce and inject the data into it at the same time as putting data into our database that we are writing. I was hoping someone out there has some suggestions, or even a cart module that would allow me to easily integrate into. One recommendation I can give you is to spend some time determining if Magento works for you. This is a conventional platform written on top of Zend Framework. OScommerce, and a derivative, ZenCart are ancient, and there are many nasty things about the programming practices, most notably, the 'view' layer, which is markup intermingled with logic .. its pretty bad. Magento is robust, and has a feature set that makes OScommerce look like it shipped from the third world. That said it may be overkill as well - just my 2c. -nathan Or look at opencart. It's based on MVC and jquery (1.3.2 ?) so you'll get some rich UI. The DB structure is very similar to oscommerce. I've finally had a few minutes to look around Opencart. the framework is custom, and doesn't appear to be as robust as some of the more popular ones I've come to enjoy, but there is a silver lining... I still can't say whether I'll like it or not, but after just digging around for a bit, it already feels more approachable than Magento. My hope is I can hop in and wire this up to associate its schema to a third party inventory and get order integration in place as well. I've spent a little time digging into Magento, and while it seems do-able, the completion date is no where in sight. nice tip Jack! -nathan ---End Message--- ---BeginMessage--- Dear Tedd, I have read one php book cover to cover, I wanted to contribute to projects for 2 reasons:- 1. Someone would benefit from the app. 2. I would learn more by interacting with experienced people. Writing apps on my own is fun but it's fruit is only for me to benefit from,but yes if nothing else I should do that. Many thanks for your time, Ashim. On Sun, Nov 7, 2010 at 8:21 PM, tedd tedd.sperl...@gmail.com wrote: At 3:39 PM +0530 11/7/10, Ashim Kapoor wrote: Dear All, I am a beginner looking for a project to contribute. Can someone tell me some good quality projects where I would learn the most? I hope this is the right forum for this query. Many thanks, Ashim Kapoor Hi Ashim: When I started programming php/mysql, I purchased as many books as I could and went through each one creating demos of everything I found. I still read at least one book every two weeks (or so my expense statement reads) and my demos have gotten more complex incorporating more than php/mysql (i.e., javascript, jquery, css, etc.) Now I have a considerable amount of demos and when I need something, I have a great store of example to draw on. Cheers, tedd -- --- http://sperling.com/ ---End Message---
php-general Digest 9 Nov 2010 02:39:35 -0000 Issue 7028
--- ---BeginMessage--- Hello, some time have past since the last release and some changes have been made. Vermis, the new open source issue tracker written in PHP, based on Zend Framework and Doctrine ORM is heading towards stable version 1.0. Today I would like to introduce the latest development version (r63-20101108) containing many bug fixes and some new features. What is new in the project: - Improved issues navigator, allows you to browse your issues in an easier way by breaking them by component, milestone, type, status and priority. - SMTP integration, you don't need to setup a mail service on your machine, use any mail account and send notification emails via SMTP. - IIS Support, even if you can't install Apache you can still enjoy using Vermis on your Windows box, finally Vermis is working under Microsoft IIS Web Server. - Lightbox, show your image attachments in a popup box. - Migration guard, you can safely upgrade Vermis to the latest version. You can try out the online demo at http://vermis.diabloware.com Feel free to test, download and use Vermis. Please let me know if everything is working as it should, any kind of feedback is much appreciated :) Home page: http://vermis.diabloware.com Forum: http://forum.diabloware.com Bugs: http://bugs.diabloware.com Thanks, Lukasz (cepa) Cepowski ---End Message---
Re: [PHP] Newbie looking for a project
Dear Tedd, I have read one php book cover to cover, I wanted to contribute to projects for 2 reasons:- 1. Someone would benefit from the app. 2. I would learn more by interacting with experienced people. Writing apps on my own is fun but it's fruit is only for me to benefit from,but yes if nothing else I should do that. Many thanks for your time, Ashim. On Sun, Nov 7, 2010 at 8:21 PM, tedd tedd.sperl...@gmail.com wrote: At 3:39 PM +0530 11/7/10, Ashim Kapoor wrote: Dear All, I am a beginner looking for a project to contribute. Can someone tell me some good quality projects where I would learn the most? I hope this is the right forum for this query. Many thanks, Ashim Kapoor Hi Ashim: When I started programming php/mysql, I purchased as many books as I could and went through each one creating demos of everything I found. I still read at least one book every two weeks (or so my expense statement reads) and my demos have gotten more complex incorporating more than php/mysql (i.e., javascript, jquery, css, etc.) Now I have a considerable amount of demos and when I need something, I have a great store of example to draw on. Cheers, tedd -- --- http://sperling.com/
RE: [PHP] simple photo gallery
-Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Sunday, November 07, 2010 2:55 AM To: Tom Sparks Cc: php-general@lists.php.net Subject: Re: [PHP] simple photo gallery On Sun, 2010-11-07 at 02:31 -0800, Tom Sparks wrote: I am looking for a simple photo gallery like this http://www.lavrsen.dk/webcam/cam1/movecam.php I want to use it in place of apache autoindex tom_a_sparks It's a nerdy thing I like to do Erm, is there a question in there? Thanks, Ash http://www.ashleysheridan.co.uk I think Tom is look a very basic photo gallery like the link. However, the link just shows updated pictures from a webcam. Tom, is that you want? Looking for something that will get pictures periodically from your cam (either web or cctv) and post online? Or looking for a more useful (read robust) photo gallery where you can have multiple albums - the albums can be protected via invite only - or the have ability to send the digital copy to a photo studio for a hard copy? The photo gallery can have other features such as slideshow, purchase download, etc... And the gallery can also take pictures from your web cam also...? Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ignore_repeated_errors has no effect
-Original Message- From: thunder...@gmail.com [mailto:thunder...@gmail.com] On Behalf Of Simon Marchi Sent: Sunday, November 07, 2010 8:45 AM To: Andre Polykanine; php-general@lists.php.net Subject: Re: [PHP] ignore_repeated_errors has no effect Hi, Just a precision, I don't want to modify the user's code, I would like to configure my server properly so it does not happen again even if another user makes a similar mistake. Thanks, Simon Simon, This I find next to impossible to achieve. As I figure it like this, imagine that your server is a perfectly fine tuned sports car. The driver (the user and his/her app) is an experienced, lack of racing training, or doesn't understand the concept of racing and decides to push the car to limit. I'd say that the car will break down or end up in a big crash 99.9% of the time. Thus, if wish you to maintain high availability as a provider, I strongly suggest you to inform the user to fix his/her app. As for changing that setting of ignore repeated errors, you're just letting buggy apps slide by, which can be both a stability and security issue, IMHO. Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is session_start() using encrypted cookies with HTTPS
-Original Message- From: Adam Richardson [mailto:simples...@gmail.com] Sent: Sunday, November 07, 2010 2:22 PM To: PHP-General Subject: Re: [PHP] Is session_start() using encrypted cookies with HTTPS On Sun, Nov 7, 2010 at 2:39 PM, Yannick Warnier ywarn...@beeznest.orgwrote: Hi all, It came to my attention through the Netcraft newsletter[1] that cookies in a web application are not always sent encrypted when a server is contacted through HTTPS. Not quite. Requests and responses over HTTPS are encrypted, including the cookie header. However, in the resource you cited, there were security issues because auth cookies were sent even over standard requests. The browser has to be told (through the flag) that the cookie should only be sent on encrypted requests. Would someone know the internals of that function and whether there is a way to force it to secure=true when the connection is made through HTTPS? Or maybe my question doesn't make sense because I am missing the point on how it works? Call this function with the appropriate settings before you call session_start() (or make some changes to php.ini): http://php.net/manual/en/function.session-set-cookie-params.php I develop an open-source application which can be used through both HTTP and HTTPS, so I'm a bit worried about not having this question answered in the doc for session_start(). Perhaps a link could be added to the documentation, although the function session_set_cookie_params() does appear in the secondary navigation in the left column, and not all sessions use cookies. Thanks, Yannick Warnier [1] http://news.netcraft.com/archives/2010/11/03/github-moves-to-ssl-but-r emains-firesheepable.html [2] http://www.php.net/setcookie [3] http://www.php.net/session-start Hope this helps, Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com Couldn't Yannick also use $_SERVER['HTTPS'] and take action for the session and cookies accordingly? Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] ignore_repeated_errors has no effect
-Original Message- From: Tommy Pham [mailto:tommy...@gmail.com] Sent: Monday, November 08, 2010 4:25 AM To: 'Simon Marchi'; 'Andre Polykanine'; 'php-general@lists.php.net' Subject: RE: [PHP] ignore_repeated_errors has no effect -Original Message- From: thunder...@gmail.com [mailto:thunder...@gmail.com] On Behalf Of Simon Marchi Sent: Sunday, November 07, 2010 8:45 AM To: Andre Polykanine; php-general@lists.php.net Subject: Re: [PHP] ignore_repeated_errors has no effect Hi, Just a precision, I don't want to modify the user's code, I would like to configure my server properly so it does not happen again even if another user makes a similar mistake. Thanks, Simon Simon, This I find next to impossible to achieve. As I figure it like this, imagine that your server is a perfectly fine tuned sports car. The driver (the user and his/her app) is an experienced, lack of racing training, or doesn't understand the concept of racing and decides to push the car to limit. I'd say that the car will break down or end up in a big crash 99.9% of the time. Thus, if wish you to maintain high availability as a provider, I strongly suggest you to inform the user to fix his/her app. As for changing that setting of ignore repeated errors, you're just letting buggy apps slide by, which can be both a stability and security issue, IMHO. Regards, Tommy Sorry, that above should read as 'inexperienced' instead of 'experience'... I've been up late too long :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is session_start() using encrypted cookies with HTTPS
Couldn't Yannick also use $_SERVER['HTTPS'] and take action for the session and cookies accordingly? Regards, Tommy Not to my understanding. When a visitor makes a request, the browser must determine which cookies are appropriate for transmitting in the request. By the time PHP processes the request, it's too late if a packet sniffer has intercepted an unencrypted request. Even if you carefully use $_SERVER['HTTP'] to manually set up session tracking with your own cookie, subsequent unencrypted requests would be vulnerable without the flag. The secure flag for cookies is precisely for situations where you want to help the browser understand that a particular cookie should be protected. However, people can run into trouble by assuming that this automatically means that a cookie is only transmitted over HTTPS requests. For most browsers, this is the default behavior, but the RFC isn't as demanding as one might expect: http://www.ietf.org/rfc/rfc2965.txt === Secure OPTIONAL. The Secure attribute (with no value) directs the user agent to use only (unspecified) secure means to contact the origin server whenever it sends back this cookie, to protect the confidentially and authenticity of the information in the cookie. *The user agent (possibly with user interaction) MAY determine what level of security it considers appropriate for secure cookies [emphasis added]*. The Secure attribute should be considered security advice from the server to the user agent, indicating that it is in the session's interest to protect the cookie contents. When it sends a secure cookie back to a server, *the user agent SHOULD use no less than the same level of security as was used when it received the cookie from the server [emphasis added]*. = So, use the flag, but remember it's not a fix-all. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com
Re: [PHP] Newbie looking for a project
On Mon, Nov 8, 2010 at 06:29, Ashim Kapoor ashimkap...@gmail.com wrote: Writing apps on my own is fun but it's fruit is only for me to benefit from,but yes if nothing else I should do that. Not at all, many others can benefit from it as well. Tedd's examples have been referenced on this list many times, and you can see them yourself: http://www.php1.net/ Just because you're developing the code to learn for yourself doesn't mean you can't put it in the public domain for others to do the same. -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is session_start() using encrypted cookies with HTTPS
On 2010-11-08, at 9:58 AM, Adam Richardson simples...@gmail.com wrote: Couldn't Yannick also use $_SERVER['HTTPS'] and take action for the session and cookies accordingly? Regards, Tommy Not to my understanding. When a visitor makes a request, the browser must determine which cookies are appropriate for transmitting in the request. By the time PHP processes the request, it's too late if a packet sniffer has intercepted an unencrypted request. Even if you carefully use $_SERVER['HTTP'] to manually set up session tracking with your own cookie, subsequent unencrypted requests would be vulnerable without the flag. The secure flag for cookies is precisely for situations where you want to help the browser understand that a particular cookie should be protected. However, people can run into trouble by assuming that this automatically means that a cookie is only transmitted over HTTPS requests. For most browsers, this is the default behavior, but the RFC isn't as demanding as one might expect: http://www.ietf.org/rfc/rfc2965.txt === Secure OPTIONAL. The Secure attribute (with no value) directs the user agent to use only (unspecified) secure means to contact the origin server whenever it sends back this cookie, to protect the confidentially and authenticity of the information in the cookie. *The user agent (possibly with user interaction) MAY determine what level of security it considers appropriate for secure cookies [emphasis added]*. The Secure attribute should be considered security advice from the server to the user agent, indicating that it is in the session's interest to protect the cookie contents. When it sends a secure cookie back to a server, *the user agent SHOULD use no less than the same level of security as was used when it received the cookie from the server [emphasis added]*. = So, use the flag, but remember it's not a fix-all. Adam -- Nephtali: PHP web framework that functions beautifully http://nephtaliproject.com If the cookie needs to be encrypted, why not just encrypt it and worry less about the transport layer? Or just down one hash value id cookie and pull back the secure data for action just on the server? Bastien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Template engines
I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 16:41, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? I chose to write two of my own over the years: one procedural, one OOP. That said, the most common is likely still to be Smarty, and by far. -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 4:58 PM, Robert Cummings rob...@interjinn.com wrote: On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php We are using some flex components for charting. Very cool with lots of flexibility. Just pass in xml datasets -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-08 05:02 PM, Bastien Koert wrote: On Mon, Nov 8, 2010 at 4:58 PM, Robert Cummingsrob...@interjinn.com wrote: On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. We are using some flex components for charting. Very cool with lots of flexibility. Just pass in xml datasets There was a sans flash requirement :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 8 November 2010 22:59, Michael Shadle mike...@gmail.com wrote: On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. PHPTal is an alternative to smarty: http://phptal.org/ - it's got a nice syntax, I find. However, whether one should bother with a templating system like smarty or phptal very much depends upon how intricate your front-end system needs to be and what it needs to do. For smaller projects. smarty or phptal will get in the way and will likely get very annoying. For bigger projects they can be of great use. Regards Peter -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
i would point someone in the direction of XHP too if they really wanted to https://github.com/facebook/xhp/wiki/ On Mon, Nov 8, 2010 at 2:10 PM, Peter Lind peter.e.l...@gmail.com wrote: On 8 November 2010 22:59, Michael Shadle mike...@gmail.com wrote: On Mon, Nov 8, 2010 at 1:41 PM, Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? smarty is everyone's favorite usually but i find it a bit annoying. not to mention php itself is already a templating language... the only benefit is trying to separate content and presentation. however, for that to happen people create DSLs for templating that all have their own little syntaxes and glitches and annoyances. PHPTal is an alternative to smarty: http://phptal.org/ - it's got a nice syntax, I find. However, whether one should bother with a templating system like smarty or phptal very much depends upon how intricate your front-end system needs to be and what it needs to do. For smaller projects. smarty or phptal will get in the way and will likely get very annoying. For bigger projects they can be of great use. Regards Peter -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Vermis The Issue Tracking System
Hello, some time have past since the last release and some changes have been made. Vermis, the new open source issue tracker written in PHP, based on Zend Framework and Doctrine ORM is heading towards stable version 1.0. Today I would like to introduce the latest development version (r63-20101108) containing many bug fixes and some new features. What is new in the project: - Improved issues navigator, allows you to browse your issues in an easier way by breaking them by component, milestone, type, status and priority. - SMTP integration, you don't need to setup a mail service on your machine, use any mail account and send notification emails via SMTP. - IIS Support, even if you can't install Apache you can still enjoy using Vermis on your Windows box, finally Vermis is working under Microsoft IIS Web Server. - Lightbox, show your image attachments in a popup box. - Migration guard, you can safely upgrade Vermis to the latest version. You can try out the online demo at http://vermis.diabloware.com Feel free to test, download and use Vermis. Please let me know if everything is working as it should, any kind of feedback is much appreciated :) Home page: http://vermis.diabloware.com Forum: http://forum.diabloware.com Bugs: http://bugs.diabloware.com Thanks, Lukasz (cepa) Cepowski -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 8 Nov 2010 14:41:12 -0700 Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? PHP is in itself a template language and I find that the template engines just get in the way. Why learn a template language when you can just concentrate on PHP? Also you can easily become dependable on a third party template system which needs to be upgraded. You never know when such an upgrade is necessary for your system and when it might break something. I always use homemade template systems and try to keep things very simple. If designers are working on the project as well they almost always benefit from a little insight into PHP rather than having to learn some template language they can't use for anything else. IMHO - If you have to jump in and out of HTML and template syntax you might as well jump in and out of HTML and PHP. --- Mange venlige hilsner/Best regards Kim N. Lesmer Programmer/Unix systemadministrator Web: www.bitflop.com E-mail : k...@bitflop.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] simple photo gallery
--- On Mon, 8/11/10, Tommy Pham tommy...@gmail.com wrote: From: Tommy Pham tommy...@gmail.com Subject: RE: [PHP] simple photo gallery To: a...@ashleysheridan.co.uk, 'Tom Sparks' tom_a_spa...@yahoo.com.au Cc: php-general@lists.php.net Received: Monday, 8 November, 2010, 11:11 PM -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Sunday, November 07, 2010 2:55 AM To: Tom Sparks Cc: php-general@lists.php.net Subject: Re: [PHP] simple photo gallery On Sun, 2010-11-07 at 02:31 -0800, Tom Sparks wrote: I am looking for a simple photo gallery like this http://www.lavrsen.dk/webcam/cam1/movecam.php I want to use it in place of apache autoindex tom_a_sparks It's a nerdy thing I like to do Erm, is there a question in there? Thanks, Ash http://www.ashleysheridan.co.uk I think Tom is look a very basic photo gallery like the link. However, the link just shows updated pictures from a webcam. Tom, is that you want? not the webcamera part, the gallery layout well be following the Design rule for Camera File system, and it well be run on a network camera (with hard drive) Looking for something that will get pictures periodically from your cam (either web or cctv) and post online? no Or looking for a more useful (read robust) photo gallery where you can have multiple albums - the albums can be protected via invite only - or the have ability to send the digital copy to a photo studio for a hard copy? The photo gallery can have other features such as slideshow, purchase download, etc... And the gallery can also take pictures from your web cam also...? I am going to be using gallery2 for my website, but this is for my custom made elphel camera Regards, Tommy tom_a_sparks It's a nerdy thing I like to do -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 2010-11-08 at 16:51 -0500, Steve Staples wrote: On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) I agree 100%!! Everyone here pretty much knows how much I've ranted about smarty :-) IMHO it's smart to use smarty! ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, 2010-11-08 at 23:36 +0100, k...@bitflop.com wrote: On Mon, 8 Nov 2010 14:41:12 -0700 Hansen, Mike mike.han...@atmel.com wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? PHP is in itself a template language and I find that the template engines just get in the way. Why learn a template language when you can just concentrate on PHP? Also you can easily become dependable on a third party template system which needs to be upgraded. You never know when such an upgrade is necessary for your system and when it might break something. I always use homemade template systems and try to keep things very simple. If designers are working on the project as well they almost always benefit from a little insight into PHP rather than having to learn some template language they can't use for anything else. IMHO - If you have to jump in and out of HTML and template syntax you might as well jump in and out of HTML and PHP. There is truth to this, but for me, its helping me learn in a much clearer way. I can't explain how or why, but it make me feel like everything is neat and tidy and where it should be. Where PHP and HTML mixed and mingled gives me the feeling that everything is a disaster. -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 9:39 PM, David McGlone da...@dmcentral.net wrote: On Mon, 2010-11-08 at 16:51 -0500, Steve Staples wrote: On Mon, 2010-11-08 at 14:41 -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? for the longest time, i didn't know about them, and was breaking in and out of php, as well as didn't use ANY classes... then i was starting to play with phpbb, and found out a little about templates... so i borrowed the template engine from them for a personal project... and was pretty impressed. then shortly after that, i got a job with a company who used smarty templates... and was VERY impressed with them :) ever since then, i've been using smarty, and have been very happy since. I dont know of any others out there, but that is mostly becuase i am content with what smarty does for me (and prolly becuase i am too lazy to change now ;) ) all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) I agree 100%!! Everyone here pretty much knows how much I've ranted about smarty :-) IMHO it's smart to use smarty! ;-) -- Blessings, David M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I have to agree with David here. Smarty may be an added layer to the whole mix, but it makes maintaining the template and application much simpler. Much better than mixing html/php all together in a single file. That and a single template is easily used in multiple applications if needed, ore in multiple files within the same application. IMHO the benefits far out way the negatives of using a template engine.
[PHP] After parsing
The parse worked great, got all the information I needed. Being so new to php, I am not sure how to get this information to display in an html table so that I can style it...any suggestions would be greatly appreciated. It displays in my browser but I have not been able to figure out how to get it into a table on a page. (This is not the whole script, just wanted to show the portion to try to give a picture...of what I was working with... SimpleXMLElement.) foreach ($guildxml-guildInfo-guild-members-children() as $char) { if ( $char['level'] 20 ) continue; $toonrace= return_race($char['raceId'], $char['genderId']); // Maps Race and Sex $toonclass= return_class($char['classId']); // Maps class name $toonrank = return_rank($char['rank']); //Maps guild rank name $cch = curl_init(); curl_setopt ($cch, CURLOPT_URL, $charurl . $char['url']); curl_setopt ($cch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($cch, CURLOPT_USERAGENT, $browser_user_agent); $charxml = curl_exec($cch); $detailxml = new SimpleXMLElement($charxml); echo 'bName:/b a href=' .$charurl . $char['url'] .' target=_blank' . $char['name'] . '/a ';//Includes an armory external link echo 'bClass:/b ' . $toonclass . ' '; echo 'bRace:/b' . $toonrace . ' '; echo 'bRank:/b ' . $toonrank .' '; echo 'bLevel:/b ' . $char['level'] . ' '; // Displays char level echo 'bProfessions: /b '; foreach ($detailxml-characterInfo-characterTab-professions-children() as $profession) { if ($profession['name']=NULL) continue; // Displays all of the professions and skill levels and maximums echo $profession['name'] . ' (' . $profession['value'] . '/' . $profession['max'] .') '; } echo 'bSpecs: /b '; foreach ($detailxml-characterInfo-characterTab-talentSpecs-children() as $spec) { // Displays all of the specs in use and their builds and names. It is easily possible to show which one is active as well. echo $spec['prim'] . '(' . $spec['treeOne'] . '/' . $spec['treeTwo'] . '/' . $spec['treeThree'] . ') '; } echo 'br'; } ggestions? The manual is a bit overwhelming, and I have searched for a solution, am really lost.
RE: [PHP] After parsing
-Original Message- From: stac...@comcast.net [mailto:stac...@comcast.net] Sent: Monday, November 08, 2010 7:41 PM To: php-general@lists.php.net Subject: [PHP] After parsing The parse worked great, got all the information I needed. Being so new to php, I am not sure how to get this information to display in an html table so that I can style it...any suggestions would be greatly appreciated. It displays in my browser but I have not been able to figure out how to get it into a table on a page. (This is not the whole script, just wanted to show the portion to try to give a picture...of what I was working with... SimpleXMLElement.) foreach ($guildxml-guildInfo-guild-members-children() as $char) { if ( $char['level'] 20 ) continue; $toonrace= return_race($char['raceId'], $char['genderId']); // Maps Race and Sex $toonclass= return_class($char['classId']); // Maps class name $toonrank = return_rank($char['rank']); //Maps guild rank name $cch = curl_init(); curl_setopt ($cch, CURLOPT_URL, $charurl . $char['url']); curl_setopt ($cch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($cch, CURLOPT_USERAGENT, $browser_user_agent); $charxml = curl_exec($cch); $detailxml = new SimpleXMLElement($charxml); echo 'bName:/b a href=' .$charurl . $char['url'] .' target=_blank' . $char['name'] . '/a ';//Includes an armory external link echo 'bClass:/b ' . $toonclass . ' '; echo 'bRace:/b' . $toonrace . ' '; echo 'bRank:/b ' . $toonrank .' '; echo 'bLevel:/b ' . $char['level'] . ' '; // Displays char level echo 'bProfessions: /b '; foreach ($detailxml-characterInfo-characterTab-professions- children() as $profession) { if ($profession['name']=NULL) continue; // Displays all of the professions and skill levels and maximums echo $profession['name'] . ' (' . $profession['value'] . '/' . $profession['max'] .') '; } echo 'bSpecs: /b '; foreach ($detailxml-characterInfo-characterTab-talentSpecs- children() as $spec) { // Displays all of the specs in use and their builds and names. It is easily possible to show which one is active as well. echo $spec['prim'] . '(' . $spec['treeOne'] . '/' . $spec['treeTwo'] . '/' . $spec['treeThree'] . ') '; } echo 'br'; } ggestions? The manual is a bit overwhelming, and I have searched for a solution, am really lost. Create a table with a header. In the header, put 'Name', 'Class', 'Race', 'Rank', 'Level', 'Professions' in each column. Then just loop through your data for each table row and put the data into the proper column accordingly. After the loop for the data, just close the table. echo 'tabletrthName/ththClass/ththRace/ththRank/ththLevel/ththProfessions/th/tr'; foreach () { // data init echo 'tr'; echo 'td'.$char['name'].'/td'; echo 'td'.$toonclass.'/td'; // etc... echo '/tr'; } echo '/table'; Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 10-11-09 12:20 AM, Paul M Foster wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? Fourth, you could achieve the same end result with carefully crafted PHP embedded in your static HTML file, with actually very little more work. I know, everyone's heard this before. But just because you *can* do something doesn't mean you *should*. Aaaah, the great argument that uses a single brush to paint all template engines into one corner because if you've used one, you've used them all... Seriously? Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On 9 November 2010 06:20, Paul M Foster pa...@quillandmouse.com wrote: On Mon, Nov 08, 2010 at 02:41:12PM -0700, Hansen, Mike wrote: I really like the idea of using a templating engine. Which one do you use? Why? For those that don't use templating engines, why don't you use them? Here's why I don't use a templating engine. First, You're taking an embedded language and writing a templating engine in it. Seriously? Second, you're painting a single page, maybe 10-15K worth of information, and you're dragging 100K of code around just to paint a single page. Seriously? Third, you're creating a page on the fly, thrashing the server's CPU in order to generate a page which could be built statically, or at least with minimally embedded PHP. Seriously? You assume that the OP will either make static pages (yet posts on the PHP mailing list) or makes pages that aren't very dynamic in any sense. Seriously? -- hype WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Basic question
Hello, I would like to know what is the difference between follows. PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) and PHP 5.1.6-pl6-gentoo (cgi-cgi) One is cli another is cgi-cgi . Sincerely, Tseveen.