Uploaded by CultOfJaffa
Many thanks Jo!
Here’s some steps which may help somebody else install PHP on their Windows machine to run alongside JetBrain’s PhpStorm for PHPUnit testing
Now PHP is configured, we need to configure JetBrain’s PHPStorm to use it:
I’m going on a little holiday soon and so want to take a number of books to read. I’m tempted to buy:
Any other recommendations? (Thanks Tim – but I’ve already got all the Ben Elton books, along with all the Robert Llewellyn ones)
If, when trying to start the Varnish reverse proxy server, you receive an error message such as:
[firstname.lastname@example.org ]#/usr/sbin/varnishd -d -f /etc/varnish/default.vcl
GeoIP plugin loaded successfully.
storage_file: filename: ./varnish.8QhQpI size 4208 MB.
SHMFILE owned by running varnishd master (pid=2451)
(Use unique -n arguments if you want multiple instances.)
but “ps auxwww | grep 2451” doesn’t show Varnish (in my case, it was dkim-milter on that pid) and “ps auxwww | grep varnish” shows nothing, then you need to manually reset Varnish’s SHMFILE settings.
This is easier done than said! Just go into /var/lib/varnish/[hostname] and delete all the files in there (such as varnish.8QhQPI and _.vsl). Restarting varnish should then be successful.
If you run the Magento ecommerce shopping cart software and you want to find out how much your stock is worth, how many product lines you have stocked and how many individual items you have, you may find the following MySQL query handy.
I’m assuming that you’ve created an attribute with the attribute code “supplier_price” as a decimal, that you’ve kept this field up to date and your stock levels are accurate 😀 If it isn’t called “supplier_price” change the appropriate part in the query.
COUNT(sku) AS 'products_stocked',
SUM(qty) AS 'items_in_stock',
SUM(stockvalue) AS 'stock_value'
(cataloginventory_stock_item.qty * catalog_product_entity_decimal.value) AS stockvalue
cataloginventory_stock_item.qty > 0
ORDER BY sku ASC) AS b