Skip to content

Tag: php

Magento separate PHP-FPM group for admin

I run a Magento webstore with middling traffic levels, running on NGINX with PHP-FPM. The server environment is very powerful with plenty of overhead, so hardware is not a factor. We are getting timeouts and errors when running memory intensive operations in the backend, such as exports and some custom indexe…

Cast a column as Boolean in PDO

I have a field (‘done’) in the Database which is boolean. The function which GET/ the rows doesn’t return a json with that field as boolean but it returns 1 or 0. How can I get THAT column (‘done’ column) as boolean? I mean, Is posible to cast a column with PDO::PARAM_BOOL ?? Her…

Title tag showing latest post title

I am working a site here . the title tag of the site in tab shows the title of the latest published post . the header.php has the following i replaced it to still its showing. i have installed All In One SEO Pack plugin.is that could be the reason.If yes,is there any way to correct it without deactivating the

How to tell phpDoc a string is a class name?

I often give objects static methods and properties that do not require the object to be initialized. For example: Now we subclass these objects and have some sort of controller that returns an object class string under certain circumstances where the object should not yet be initialized. For example: At times…

How can I parse command line arguments in PHP?

I call a PHP script from command line $ php my_script.php –num1=124 –first_name=don How can I get access to any key value pairs passed into this script? The keys can be arbitrary, so using getopt() with particular values will not work. Here is what I want access to in my script: If I use var_dump(…