Vasteras - Sweden, Belgrade, Nis - Serbia

September 3, 2010

Troxo - Software Development Company

Most popular websites running on PHP

January 8th, 2008
Tags:, ,

PHP is currently the most popular server-side web programming language. It runs 33,53% of the websites on the Internet. Its widespread use for web development can be attributed to the fact it boasts the largest open source community, simplicity and high performance.

Given that PHP is our personal pick, we put together a list of interesting sites that use the same technology. The article outlines some of Alexa’s most popular websites running on PHP and looks into their architecture.

The first on our list is Yahoo, the most trafficked website on the planet with more than 130 million unique users. In 2002 the company switched from C/C++ to PHP. More on how and why they picked it after reviewing all the web technologies is available here.

Wikipedia, the 8th most popular website on the web and the largest online encyclopedia in the world. It’s built on MediaWiki, a platform written in PHP which powers many other popular wikis on the web.

For the skinny on Wikipedia design and architecture, we attached this workbook by Domas Mituzas, who works with Wikipedia and MySQL AB.

Flickr, the web’s leading photo sharing site hosting over 2 billion images. Looking inside Flickr’s general architecture, we found some noteworthy stats.

~ 60,000 lines of PHP code
~ 60,000 lines of templates
~ 70 custom smarty functions/modifiers
~ 25,000 database transactions/second at peak
~ 1,000 pages per second at peak

More is available in the presentation Cal Henderson gave to the Vancouver PHP Association in 2005.

Friendster, one of the largest social networking sites. It was founded in 2003. A traffic rank of 14 on Alexa and over 50 million users. In 2007 it won the Webware 100 Award for best community site.

Digg, a user driven social content website with over 1.2 million users. They started in late 2004 with a single Linux server running Apache 1.3, PHP 4, and MySQL. 4.0. Today it’s 100 servers hosted in multiple data centers. Further reading available on High Scalability, a nice source of information on the architecture of highly scalable sites.

LiveBid Auctions, a part of amazon.com and the leading provider of live-event auctions on the Internet.

SourceForge.net, the world’s largest development and download repository of Open Source code and applications.

Neopets, a virtual pet website with huge traffic levels. It started in 1999 as a small project by two British college students.

IstockPhoto, a royalty-free stock photo provider and most likely the most popular online photo library with over 2.2 million images as of October 2007.

Far from being complete, this list comprises only some of the most popular websites on the web running on PHP. Hope it has been interesting.

 

A small thing we did for our client

September 18th, 2007
Tags:, , , ,

This is one of the posts from the how-we-do-it series.

A while ago we had a part of a project where our client NSN ASA wanted to have:

  • Custom reporting with an advanced mail merge function (to create invoices, order lists, etc.)
  • Easy-to-create report templates, so they can be created by non-programmers
  • Simple, simple, simple
  • PHP API

Our first thought of course was to find an appropriate component and use it for this project. However, we were amazed to realize there isn’t any out-of-box solution for easy report creation from PHP. There surely are a lot of ready solutions like CrystalReports, Birt, Jasper reports with iReport, but we felt none of them met the above requirements (especially simplicity).

So, here is our approach to solving this problem:

  • Report data should be sent via a standardized XML. There will be no more than hands full types of XML tags in the report data.
  • Report template will be created with MS Word (after all, anyone can use it, right?)
  • Template will have the simplest possible tagging system, implemented as MS WORD fields. (Example: <<tablestart>><<data1>><<data2>><<data3>><<tableend>>
  • There are no good Unix components for handling Word files – therefore we will implement this on windows platform and expose SOAP interface for accessing it from PHP.

Now that this is up and running here is the small illustration of our “baby” in action:

 

We would like to thank NSN ASA for giving us the green light to share this with you.

 

We are hiring!

August 31st, 2007
Tags:, , ,

We are staffing up for 2008 after a raft of new deals in 2007. It’s been one of those periods where there’s been a lot of work in progress and we’re looking forward to getting new team members on board skilled in PHP and .NET.

We’ve just welcomed two more PHP developers, yet we have no doubt there are even more exceptional individuals willing to join us.

We are particularly keen to hear from .NET developers as we’re always working on interesting, highly interactive applications. Feel free to send us your resume at job at troxo.com.

 

PHP Error Reporting on Production and Development Servers

June 21st, 2007
Tags:, , ,

In case you already run your PHP powered web site, you know how important tweaking of error reporting is for transition between dev and production server. Here’s how we do it at Troxo.

PHP’s error reporting is very useful in discovering the nature of errors in the code that you write. Having errors displayed in the browser while developing an app is a useful way to receive immediate feedback, and this can speed up the development process.

In application production, such behavior is unwanted, embarrassing and worst of all, considered to be a security risk. If an application in production displays errors, vital information about your application is revealed to the public.

PHP configuration settings could be done through making changes in php.ini configuration file. When using PHP as an Apache module, you can also change the configuration settings using directives in Apache configuration files (e.g. httpd.conf) and .htaccess files. To do this you will need "AllowOverride Options" or "AllowOverride All" privileges to do so.

Reference: http://www.php.net/manual/en/configuration.changes.php

If you do not have the privileges to edit php.ini or httpd.conf configuration files the easiest way to configure PHP error reporting is via .htaccess file.

.htaccess file contains one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

Error reporting on development server

Create .htaccess file and save it in web application root with following contents:

php_value error_reporting 2047
php_flag display_errors true
php_flag display_startup_errors true
php_flag log_errors true
php_value log_errors_max_len 100M
php_flag ignore_repeated_errors false
php_flag ignore_repeated_source false
php_flag report_memleaks true
php_flag track_errors true
php_flag html_errors false
php_value error_log /path/to/error/log

Make sure that /path/to/error/log file exists and is writable by web server user.
With such settings on development server all PHP errors will be displayed and logged at the file at the same time.

For setting value for directive error_reporting you may use these constant names in php.ini but not outside of PHP, like in httpd.conf or .htaccess, where you’d use the bitmask values instead.

Description of configuration directives:
error_reporting – Set the error reporting level. Setting this to E_ALL (2047) enables reporting all types of errors including E_NOTICE which will warn you about possible bugs in your code.

display_errors – Defines whether errors should be printed on output or hidden from user.

display_startup_errors – Even when display_errors is on, errors that occur during PHP’s startup sequence are not displayed. It’s strongly recommended to keep display_startup_errors off, except for debugging.

log_errors – Defines whether PHP errors should be logged to web server log or to PHP error log file which is defined by error_log directive.

log_errors_max_len – Set the maximum length of log_errors in bytes.

ignore_repeated_errors – Do not log repeated messages. Repeated errors must occur in the same file on the same line until ignore_repeated_source is set true.

ignore_repeated_source – Ignore source of message when ignoring repeated messages. When this setting is On you will not log errors with repeated messages from different files or sourcelines.

report_memleaks - If this parameter is set to Off, then memory leaks will not be shown (on stdout or in the log).

track_errors – If enabled, the last error message will always be present in the variable $php_errormsg

html_errors – Turn off HTML tags in error messages.

error_log – Defines name of the file where script errors should be logged. The file should be writable by the web server’s user.

Error reporting on production server via .htaccess file in application root

php_value error_reporting 2047
php_flag display_errors false
php_flag display_startup_errors false
php_flag log_errors true
php_value log_errors_max_len 100M
php_flag ignore_repeated_errors false
php_flag ignore_repeated_source false
php_flag report_memleaks true
php_flag track_errors true
php_flag html_errors false
php_value error_log /path/to/error/log

 

We need developers to join our team

June 11th, 2007
Tags:, , ,

We are quite busy. Things are hectic here at Troxo but exciting too.

We are on the lookout for developers to work with us full-time in central Serbia. You know your way around PHP and .NET and can’t wait to get a running start?

Get in touch with us and show us some recent work you’ve done. We look forward to getting you onboard.

If you’re willing to relocate, have a look at where our development office is:

Serbia, 18000 Nis, Dusanov bazar 106:

googlemapsnisserbia20060611.png