mcrypt is deprecated, what is the alternative?

It’s best practice to hash passwords so they are not decryptable. This makes things slightly more difficult for attackers that may have gained access to your database or files. If you must encrypt your data and have it decryptable, a guide to secure encryption/decryption is available at https://paragonie.com/white-paper/2015-secure-php-data-encryption. To summarize that link: Use Libsodium – A PHP extension … Read more

Getting an error when I visit http://localhost

You can access “localhost” just fine. The “404: file not found” error indicates the server can’t find the requested file once you’ve connected to localhost. ADDENDUM: Maybe try to create a regular html file called test.html in one of your vhosts that is not working. Then try to visit that url. That should give you some clue … Read more

How to check if a string starts with a specified string?

PHP 8 or newer: Use the str_starts_with function: PHP 7 or older: Use the substr function to return a part of a string. If you’re trying to make sure it’s not another protocol. I’d use http:// instead, since https would also match, and other things such as http-protocol.com. And in general:

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)