php実行ファイルのパスを調べる(MacPort)
MacPortではターミナルコマンド1行インストールで、
様々なコンポーネントを簡単に追加削除が行えます。
その為、インストールは完了したが、どこにインストールされたのかが、
分からなくなってしまう場合もあるのではないでしょうか。
ここではインストールしたPHPの実行ファイルパスを調べる手順をご紹介します。
php実行ファイルのパスを調べる(MacPort)
MacPortからインストールしたコンポーネントが、
使用しているファイルの一覧は簡単に確認することができます。
以下の手順で行う事ができます。
以下は「php53」というコンポーネント名で提供されるPHPの、
インストールによって展開されたファイルの一覧を表示しています。
その実行結果が以下になります。
多くの情報が表示されていますが、強調表示をしている部分に着目します。
実行ファイルが「php53」として以下に展開されています。
/opt/local/bin/php53
また、php.iniファイルのテンプレートが以下に配置されているのが分かります。
/opt/local/etc/php53/php.ini-development
/opt/local/etc/php53/php.ini-production
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 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
Last login: Tue Feb 7 17:21:16 on ttys001 psl-osxlion:~ <username>$ port contents php53 Port php53 contains: /opt/local/bin/php-config53 /opt/local/bin/php53 /opt/local/bin/phpize53 /opt/local/etc/php53/php.ini-development /opt/local/etc/php53/php.ini-production /opt/local/etc/select/php/php53 /opt/local/include/php53/php/TSRM/TSRM.h /opt/local/include/php53/php/TSRM/acconfig.h /opt/local/include/php53/php/TSRM/readdir.h /opt/local/include/php53/php/TSRM/tsrm_config.h /opt/local/include/php53/php/TSRM/tsrm_config.w32.h /opt/local/include/php53/php/TSRM/tsrm_config_common.h /opt/local/include/php53/php/TSRM/tsrm_nw.h /opt/local/include/php53/php/TSRM/tsrm_strtok_r.h /opt/local/include/php53/php/TSRM/tsrm_virtual_cwd.h /opt/local/include/php53/php/TSRM/tsrm_win32.h /opt/local/include/php53/php/Zend/acconfig.h /opt/local/include/php53/php/Zend/zend.h /opt/local/include/php53/php/Zend/zend_API.h /opt/local/include/php53/php/Zend/zend_alloc.h /opt/local/include/php53/php/Zend/zend_build.h /opt/local/include/php53/php/Zend/zend_builtin_functions.h /opt/local/include/php53/php/Zend/zend_closures.h /opt/local/include/php53/php/Zend/zend_compile.h /opt/local/include/php53/php/Zend/zend_config.h /opt/local/include/php53/php/Zend/zend_config.nw.h /opt/local/include/php53/php/Zend/zend_config.w32.h /opt/local/include/php53/php/Zend/zend_constants.h /opt/local/include/php53/php/Zend/zend_dynamic_array.h /opt/local/include/php53/php/Zend/zend_errors.h /opt/local/include/php53/php/Zend/zend_exceptions.h /opt/local/include/php53/php/Zend/zend_execute.h /opt/local/include/php53/php/Zend/zend_extensions.h /opt/local/include/php53/php/Zend/zend_fast_cache.h /opt/local/include/php53/php/Zend/zend_float.h /opt/local/include/php53/php/Zend/zend_gc.h /opt/local/include/php53/php/Zend/zend_globals.h /opt/local/include/php53/php/Zend/zend_globals_macros.h /opt/local/include/php53/php/Zend/zend_hash.h /opt/local/include/php53/php/Zend/zend_highlight.h /opt/local/include/php53/php/Zend/zend_indent.h /opt/local/include/php53/php/Zend/zend_ini.h /opt/local/include/php53/php/Zend/zend_ini_parser.h /opt/local/include/php53/php/Zend/zend_ini_scanner.h /opt/local/include/php53/php/Zend/zend_ini_scanner_defs.h /opt/local/include/php53/php/Zend/zend_interfaces.h /opt/local/include/php53/php/Zend/zend_istdiostream.h /opt/local/include/php53/php/Zend/zend_iterators.h /opt/local/include/php53/php/Zend/zend_language_parser.h /opt/local/include/php53/php/Zend/zend_language_scanner.h /opt/local/include/php53/php/Zend/zend_language_scanner_defs.h /opt/local/include/php53/php/Zend/zend_list.h /opt/local/include/php53/php/Zend/zend_llist.h /opt/local/include/php53/php/Zend/zend_modules.h /opt/local/include/php53/php/Zend/zend_multibyte.h /opt/local/include/php53/php/Zend/zend_multiply.h /opt/local/include/php53/php/Zend/zend_object_handlers.h /opt/local/include/php53/php/Zend/zend_objects.h /opt/local/include/php53/php/Zend/zend_objects_API.h /opt/local/include/php53/php/Zend/zend_operators.h /opt/local/include/php53/php/Zend/zend_ptr_stack.h /opt/local/include/php53/php/Zend/zend_qsort.h /opt/local/include/php53/php/Zend/zend_stack.h /opt/local/include/php53/php/Zend/zend_static_allocator.h /opt/local/include/php53/php/Zend/zend_stream.h /opt/local/include/php53/php/Zend/zend_strtod.h /opt/local/include/php53/php/Zend/zend_ts_hash.h /opt/local/include/php53/php/Zend/zend_types.h /opt/local/include/php53/php/Zend/zend_variables.h /opt/local/include/php53/php/Zend/zend_vm.h /opt/local/include/php53/php/Zend/zend_vm_def.h /opt/local/include/php53/php/Zend/zend_vm_execute.h /opt/local/include/php53/php/Zend/zend_vm_opcodes.h /opt/local/include/php53/php/ext/date/lib/timelib.h /opt/local/include/php53/php/ext/date/lib/timelib_config.h /opt/local/include/php53/php/ext/date/lib/timelib_structs.h /opt/local/include/php53/php/ext/date/php_date.h /opt/local/include/php53/php/ext/dom/xml_common.h /opt/local/include/php53/php/ext/ereg/php_ereg.h /opt/local/include/php53/php/ext/ereg/php_regex.h /opt/local/include/php53/php/ext/ereg/regex/cclass.h /opt/local/include/php53/php/ext/ereg/regex/cname.h /opt/local/include/php53/php/ext/ereg/regex/regex.h /opt/local/include/php53/php/ext/ereg/regex/regex2.h /opt/local/include/php53/php/ext/ereg/regex/utils.h /opt/local/include/php53/php/ext/filter/php_filter.h /opt/local/include/php53/php/ext/hash/php_hash.h /opt/local/include/php53/php/ext/hash/php_hash_adler32.h /opt/local/include/php53/php/ext/hash/php_hash_crc32.h /opt/local/include/php53/php/ext/hash/php_hash_gost.h /opt/local/include/php53/php/ext/hash/php_hash_haval.h /opt/local/include/php53/php/ext/hash/php_hash_md.h /opt/local/include/php53/php/ext/hash/php_hash_ripemd.h /opt/local/include/php53/php/ext/hash/php_hash_salsa.h /opt/local/include/php53/php/ext/hash/php_hash_sha.h /opt/local/include/php53/php/ext/hash/php_hash_snefru.h /opt/local/include/php53/php/ext/hash/php_hash_tiger.h /opt/local/include/php53/php/ext/hash/php_hash_types.h /opt/local/include/php53/php/ext/hash/php_hash_whirlpool.h /opt/local/include/php53/php/ext/json/php_json.h /opt/local/include/php53/php/ext/libxml/php_libxml.h /opt/local/include/php53/php/ext/mysqlnd/config-win.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_block_alloc.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_charset.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_debug.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_enum_n_def.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_libmysql_compat.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_net.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_portability.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_priv.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_result.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_result_meta.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_statistics.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_structs.h /opt/local/include/php53/php/ext/mysqlnd/mysqlnd_wireprotocol.h /opt/local/include/php53/php/ext/mysqlnd/php_mysqlnd.h /opt/local/include/php53/php/ext/mysqlnd/php_mysqlnd_config.h /opt/local/include/php53/php/ext/pcre/php_pcre.h /opt/local/include/php53/php/ext/pdo/php_pdo.h /opt/local/include/php53/php/ext/pdo/php_pdo_driver.h /opt/local/include/php53/php/ext/session/mod_files.h /opt/local/include/php53/php/ext/session/mod_user.h /opt/local/include/php53/php/ext/session/php_session.h /opt/local/include/php53/php/ext/spl/php_spl.h /opt/local/include/php53/php/ext/spl/spl_array.h /opt/local/include/php53/php/ext/spl/spl_directory.h /opt/local/include/php53/php/ext/spl/spl_dllist.h /opt/local/include/php53/php/ext/spl/spl_engine.h /opt/local/include/php53/php/ext/spl/spl_exceptions.h /opt/local/include/php53/php/ext/spl/spl_fixedarray.h /opt/local/include/php53/php/ext/spl/spl_functions.h /opt/local/include/php53/php/ext/spl/spl_heap.h /opt/local/include/php53/php/ext/spl/spl_iterators.h /opt/local/include/php53/php/ext/spl/spl_observer.h /opt/local/include/php53/php/ext/standard/base64.h /opt/local/include/php53/php/ext/standard/basic_functions.h /opt/local/include/php53/php/ext/standard/crc32.h /opt/local/include/php53/php/ext/standard/credits.h /opt/local/include/php53/php/ext/standard/credits_ext.h /opt/local/include/php53/php/ext/standard/credits_sapi.h /opt/local/include/php53/php/ext/standard/crypt_blowfish.h /opt/local/include/php53/php/ext/standard/crypt_freesec.h /opt/local/include/php53/php/ext/standard/css.h /opt/local/include/php53/php/ext/standard/cyr_convert.h /opt/local/include/php53/php/ext/standard/datetime.h /opt/local/include/php53/php/ext/standard/dl.h /opt/local/include/php53/php/ext/standard/exec.h /opt/local/include/php53/php/ext/standard/file.h /opt/local/include/php53/php/ext/standard/flock_compat.h /opt/local/include/php53/php/ext/standard/fsock.h /opt/local/include/php53/php/ext/standard/head.h /opt/local/include/php53/php/ext/standard/html.h /opt/local/include/php53/php/ext/standard/info.h /opt/local/include/php53/php/ext/standard/md5.h /opt/local/include/php53/php/ext/standard/microtime.h /opt/local/include/php53/php/ext/standard/pack.h /opt/local/include/php53/php/ext/standard/pageinfo.h /opt/local/include/php53/php/ext/standard/php_array.h /opt/local/include/php53/php/ext/standard/php_assert.h /opt/local/include/php53/php/ext/standard/php_browscap.h /opt/local/include/php53/php/ext/standard/php_crypt.h /opt/local/include/php53/php/ext/standard/php_crypt_r.h /opt/local/include/php53/php/ext/standard/php_dir.h /opt/local/include/php53/php/ext/standard/php_dns.h /opt/local/include/php53/php/ext/standard/php_ext_syslog.h /opt/local/include/php53/php/ext/standard/php_filestat.h /opt/local/include/php53/php/ext/standard/php_fopen_wrappers.h /opt/local/include/php53/php/ext/standard/php_ftok.h /opt/local/include/php53/php/ext/standard/php_http.h /opt/local/include/php53/php/ext/standard/php_image.h /opt/local/include/php53/php/ext/standard/php_incomplete_class.h /opt/local/include/php53/php/ext/standard/php_iptc.h /opt/local/include/php53/php/ext/standard/php_lcg.h /opt/local/include/php53/php/ext/standard/php_link.h /opt/local/include/php53/php/ext/standard/php_mail.h /opt/local/include/php53/php/ext/standard/php_math.h /opt/local/include/php53/php/ext/standard/php_metaphone.h /opt/local/include/php53/php/ext/standard/php_rand.h /opt/local/include/php53/php/ext/standard/php_smart_str.h /opt/local/include/php53/php/ext/standard/php_smart_str_public.h /opt/local/include/php53/php/ext/standard/php_standard.h /opt/local/include/php53/php/ext/standard/php_string.h /opt/local/include/php53/php/ext/standard/php_type.h /opt/local/include/php53/php/ext/standard/php_uuencode.h /opt/local/include/php53/php/ext/standard/php_var.h /opt/local/include/php53/php/ext/standard/php_versioning.h /opt/local/include/php53/php/ext/standard/proc_open.h /opt/local/include/php53/php/ext/standard/quot_print.h /opt/local/include/php53/php/ext/standard/scanf.h /opt/local/include/php53/php/ext/standard/sha1.h /opt/local/include/php53/php/ext/standard/streamsfuncs.h /opt/local/include/php53/php/ext/standard/uniqid.h /opt/local/include/php53/php/ext/standard/url.h /opt/local/include/php53/php/ext/standard/url_scanner_ex.h /opt/local/include/php53/php/ext/standard/winver.h /opt/local/include/php53/php/ext/xml/expat_compat.h /opt/local/include/php53/php/ext/xml/php_xml.h /opt/local/include/php53/php/main/SAPI.h /opt/local/include/php53/php/main/build-defs.h /opt/local/include/php53/php/main/fopen_wrappers.h /opt/local/include/php53/php/main/logos.h /opt/local/include/php53/php/main/php.h /opt/local/include/php53/php/main/php3_compat.h /opt/local/include/php53/php/main/php_compat.h /opt/local/include/php53/php/main/php_config.h /opt/local/include/php53/php/main/php_content_types.h /opt/local/include/php53/php/main/php_getopt.h /opt/local/include/php53/php/main/php_globals.h /opt/local/include/php53/php/main/php_ini.h /opt/local/include/php53/php/main/php_logos.h /opt/local/include/php53/php/main/php_main.h /opt/local/include/php53/php/main/php_memory_streams.h /opt/local/include/php53/php/main/php_network.h /opt/local/include/php53/php/main/php_open_temporary_file.h /opt/local/include/php53/php/main/php_output.h /opt/local/include/php53/php/main/php_reentrancy.h /opt/local/include/php53/php/main/php_scandir.h /opt/local/include/php53/php/main/php_streams.h /opt/local/include/php53/php/main/php_syslog.h /opt/local/include/php53/php/main/php_ticks.h /opt/local/include/php53/php/main/php_variables.h /opt/local/include/php53/php/main/php_version.h /opt/local/include/php53/php/main/rfc1867.h /opt/local/include/php53/php/main/safe_mode.h /opt/local/include/php53/php/main/snprintf.h /opt/local/include/php53/php/main/spprintf.h /opt/local/include/php53/php/main/streams/php_stream_context.h /opt/local/include/php53/php/main/streams/php_stream_filter_api.h /opt/local/include/php53/php/main/streams/php_stream_glob_wrapper.h /opt/local/include/php53/php/main/streams/php_stream_mmap.h /opt/local/include/php53/php/main/streams/php_stream_plain_wrapper.h /opt/local/include/php53/php/main/streams/php_stream_transport.h /opt/local/include/php53/php/main/streams/php_stream_userspace.h /opt/local/include/php53/php/main/streams/php_streams_int.h /opt/local/include/php53/php/main/win32_internal_function_disabled.h /opt/local/include/php53/php/main/win95nt.h /opt/local/lib/php53/build/Makefile.global /opt/local/lib/php53/build/acinclude.m4 /opt/local/lib/php53/build/config.guess /opt/local/lib/php53/build/config.sub /opt/local/lib/php53/build/libtool.m4 /opt/local/lib/php53/build/ltmain.sh /opt/local/lib/php53/build/mkdep.awk /opt/local/lib/php53/build/phpize.m4 /opt/local/lib/php53/build/run-tests.php /opt/local/lib/php53/build/scan_makefile_in.awk /opt/local/lib/php53/build/shtool /opt/local/share/man/man1/php-config53.1.gz /opt/local/share/man/man1/php53.1.gz /opt/local/share/man/man1/phpize53.1.gz /opt/local/var/db/php53/.turd_php53 psl-osxlion:~ <username>$ |
このように、MacPortがインストールしたコンポーネントの情報から、
まず実行ファイルと設定ファイルのテンプレートの場所が分かりました。
実行ファイルパスが分かりましたので、そこから設定を紐解いていきます。
当サイト内のコンテンツおよび画像を含むすべてにおいて、管理人アルゴリズンが著作権を保持しております。
当サイトでご紹介しております写真等につきましては著作権の放棄はしませんが、
ライセンスフリーでご利用いただいて構いません。
コンテンツを有益であると感じていただけましたら非常に光栄です。
ありがとうございます。
サイト内コンテンツを引用される際には、出典元として当サイト(個別記事)へのリンクをお願いいたします。
申し訳ございませんが、無断転載、複製をお断りさせて頂いております。
公開日: