Be sure to select the fitting Verson Thread Safe or Not.
Unzip the Package.
Copy php_imagick.dll into your php-root/ext-Directory. Copy all the other DLL-Files directly to your /php-root directory.
Add extension=imagick to your php.ini file. Restart your WebServer or your comand shell. Enter php -v in your command shell and check that there are no errors.
first be sure you have activated the curl-extension in your php.ini file.
After that get the cacert.pem file from curl – Extract CA Certs from Mozilla and safe it o your computer. i saved it into my php-directory. after that edit php.ini again and modify the following entry to point to the .pem.file:
[curl] ; A default value for the CURLOPT_CAINFO option. This is required to be an ; absolute path. curl.cainfo = "C:\php\php80\cacert.pem"
First of all download the PHP-Version you want to install. In my case it will be the PHP 7.3 x64 Thread Save versio. This is the link to the download section on php.net: https://windows.php.net/download#php-7.3 In my case i downloaded the ZIP-file of VC15 x64 Thread Safe (2020-Oct-27 16:52:12). Unzip the ZIP archive to a new folde which will be your php installation folder. So choose wisely 🙂 I used c:\php\php73 for that. After you have unzipped the PHP-Archive you need to locate the file php.ini-development and rename it to php.ini.
Open the php.ini file in any texteditor and change the extension_dir settings to the choosen directory, followed by an /ext. In my case its c:\php\php73\ext. Or you can set it like below:
; On windows: extension_dir = "ext"
After that you need to add your path to the php-directory (in my case: C:\php\php73) to the Windows PATH variable. Search for “PATH” in the Windows Search-Bar to edit the environment variables.
Search in the system variable for the Path entry and edit this to add your PHP-path
After you have added your line click ok on all Windows to save your settings
To verify everything worked correctly open your command shell by typing cmd into the windows search bar
and type php -v in your command shell. You shall get the version information of your php installation. And now everything is done.
The same procedure is for every other php version like 7.x or 7.4. To install php in different directories (in my case C:\php\phpVERSION) gives you the chance to use different php version on Command Line Interface by setting the direct pth to the executable CLI.
I have the problem on RolandRadio, that a lot of people try to modify the charts and register to vote. All users not verified by Mail are deleted after 24 hours to avoid fake users but some of them already mass-voted on titles.
So i needed to find out if there are ratings by users already non existent in the users table. I came up with this mySQL-Solution:
select *
from ratings A
Where Not exists (select 1 from users B Where A.model_id = B.id)
Or without the aliasing:
select *
from ratings
WHERE NOT exists (select 1 from users Where ratings.model_id = users.id)
So i select all from the table ratings and get all those entries where the model_id-column of the ratings-table is not in the id of the users-table.
This brought up 1600 ratings of already deleted users. i hate it that people are so manipulative on the charts. Now i need to do a cron-tab-command to delete ratings of deleted users every day. Also i included
if (Auth::user()->verified != 1) {
session()->flash('message', 'You must verify your email first!');
}
into the rating function to avoid users not verified to rate on titles.
If you use an older Version of mySQL or MariaDB Laravel throws an error on the first migration on your database. Thats cause the defaultStringLentth needs to be set to a maximum length of 191 characters.
public function boot() { Schema::defaultStringLength(191); } }
Add this to your AppServiceProvider.php File and rerun your migration
As spammer start flooding my users table with fake-accounts i startet to develop a command for laravel to run in a cron job for deleting all users which didnt verified their email within the last 24 hours.
Everytime i start an update of the whole project it takes hours to upload all the new updated files to my web server.
To avoid a massive downtime for the user without informing them about the status and displaying any errors i just touch a file within the project:
project->storage->framework
there i add a file called “down” and the site goes into “down-mode” – atfer i finished my work i rename the file to “down-” to bring up the site agein. I configured the Error 503 page to display a nicer version of the error.