sudo find . -type f -exec chmod 644 {} \;
Tuesday, August 2, 2011
Tuesday, June 7, 2011
Install PHP on IIS7
1. Run PHP window installer.
2. inetmgr
3. Handler Mappings
> Add Script Map...
- Request path = *.php
- Executable = ...\php5isapi.dll
- Name = PHP-ISAPI
> OK
> OK
4. ISAPI and CGI Restrictions
> Add...
- ISAPI or CGI path = ...\php5isapi.dll
- Description = PHP
- Allow extension path to execute = checked
> OK (may exist already)
5. Default Document
> Add...
- Name = index.php
> OK
6. Restart IIS
Monday, September 20, 2010
MySQL problem after upgrade to Mac OS 10.6 #2
Mac OS version:
10.6.4
Problem:
phpMyAdmin show following error after login
"Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly."
Solution:
In folder "/etc"
Recreate "php.ini" from "php.ini.default"
- sudo cp php.ini.default php.ini
- sudo chmod 777 php.ini
- edit /etc/php.ini (using what ever editor)
-> session:auto_start = 1
-> session:save_path = /tmp
-> mysql.default_socket = /tmp/mysql.sock (x2)
- sudo chmod 444 php.ini
Restart apache
Saturday, August 28, 2010
MySQL problem after upgrade to Mac OS 10.6
Mac OS version:
10.6.3
Problem:
MySQL server not started
Solution:
Create a symbolic link named "mysql"
In folder "/usr/local"
Point to "/usr/local/mysql-5.1.42-osx10.5-x86_64"
Restart computer
Wednesday, June 16, 2010
14" Notebook
1) Asus
A52JC
A52JR
http://hk.asus.com/product.aspx?P_ID=OdtStEQ9nbSbUSMI
A52F
2) Lenovo
Thinkpad Edge
Core i3-330M, 14" WXGA, 320G HD, 2G RAM, DVD
HDMI, 6 cell, 2.22kg, Win7 Home Premium
Color:black or red
Price: HK$5,688 up
Saturday, June 12, 2010
Handle photo with iPhone
1) Copy photo file from SD card to iPhone
ZoomIt SD Card Reader (hardware)
Info: ZoomIt,iPhone的讀卡機
Google Search: iPhone SD card reader
2) Upload file to FTP server
iStorage (iPhone App)
Info: search "iStorage" in iTunes App Store
Info: istorageapp.com
Google Search: istorage
FTP On The Go (iPhone App)
Info: search "ftp" in iTunes App Store
Info: www.ftponthego.com
Google Search: ftp on the go
Google Search: iPhone upload ftp
3) Update Exif/IPTC meta data of photo file
Still searching ...
Monday, May 17, 2010
Install GD on Mac with PHP
Reference:
1. start terminal
sudo bash
2. install libjpeg
mkdir -p /SourceCache
cd /SourceCache
curl -O http://.../jpegsrc.v6b.tar.gz
(http://www.opensource.apple.com/source/apache_mod_php/apache_mod_php-53/libjpeg)
(or download first, then cp /.../jpegsrc.v6b.tar.gz .)
tar xzpf jpegsrc.v6b.tar.gz
cd /SourceCache/jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
(64-bit only)
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure --enable-shared
make clean
make
mkdir -p /usr/local/include
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
mkdir -p /usr/local/man/man1
make install
3. Compile GD graphics library extension (gd.so)
- make sure which php version is using
mkdir -p /SourceCache
cd /SourceCache
curl -O http://.../php-5.2.11.tar.bz2
(http://us.php.net/get/php-5.2.11.tar.bz2/from/a/mirror)
(or download first, then cp /.../php-5.2.11.tar.bz2 .)
tar xjf php-5.2.11.tar.bz2
cd /SourceCache/php-5.2.11/ext/gd
phpize
(64-bit only)
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load" ./configure --with-zlib-dir=/usr --with-jpeg-dir=/usr/local/lib --with-png-dir=/usr/X11R6 --with-freetype-dir=/usr/X11R6 --with-xpm-dir=/usr/X11R6
make clean
make
make install
4. Add gd.so to PHP
- edit php.ini
-> add extension=gd.so
-> add extension_dir=/usr/lib/php/extensions/no-debug-non-zts-20060613
- restart apache
-> apachectl graceful
Subscribe to:
Posts (Atom)