Posts filed under 'PHP'
PHP 5.3.1 Release Announcement
The PHP development team has announced the immediate release of PHP 5.3.1. This is a maintenance release in the 5.3 series, which includes a large number of bug fixes.
Security Enhancements and Fixes in PHP 5.3.1:
* Added “max_file_uploads” INI directive, which can be set to limit the number of file uploads per-request to 20 by default, to prevent possible DOS via temporary file exhaustion.
* Added missing sanity checks around exif processing.
* Fixed a safe_mode bypass in tempnam().
* Fixed a open_basedir bypass in posix_mkfifo().
* Fixed bug #50063 (safe_mode_include_dir fails).
* Fixed bug #44683 (popen crashes when an invalid mode is passed).
Key Bug Fixes in PHP 5.3.1 include:
* Fixed crash in com_print_typeinfo when an invalid typelib is given.
* Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery() when calling using Reflection.
* Fixed crash when instantiating PDORow and PDOStatement through Reflection.
* Fixed bug #49910 (no support for ././@LongLink for long filenames in phar tar support).
* Fixed bug #49908 (throwing exception in __autoload crashes when interface is not defined).
* Around 100 other bug fixes
Add comment December 9, 2009
Parse phpinfo()
Below is ths function to parse the phpinfo() function. You can use this function to get required information from phpinfo().
Hope this is useful for you.
<?
function getPHPINIPath($strToken){
ob_start();
phpinfo(INFO_GENERAL);
$phpinfo = array('phpinfo' => array());
if(preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr>(.*?)\s*(?:(.*?)\s*(?:(.*?)\s*)?)?</tr>)#s', ob_get_clean(), $matches, PREG_SET_ORDER))
foreach($matches as $match)
if(strlen($match[1]))
$phpinfo[$match[1]] = array();
elseif(isset($match[3]))
$phpinfo[end(array_keys($phpinfo))][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
else
$phpinfo[end(array_keys($phpinfo))][] = $match[2];
foreach($phpinfo as $name => $section) {
foreach($section as $key => $val) {
if(is_array($val)){
//echo "11 > $key = $val[0]<br>";
}
elseif(is_string($key)){
if($key == $strToken)
return "$val";
}
else{
//echo "33 > $val<br>";
}
}
echo "\n";
}
return "";
}
echo getPHPINIDetails("System");
?>
Output: Windows NT JIVA-WKS-054 5.1 build 2600
Add comment October 31, 2009
Which Shopping Cart Should I use?
Which Shopping Cart Should I use? This is a common question that we get when clients call. There are so many shopping carts out there it is hard to know which one to use for your web site.
It is important to know when selecting your shopping cart what features you need. All the shopping carts below feature the following:
* Customer management
* Product management
* Variety of payment and shipping modules
* Order receipt emails
* Ability to use SSL secure layers for ordering process
However the shopping carts vary when it comes to:
* Time it takes to modify the cart to look like a current web design
* WYSIWYG ability to modify product descriptions using different fonts, colors, etc.
* Ability to import/export from Excel spreadsheet
* Wholesale/Reseller Pricing
In this review we will be going over PHP/MySQL shopping carts that run both Linux and Windows servers. We will not be reviewing pay-per-month shopping carts. We feel these offer less value because they have expensive monthly fees. Also – they usually do not allow access to the source code of the system or much customization of the shopping cart. The following shopping carts below are open-source meaning that you can modify the source code and customize the shopping cart to your needs.
Magento
Website: http://www.magentocommerce.com
Magento is one of the newer shopping carts on the block but has already attracted a large following. The coding is based on the latest PHP 5 object oriented coding standards and the Zend framework.
Advantages
1. Varian the company who backs the cart is very active in updating the code and fixing bugs
2. Multi-Store Capable
3. Nice default template
Disadvantages
1. Heavily layered and overly complicated coding style and thousands of files requires a lot of time to learn and do customizations. Estimate about 2 – 5 x more for your budget for customizing it vs. other carts
2. Right now the technical documentation is very limited, making it difficult to customize and modify the programming of Magento beyond doing graphical changes.
3. Runs fairly slow. Plan on spending at least $25/month for a 1000 product store, or $50 – $100 month for stores with over that.
Oscommerce MS 2.2 – The Cart That Started Them All
website: http://www.oscommerce.com
Oscommerce is the basis for both Zen Cart and CRE Loaded. As such is it is simpler and does not have all of the contributions already added that Zen Cart and CRE Loaded do. It runs well though and is a good back to basics shopping cart.
Advantages
1. Has the most available number of contributions and modifications
2. Recent security update brings it up to date with MySQL 5 and PHP 5
Disadvantages -
1. It can take a lot of time and money to install all the contributions you want (add-ons)
2. No graphic template system meaning it is harder to modify the design
CRE Loaded Chain Reaction Edition of Oscommerce
website: http://www.creloaded.com
CRE Loaded is like Oscommerce but with many more contributions installed. Some of the nice contributions it has are Easy Populate which lets you populate your database from an Excel file, coupon codes, administrator access levels, template system, and an affiliate manager. CRE Loaded also has one of the Oscommerce templating systems installed which allows you to more easily integrate a design into the system and control which information boxes show on the left and right columns.
Advantages
1. Many contributions from Oscommerce already installed
Disadvantages -
1. Contributions from Oscommerce.com can be more difficult to install, but CRE Loaded has many of its own already converted
2. Buggy code for some modules like multi vendor shipping
Additional Information
CRE Loaded comes in 3 verisons. The regular version is free. The Pro version adds better product attribute support and credit card encryption, and the B2B version adds seperate pricing level support.
Zen Cart – The Art of E-commerce
website: http://www.zen-cart.com
Zen Cart has a very nice wide array of features based on Oscommerce but has gone its own path. You can not install contributions directly from the Oscommerce web site onto Zen Cart. Some of the nice features include product attributes managers, template system, html editor for regular web page contents, built in coupon code system, ability to select what credit cards you accept, and more. An issue with Zen Cart right now is the Easy Populate contribution which would let you import products from an Excel sheet does not work yet. So if you need this feature we recommend the other shopping carts.
Advantages
1. No licensing fees
2. Stable
3. Many contributions from Oscommerce already installed
Disadvantages -
1. not possible to use Oscommerce contributions, they must be converted to Zen Cart
2. Admin interface is a little messy in certain areas because there are so many contributions installed
X-Cart
website: http://www.x-cart.com
X-Cart is a commercial package, but one of the most competitively priced and easy to modify.
Advantages
1. Commercially supported and has very few if any bugs
2. Uses Smarty Templates system which many programmers like to work with for laying out the web site
Disadvantages
1. Licensing fees for system and some add-on modules
OSC Max
website: http://www.oscdox.com
OSC Max is an excellent version of Oscommerce that has many useful contributions installed. It is just as easy to use in the admin as the default Oscommerce installation.
Advantages
1. No licensing fees
2. The contributions installed are very useful
3. Has wholesale/Reseller pricing module already installed
4. Well-documented
Disadvantages
1. Personal preference – I don’t like the mopics image module, you have to separately upload small and large images, but easily fixed by installing on the fly thumbnails module
Joomla & Virtuemart
website: http://virtuemart.net
Installing and configuring Joomla & Virtuemart together was a snap. On the Virtuemart website they have a combined installer that installs Virtuemart with Joomla. This is the solution you would want if you have to have your CMS (Content Management System) combined with your shopping cart. Joomla we feel is the best CMS out there, but Virtuemart on the other hand is not the best shopping cart system. It is not a bad one though, it is just not as fully featured as the other solutions.
Overall we would say that Virtuemart is about equal with default Oscommerce, but not the loaded versions of Oscommerce: Zen Cart & CRE Loaded.
Advantages
1. Easy to install
2. Combines well with the best CMS Joomla
3. Has the basic shopping cart features
Disadvantages
1. Lacks a lot of high-end shopping cart features
2. Not as many add-on modules available
Shopping Cart Feature Comparison Chart
This feature comparison chart compares the out of the box features of each cart. Sometimes a cart will have an available add-on module to install the feature listed.
| Magento | Oscommerce | CRE Loaded | Zen Cart | X-Cart | OSCMax | VirtueMart | |
| Free | Yes | Yes | Yes, but has pay versions | Yes | No | Yes | Yes |
| Unlimited Products | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Supports SSL | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Edit Products | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Edit Customers | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Admin Can Edit Products In Order | Yes | No | Yes | Yes | Yes | Yes | No |
| Spreadsheet Database Upload | Yes | No | Yes | No | Yes | Yes | No |
| Product Attributes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Multiple Product Images | Yes | No | Yes | Yes | Yes | Yes | Yes |
| Coupons | Yes | No | Yes | Yes | Yes | Yes | No |
| Different Pricing Per Customer Groups | Yes | No | Costs Extra | Yes | Yes | Yes | Yes |
| Graphic Template System | Yes | No | Yes | Yes | Yes | Yes | Yes |
| Live Shipping Quotes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Google Checkout Pre-installed | Yes | No | No | No | Yes | Yes | No |
| Paypal | Yes | Yes, but not IPN | Yes | Yes | Yes | Yes | Yes |
| Paypal Pro | Yes | No | No | Yes | Yes | No | No |
| Content Management System for Informational Pages | Yes | No | Yes | Yes | Yes | Yes | Yes |
| SEO Tools for meta tags and URLs | Yes | No | Yes, URLs cost extra | Yes | Yes | Yes | No |
| One Page Checkout | Yes | No | No | No | No | No | No |
| Multi-Lingual Support | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Multi-Currency Support | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Multi-Store Support | Yes | No | No | No | Cost Extra | No | No |
| Web Hosting Requirements | Semi Dedicated $25/m – $100/m | Shared Hosting | Shared Hosting | Shared Hosting | Shared Hosting | Shared Hosting | Shared Hosting |
| Our Overall Opinion from 1 – 10 | 7 | 7 | 8 | 8 | 7.5 | 8.5 | 7 |
Final Thoughts
If you decide to go with an Oscommerce based shopping cart, we recommend that you start with one of the loaded versions – Zencart, CRE Loaded, or OSCmax – in order to save you lots of money on installing additional modules to the plain Oscommerce version. You can then use your development money to put in your own custom modifications, design, etc. rather than installing all of the basics.
1 comment September 1, 2009
PHP Debugger
PHP Debugger is a powerful php project development tool which integrated with PHP code editing and debugging. Without any other php server, you can edit and debug an PHP project with the help of PHP server integrated capable of debugging , after you create an PHP project simply.
Advantages of the Software
1. Integrated with PHP server: This software is Integrated with an PHP server which has capable of debugging. Without IIS ,you can run and debug the PHP project after creation .(In fact ,your operation system is completely independent of any PHP server.
2. Edit with code cue function: The edit interface of the software is a editor of source level ,it specially optimizes the PHP programs , which make it competent to list the member functions and their grammar cues of PHP object integrated.
3. Support breakpoints and step to debug: You can start up your PHP project with breakpoints , step and so on . When the server is executing on the breakpoint(or you’re stepping , there are many ways for you to watch the variable values of the current PHP code. We specially optimize the PHP object integrated , which enables it to show more detailed information on the interface.
4. Set Breakpoint: You can set the breakpoint at any line, The PHP code will be break when it run at these Breakpoint lines.
5. Step-In: Execute the following line of PHP code. If the next line of code is a function call, then begin execution at the beginning of the function.
6. Step-Out: Execute program execution until you reach the line of PHP code that called the currently executing function.
7. Step-Over: Execute the current line of PHP code.
8. Watch variables:You can add watches for specific variables or any valid PHP expression.
Key Techniques
1. PHP Debugging Server: The main function of this software is to debug PHP code . It’s well known for all PHP developers , a satisfactory development tool is still absent for the time being , which is different from VC++, VC# and VB. Take DreamWeaver for example ,for which the PHP code edit function is available, but it’s very inconvenient to debug the PHP program ; You can debug your ASP programs at any time.
2. PHP Source Code editor: There are many static page editors available , however ,an excellent PHP source code editor is scarce . Many developers compile PHP code with EditPlus,Ultraedit and other tools, but the PHP code grammar cue is not applicable for EditPlus , let alone grammar cue for object user-defined.
Add comment August 20, 2009
Drupal vs WordPress
Both Drupal and WordPress are content management systems that allow users the flexibility and ease of putting together a website quickly and successfully.
But which one is better? And which CMS would be better for a library to use?
Even though both Drupal and WordPress are popular, open source, and have large user communities, there are some differences between the two systems.
Drupal & WordPress
Drupal is extremely flexible, allowing you to do just about anything you want to with your website. It allows for easy creation of membership sites and portals. So for example you can create a forum, a blog, a community site, or just a plain website, whereas WordPress is more limited and geared more towards blogs.
Drupal however, has a higher learning curve and is more difficult to customize and use. WordPress on the other hand is very user friendly, easy to learn and quick to put together. Things like modifying the code, customizing the theme and setting up the site are much easier in WordPress.
So what it really comes down to is this:
Drupal is extremely flexible — but is more difficult to use.
WordPress is easier to use — but is not as flexible and lacks in functionality.
So … which CMS is better and which one should you use?
Both Drupal and WordPress have their strengths and weaknesses, and neither is really superior over the other. The decision of whether to use Drupal or WordPress really depends on what you want it to do and how you’re going to utilize the CMS.
Drupal allows for more flexibility, functionality and complexity therefore it’s better for full featured websites, a blog community, a forum, or a social networking community.
WordPress, although easy to use is less flexible and better suited for a single author and/or group blogs.
Both Drupal and WordPress can be utilized by libraries, and it really depends on what the library plans to do with the site. Before deciding on which CMS to use, the library should take into consideration the goals of the website and the functionality that is needed to accomplish those goals. Ease of use might come into play and should not be overlooked; if a website is difficult to put together and edit and then the extra functionality might not matter as much if it is not being utilized.
I also think it’s not a bad idea to test Drupal and WordPress, since they’re both free open source systems, to see which one will be better for a particular project.
1 comment July 21, 2009


