Eclipseのプラグインとして、Aptana インストール(Windows7で検証)
Aptana Update Siteで検索
http://update15.aptana.org/studio/26124/
をアップデートURLとして
From the Help menu, select Install New Software... to open an Install pop-up window.
In the Work with: text box of the Install window, type the URL http://update15.aptana.org/studio/26124/ for the update site, and hit the Enter key.
In the populated table below, check the box next to the name of the plug-in, and click the Next button.
Click the Next button to go to the license page.
Choose the option to accept the terms of the license agreement, and click the Finish button.
PHPのコンパイルオプションをちゃんと勉強する
--prefix=/usr
インストール場所
--exec-prefix
ほとんどの場合、prefixと同じで良いらしい
--bindir=/usr/bin
実行場所
--with-apxs2=/opt/apache-httpd-2.2.21/bin/apxs
Apache 共有モジュールをビルドします。
FILE は Apache apxs ツールへの パスで、デフォルトは apxs です。
Apache のソース Tarball に含まれる apxs を指定するのではなく、
そのシステムに実際にインストールされている バージョンの apxs を指定するようにしましょう。
--enable-mbstring
マルチバイト文字のサポート
--with-mysql=/usr/bin/mysql \
MySQLのサポートをインクルードする
--enable-pdo \
データベースの抽象化レイヤ
--enable-ftp \
FTPサポートを有効にする
--with-pdo-mysql=/usr/bin/mysql
MySQLサポート。右側には、MySQLのベースディレクトリを指定する
PHPのftp_connect関数を使えるようにする
作成したPHPスクリプトで
Fatal error: Call to undefined function ftp_connect() in /home/atmarkit/mycron/notice_ip.php on line 3
ftp_connectが使えない旨のエラーが出たので、--enable-ftpをオプションに加えて、再度コンパイルする
sudo ./configure \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--with-apxs2=/opt/apache-httpd-2.2.21/bin/apxs \
--enable-mbstring \
--with-mysql=/usr/bin/mysql \
--enable-pdo \
--enable-ftp \
--with-pdo-mysql=/usr/bin/mysql
sudo make
sudo make install
apacheをリスタートして、終了
sudo /opt/apache-httpd-2.2.21/bin/apachectl start
Fatal error: Call to undefined function ftp_connect() in /home/atmarkit/mycron/notice_ip.php on line 3
ftp_connectが使えない旨のエラーが出たので、--enable-ftpをオプションに加えて、再度コンパイルする
sudo ./configure \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--with-apxs2=/opt/apache-httpd-2.2.21/bin/apxs \
--enable-mbstring \
--with-mysql=/usr/bin/mysql \
--enable-pdo \
--enable-ftp \
--with-pdo-mysql=/usr/bin/mysql
sudo make
sudo make install
apacheをリスタートして、終了
sudo /opt/apache-httpd-2.2.21/bin/apachectl start
CentOS 5.7 PHPをApache上で動かすと Exec format Error
AddHandler cgi-script .cgi .pl .php
を変更して、
AddHandler cgi-script .cgi
とすると解消。
phpファイルがcgiと認識されていたのが原因らしい
CentOS 5.7にPHPをビルド
■PHPのインストール
yumで入れたphpを削除
sudo yum remove php\*
wgetでソース取得して展開。
--with-apxs2はApacheに組み込む設定
--with-mysqlはMySQLを使用するためのオプション
sudo ./configure \
--prefix=/usr \
--exec-prefix=/usr \
--bindir=/usr/bin \
--with-apxs2=/opt/apache-httpd-2.2.21/bin/apxs \
--enable-mbstring \
--with-mysql=/usr/bin/mysql \
--enable-pdo \
--with-pdo-mysql=/usr/bin/mysql
sudo make
sudo make install



