Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Previous 30 Newer Entries Showing entries 121 to 150 of 816 Next 30 Older Entries

Displaying posts with tag: PHP (reset)

Rewriting the Creating a CRUD Application with PHP tutorial cycle: help wanted!
Employee +0 Vote Up -0Vote Down

I've been reworking the Creating a CRUD Application with PHP tutorials. The new version should be ready for 7.0 Beta 2 release. In the new version:

  • I replaced mysql functions with mysqli functions.
  • With the help of Christoper Jones, I've added OCI8 versions of the code for connecting to Oracle Database
  • I've fixed some old bugs and improved the tutorials overall.

In the course of this work, two things have come to my attention. These are two things that you can help with.

  • The title Creating a CRUD Application... is not very appealing.
  • The sample CSS used for Lesson 8 is terrible.

So first, can anyone suggest a new title? We have one


  [Read more...]
Rewriting the Creating a CRUD Application with PHP tutorial cycle: help wanted!
Employee +0 Vote Up -0Vote Down

I've been reworking the Creating a CRUD Application with PHP tutorials. The new version should be ready for 7.0 Beta 2 release. In the new version:

  • I replaced mysql functions with mysqli functions.
  • With the help of Christoper Jones, I've added OCI8 versions of the code for connecting to Oracle Database
  • I've fixed some old bugs and improved the tutorials overall.

In the course of this work, two things have come to my attention. These are two things that you can help with.

  • The title Creating a CRUD Application... is not very appealing.
  • The sample CSS used for Lesson 8 is terrible.

So first, can anyone suggest a new title? We have one


  [Read more...]
Speaking at the MySQL conference 2011
+6 Vote Up -0Vote Down
I just received a confirmation that my presentation proposal for the MySQL user conference 2011 was accepted! The title for my proposal is MQL-to-SQL: a JSON-based Query Language for RDBMS Access from AJAX Applications, and it covers pretty much everything implied by the title.

As always, the Hyatt Regency Hotel in Santa Clara, California serves as the venue. The conference will be held from April 11-14. Except for the venue and period, I think this year's conference will bear few similarities to previous editions. Let me try and explain.

This year's theme is "MySQL, the ecosystem and



  [Read more...]
MySQL 5.5 GA launchd issues with Snow Leopard
+2 Vote Up -0Vote Down

I did a clean install on my Macbook Pro this morning, part of the clean install means, re-downloading things like MySQL.

When I installed it, I noticed that the pref-pane wouldn’t start MySQL. Even when it asked for my admin password. I thought maybe it was a boot up issue, so I rebooted, and got an error telling me that the permissions for the start up item were in secure.

Here’s what I did to debug/fix the problem.

  • Change permission of /Library/StartupItems/MySQLCOM/MySQLCOM
  • edit /usr/local/mysql/support-files/mysql.server and edited line 46 and 47 to say
chown -R root:wheel /Library/StartupItems/MySQLCOM
x

[content_box style="yellow-box" title="Edit mysql.server file"]
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
[/content_box]

[break]
There is already a bug filed for this..

PHP 5.3.4 and MySQL 5.5.8 GA (libmysql)
+0 Vote Up -0Vote Down

As you are probably aware, PHP 5.3.4 does not compile with MySQL 5.5 GA (http://www.mysql.com/why-mysql/white-papers/mysql-wp-whatsnew-mysql-55.php). The details can be seen in MySQL bug queue. Basically, the problem boils down to incorrect installation of MySQL headers. MySQL 5.5 build system does not install the headers under the include-prefix/mysql directly but instead installs under the include-prefix directory itself. So, when the PHP build system looks for the MySQL (http://mysql.com/) headers, it cannot find <mysql/psi/mysql_thread.h> and so forth.

What is the fix?

The MySQL dev team

  [Read more...]
PHP 5.3.4 and MySQL 5.5.8 GA (libmysql)
+0 Vote Up -0Vote Down

This content has been updated and moved to a new place.

As you are probably aware, PHP 5.3.4 does not compile with MySQL 5.5 GA (http://www.mysql.com/why-mysql/white-papers/mysql-wp-whatsnew-mysql-55.php). The details can be seen in MySQL bug queue. Basically, the problem boils down to incorrect installation of MySQL headers. MySQL 5.5 build system does not install the headers under the include-prefix/mysql directly but instead installs under the include-prefix directory itself. So, when the PHP build system looks for the MySQL (http://mysql.com/) headers, it cannot find <mysql/psi/mysql_thread.h> and so forth.

What is the fix?

  [Read more...]
PHP driver for HandlerSocket (NoSQL for MySQL) spotted
+2 Vote Up -1Vote Down

Just a short note again on HandlerSocket developments: PHP bindings to the HandlerSocket client library have been spotted in the wild: http://code.google.com/p/php-handlersocket/ (I'd like to credit someone, but I have no idea who user "avuenta" is on Google Code. Is it you Dathan?)

I found this on Dathan Vance Pattishall's blog. I haven't personally had time to try it out yet as I'm still deep into my current project (of which I hope to blog in January).

"...php-handlersocket which is a PECL type version (C driver with exposure to PHP). It does the job but needs some work that I'm doing now."

read more

MySQL 5.5.8 GA and PHP 5.3.4 don’t get along with libmysql
+0 Vote Up -0Vote Down

Today I discovered that you are unable to compile the current stable PHP version 5.3.4 with yesterday’s MySQL 5.5.8 GA release. I was able to download the current MySQL 5.1.54 and compile without issue.

You can find all the gory details in Bug #58987 however I was able to edit a number of MySQL include file to get a build. Does this mean it’s a MySQL packaging problem or a PHP problem I don’t know, but I would hope that Oracle in the testing phase of a GA release test this against popular programming languages starting with the LAMP stack to ensure compatibility such as what I uncovered.

How to test your WordPress Cache
+0 Vote Up -0Vote Down

How I lost 30 pounds in 2010 – a weight loss guide for developers

Posted on December 30th, 2010 in blog, personal, zippykid.

2010 was a great year for me, I started a new company, and it’s been profitable since month 2, I closed my consulting company, and most importantly, I lost 30 pounds, and am more mobile/agile than I was in college. I’m 32 and I feel better than I did when I was 24. I’ve talked [...]

View  [Read more...]
How to make WordPress faster without the use of a plugin
+0 Vote Up -0Vote Down

When it comes to web page load time, she should always say “wow, that was fast”.

A Quick update based on Frederick’s comment below

** Please do not take these tips as THE answer, this is a complement, not a replacement. I have purposely not given specifics on how to configure anything, or what value to set, because I don’t want people copy pasting things, and then having their site crashing. Regarding mod_pagespeed, I said it’s the most bang for OUR buck.. it’s not recommended in production, nor do we have it on for everyone else. **.

Webpage load time is getting more and more important these days, if you go into

  [Read more...]
Installing Lighttpd With PHP5 And MySQL Support On Ubuntu 10.10
+0 Vote Up -1Vote Down

Installing Lighttpd With PHP5 And MySQL Support On Ubuntu 10.10

Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on an Ubuntu 10.10 server with PHP5 support (through FastCGI) and MySQL support.

Transparent query layer for MySQL
+2 Vote Up -0Vote Down

The biggest challenges of today's web development are performance, scalabilty, rapid development and maintainability of the source code. Usually one quickly sets on abstraction models such as MVC, which poor covers the above mentioned requirements for today's development. Since my main concern is scalable and secure code, I've developed my own model, which solves the needs better. Below I will explain the model and take reference to my SQL class that implements this model.

Read the rest »

mysqlnd plugins for PHP in practice
Employee +1 Vote Up -0Vote Down

If you follow my blog or twitter stream you might know I've recently been at Barcelona to attend the PHP Barcelona conference. Conferences are great for exchanging ideas one of the ideas I discussed with Combell's Thijs Feryn: They are a hosting company providing managed MySQL instances to their customers, as such they run multiple MySQL servers and each server serves a few of their customers. Now they have to provide every customer with database credentials, including a host name to connect to. The issue there is that a fixed hostname takes flexibility out of the setup. Say you have db1.example.com and db2.example.com over time you figure out that there are two high load customers

  [Read more...]
Slides from IPC and PHP Barcelona
Employee +2 Vote Up -0Vote Down
Recently I gave a few public presentations and started to convert the slides for making them available online. Here's the first bunch with slides from two conferences which were held in October, the International PHP Conference in Germany and PHP Barcelona in Spain. As always: The spoken word is missing on the slides ...

Continue reading "Slides from IPC and PHP Barcelona"
Installing Apache2 With PHP5 And MySQL Support On Ubuntu 10.10 (LAMP)
+0 Vote Up -0Vote Down

Installing Apache2 With PHP5 And MySQL Support On Ubuntu 10.10 (LAMP)

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

CB1 Ubuntu 10.10 Linux Development Setup
+0 Vote Up -0Vote Down

I use a MacBook Pro for my day-to-day operations here at CB1, INC. I’m a huge believer that a development environment should mimic the production environment, so I find myself running a couple virtual machines in VMware Fusion.

The following guide is a reference for myself as well as possibly a helpful resource for setting up your own Linux development environment. Here’s an checklist of the tasks to perform and software to install:

  • Operating System
    • Ubuntu 10.10 64-bit: I use Ubuntu Desktop in dev and Ubuntu Server in production
    • Package updates and upgrades
    • Network configuration (at least 2 static IP addresses)
  • Development Tools
    • C/C++ development environment
    • Autotools
    • Sun Java JDK
  [Read more...]
Paginación de resultados con Php y MySql
+0 Vote Up -0Vote Down

Ejemplo práctico de paginación de resultados en Php

<?php
mysql_connect("localhost", "root", "");
mysql_select_db("dev");
$noRegistros = 3; //Registros por página
$pagina = 1; //Por default, página = 1
if($_GET["pagina"]) //Si hay página por ?pagina=valor, lo asigna
    $pagina = $_GET["pagina"];
echo "Pagina: ".$pagina."<hr>";

//Utilizo el comando LIMIT para seleccionar registros
$sSQL = "SELECT * FROM alumnos LIMIT ".($pagina-1)*$noRegistros.",$noRegistros";
$result = mysql_query($sSQL) or die(mysql_error());
while($row = mysql_fetch_array($result)) { //Exploracion comun de registros
    echo $row["nombre"]."<br>";
}

//Imprimiendo páginas
$sSQL = "SELECT count(*) FROM alumnos"; //Cuento el
  [Read more...]
Database speed tests (mysql and postgresql) - part 3 - code
+0 Vote Up -0Vote Down
Here is the code structure dbfuncs.php : is the file which contains classes and functions for firing queries on mysql and pgsql mysqlinsert.php : creates and fires inserts on mysql mysqlselect.php : creates and fires selects on mysql pgsqlinsert.php : creates and fires inserts on pgsql pgsqlselect.php : creates and fires selects on pgsql benchmark.php : script used to control concurrency and
Installing Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.3
+0 Vote Up -0Vote Down

Installing Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.3

Lighttpd is a secure, fast, standards-compliant web server designed for speed-critical environments. This tutorial shows how you can install Lighttpd on an OpenSUSE 11.3 server with PHP5 support (through FastCGI) and MySQL support.

Open source in the clouds and in the debates
+0 Vote Up -1Vote Down

We continue to see more evidence of the themes we discuss in our latest CAOS special report, Seeding the Clouds, which examines the open source software used in cloud computing, the vendors backing open source, the cloud providers using it and the impact on the industry.

First, as usual, we are seeing consistencies between our own research — which indicates open source is a huge part of today’s cloud computing offerings from major providers like Amazon, Google, Rackspace, Terremark and VMware — and that of code analysis and management vendor Black Duck. In its analysis of code that runs the cloud, Black Duck also found a preponderance of open source pieces, in many cases the same projects we profile in our report.

Indeed, open source software is an

  [Read more...]
MySQL at FrOSCon
Employee +3 Vote Up -0Vote Down

Oh time is flying! - This weekend it is already time for FrOSCon, the Free and Open source Conference in St. Augustin close to Western Germany's former capitol Bonn. The conference consists out of a main track and different side tracks, like the PHP developer room and the OpenSQL sub-conference.

In the PHP developer room I will give an overview over things that happened at MySQL, especially in regards to PHP in recent times. My colleague Ulf Wendel will then go and talk about plugins to mysqlnd - the MySQL native driver for PHP -  in detail.

In the OpenSQL Camp track you can find other interesting MySQL related talks which will, unfortunately, not leave you with enough time


  [Read more...]
MySQLnd Plugins: Writing a MySQL Query Logger in PHP
+4 Vote Up -0Vote Down

During the development of an application, not all time is spent on writing code. A lot of time is spent on reading debug output, crawling through log files and firing up the debugger to figure out what the application does. While the debugger helps us to inspect details of a running application on a testing environment, logfiles are often the only indication of the origin of an error on a production system. In this blogpost I want to describe how to log SQL statements on an existing application without touching any existing line of code at all. We will use a new MySQLnd Extension developed at the Mayflower OpenSource Labs for that purpose.

As an example, I will use PHProjekt 6. The project is particularly suitable for demonstration purposes as it has a

  [Read more...]
On HTML Sanitization, What, Why, How
+0 Vote Up -0Vote Down

This is a very good article discussing the different HTML Sanitizers available in the PHP community, what they mean, and the general state of things. Even the WordPress sanitizer (Kses) is included in this review. I really recommend you read this before you start building your own mini cms.

How to: rotate wordpress posts into headline/feature status
+0 Vote Up -0Vote Down

If you’re using the new Arthemia theme for WordPress you might notice that there are two areas of the theme that can have articles promoted to; namely Headline and Featured sections. This is controlled by category association. Basically you have a post and if you want it in the Headline area of the theme you attach the category “headline” to it, similarly for the featured section. Now, let’s say you don’t want to manually change this all the time since it can be time consuming to promote posts to those categories if you want rotating content.

Here’s a simple solution. In this bash script I connect to MySQL and remove the current associations from posts and then randomly choose posts to be promoted to the Headline and Featured categories. This can be

  [Read more...]
Scalar type hints in PHP trunk
Employee +1 Vote Up -2Vote Down

So in my blog series I try to cover all additions to PHP trunk so I have to mention scalar type hints.

<?php
function print_float(float $f) {
    echo $f."\n";
}

for ($i = 1; $i < 5; $i++) {
    print_float( $i / 3 );
}
?>
	
0.33333333333333
0.66666666666667

Catchable fatal error: Argument 1 passed to print_float() must be of the type double, integer given, called in typehints.php on line 7 and defined in typehints.php on line 2

Is expected behavior in PHP's trunk. If you want such a thing to work please use the numeric type hint.

In case that wasn't enought fun: There's more!

<?php
function handle_result(int $i) {
    echo $i."\n";
}



  [Read more...]
PHP 5.3 and mysqlnd - Unexpected results
+0 Vote Up -0Vote Down
I have started seriously using PHP 5.3 recently due to it finally making it into Portage. (Gentoo really isn't full of bleeding edge packages people.) I have used mysqlnd a little here and there in the past, but until it was really coming to my servers I did not put too much time into it.

What is mysqlnd?

mysqlnd is short for MySQL Native Driver. In short, it is a driver for MySQL for PHP that uses internal functions of the PHP engine rather than using the externally linked libmysqlclient that has been used in the past. There are two reasons for this. The first reason is licensing. MySQL is a GPL project. The GPL and the PHP License don't play well together. The second is better memory management and hopefully more performance. Being a performance junky, this is what peaked my interests. Enabling mysqlnd means it is used by the older MySQL extension, the newer MySQLi



  [Read more...]
Expert PHP and MySQL – review — 8 star
+0 Vote Up -0Vote Down

mysql > start review;
Query OK, 0 rows affected (0.00 sec)

mysql > Being a MySQL DBA, not a developer, I was mostly interested in the MySQL sections but given I have a general interest in scripting I did go through some of the PHP sections. To be honest they were quite advanced for my php knowledge and experience.

The good thing about the book is that even though it assumes you have the basic knowledge, it still provides an introductory background on most of the two (PHP and MySQL) topics. This is not a “PHP and MySQL for dummies” so don’t expect to learn the very basics nor will you become an expert in either topic by just reading the book. Even if you read the book thoroughly, becoming an expert requires years of hard work and experience. Having said that, his book is a good guide to make it there.

If you are at least


  [Read more...]
Alternative PHP Cache (APC) and Drupal Performance
+0 Vote Up -0Vote Down

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. So what does this mean for Drupal?

An opcode cache is used to keep compiled PHP code in memory. In a nutshell, when there's a request for a Drupal node, there are all kinds of PHP code that need to  be compiled before PHP can execute that code to query the database, create the webpage, and send it to the browser. The more complex your Drupal site, IE the more modules you have installed, the more PHP code that needs to be compiled. This compilation process occurs on every request to your Drupal site. By installing and enabling an opcode cache, your server will compile all the PHP code once, then store it in memory for later

  [Read more...]
Alternative PHP Cache (APC) and Drupal Performance
+0 Vote Up -1Vote Down

The Alternative PHP Cache (APC) is a free and open opcode cache for PHP. Its goal is to provide a free, open, and robust framework for caching and optimizing PHP intermediate code. So what does this mean for Drupal?

An opcode cache is used to keep compiled PHP code in memory. In a nutshell, when there's a request for a Drupal node, there are all kinds of PHP code that need to  be compiled before PHP can execute that code to query the database, create the webpage, and send it to the browser. The more complex your Drupal site, IE the more modules you have installed, the more PHP code that needs to be compiled. This compilation process occurs on every request to your Drupal site. By installing and enabling an opcode cache, your server will compile all the PHP code once, then store it in memory for later

  [Read more...]
PBMS version 0.5.015 beta has been released.
+1 Vote Up -0Vote Down
A new release of the PrimeBase Media Streaming daemon is now available for download at
http://www.blobstreaming.org .

This release doesn't contain any major new features just some bug fixes and a lot of house keeping changes.

If you look at the download section on http://www.blobstreaming.org you will see that there are now more packages that can be downloaded. I have separated out different client side components from the PBMS project and created separate launchPad projects for each one. You can see them listed in the "Related Links" side panel to the right of this post.

  • The "PBMS Client Library" facilitates communication with the PBMS daemon. This library is independent of the PBMS daemon's host server and can be used to communicate with a







  [Read more...]
Previous 30 Newer Entries Showing entries 121 to 150 of 816 Next 30 Older Entries

Planet MySQL © 1995, 2013, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.