Showing entries 311 to 320 of 1121
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: PHP (reset)
Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On Scientific Linux 6.3

Installing Nginx With PHP5 (And PHP-FPM) And MySQL Support On Scientific Linux 6.3

Nginx (pronounced "engine x") is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a Scientific Linux 6.3 server with PHP5 support (through PHP-FPM) and MySQL support.

Installing Apache2 With PHP5 And MySQL Support On Scientific Linux 6.3 (LAMP)

Installing Apache2 With PHP5 And MySQL Support On Scientific Linux 6.3 (LAMP)

LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on a Scientific Linux 6.3 server with PHP5 support (mod_php) and MySQL support.

OpenVZ and Amazon S3: how to solve the dreaded connection throttle failure

Sometimes we encounter odd application responses that seem to make no sense. One of these such issues is related to running virtual server instances (OS Containers not Para-Virtualized VMs) and attempting to back up their data to Amazon’s S3 cloud storage. For moderately sized virtual machines running MySQL databases or Python/PHP based websites and code repositories this can be an inexpensive, quickly provisioned, and easy way to provide disaster recovery backups in numerous geographic locations, since we generally want DR content to be located in a physically distant location. Nevertheless, we can encounter errors if using an S3 mount in a distance location from our server if the timezone/sync data is incorrect.

The commonly seen error is as follows – and it doesn’t give much information for troubleshooting and resolution.

WARNING: Upload failed:  ([Errno 32] Broken pipe)
WARNING: Retrying on lower speed (throttle=0.00) …
[Read more]
Secrets of mysqlnd Presentation


Download PDF Presentation

At the recent New York PHP Group in New York, I gave a presentation on “Secrets of mysqlnd”. While there are no real “secrets” of the new MySQL Native Driver for PHP, available in PHP 5.3, and the default for PHP 5.4+ replacing libmysqlclient, there are new features of the driver many are unaware of. If you have ever had to fight the gods with compiling a particular version of PHP with the right libmysqlclient dependency, the good news is that legacy requirement is no longer necessary.

Some of the topics discussed in detail included support for read/write splitting and load balancing with existing applications, …

[Read more]
PECL/mysqlnd_ms 1.5 + PHP 5.5.0 + MySQL 5.6 = better load balancing

PECL/mysqlnd_ms is a client-side load balancer for PHP that supports any MySQL cluster. It does read-write splitting, failover, introduces a quality of service concept, supports partitioning and, of course, load balancing. New mysqli API (begin, *savepoint) calls in PHP 5.5.0 help to improve transaction awareness. New read only in MySQL 5.6 promise major performance gains (think 2x) and an option to reduce the load on a MySQL Replication master. Read how the features go together in PECL/mysqlnd_ms 1.5.

Load balancing – transaction aware?

A load balancer must not switch connections in the middle of a transaction. A load balancer must send all queries to the server a transaction has been started on until the transaction ends. Unfortunately, it is very hard to develop a transparent load balancer for MySQL. In general there are …

[Read more]
[updated] Free book February returns – Get a copy of the InnoDB Quick Reference Guide

This month is a special month. It’s not because of President’s Day or even the exciting day where we revel in groundhogs. No, this month is special because the free book give-away is happening again. This is where you, the reader, gets to win something free for doing nothing more than posting a comment saying that you want a copy of my recently published book – The InnoDB Quick Reference Guide from Packt Publishing. The book is a great reference for DBAs, PHP, Python, or Perl programmers that integrate with MySQL and want to learn more about the InnoDB database engine.

So, all you have to do is post a comment here saying that you want a copy and write out a single (or more) sentence about how you use InnoDB in your development or production environment. At the end of the month two readers will be chosen via a random list sorting script that …

[Read more]
Installing Lighttpd With PHP5 (PHP-FPM) And MySQL Support On Fedora 18

Installing Lighttpd With PHP5 (PHP-FPM) And MySQL Support On Fedora 18

Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on a Fedora 18 server with PHP5 support (through PHP-FPM) and MySQL support. PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites. I use PHP-FPM in this tutorial instead of Lighttpd's spawn-fcgi.

The InnoDB Quick Reference Guide is now available

I’m pleased to announce that my first book, the InnoDB Quick Reference Guide, is now available from Packt Publishing and you can download it by clicking here. It covers the most common topics of InnoDB usage in the enterprise, including: general overview of its use and benefits, detailed explanation of seventeen static variables and seven dynamic variables, load testing methodology, maintenance and monitoring, as well as troubleshooting and useful analytics for the engine. The current version of MySQL ships with InnoDB as the default table engine, so whether you program your MySQL enabled applications with PHP, Python, Perl or otherwise, you’ll likely benefit from this concise but comprehensive reference guide for InnoDB databases.

Here are the chapter overviews …

[Read more]
Learn to Develop Dynamic Web Applications with PHP and MySQL

Learn to create best-of-breed web applications with the MySQL and PHP - Developing Dynamic Web Applications course

After taking this course you will be able to:

  • Describe the LAMP architecture
  • Use the basic components of PHP to build a foundation for more complex web applications
  • Understand the basic components of MySQL
  • Use SQL query commands to retrieve data from the MYSQL database
  • Change table data using the SQL Data Manipulation Language (DML) commands
  • Retrieve data from multiple MySQL tables using Joins
  • Create web based forms that interact with the end user and the data within MySQL
  • Use session handling to authenticate and monitor user identities
  • Describe the purpose of template systems
[Read more]
Poor programming practices

When will it stop. These amateur programmers that simply cut/paste code really affect those good programmers in the ecosystem trying to make a decent living. I was reviewing a developed (but incomplete) PHP/MySQL system using a common framework (which in itself is irrelevant for this post).

In one source file there were 12 repetitions of the following code:

   //permissions
    $this->security_model->setUserPermissions($id);
    if (!array_key_exists($id,$this->session->userdata['permissions']) OR
        !array_key_exists('id', $this->session->userdata['permissions'][$id]) OR
        !array_key_exists('scope', $this->session->userdata['permissions'][$id]['name'])){
      $this->session->set_flashdata('alert', 'You are not authorized to go there.');
      redirect($this->agent->referrer());
    }

It’s bad enough when code is repeated and not put in a simple re factored function. When it’s …

[Read more]
Showing entries 311 to 320 of 1121
« 10 Newer Entries | 10 Older Entries »