if you want something done right… DIY.

meanderings of a computer scientist on the brink of sheer insanity.

and here i thought php would supply a default value for the second parameter to fread(), namely the number of bytes to be read from an open file handle (that being the first parameter). nope! not only does this quietly surpass php’s syntax check, it causes an internal server error thus creating quite the air […]

so, back again with an instance of === not always yielding the same result as == when perhaps it should… it just so happens that code i just wrote, given an empty string, yields a different result comparing that string to “” when using the === operator rather than the == operator.
even more strange, my […]

debugging gallery2 after upgrade

no idea what version to which this applies as i’ve never installed or configured gallery2, but here’s the process by which i just now debugged one particular gallery2 install…
gallery2/config.php
line 30 - @ini_set(’display_errors’, 1);
line 134 - $gallery->setDebug(’buffered’);
1st error:
Unknown column ‘g2_Item.g_renderer’
grep -r ‘renderer’ *
modules/core/classes/GalleryStorage/schema.tpl:
CREATE TABLE DB_TABLE_PREFIXItem(

DB_COLUMN_PREFIXownerId int(11) NOT NULL,
DB_COLUMN_PREFIXrenderer varchar(128),
ALTER TABLE g2_Item ADD g_renderer VARCHAR(128) NULL AFTER […]

if, after painfully specifying character set and collation for your database, all your tables, and all columns within them, you’re still experiencing discrepencies between what your database is storing (eg. strings appear correct from within phpMyAdmin) versus what your website is displaying from database query results (question marks instead of your fancy quotes), try this:
mysql_query(”SET […]

when you’re “rolling your own” session management by using header(”Set-Cookie:… and you’re mixing temporary cookies with ones that have an expires= attribute, you may notice erratic behavior unless you set the temporary parameters first.
for example,
header(”Set-Cookie: permanent=important; expires=Sun, 17-Jan-2037 23:59:59 GMT”);
header(”Set-Cookie: temporary=trivial”);
may not work as expected, whereas if you switch the two around, you’re good to […]

  
Black leather sofas leather sectional couch and loveseat for sale. Best sofa bed sleeper sofa leather recliner. Microfiber sectional couch contemporary sofa and leather sectional sofa. Italian sectional furniture contemporary sofa reclining sofa. Leather 2 piece sectional sofa sectional couch apartment size sectional couch. Buy sectional sofas microfiber sofa microfiber sofa and loveseat set. Piece leather sectional sofa chaise chaise sectional leather couches houston. 86 microfiber sofa leather sofa bycast leather sectional. Sectional sleeper sofas for modern sofas leather sectional sofas. Piece microfiber sofa sectional sleeper 2 piece sectional couch. Purple microfiber couch leather couches leather sectional prices. Cloth sectional couches leather recliner pc chaise sectional. Traditional leather couches modern sectional free sleeper sofa. Discount leather sofa sectional furniture l sectional couches. Natucci leather sofas recliner sofa leather patches for couches. Contemporary sofas with sofa bed sectional couches with chaise. Sofa twin bed microfiber sectional american leather couches. Modern sofa cover modern sectional monica sectional sofa. home furniture