[PHP] OOP to run sequential SQL queries?

2013-02-17 Thread AmirBehzad Eslami
Dear list, We have a bunch of SQL-queries, they should be executed in a sequential order, with a defensive programming style in mind. We were thinking to implement the solution as Stored Procedures instead of a PHP solution that runs SQL queries, but an article in Coding Horro recommendeds to

[PHP] Apache to serve RESTful requests using PHP

2013-02-09 Thread AmirBehzad Eslami
Dear list, We're a developing a PHP-driven web service with a RESTful API, and we have a dedicated Linux server for that with 6GB of RAM. Since this service will be used by many clients in a concurrent manner, we'll face with a high-load on our web-server. But web-services are different from

Re: [PHP] Apache to serve RESTful requests using PHP

2013-02-09 Thread AmirBehzad Eslami
. On Sun, Feb 10, 2013 at 1:00 AM, Bastien phps...@gmail.com wrote: Bastien Koert On 2013-02-09, at 11:42 AM, AmirBehzad Eslami behzad.esl...@gmail.com wrote: Dear list, We're a developing a PHP-driven web service with a RESTful API, and we have a dedicated Linux server

Re: [PHP] Apache to serve RESTful requests using PHP

2013-02-09 Thread AmirBehzad Eslami
Stuart, thanks for your detailed response. I find it unlikely that Apache is your bottleneck, especially with a service involving MySQL. How have you come to this conclusion? Apache is the entry-point to our service, and I did a benchmark with AB to see how it can handle concurrent requests

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-25 Thread AmirBehzad Eslami
Wow. David. That was a great help with every detail ! Thanks for sharing that with us. One side question: Without OOP, how do you handle Unit Tests? Do you know a Testing framework for procedural code?

[PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
Hi, i'm going to join a mid-size company with a few PHP-driven projects written in procedural PHP, million years old. At the moment, they don't have a wiki or any documentation about their projects. For me, the first challenge in probation period is to understand how their code works. *

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
Thanks Samuel. Actually I'm not going to add features or fix bugs, they're trying a refactoring process, to improve the design of code. So, I really need to understand the current design at the outset. On Mon, Sep 24, 2012 at 5:41 PM, Samuel Lopes Grigolato samuel.grigol...@gmail.com wrote: I

Re: [PHP] Re: Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
Jim wrote: If you really are joining a team, I would expect that the teammates would be guiding you through their systems. True, but based on my experience, most programmers are not good when it comes to explain stuff. So, I should rely on my own.

Re: [PHP] Re: Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
prior to ask questions, right? With that basic understanding, we can ask good questions, and will gain benefit from the answers. On Mon, Sep 24, 2012 at 5:52 PM, Mihamina Rakotomandimby miham...@rktmb.org wrote: On 09/24/2012 05:19 PM, AmirBehzad Eslami wrote: True, but based on my experience

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
+Like. The idea of mapping the db-structure and logic behind each page is interesting. Thanks for sharing. On Mon, Sep 24, 2012 at 6:06 PM, admin ad...@buskirkgraphics.com wrote: I would start by mapping their databases structure. Now for each page I would map out any functions,

Re: [PHP] Re: Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
Never worked with Emacs or genben. I'm a fan of vim ;) But thanks a ton, based on your suggestion, I just found vim-dbgp On Mon, Sep 24, 2012 at 6:27 PM, Mihamina Rakotomandimby miham...@rktmb.org wrote: #5 install xdebug + geben + emacs and have a look at the call stacks and bottlenecks.

Re: [PHP] Joining a team, where no wiki or docs are available

2012-09-24 Thread AmirBehzad Eslami
Shiplu, For debugging, what else do you use beyond xdebug and var_dump() ? On Mon, Sep 24, 2012 at 6:07 PM, shiplu shiplu@gmail.com wrote: If there is no wiki there could be inline comment. If not inline comments and those are written by your peers, dont join that team. Even there are

[PHP] Log Rotation, leave it to OS or do it in PHP code?

2011-02-26 Thread AmirBehzad Eslami
Dear list, It seems that Python has already a Log Rotation mechanism, which solves the problem of log file growth. I'm wondering whether there is any PHP-based solution around? Now let me ask from a different view: Is it a good approach to implement the Rotation mechanism to PHP? (Code Level)

Re: [PHP] Counting Online users, but not using a Session Table in MySQL

2011-01-28 Thread AmirBehzad Eslami
Jim, I'm already using the solution you mentioned. The problem is about the performance. One solution is to increase the performance by using Memcached. But counting online users always requires a __new__fresh__ COUNT(*) query, even under Memcahched. Since the COUNT(*) result is very dynamic and

[PHP] Centralizled Authentication

2010-12-02 Thread AmirBehzad Eslami
Dear list, We have dozen of applications, mostly written in PHP and Python. They're distributed on different servers, but i'm trying to integrate them somehow. Each application has its own users. Is there a way to store all username/passwords into a single datasource and give each user, her

Re: [PHP] Centralizled Authentication

2010-12-02 Thread AmirBehzad Eslami
Suppose you're running phpBB with another php-driven application. phpBB has a user table where the username/password/email/.. of each user is stored at mysql. Once a user logs-in to the website, the Last Login timestamp updates on the users table at mysql. How do I use LDAP in this type of

[PHP] PHP-driven alternative to Crystal Report

2010-11-26 Thread AmirBehzad Eslami
Dear List, I'm looking for an open-source database reporting tool, which is written in PHP. Do you know of any php-driven alternative to Crystal Report? What do you recommend? Please let me know. Thank you very much. -behzad

[PHP] Implementation of non-linear business processes in PHP

2010-01-17 Thread AmirBehzad Eslami
Dear List, Helllo!!! I'm trying to write a web application for my own ISP, to simplify the processing of orders for Internet Accounts, creating reports of their users, and keeping track of their sales. A brief history: This ISP provides ADSL connections over ordinary telephone lines for home

[PHP] PHP-based Workflow Editor

2010-01-17 Thread AmirBehzad Eslami
Dear list, Java has a lot of tools to implement Workflows, but I'm trying to find a way to achieve the same results in PHP. It seems that ezComponents has a Workflow mechanism, but it lacks the editor. Is there any PHP-based Workflow Editor? Do you have any recommendation? Thank you in advance,

[PHP] A PHP-driven script to determine if the environment is configured correctly (checklist)

2009-12-16 Thread AmirBehzad Eslami
Dear list, e-Greetings, I've developed some PHP-driven web applications. These applications will be installed on different linux-based servers (typically Debian and Redhat). Usually, after I copy the files to the server, they DO NOT WORK, so I spend hours to debug the problem. Problems are very

Re: [PHP] Server-side encryption to prevent form hacking: new idea?

2009-12-12 Thread AmirBehzad Eslami
Suppose you have the following array: * ?php $cities = array(Tehran, Isfahan, Tabriz); ?* which is used to generate the following Select: *select name=city option value=TehranTehran/option option value=IsfahanIsfahan/option option value=TabrizTabriz/option /select* You can check

[PHP] FCKEditor, TinyMCE, ... I need a light weight WYSIWYG HTML Editor

2008-08-17 Thread AmirBehzad Eslami
Dear list, I'm looking for a light weight WYSIWYG HTML Editor to allow users to send private messages to each other in a forum application. FCKEditor is too complex and very huge for my purposes. I want a simple editor. What do you recommend? Thanks in advance -- Kind regards, -behzad -- PHP

Re: [PHP] Doctrine vs. Propel

2008-02-06 Thread AmirBehzad Eslami
Thank you all for your kind replies.

[PHP] Doctrine vs. Propel

2008-02-04 Thread AmirBehzad Eslami
Dear List, I've just heard of ORM (Object Relational Mapping) frameworks written for PHP. It seems that there are two major frameworks here: Doctrine and Propel: http://www.phpdoctrine.org/ http://propel.phpdb.org/trac/ I wonder which one is better? What is the difference between these? I'm

[PHP] is_prefix() - checking wheather $A is prefix for $B

2007-12-29 Thread AmirBehzad Eslami
I want to write a function to check whether string $A is a prefix for string $B or not. I writing this function in order to prevent directory traversal during a download request. (e.g., download.php?file=..\index.php) I want to make sure that the realpath() of the requested file is within the

Re: [PHP] is_prefix() - checking wheather $A is prefix for $B

2007-12-29 Thread AmirBehzad Eslami
In case you haven't realized it, I have already written two functions to check for a prefix !! The question is: Which function is better? (is_prefix1() or is_prefix2()) On 12/29/07, Zoltán Németh [EMAIL PROTECTED] wrote: 2007. 12. 29, szombat keltezéssel 13.39-kor AmirBehzad Eslami ezt írta

[PHP] Generating Random Numbers with Normal Distribution

2007-12-10 Thread AmirBehzad Eslami
Dear list, For some computer-based simulation, i need to generate random numbers that have a normal distribution. It seems that PHP's rand() and mt_rand() functions return uniformly distributed numbers which is not suitable for simulation purposes. Is there any way to generate random numbers

[PHP] The PHP License

2007-11-28 Thread AmirBehzad Eslami
Hi list, Below statement is borrowed from PHP License here[1]: The name PHP must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [EMAIL PROTECTED] Does this mean that saying this

Re: [PHP] The PHP License [SOLVED]

2007-11-28 Thread AmirBehzad Eslami
Thanks Jochem and Daneil. I got it.

Re: [PHP] Should I put pictures into a database?

2007-11-28 Thread AmirBehzad Eslami
On Wednesday 21 November 2007 03:14:43 Ronald Wiplinger wrote: I have an application, where I use pictures. The size of the picture is about 90kB and to speed up the preview, I made a thumbnail of each picture which is about 2.5 to 5kB. I use now a directory structure of ../$a/$b/$c/pictures

[PHP] Concatenation vs. Interpolation

2007-08-11 Thread AmirBehzad Eslami
Hi, FASTER CODE! This question involves Coding Style, Readability, Write-ability and Performance. Some people use the . operator to concat an string to a variable, some people use interpolation (embeding variable into string). = 1st Method (Concatenation) $str = 'My name is

Re: [PHP] Concatenation vs. Interpolation

2007-08-11 Thread AmirBehzad Eslami
think that it is better to use Concatenation instead of Interpolation. Since it provides Performance, both on Speed and Memory Usage. There is a benchmark available here: http://us2.php.net/manual/en/function.print.php#66392 On 8/11/07, Tijnema [EMAIL PROTECTED] wrote: On 8/11/07, AmirBehzad

Re: [PHP] Symfony versus CakePHP?

2007-07-21 Thread AmirBehzad Eslami
What is difference between Zend Framwork and other frameworks like CakePHP? I'm trying to develop a sample blog for educational purposes in Zend Framwork, but some times I feel that I'm learning a new language or a new programming paradigm. On 7/21/07, Larry Garfield [EMAIL PROTECTED] wrote:

Re: [PHP] Pirate PHP books online?

2007-07-21 Thread AmirBehzad Eslami
I'm living in a country where people do not afford to buy real books. Most people earn $250~$400 per month. $50 for a book is too damn expensive. In addition, since US has restricted business with us, no body ships books to us. And we don't have Credit Card, since Master Card, Visa, Paypal do not

[PHP] Migration from MySQL to MS-SQL Server

2005-12-09 Thread AmirBehzad Eslami
Hi List, I want to re-implement a PHP-driven package named ATutor (http://atutor.ca) to work with MS-SQL Server. Currently, it works with MySQL. Unfortunately, authors of ATutor have not defined a class for database connectivity. In other words, they call each mysql functions directly in their

Re: [PHP] Lowest PHP version to work with MySQL 4.1.x

2005-12-01 Thread AmirBehzad Eslami
Brent and Oliver, Thank you for your assistance. I found some notable solutions from MySQL Forums: http://forums.mysql.com/read.php?11,6400,6400#msg-6400 Regards, Behzad

[PHP] Lowest PHP version to work with MySQL 4.1.x

2005-11-30 Thread AmirBehzad Eslami
Hi List, I have noted that some versions of PHP are unable to work with MySQL 4.1.x. 1) Should I upgrade to PHP 5? 2) What is the lowest PHP version which works fine with MySQL 4.1.x? Regards, Behzad P.S. I don't use Improved MySQL extension in PHP. I just need MySQL 4.1.x for multi-byte

[PHP] phpInfo() executed on Yahoo!

2005-06-20 Thread AmirBehzad Eslami
Yes! phpInfo() on Yahoo! URL: http://advr1.advertising.scd.yahoo.com/ 1) First I was at: http://promo.yahoo.com/user_research/ 2) I moved to the upper directory: http://promo.yahoo.com/ 3) Do you Yahoo!, the new page said. So I did View Source. 4) http://advr1.advertising.scd.yahoo.com/ Cheers,

[PHP] phpInfo() executed on Yahoo!

2005-06-20 Thread AmirBehzad Eslami
Yes! phpInfo() on Yahoo! URL: http://advr1.advertising.scd.yahoo.com/ 1) First I was at: http://promo.yahoo.com/user_research/ 2) Then I moved to an upper directory: http://promo.yahoo.com/ 3) Do you Yahoo!, the new page said. So I did View Source. 4) http://advr1.advertising.scd.yahoo.com/

[PHP] phpinfo(); executed on Yahoo!

2005-06-20 Thread AmirBehzad Eslami
Yes! phpInfo() on Yahoo! URL: http://advr1.advertising.scd.yahoo.com/ 1) First I was at: http://promo.yahoo.com/user_research/ 2) Then I moved to an upper directory: http://promo.yahoo.com/ 3) Do you Yahoo!, the new page said. So I did View Source. 4) http://advr1.advertising.scd.yahoo.com/

Re: [PHP] phpInfo() executed on Yahoo!

2005-06-20 Thread AmirBehzad Eslami
On Monday, June 20, 2005, Jason Barnett wrote: JB [..] but it would have been cool to see what things they've done to handle the number of page requests they have. Take a look at the attached file. HTH, Behzad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: