Skip to main content
Maher Sakka's Blog
Main navigation
  • Home
  • Contact me
Language switcher
  • English
  • عربي
Breadcrumb
  1. Home
  2. Monthly Archive
  3. Monthly Archive

October 2025

How to detect tables wihtout primary key in a database

Primary keys in Database are essential for many reasons; they maintain entity integrity and help the database work faster when searching or linking data.

Sometimes, the primary keys aren't set for some tables. It's better to create the keys for these tables for better performance and integrity.

The following SQL query list all tables without Primary Key in a specific Database (<database_name>):

Tags
  • Database
  • Read more about How to detect tables wihtout primary key in a database

How to know which ini configuration files are loaded with PHP

To listt all the ini configuration files loaded with PHP in command line, you have to type the command:

php --ini

All the configuration files will be listed. ex :

Tags
  • Servers
  • Linux
  • Read more about How to know which ini configuration files are loaded with PHP

How to prevent search engines from indexing your staging server websites

Here are the configurations to prevent search engines (Google, Bing, etc.) from indexing all websites on your server using global configuration for both web servers Apache and Nginx:

Prevent search engines indexing in Apache

Add the following line in httpd.conf or apache2.conf:

Tags
  • Servers
  • SEO
  • Linux
  • Read more about How to prevent search engines from indexing your staging server websites

How to export Database with time-stamped file name in phpMyAdmin

To export Database with time-stamped file name in phpMyAdmin, you have to change the parameter  Output: > Save output to a file > File name template from :

@DATABASE@

to :

Tags
  • Database
  • Read more about How to export Database with time-stamped file name in phpMyAdmin

How to reset a User password in a Laravel project from console

We can use Tinker to change a Laravel user password from the console using theses instructions.

Start Tinker

php artisan tinker

The shell is launched

Psy Shell v0.12.9 (PHP 8.2.4 — cli) by Justin Hileman
>

Select the concerned user by email

Tags
  • Laravel
  • Read more about How to reset a User password in a Laravel project from console

How to check if email are sent correctly in a Laravel Project

You can you use tinker to check if email are sent correctly in a Laravel project.

Launch Tinker using this command

php artisan tinker

The shell is launched

Psy Shell v0.12.9 (PHP 8.2.4 — cli) by Justin Hileman
>

Now add the following code:

Tags
  • Laravel
  • Read more about How to check if email are sent correctly in a Laravel Project
Tags
  • Laravel
  • Linux
  • Drupal
  • Database
  • Tips & Tricks
  • Mobile
  • Servers
  • SEO
Recent posts
  • How to detect tables wihtout primary key in a database
  • How to know which ini configuration files are loaded with PHP
  • How to prevent search engines from indexing your staging server websites
Monthly archive
  • May 2017 (2)
  • August 2018 (1)
  • October 2020 (1)
  • August 2023 (1)
  • July 2024 (2)
  • November 2024 (1)
  • July 2025 (10)
  • October 2025 (6)
Projects
  • elmanager.tn
  • 365mathex.com
  • vpop.tn
  • toufoula.tn
  • writethemoney.com
  • dinartunisien.com
RSS feed

mahersakka.com © 2024 
Build Your IT Skills, Grow Your Wealth with Maher Sakka