Many a times we have faced this problem that when we commit
something and it breaks something on the server due to some
syntax error.
I know that these can be caught by IDEs and
good editors, but sometimes there might be an syntax error
introduced after a code merge conflict resolution and
commit.
To address this, we can use git pre-commit hooks to check for any
syntax errors in the to be committed files.
There is a good script I found which does this at https://github.com/ReekenX/phpcheck-git
Steps to add pre-commit php syntax check with git:
(Issue …
In February my colleague Morgan Tocker will travel through Europe and talk about MySQL 5.7, which recently went GA.
In Munich we're having a meeting for PHPers and other Web developers, where Morgan will talk about MySQL and JSON and I'll also be around.
Summary of the talk:
With the newly added JSON support in MySQL, you can combine the flexibility of NoSQL with the strength of a relational database. In this session, Morgan will explain the new JSON datatype, and the new set of functions for handling JSON documents, available storage and indexing options. In addition, he will present benchmarks showing how much one can expect from the MySQL server in different use case scenarios.
About Morgan: Morgan rejoined the MySQL team at Oracle in 2013 as MySQL Community Manager, having …
[Read more]The password features in PHP aren't exactly new, but I see lots of applications from "before" which aren't being migrated to better practices. I have some strategies for doing these migrations so I thought I'd share my main approach, plus a similar-but-different one I saw in the wild (OK it was in CakePHP, so not too wild!).
The examples here assume that you currently have either unsalted or all-with-the-same-salt passwords stored in your database, hashed with md5 or sha1 or something. This is a Very Bad Idea (TM) since it's trivial to recover unsalted passwords and not all that hard to figure out same-salted ones.
Enter the password_hash() and
password_verify() functions which were included by
default in PHP 5.5 but are also available for PHP 5.3.9+ via a
userland implementation (see https://github.com/ircmaxell/password_compat). …
In this article we will show you how to install GLPI with Apache, PHP and MySQL on a Debian 7 VPS. GLPI is an IT software management package developed in PHP. It offers many functionalities one of which is to build up a database with an inventory for your company (computer, monitors, software, printers…). GLPI has enhanced functions to make the daily life for the administrators easier, like a job-tracking-system with mail-notification and methods to build a database with basic information about your network-topology. Below are the functions of this application: Inventory of computers, peripherals, network printers and associated components […]
I posted earlier in the year how to configure a Fedora instance to test PHP code on a local VM. However, I’ve got a few questions on how to find those posts. Here’s a consolidation with links on those steps:
- Go to this blog post and install the
httpdandphplibraries with theyuminstaller. - In the same blog post as step 1 (you can put the sample
PHP code into the
/var/www/htmldirectory for testing), connect to theyumshell and remove thephp-mysqllibrary and then install themysqlndlibrary. - Go to this blog …
I'm very excited to announce that some of my content is featured in the PHP Learning Path from O'Reilly. The Learning Paths are a good way to buy a bundle of content from different people on related topics, and the introductory pricing is always a good deal! Their newest offering is the PHP Learning Path, which has a video course on PHP and MySQL, my intermediate PHP Video course (they wouldn't let me call it "all the things Lorna thinks PHP developers need to know" unfortunately!) and also my video course Git for Web Developers which has a bunch of PHP in it as well as my best git tips and tricks.
I think it's a pretty well-rounded collection and it's only $99 for a couple of weeks, so get the PHP Learning Path here and let me know what you think?
…
[Read more]
Recently, we had an issue in our application which is a single
page application(SPA). We have all the functionality in a single
page and most of the data and view changes happen through ajax
requests and iframe page displays.We are using CodeIgniter
framework for this application. So sometimes what happened was
the user was logged out while accessing the application and this
occurred once a while for 1 or 2 users, not a reproducible case
one would say.Before starting on the case, I would like to
specify the steps which CodeIgniter takes for checking session
for any request.Steps:
1. Read session cookie sent from browser.
2. Read session cookie process proceeds with below step checks
(If any one step fails below, it results in create one session
cookie)
2a. Checks if session cookie is present
2b. Checks if it is a valid session cookie by using it's
decryption algorithm check
2c. If valid session, then check if …
In this article we will walk you through the steps on how to install LAMP (Linux, Apache, MySQL and PHP-FPM) on a Debian 8 VPS. A LAMP stack is a synonym of LAMP server or LAMP web server. It refers to a set-up which includes Linux, Apache, MySQL (MariaDB) and PHP. REQUIREMENTS We will be using our SSD 1 Linux VPS hosting plan for this tutorial. UPDATE THE SYSTEM Make sure your server is fully up to date using: # apt-get update && apt-get upgrade INSTALL APACHE To install Apache on your Debian 8 server, you need to execute the […]
ConFoo is once more seeking passionate speakers for the upcoming conference.
The event is happening in Montreal, Canada, between February 24th and 26th, 2016. It is an exciting conference for web developers with speakers from all over the world. It unites many web programming languages under one roof, as well as other topics related to web development. The call for papers closes on September 20th.
ConFoo renews 50% of its speakers each year. If you’re new to this conference, you should definitely submit.
If you would just like to attend, there is a discount until October 13th.
Everything seemed complete after configuring my standalone MySQL instance to a LAMP
installation, but last night I started playing with the image
files. It turns out that I failed to install the
php-gd library.
There’s very little feedback when you try to troubleshoot why you
can’t read an image. In fact, the error message for reading the
BLOB from MySQL was only available on the local
Firefox browser:
The image "http://localhost/ConvertMySQLBlobToImage.php" cannot be displayed because it contains errors.
|
The fix requires root to install the
php-gd library with the yum utility:
yum install php-gd |
You’ll need to answer …
[Read more]