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 […]
06 Jul
Posted by krisgale as virtualization, windows, os x, apache
first, edit your web server’s httpd.conf (for example, /Applications/MAMP/conf/apache/httpd.conf) and add a VirtualHost with some name other than “localhost” (we do this because windows may reserve localhost for some of its services).
NameVirtualHost yourhostname:80
<VirtualHost *:80>
ServerName yourhostname
DocumentRoot “/your/directory/here”
</VirtualHost>
edit leopard’s “hosts” file:
sudo nano -w /etc/hosts
and append your new host name to the existing line for localhost:
127.0.0.1 localhost yourhostname
now, […]
in httpd.conf, put this somewhere after LoadModule mod_ssl:
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
and this declaration in each VirtualHost’s Directory:
SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
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 […]
i recently had cause to change the ip address associated with a certain domain name and wanted to find a way to experience zero downtime while the dns update went global…
let’s say you had a website ‘mydomain.com’ pointing at 1.2.3.4 in your dns records, and had set up a virtual host in apache accordingly. […]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Nov | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||