• 締切済み

phpのConfigure Commandについて

ocnのサーバーにphpをvinstallでインストールしたのですが ocn標準で用意されているのは、データベースへアクセスする言語としてのみ利用できる内容になっているようです。 その後のカスタマイズは可能なので、機能を増やしたいのです。 参考になるか分かりませんが、 phpinfo()で表示させると、configure commandの内容が ./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/usr/local/lib' '--disable-debug' '--enable-memory-limit' '--enable-zend-multibyte' '--with-regex=system' '--enable-mbstring=all' '--enable-mbregex' '--enable-dio' '--enable-calendar' '--enable-versioning' '--with-bz2=shared,/usr' '--enable-sockets=shared' '--with-pcre-regex=/usr/local' '--with-iconv=shared,/usr/local' '--with-gdbm=shared' '--with-db3=shared,/usr/local' '--with-gettext=/usr/local' '--with-curl=shared,/usr/local' '--with-openssl=shared,/usr' '--with-pgsql=shared,/usr/local' '--with-openssl=/usr' '--with-gd=shared' '--enable-gd-native-ttf=shared' '--with-freetype-dir=shared,/usr/local' '--with-ttf=shared,/usr/local' '--with-xpm-dir=/usr/X11R6' '--with-jpeg-dir=shared,/usr/local' '--with-png-dir=shared,/usr/local' '--with-t1lib=shared,/usr/local' '--with-zlib=/usr' こんな感じになっています。 この内容で分かりますか? どなたかご教授宜しくお願いいたします。

みんなの回答

  • Yeti21
  • ベストアンサー率47% (396/830)
回答No.2

>私が行いたいのは、htmlファイルは通さずに >任意のphpファイルにアクセスすると >内部で処理が行われ、header関数で任意のhtmlに飛ばすなど >サーバー内で実行のみしたいのです。 これは普通に可能だと思いますよ。 OCNのサイトも確認してみましたが、MySQLの利用する手段としてphpが利用できますよ という記述で、機能を限定しているという記述は見当たりません。 pearに関しては何で判断されたのかわかりませんが、入っていないものを追加することは 無理でしょうね。 OCNでそのような融通が利くとは到底思えません。 どうしても利用したいということであれば、他所のレンタルサーバなどを探すしかないと思います。

miyury
質問者

お礼

ご回答有難うございます。 他のサーバーを検討してみます。 有難うございました。

  • Yeti21
  • ベストアンサー率47% (396/830)
回答No.1

何を聞きたいのかがわかりません。 phpが使えるのであれば、どのようなものを稼動させたいのかを具体的にするか、 実際に作るか既成のものを動かしてみてから考えたらどうでしょう? 少なくとも、質問としてはこのような機能が使えるのか?とか、どこそこで 配布されているこのスクリプトが動作するのか?とか、そういう聞き方を していただかないと回答のしようが無いと思います。

miyury
質問者

補足

今のサーバーのphp設定は、 「MySQLをHTMLファイルから利用するインターフェースとしてPHPのご利用が可能です。」となっています。 私が行いたいのは、htmlファイルは通さずに 任意のphpファイルにアクセスすると 内部で処理が行われ、header関数で任意のhtmlに飛ばすなど サーバー内で実行のみしたいのです。 それから、PEARもインストールしたいのですが インストールされていないようです。 説明が下手ですみません。わかりますでしょうか?

関連するQ&A

  • PHPのconfigureのオプションにつきまして

    日頃WindowsメインでLinuxをあまり使わない者です。 今回、とある理由でCentOS5.5にPHP5.2とMySQL4.0の環境を作る必要が出てきました。それで、それらをソースからコンパイルしてインストールしてみたのですが、PHPのmysql_connect()で以下のようなエラーが出て、原因がわからず困っています。 Can't connect to local MySQL server through socket '/tmp/mysql.sock' (13) PHPもMySQLも単体では正常に動いているようです。データベースも作れました。 それで色々調べていたのですが、/tmp/mysql.sockのアクセス権限を777にしたり、 PHPとMySQLが/tmp/mysql.sockを介する設定になっているかを確認しましたが、いずれも問題無さそうです。 それで、phpinfo()の結果をさくらサーバーのそれと比べてみたところ、 Configure Commandのところが全然違うことがわかりました。 今回構築した環境では、 './configure' '--with-apxs2=/usr/sbin/apxs' '--with-mysql=/usr/local/mysql' ですが、 さくらサーバーは、 './configure' '--prefix=/usr/local/php/5.2' '--with-config-file-path=${prefix}/etc' '--with-config-file-scan-dir=${prefix}/etc/conf.d' '--enable-force-cgi-redirect' '--with-openssl=/usr/local/ssl' '--with-zlib=/usr' '--with-curl' '--enable-exif' '--with-pcre-dir=/usr/local' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-ttf' '--with-freetype-dir=/usr/local' '--with-gettext=/usr/local' '--with-gmp=/usr/local' '--with-iconv=/usr/local' '--enable-mbstring' '--with-mcrypt' '--with-mysql=/usr/local' '--with-mysqli=/usr/local/bin/mysql_config' '--with-pdo-mysql=/usr/local' '--with-snmp=/usr/local' '--enable-soap' '--with-xsl=/usr/local' '--enable-zip' と非常に多いです。 これらは関係あるでしょうか。初歩的な質問で恐縮ですが、ご存知の方がいらっしゃいましたら、ご教示いただけましたら助かります。 よろしくお願いします。

    • ベストアンサー
    • PHP
  • PHPのCGIモードとについて

    PHPのCGIモードとについて PHPのCGIモードというのがよく分かりません。 自分はcentOSにソースコードからPHPを入れております。 で、主にApacheと連携させています。 ただ、最近は #!/usr/local/bin/php -q などを最初に書いてコマンドラインからの使用が多くなっております。 自分は ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-freetype-dir=/usr/local/lib --with-gd --with-mysqli=/usr/local/mysql5.5/bin/mysql_config --with-pdo-mysql=/usr/local/mysql5.5 --with-mysql-sock=/var/lib/mysql/mysql.sock --with-zlib --with-xsl=/usr/lib --enable-mbregex --enable-mbstring --enable-bcmath --with-mcrypt --disable-posix-threads --enable-bcmath --with-readline --with-curl=/usr/local/curl --with-curlwrappers --with-openssl --with-openssl-dir=/usr/lib64/openssl --enable-pcntl のようにしているのですが、これでCGIモードにはなっているのでしょうか? いまいち概念が掴めないでおります。 具体的な事例や、CGIモードでない場合との違いなどを教えていただけないでしょうか? また、CGIモードにするために何かphp.ini等で設定をするような事があるのであれば、 どのようにしてCGIモードとして使えるようになるのかをアドバイスいただきたいと思います。

    • ベストアンサー
    • PHP
  • Red Hat ES 3にPHP5.2.5インストール時のconfigureエラー

    Red Hat ES 3にPHP5.2.5をインストールしようとしています。 configure時に(オプションは後述)、 configure: error: GD build test failed. Please check the config.log for details. と出てしまい、config.logを見てもよくわかりません。 (config.log 頭省略) configure:43450: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local//lib -L/usr/local//lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib -Wl,-rpath,/usr/local//lib -L/usr/local//lib conftest.c -lgd -lgd -lfreetype -lpng -lz -ljpeg -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5 /usr/local//lib/libgd.so: undefined reference to `libiconv_open' /usr/local//lib/libgd.so: undefined reference to `libiconv_close' /usr/local//lib/libgd.so: undefined reference to `libiconv' collect2: ld returned 1 exit status configure: failed program was: #line 43439 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gdImageCreate(); int main() { gdImageCreate() ; return 0; } --------------------------- undefined reference to `libiconv_open' かなと予想していますが、どこをどうしていいのやら? ちなみに # ls -l /usr/local/lib/libgd.so /usr/local/lib/libgd.so -> libgd.so.2.0.0 でちゃんとシンボリックリンクは設定されているようです。 どなたか対処方法・調査方法がご存知の方、ぜひぜひご教授ください。m(_._)m ※ configureオプション ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbsrt-enc-trans --enable-mbregex --enable-trans-sid --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --with-gd=/usr/local/ --enable-gd-native-ttf --enable-gd-jis-conv

    • 締切済み
    • PHP
  • Apache OpenSSL PHP でエラー

    CentOS 5.1にOpenSSL-0.9.8g、httpd-2.0.61、Postgres8.1.10、php-5.2.5でWEBサーバを作っているのですが、不思議なエラーが出てうまくいきません。 現象としては以下の通りです。 htdocs_http = httpコンテンツ htdocs = httpsコンテンツ apacheをstartsslで起動して、htdocsにphpinfoを 出力するプログラムを作成した後アクセスすると コンテンツのTOPに Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html ae03 などのメッセージが出力されます。 Apacheとphpを何度も再インストールしたのですが解決できません。 誰か似たような現象を起こった方や、 解決策を知っている方教えていただけませんか。 インストールした順は以下の通りです。 1. OpenSSL 2. httpd 3. Postgres 4. php インストールしたオプション 1. OpenSSL # ./config -fPIC shared 参考にしたサイト http://uguisu.skr.jp/Windows/apache2.html 2. Apache # ./configure \ # --enable-so --enable-ssl --with-ssl=/usr/local/ssl 3. Postgres # ./configure のみのオプションなし。 4. php # ./configure \ # --enable-mbstring=all --enable-mbregex \ # --enable-sockets --enable-ftp \ # --with-apxs2=/usr/local/apache2/bin/apxs \ # --with-pgsql=/usr/local/pgsql --without-mysql \ # --with-gd --enable-gd-native-ttf \ # --with-freetype-dir=/usr --with-jpeg-dir=/usr \ # --with-zlib=/usr --with-png-dir=/usr \ # --with-imap=/usr --with-kerberos=/usr \ # --with-imap-ssl --with-pdo-pgsql=/usr/local/pgsql \ # --with-mcrypt=/usr/local

    • 締切済み
    • PHP
  • PHPのconfigureについて

    PHP5.2.6をインストールしようとしているのですが、configureコマンドの所で躓いています 実行しているconfigureオプションは以下の通りです。 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-gd --with-zlib --enable-bcmath --enable-mbregex --enable-mbstring とすると configure: error: libpng.(a|so) not found. となります。 yum install libpngとすると Package 2:libpng-1.2.10-7.1.el5_3.2.i386 already installed and latest version となるので最新版のようです。 このconfigure: error: libpng.(a|so) not found.を克服する術を教えて頂けると助かります。 何卒よろしくお願いします。

    • ベストアンサー
    • PHP
  • phpインストールについて

    CentOS5.0にphp5.2系をmakeし、インストールを 行いました。 その後の確認を行ったときにhttpを再起動したのですが 起動されません。 (httpはCentOSに入っているものを使用しています。) phpをインストールする前は問題なく起動できていました。 httpのerrorログを見ると Directory index forbidden by Options directive: /var/www/html/ のエラーがでていました。 /var/www/html/自体は存在しますしhttpd.confにも設定しています。 ちなみにphpのコンパイルは ./configure --with-apxs2=/usr/sbin/apxs \ --prefix=/usr/local \ --with-mysql=/usr/lib/mysql \ --enable-mbstring \ --with-gd \ --with-jpeg-dir=/usr \ --with-png-dir=/usr \ --with-zlib-dir=/usr \ --with-pear \ --with-openssl で行いました。 どこから調査すればよいのでしょうか?

    • 締切済み
    • PHP
  • PHPのconfigureでmysqlエラーが

    CentOS 5 x86_64上でapache+php+mysqlのサーバ構築中ですが、どうもうまくいきません。 apacheとphpでconfigureのオプションを付けてインストールしたいので、rpm -eでhttpdとphpをアンインストールしたうえで、apacheとphpをmake installしようとしました。 apacheはうまくinstallできたのですが、phpはconfigureでエラーが出てしまいます。 以前Cent OS 5.2(32bit)でやった時は問題なかったのですが・・・ ↓configure時のエラーメッセージ -------------------- checking for mSQL support... no checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. -------------------- ↓config.logのエラーメッセージ -------------------- configure:60440: checking for mysql_error in -lmysqlclient configure:60459: gcc -o conftest -I/usr/include -g -O2 -Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib -Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -Wl,-rpath,/usr -L/usr conftest.c -lmysqlclient -lz -lfreetype -lpng -lz -ljpeg -lcurl -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lssl -lcrypto -ldl -lz -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz -lxml2 -lz -lm 1>&5 /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status configure: failed program was: #line 60448 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char mysql_error(); -------------------- ↓apacheのconfigure ------------------------- ./configure --enable-layout=Apache --disable-autoindex --disable-status --disable-userdir --enable-modules=so --enable-mods-shared=max --enable-ssl --with-ssl=/usr/share/ssl --enable-rewrite=shared --enable-ext-filter ------------------------- ↓phpのconfigure ------------------------- ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --enable-gd-native-ttf --with-gd --with-ttf --with-jpeg-dir --with-freetype-dir --with-png-dir --with-zlib --with-curl --with-openssl --with-mysql ------------------------- バージョンは apache:2.2.11 php:5.2.10, 5.3.0の両方で試しましたが結果は同じ mysql-5.0.45-7.el5.x86_64 mysql-devel-5.0.45-7.el5.x86_64 です。 どなたかご教授いただけますと助かります・・・

  • php-5.3.3のconfigureでエラー

    RHEL6にPHP5.3.3をソースインストール(訳あってrpmを使えない)しようとすると 下記のエラーが出て困ってます。 configure: error: DBA: Could not find necessary header file(s). configureは下記を指定してます。RHEL5.5ではOKだったのに6では通らない。 インストールされているパッケージが原因かと思っているのですが、情報が 見当たらず前に進めません。 同じ状況になった方助言をお願いします。 OS:Red Hat Enterprise Linux Server release 6.0 (Santiago) PHP:php-5.3.3.tar.gz configure:./configure \ --enable-track-vars \ --enable-trans-sid \ --with-mysql=/usr/local/mysql \ --with-gdbm \ --disable-debug --with-apxs2=/usr/local/apache/bin/apxs \ --enable-mbstring \ --enable-mbstr-enc-trans \ --with-mcrypt=/usr/local/lib \ --with-ldap=/usr ※Apache2、mysql、mcryptは正常にインストールされてます。 宜しくお願いします。

  • PHPにmssqlをインストールする際のエラー

    CentOS5.1を使っています。 PHP5.2.6にmssqlをインストールしようとしていますが、エラーが出ます。 ./configure --with-apxs2=/usr/local/apache2/bin/apxs --enable-mbstring --enable-mbregex --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local/lib --with-freetype-dir=/usr/local/lib --with-gd=/usr/local/ --enable-gd-native-ttf --enable-gd-jis-conv --with-mcrypt=/usr/local/lib --with-mssql=/usr/local (実行) ・・・・ checking for mSQL support... no checking for MSSQL support via FreeTDS... yes configure: error: Directory /usr/local is not a FreeTDS installation directory --with-mssql=/usr/localのところを --with-mssql=/usr/ --with-mssql=/ に変えてみましたが同様です。 freeTDSが入っている事も再度確認しました。 --- # yum info freetds Loading "installonlyn" plugin Setting up repositories Reading repository metadata in from local files Installed Packages Name : freetds Arch : i386 Version: 0.64 Release: 11.el5.centos Size : 2.2 M Repo : installed Summary: Implementation of the TDS (Tabular DataStream) protocol Description: FreeTDS is a project to document and implement the TDS (Tabular DataStream) protocol. TDS is used by Sybase(TM) and Microsoft(TM) for client to database server communications. FreeTDS includes call level interfaces for DB-Lib, CT-Lib, and ODBC. --- 海外の掲示板でも悩んでいる人がいましたが、prefixを変更して解決しているようです。ですが、私の場合解決しません。 どなたかご存知の方、教えてください。

    • ベストアンサー
    • PHP
  • CentOS5.2にPHP4.4.9をインストールしたいんですが。。。

    CentOS5.2にPHP4.4.9をインストールしたいんですが。。。 $ tar -zxvf php-4.4.9.tar.gz; cd php-4.4.9 ファイルを展開した後に $ ./configure --with-apxs2=/usr/bin/apxs --enable-mbstring --with-mysql --with-gd --with-jpeg=/usr/lib --with-png=/usr/lib を実行しましたが。 # ./configure --with-apxs2=/usr/bin/apxs --enable-mbstring --with-mysql --with-gd --with-jpeg=/usr/lib --with-png=/usr/lib loading cache ./config.cache checking for egrep... grep -E checking for a sed that does not truncate output... /bin/sed checking host system type... i686-pc-linux-gnu checking for gcc... no checking for cc... no configure: error: no acceptable cc found in $PATH このようになってしまい何をしていいか分かりません。どなたか教えて下さい。 参考URL http://d.hatena.ne.jp/donbulinux/20090304/1236160239