Category: PHP
-
[Forgot Password] [Can’t Log In] How to reset WordPress admin password without sending reset email?
So, admit it. We put really strong passwords and then we forget them. And you end up being locked out of your own website. So here is how you can reset it quickly. Go to your hosting control panel and then go to phpMyAdmin if available. Look into the database which is being used for…
-
Fix Magento 2 – php cli error on cpanel or other hostings
The problem: On a fresh install of Magento2 on cpanel based hosting, you receive the following error while running any command on SSH The Solution: You have to point php to correct binary;Use the following code in order:First, open the file which can alter the runtime variables like .bash_profile or .bashrc Go to last line…
-
How to add colon separated hours in PHP using explode function twice?
Problem Statement Tracking hours for multiple days are available in HH:MM:SS format separated by tab element. Add all the time to show total hours worked/tracked.
-
How to get all attributes with all available labels/options in Magento2?
I did a lot of research but could not find a solution for that. so gathered some info and created this code: (it is not the best way to do it, but it works – you can use it at least one time for quick results) the values need to be transformed if you want…
-
Extracting names from given list of URLs (using regex)
let us extract name form the URL paste the URL in the notepad and press crtl+f , and select ‘regular expressions ‘ from search mode now, enter the regex in the find tab to fetch names Now, the selected name will be fetched form regex as (\1). it can work on numerous links like:- And…
-
[SOLVED] PHP must be run as a CLI application error : Content-type: text/html; charset=UTF-8
php bin/magento cache:cleanContent-type: text/html; charset=UTF-8bin/magento must be run as a CLI application as root user, run the following commands (For php v7.0) The solution involves fixing php variable’s path. We need to find which php is being used right now, you can find out by To fix this PHP cli error, see how to edit…
-
Installing Magento Common Issues
Following are the steps to complete install Magento error-free:- Uncomment the files which are required by Magento in php.ini and restart the server If installation error occurs, set memory_limit = 786M if still error occurs, uninstall the db and make it again after successfull install, go to (root_directory)app/etc/di.xml and change “Symlink” to “Copy” in developerMaterialization section.…
-
PHP Malware – Important regex to bust infected website
-
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry Magento 2
-
[SOLVED] Magento 2 Error: A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.
Sometimes debugging on Magento can be annoying, specially if something just arises out of the blue, not while you are actually writing a code. This is something that occurs on Magento admin panel. As of now, it can be one out of 3 reasons, let us discuss them: 1. Admin Password Try to change admin…