Showing entries 1 to 10 of 943
10 Older Entries »
Displaying posts with tag: PHP (reset)
How to Install LAMP (Linux, Apache, MySQL, PHP) on Debian 9

In this tutorial, we will show you how to install LAMP Stack on a Debian 9 VPS. A LAMP (Linux, Apache, MySQL, PHP) stack is a combination of open-source software, typically installed on a server used for hosting dynamic websites and web applications. It includes the Linux operating system, the Apache web server, MySQL or […]

mysqli Strict Standards

Six years ago I wrote a common lookup post to illustrate the effectiveness of things used throughout your applications. Now, I’m updating my student image with a more complete solution to show how to avoid update anomalies.

In the prior post, I used a while loop in PHP, like the following:

do {
} while($stmt->next_result());

Using PHP Version 7.3.8 and MySQL 8.0.16, that now raises the following error message:

Strict Standards: mysqli_stmt::next_result(): There is no next result set. Please, call mysqli_stmt_more_results()/mysqli_stmt::more_results() to check whether to call this function/method in /var/www/html/app/ on line 81

You can see this type of error when you set the following parameters in your file during testing:

ini_set('display_errors',1); …
[Read more]
MySQL Update in mysqli

Somebody didn’t like the MySQLi Update Query example on the website because it use the procedure mysqli_query style. Here’s a simple example of using the object-oriented method version. More or less, instead of query it uses the more intuitive execute() method.

The update_member function contains the logic and below it is a call to the test the function. It relies on a file that contains the hostname, user name, password, and database name. You can create create member table, like my example in MySQL 8, or any other table in your MySQL database.

<?php /*
||  Function Name: update_member
function update_member($account_number, $member_type, …
[Read more]
Apache on Fedora 30

There was an option during the Fedora 30 Workstation installation to add the Apache Web Server, but you need to set it to start automatically. Unfortunately, there was no option to install PHP, which I thought odd because of how many web developers learn the trade first on PHP with a LAMP (Linux, Apache, MySQL, Perl/PHP/Python) stack. You see how to fix that shortcoming in this post and how to install and test PHP, mysqli, and pdo to support MySQL 8.

Before you do that make sure you install MySQL 8. You can find my prior blog post on that here.

You set Apache to start automatically, on the next boot of the operating system, with the following command:

chkconfig httpd on

It creates a symbolic link:

Created symlink /etc/systemd/system/ → …
[Read more]
MySQL 8.0.17 and Drupal 8.7

From Drupal’s website, we can see that now the support of MySQL 8 is ready.

I just tested it and it works great !

The only restriction is related to PHP and the support for the new authentication method in php-mysqlnd.

In this previous post, I was happy because it was included in PHP 7.2.8, but this has been reverted back since then. Currently none of the latest version of PHP 7.x is supporting this authentication method.

We can easily verify this, first with the PHP version provided by default in Oracle Linux 8:

# php -i | grep "Loaded plugins\|PHP Version " | tail -n2
PHP Version => 7.2.11
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password, …
[Read more]
Laravel CRUD Example with jQuery Datatable

This laravel tutorial help to add CRUD operation with datatable, I will just share laravel code to create new record, edit record and delete record. I have already shared How To Use jQuery Datatable With Laravel.We have integrated jQuery datatable with laravel. We will cover following functionality in this laravel tutorial : Create record Template […]

The post Laravel CRUD Example with jQuery Datatable appeared first on

Jquery Duplicate Fields Form Submit with PHP

This tutorial explains How to submit jquery duplicate/clone field values to form with PHP.  In this example we are going to provide very simple example and using existing jquery plugin, so here we are using relCopy.js jquery plugin to duplicating the existing field.

                                             Download                    …

[Read more]
MySQL and PHP Basics Part I

I have had some requests to write some blogs on the basics of using PHP and MySQL together.  This will not be a series for the experienced as it will start at a level where I will go into a lot of details but expect very few prerequisites from the reader.  If this is not you, please move on. If it is you and you read something you do not understand, please contact me to show me where I assumed too much.

PHP and MySQL are both in their mid twenties and both vital in the worlds of developers.  With the big improvements in PHP 7 and MySQL 8, I have found a lot of developers flocking to both but stymied by the examples they see as their are many details not explained. So let's get to the explaining!
1. Use the latest software
If you are not using PHP 7.2 or 7.3 (or maybe 7.1) then you are missing out in features and performance.  The PHP 5.x series is deprecated, no longer support, and …

[Read more]
Your SQL IS NOT JavaScript (neither PHP)

IS NULL, IS NOT NULL, truthiness among other assertions on MySQL and PostgreSQL

People like to complain about JavaScript, how can one thing be equal to the other, i.e. null == undefined evaluates to true unless you use the triple equals ===. Other dynamic typed languages have its peculiarities, such as Ruby where 0 == true evaluates to true, the reason for Ruby is that considers 0 as a value and any value evaluates to true.

How about SQL? The answer is… it depends.

Which database are you using?

Some may be more forgiving, like MySQL doing casts for you all over the place, or more strict like PostgreSQL where you can only compare the truthiness of something of the same type.

[Read more]
How to Install LEMP on Ubuntu 18.04

The LEMP stack is a web development platform for hosting static and dynamic websites. It is a combination of free and open-source software including Linux, Nginx, MySQL, and PHP. It is an alternative to the highly popular LAMP stack, the only difference being having Nginx as a web server instead of Apache. Requirements: For the […]

Showing entries 1 to 10 of 943
10 Older Entries »