lighttpd (cygwin), PHP5.2.0, Windows 2000, symfony
Wednesday, 7. February 2007, 19:01:18
I can only tolerate W2K with cygwin installed, and its package manager got me lighttpd.
This needed configuration:
cp /e^T/li^T/lighttpd.conf.default /etc/lighttpd/lighttpd.conf
vi ESC .
Only static HTML at first:
server.document-root = "/cygdrive/e/www/localhost/"
echo "test" > /cygdrive/e/www/localhost/index.php
echo "test" > /cygdrive/e/www/localhost/index.htm
/usr/sbin/lighttpd.exe -D -f /etc/lighttpd/lighttpd.conf #I could CTRL-C terminate it
#/usr/sbin/lighttpd.exe -f /etc/lighttpd/lighttpd.conf #goes to background mode, ps ux needed to get the PID
Big mistake: index.php takes precedence over index.htm and I got a 403 error. Removing the index.php helped.
Get PHP from http://www.php.net/downloads.php
Put it to C:\PHP and include the cgi version!
Version PHP5.2.0 did not work with yaz, pspell, nt$something and a 4th extension that I have already forgotten, so I excluded them.
The peardev.bat has some ^ characters in it, removed them by hand.
Double-clicking (*yuck*) to initialize PEAR, then I did the usual channel-discover etc. as per symfony docs. Then symfony installed without any problems.
Back to lighttpd: Un-commented cgi module, cgi.assign = (".php"=>"C:\PHP\php-cgi.exe")
Got a "no input file specified" error, added in php.ini a docroot E:\www\localhost as per http://www.php.net/manual/de/security.cgi-bin.php 1st comment.
A phpinfo(); in index.php worked then.
Changed BOTH php.ini and lighttpd.conf to point to a symfony-style $mypath/web/ directory, un-commented mod_rewrite, mod_redirect, mod_alias in lighttpd.conf and added
alias.url = ( "/sf/" => "/cygdrive/c/PHP/PEAR/data/symfony/web/sf/" )
url.rewrite-once = (
"^/(.*\..+(?!html))$" => "$0",
"^/(.*)\.(.*)" => "$0",
"^/([^.]+)$" => "/index.php/$1",
"^/$" => "/index.php"
)
I didn't bother to setup a vhost, as this installation is just for testing anyways. I got that above rewrite stuff from the symfony wiki IIRC (taken from another host).
Now c:\php\symfony init-project test && C:\PHP\symfony init-app frontend brought me the familiar symfony welcome screen.
I downloaded mysql-essential-5.0.27-win32.msi and installed ot as a service (for now). Configuration was done with the bundled "MySQL Server Instance Config Wizard". In cmd.com mysql -u root -pmyPassword and create databse symfony.
In the symfont directory I changed both config/database.yml AND propel.ini including username:password in both of them. I could then copy the schema.yml from the First Project tutorial and run propel-*-* to create the database tables.
Music to my ears!
I downloaded http://xdebug.org/link.php?url=xdebug200rc3-521-win although it said PHP5.2.1+ and put it in my C:\PHP\ext and added zend_extension_ts="C:/PHP/ext/php_xdebug-2.0.0rc3-5.2.1.dll" to my php.ini -- that's all to install xdebug. In cmd.com a C:\PHP\php-cgi.exe brought no error message, if the xdebug dll is too old it says something along the lines "Xdebug requires Zend Engine API version 220051025.
The Zend Engine API version 220060519 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org for a later version of Xdebug."
I could not get xcache to work with PHP5.2.0, but on another machine with PHP-5.1.6
This needed configuration:
cp /e^T/li^T/lighttpd.conf.default /etc/lighttpd/lighttpd.conf
vi ESC .
Only static HTML at first:
server.document-root = "/cygdrive/e/www/localhost/"
echo "test" > /cygdrive/e/www/localhost/index.php
echo "test" > /cygdrive/e/www/localhost/index.htm
/usr/sbin/lighttpd.exe -D -f /etc/lighttpd/lighttpd.conf #I could CTRL-C terminate it
#/usr/sbin/lighttpd.exe -f /etc/lighttpd/lighttpd.conf #goes to background mode, ps ux needed to get the PID
Big mistake: index.php takes precedence over index.htm and I got a 403 error. Removing the index.php helped.
Get PHP from http://www.php.net/downloads.php
Put it to C:\PHP and include the cgi version!
Version PHP5.2.0 did not work with yaz, pspell, nt$something and a 4th extension that I have already forgotten, so I excluded them.
The peardev.bat has some ^ characters in it, removed them by hand.
Double-clicking (*yuck*) to initialize PEAR, then I did the usual channel-discover etc. as per symfony docs. Then symfony installed without any problems.
Back to lighttpd: Un-commented cgi module, cgi.assign = (".php"=>"C:\PHP\php-cgi.exe")
Got a "no input file specified" error, added in php.ini a docroot E:\www\localhost as per http://www.php.net/manual/de/security.cgi-bin.php 1st comment.
A phpinfo(); in index.php worked then.
Changed BOTH php.ini and lighttpd.conf to point to a symfony-style $mypath/web/ directory, un-commented mod_rewrite, mod_redirect, mod_alias in lighttpd.conf and added
alias.url = ( "/sf/" => "/cygdrive/c/PHP/PEAR/data/symfony/web/sf/" )
url.rewrite-once = (
"^/(.*\..+(?!html))$" => "$0",
"^/(.*)\.(.*)" => "$0",
"^/([^.]+)$" => "/index.php/$1",
"^/$" => "/index.php"
)
I didn't bother to setup a vhost, as this installation is just for testing anyways. I got that above rewrite stuff from the symfony wiki IIRC (taken from another host).
Now c:\php\symfony init-project test && C:\PHP\symfony init-app frontend brought me the familiar symfony welcome screen.
I downloaded mysql-essential-5.0.27-win32.msi and installed ot as a service (for now). Configuration was done with the bundled "MySQL Server Instance Config Wizard". In cmd.com mysql -u root -pmyPassword and create databse symfony.
In the symfont directory I changed both config/database.yml AND propel.ini including username:password in both of them. I could then copy the schema.yml from the First Project tutorial and run propel-*-* to create the database tables.
Music to my ears!
I downloaded http://xdebug.org/link.php?url=xdebug200rc3-521-win although it said PHP5.2.1+ and put it in my C:\PHP\ext and added zend_extension_ts="C:/PHP/ext/php_xdebug-2.0.0rc3-5.2.1.dll" to my php.ini -- that's all to install xdebug. In cmd.com a C:\PHP\php-cgi.exe brought no error message, if the xdebug dll is too old it says something along the lines "Xdebug requires Zend Engine API version 220051025.
The Zend Engine API version 220060519 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org for a later version of Xdebug."
I could not get xcache to work with PHP5.2.0, but on another machine with PHP-5.1.6

