Just spent too much time on finding out why sessions didn’t work on a particular site. To be precise: the PHP session cookie was not sent.
Turned out that there was a line in the site’s .htaccess that also set a temporary cookie:
Header set Set-Cookie "myCookie=1; path=/;"
All was fine when I changed
Header add Set-Cookie "myCookie=1; path=/;"
A script that handled a php://input stream exited rather unexpectedly when it called
session_start(). I had ‘track_errors’ enabled, so there was a message in
$php_errormsg saying that headers had already been sent. But there was no file name or line number.
Continue reading Mysterious ‘headers already sent’ while handling php://input stream
As my production web server now runs on Apache 2.4 and PHP 5.6, an upgrade on the dev machine seemed appropriate. Also, Zend recently launched Studio 13, with support for PHP 5.6 and even PHP 7. I decided to upgrade everything at once.
Continue reading Studio without Server
On my server, I have a PHP script that runs once a day to post a message and a picture to a Facebook page that I administer. Yesterday Facebook upgraded their API to v2, breaking my script that had been running fine since a few years.
Continue reading Post from server to Facebook page with FB’s PHP SDK 4
A while ago I couldn’t add any files to a Debian server I control. It was pretty odd, as there was plenty of free disk space available (
df -h will show that).
After I deleted a number of web cache files, I could add new files again. But soon the problem would return, leaving me wondering what was wrong.
Continue reading When the server ran out of inodes