Author Archive

PHP 7 moves full speed ahead

Posted: November 7, 2014 in PHP
Tags: , , , ,

PHP 7 Move Full Speed

Next major version of server-side Web development language planned for release in the next year
PHP 7, a major update to the server-side scripting language due next year, will offer performance improvements and more capabilities, along with deprecation of some existing features.

The release will be anchored by performance enhancements derived from the phpng branch of the PHP tree. Officials from PHP tools vendor Zend Technologies discussed the progress of phpng and PHP 7 at the company’s ZendCon conference in Silicon Valley this week. “[The upgrade is] really focused on helping real-world applications perform significantly faster and plus, we’re going to have additional improvements in PHP,” said Zend CEO Andi Gutmans, who has been involved in the ongoing development of PHP.

Recent versions of PHP have been part of the 5.x release series, but there will be no PHP 6. “We’re going to skip [version] 6 because years ago, we had plans for a 6 but those plans were very different from what we’re doing now,” Gutmans said. Going right to version 7 avoids confusion.

The phpng improvements in version 7 have been focused on areas such as hash tables and memory allocation. A chart on the state of phpng as of this month, presented at the conference, had the technology producing a 35 percent speedup on synthetic tests; 20 to 70 percent performance improvements on real applications, including a 60 percent improvement on WordPress home pages, and better memory consumption for most useful server APIs. The technology supports most PHP extensions bundled into the PHP source distribution and provides speed comparable to the HHVM 3.3.0 open source virtual machine.

A PHP developer at the conference expressed optimism about phpng. “Obviously, speed is the most important thing to a Web app or any app in general,” said developer Pete Nystrom, vice president of engineering and co-founder at Classy.org, an online fundraising platform. While recognizing it would be a while before the technology was available in tools, Nystrom understands what’s at stake. “Obviously, going into the core and speeding up all these functions that are core to PHP is a massive undertaking and something that’s going to be great for all of us.”

Also on tap for PHP is elimination of some existing features. “We’re going to deprecate some old functionality that we think is not that interesting anymore,” Gutmans said. Ext/ereg and ext.mysql are on the deprecation list and have both been replaced by other extensions. Other deprecated features include # style comments in ini files and string category names in setlocale().

Create great Page posts to increase engagement and improve your chances of being shown in News Feed.

1. Use link posts to drive people to your website

Link posts now have a larger, clickable area that helps drive people to your website.
  • In your Page’s sharing tool, enter the offsite URL, then hit Enter
  • The title, description and image are taken from your URL, but you can still customise the text and image of the post
  • We have increased the size of the image for these types of posts, so ensure you select compelling imagery that will blend into the News Feed experience

2. Use engaging copy, images and videos

  • Rich media like photos and videos get more attention and help your message stand out in News Feed
  • Lifestyle images like the ones you see from your friends on Facebook are always engaging. Try sharing images of your products or photos of your customers enjoying your services
  • Try to keep your posts between 100 and 250 characters to get more engagement. Shorter, succinct posts are better received

3. Create a two-way conversation

  • Ask your audience to share their thoughts and feedback on your product and services. This is another way to listen to your customers and improve your business.
  • Posting content that shows you took their feedback into consideration can build customer loyalty and show you value their ideas
  • In Action: Modify Watches, a company that creates mix-and-match watches, asks customers for input on product designs and names, and builds ongoing watch designs from this real-time feedback

4. Share exclusive discounts and promotions

  • Offer special deals or perks to your customers to keep them interested and to drive online sales. Include call to actions with links to the most relevant page on your website.
  • In Action: BarkBox creates posts with promotional codes. They found that valuable offers like buy-1-get-1-free or discounts over 20% were more likely to be shared and it helped them spread the word about their business.
  • To improve engagement with your promotions, include clear calls to action, redemption details, and when the promotion ends to add a sense of urgency.

5. Provide access to exclusive information

  • Reward people who are connected to your Page and drive loyalty and online sales by providing them with exclusive information. Make them feel special by sharing exclusive product news, contests and events.
  • In action: PhotoBarn created a Mother’s Day 10-Day Giveaway of PhotoBarn products on their Page

6. Be timely

  • Your audience will be more likely to engage with posts when they’re related to subjects that are top of mind, like current events or the holidays
  • Timeliness is also important when replying to comments on your posts. The faster you reply, the more likely fans will engage with you in the future.
  • Tip: Post a daily sneak peek of upcoming product sales 2 weeks prior to Black Friday or Cyber Monday

7. Plan your conversational calendar

  • The easiest way to stay in regular contact with fans is by creating a conversational calendar with ideas about what to talk about each week or month
  • A content calendar will not only help you post regularly, but will ensure your content is well planned, interesting, and that you don’t miss major business events and news. Find a frequency that works for you and your audience.

8. Schedule your posts

  • To better manage your time, you can schedule your posts in advance and plan for upcoming holiday events and specials
  • To schedule your posts, simply click the clock icon on the lower left-hand corner of your Page’s sharing tool
  • Schedule your posts when most of your fans are online. You can find out when your fans are online by visiting your Page Insights and going to the posts tab
  • After you’ve scheduled a post, you can manage your scheduled posts by going to the top of your Page and choosing Edit Page and then selecting Use Activity Log

9. Target your posts

If your posts are meant for specific groups of people, you can target your post in your Page’s sharing tool by clicking on the target icon at the bottom left corner and selecting Add Targeting. You can target your post based upon gender, relationship status, educational status, interests, age, location, and language.

10. Review the performance of your posts

Check your Page Insights regularly to understand what’s working to keep your posts relevant and engaging. Page Insights will help you understand your audience and what types of content interests them.

Increase online sales Learn More

Get started today  Create Ad

Ladies and Gentlemen, we interrupt our normal programming about crazy entrepreneurs and even crazier VCs to bring you a little learning from the world of Engineering. Remember that? Recently Dropbox was in the news for revealing they’d hit 175 million users, and daring to say they could replace the hard drive. Big words. But what’s the engineering back-story of how they got there? How do successful startups scale, in technical terms, to hundreds of millions of users? It turns it one of the ways it became successful was by creating a very simple and flexible platform early on.

Today in Budapest, Rajiv Eranki, who was previously head of server engineering at Dropbox, gave a room full of engineers at the RAMP conference a rundown of how they did it. He joined Dropbox in 2008 and left in 2011, as he wanted to tackle, he says, “new, different challenges” – one of which is potentially opening a cocktail bar in New York. (RAMP is run by some big companies that have emerged from Hungary: Prezi, Ustream and LogMeIn).

After being lured away from a potential career in academia, Eranki joined when Dropbox had only 2,000 users. He worked at worked at scaling up the platform with just one other person working full time on the back end. In those days, Dropbox had just one database machine and one front-end server.

Eranki told the audience how that early team did a “a lot of things that weren’t efficient but did actually scale for thousands of users.”

So for instance, the first iteration of sharding on Dropbox was quite buggy. “Joins” across databases had to be separated, and there was a lot of ‘denormalisation’.

That said, they “would not have changed a thing” and this kind of scrappy, slightly haphazard way Dropbox started up actually created some benefits in engineering terms.

They could run queries on the user behaviour very easily without having to write any special code. They could do Joins across databases as they needed. And the structure allowed for a lot of bug fixing as they could do queries in MySQL easily. Users with large numbers of shared folders only had to make one query of the database. Another benefit was that having just one front end meant the team only had one log to look at.

All this meant they “gained tremendous flexibility and scalability,” said Eranki.

For starters, not separating the database out from the start meant they could do things that would normally require lots of work otherwise. Another great learning from the early days was this: They used Python for everything. And it worked.

It meant that after one million users the whole platform was still only running on hundreds of lines of code, instead of thousands. By using Python for it all “we could get to 40m users without having to write thousands of lines of C code.” Even the client app was written in Python.

Out of this came some learning such as, in terms of app specific metrics such as ease and ‘fooplroofness’. Plus, it emerged that “most graphs are useless”. Instead they built dashboards to analyze the performance; they always put lefts on values (like failed log-ins etc); and they kept some slack such as: extra queries were memcached, and delayed optimization of SQL queries.

Eventually, it turned out that “users” who used Dropbox there most – like almost constantly – were either using is illegitimately (like trying to use it as a CDN etc) or it was just bugs. It was the second biggest users of Dropbox – the core legitimate users – and the categories of behavior that they were exhibiting that ended up suggesting how Dropbox could evolve as a real business. It’s moments like that when a mere product can turn into a multi-million-user business.

Eranki also came up with some great startup lessons.

He said that every time their tried to anticipate things or “be clever in advance” they failed. In fact, it was much easier to just stay on top of the architecture as it grew and keep tabs on it.

To avoid ‘Murphy’s Law’ of things going wrong, they would do things like take web servers and hard reboot them just to see if they would restart themselves.

The team also found it was easier to keep log data rather than delete old code – usually there would be a need for it later on for whatever reason. “Delete nothing unless necessary,” said Eranki. A major conclusion of those early days: Be sceptical about adopting new technology.

rajiverankiEranki shared some things they also did wrong.

They did not keep a good track of downtime or degraded performance. And with hiring, they found they should have started sooner and things worked best when the hired people that were connected to the company in some way or knew the company. From this they learnt to hire more people that were in turn capable of attracting more potential hires.

In the end, Eranki said that his early Dropbox team found that “being clever about architecture in advance is hard” and “scaling for us was more about prioritizing projects… and building process.”

Asked if Dropbox could scale to a billion users from its current 175 million, he said yes it could. After all, that’s only five times bigger than what it is today.

Looks like Latitude wasn’t the only Google product that got shut down yesterday in the wake of a new version of Google Maps. Alfred, the local recommendations app that Google picked up through its acquisition in December 2011 of developers The Clever Sense, is getting shut down on July 19. 

The news was posted in a notification in the app itself (pictured here), which also notes that users have until July 12 — that is, this Friday — to get in touch through the app itself to request an archive of their data, in the form of places they have tagged.

This is a turn of events from Google’s original plan to leave Alfred open “for the foreseeable future,” as the company told us back at the time of the acquisition.

But it’s not really a surprise, either. Apart from the fact that Google has a track record for closing down apps after buying them — Wavii, Meebo, JaikuSlide, and Aardvark are but a few examples — the company has been gradually consolidating more features in fewer products. In this case, it’s been adding more recommendation features into both its Maps app as well as Google+.

Having said that, it’s unclear whether any of the Alfred technology has been used in those recommendation features.

The app, for those of you who don’t know it already, went beyond being a simple search engine for places near you. Instead, it provided personalized recommendations for restaurants, coffee shops, bars and nightclubs using a combination of artificial intelligence and machine-learning algorithms, the idea being that it would learn more about places to suggest to you based on places that you visit. Some even compared it to a kind of proto-Siri in its approach to being a kind of personal assistant. After launching in 2011, the app and developers behind it were compelling enough, apparently, to attract the attention of Groupon as a potential acquirer (indeed, it may have been partly Google’s motivation to pick it up simply to keep it out of Groupon’s hands at the time).

Clever Sense originally had ambitions to take the app to more countries and to add in more types of businesses beyond places to eat and drink. However, until today it remains U.S.-only and never expanded to further categories. The last update was over a year ago, in May 2012, so it has been left to run itself for a while now.

And Clever Sense people have also moved on. Originally, the team went en masse to Google’s local services division, Google Places, but today it looks like Babak Pahlavan, who had been the CEO of the developers, has taken the role of global head of products for Google Analytics, according to his LinkedIn profile.

We have reached out to Google and Pahlavan for more details and will update this post as we learn more.

(more…)

How to enable SSL connection in OpenCart

Posted: September 20, 2012 in Forums, PHP

You should make sure you have a SSL certificate installed for your domain. If you do not have a dedicated SSL installed, this configuration will cause issues with accessing your OpenCart dashboard and the login/checkout pages of your store. Most payment processors such as Authorize.net will require you to purchase a SSL. You may want to purchase and install one prior to fully setting up your shopping cart.

Please see our tutorials if you need more information on what a SSL is and how to purchase one. Please keep in mind OpenCart does not support the use of the shared SSL certificate.

To enable SSL in OpenCart, there are three areas to edit: The System Settings in the OpenCart Dashboard, the config.php file in the directory where you installed OpenCart, and the config.php file in your OpenCart Admin folder.

Enabling SSL in the OpenCart Dashboard
  1. Log into the OpenCart Dashboard
  2. Go to System > Settings
  3. Click on the Server tab
  4. Check the radio button to use SSL
Enabling SSL in the OpenCart directory config.php file
  1. Log into cPanel and go to File Manager
  2. Navigate to your OpenCart installation directory
  3. Open (Edit or Code Editor) the configuration file (config.php)
  4. Look for the lines below // HTTPS that looks similar to this: 

    define(‘HTTPS_SERVER’, ‘http://opencart.inmotiontesting.com/’);
    define(‘HTTPS_IMAGE’, ‘http://opencart.inmotiontesting.com/image/’);

  5. Edit the HTTPS settings to reflect your SSL URL path. For example:define(‘HTTPS_SERVER’, ‘https://opencart.inmotiontesting.com/’);
    define(‘HTTPS_IMAGE’, ‘https://opencart.inmotiontesting.com/image/’);
  6. Save changes and close the config.php file
Enabling SSL in the OpenCart Admin folder config.php file
  1. Go to the “Admin” folder
  2. Open (Edit or Code Editor) the configuration file (config.php)
  3. Look for the lines below // HTTPS that looks similar to this: 

    define(‘HTTPS_SERVER’, ‘http://opencart.inmotiontesting.com/’);
    define(‘HTTPS_IMAGE’, ‘http://opencart.inmotiontesting.com/image/’);

  4. Edit the HTTPS settings to reflect your SSL URL path. For example:define(‘HTTPS_SERVER’, ‘https://opencart.inmotiontesting.com/’);
    define(‘HTTPS_IMAGE’, ‘https://opencart.inmotiontesting.com/image/’);
  5. Save changes and close the config.php file