Архиви на блога

Opencart losing cart on redirect after payment

Opencart has issue with Samesite session cookie which can be resolved in OC version 2.X by adding those two lines code There is a lot of info about PHP example for SameSite=None; Secure https://github.com/GoogleChromeLabs/samesite-examples/blob/master/php.md Or even in the OpenCart forums

С етикет: , , ,
Публикувано в Opencart, php

search for short open tags

If you use Linux and try to search for all php files containing short open tags you can use following command find -type f -exec grep -IlP ‘<\?(?!(php|xml|=))’ {} +

С етикет: , ,
Публикувано в linux, php

restore wordpress widdget from database backup

If you wish to restore wordpress text widget from backup you need to follow those steps 1. Copy content from wp_options of the widget for example option_name=widget_text 2. Paste it on the new site 3. Restore all widgets on positions

С етикет: , , ,
Публикувано в php, wordpress

catch spam from apache

Sometimes is very hard to debug from which virtual host spam is This can be check very easy with this trick create a new file  vim /usr/local/bin/phpsendmail place inside it #!/usr/bin/php <?php $sendmail = ‘/usr/sbin/sendmail’; $logfile = ‘/var/log/mail.form’; /* Get

С етикет: , , , ,
Публикувано в linux, php

idea for id storing of files

If you have some time of id in your database and you want to save file associated with this id it’s not a good idea to make dir with id value and save the file there because on some point

С етикет: , , , , , ,
Публикувано в linux, php