Âç²È¥á¥â/MAMP/MAMP´Ä¶¤Ç¤ÎPHP¥¨¥é¡¼É½¼¨ http://www.ark-web.jp/sandbox/design/wiki/300.html
Âç²È¥á¥â/MAMP/MAMP´Ä¶¤Ç¤ÎPHP¥¨¥é¡¼É½¼¨
Âç²È¥á¥â/MAMP/MAMP´Ä¶¤Ç¤ÎPHP¥¨¥é¡¼É½¼¨MAMP´Ä¶¤Ç¤ÎPHP¥¨¥é¡¼É½¼¨ †
Ìܼ¡ †
phpinfo´Ø¿ô¤ÇMAMP´Ä¶¤Ç¤ÎÀßÄê³Îǧ †
MAMP¤Î¥Ð¡¼¥¸¥ç¥ó¤Ë¤è¤êÀßÄê¤Ëº¹°Û¤¬¤¢¤ë¤¿¤á¡¢¤Þ¤º¤Ï¸½¾õ¤ÎÀßÄê¤ò³Îǧ¤¹¤ë¤¿¤áphpinfo´Ø¿ô¤òµ½Ò¤·¤¿php¥Õ¥¡¥¤¥ë¤òÍÑ°Õ¤·¤Þ¤¹¡£
<?php phpinfo(); ?>
¾åµ¤ÎÆâÍƤòµ½Ò¤·¤¿php¥Õ¥¡¥¤¥ë¤ò²¾¤Ëphp_test.php¤È¤·¡¢MAMP¤Î´Ä¶²¼¤ØÇÛÃÖ¤·É½¼¨¤µ¤»¤Æ¤ß¤Þ¤¹¡£
Îã¤È¤·¤Æ¡¢
¤ÇÀßÄꤷ¤¿¡Öproject001¡×¥Ç¥£¥ì¥¯¥È¥êľ²¼¤ØÇÛÃÖ¤·¡¢¥Ö¥é¥¦¥¶¤Ë¤Æ
http://localhost:8001/php_test.php
¤Ç¥¢¥¯¥»¥¹¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Ê¾ðÊ󤬳Îǧ¤Ç¤¤Þ¤¹¡£
º£²ó¤Ï¤½¤ÎÃæ¤Î¡Öerror_log¡×¡Ödisplay_errors¡×¤Î¹àÌܤò³Îǧ¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
php.ini¤Îerror_log¡¢display_errors¹àÌܤÎÀßÄê³Îǧ †
MAMP ¥Ð¡¼¥¸¥ç¥ó1.7.1¤Ç¡Öerror_log¡×¤Î¹àÌܤò³Îǧ¤·¤Æ¤ß¤ë¤È¡¢
¤Èɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç͸ú¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢¥¨¥é¡¼¤Î¥í¥°¤Ïί¤Þ¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£
¼¡¤Ë¡Ödisplay_errors¡×¤Î¹àÌܤò³Îǧ¤·¤Æ¤ß¤ë¤È¡¢
¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢¡Ödisplay_errors¡×¤Ï̵¸ú¤È¤Ê¤Ã¤Æ¤¤¤ë¤è¤¦¤Ç¤¹¡£
»î¤·¤ËÀè¤Û¤ÉÀßÄê³ÎǧÍѤ˺îÀ®¤·¤¿¡Öphp_test.php¡×¤ÎÆâÍƤò¤ï¤¶¤È´Ö°ã¤¨¤¿ÆâÍƤˤ·¡¢¡Öphp_test2.php¡×¤È¤·¤Þ¤¹¡£
<? php // ¤ï¤¶¤È¥¹¥Ú¡¼¥¹¤òÆþ¤ì¤Æ¤ß¤Þ¤·¤¿ phpinfo(); ?>
¤³¤Î¥Õ¥¡¥¤¥ë¤ò³Îǧ¤¹¤ë¤¿¤á¡¢¥Ö¥é¥¦¥¶¤Ç
http://localhost:8001/php_test2.php
¤Ë¥¢¥¯¥»¥¹¤·¤Æ¤ß¤Þ¤¹¡£
¤¹¤ë¤È¡Ödisplay_errors¡×¤¬Ìµ¸ú¤È¤Ê¤Ã¤Æ¤¤¤ë¤¿¤á¡¢¥¨¥é¡¼¤¬¤¢¤Ã¤Æ¤â¥Ö¥é¥¦¥¶²èÌ̤ˤϲ¿¤âɽ¼¨¤µ¤ì¤º¡¢½¤Àµ»þ¤Î¼ê½õ¤±¤È¤Ê¤ë¥¨¥é¡¼¤¬É½¼¨¤µ¤ì¤Þ¤»¤ó¡£
MAMP¤Î¥Ç¥Õ¥©¥ë¥È¤Ç̵¸ú¤È¤Ê¤Ã¤Æ¤¤¤ëÍýͳ¤È¤·¤Æ¤Ï¡¢¡Ödisplay_errors¡×¤ÎÀßÄê¤òµ½Ò¤·¤Æ¤¢¤ëphp.ini¥Õ¥¡¥¤¥ë¤Ë¤âµ½Ò¤·¤Æ¤¢¤ë¤è¤¦¤Ç¤¹¤¬¡¢
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
¤Ä¤Þ¤ê
http://jp2.php.net/manual/ja/errorfunc.configuration.php#ini.display-errors
³«È¯¤ò¥µ¥Ý¡¼¥È¤¹¤ë»ÅÁȤߤǤ¢¤ê¡¢ËÜÈ֤Υ·¥¹¥Æ¥à¤Ç¤Ï»ÈÍѤ¹¤Ù¤¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó
¤È¤¤¤¦¤³¤È¤Î¤è¤¦¤Ç¤¹¡£
¤·¤«¤·¡¢¤³¤ÎÏ¢ºÜ¤Ç¤ÏMAMP¤Ï¤¢¤¯¤Þ¤Ç¥í¡¼¥«¥ë¤Î³«È¯´Ä¶¤È¤·¤ÆÍøÍѤ¹¤ë¤³¤È¤òÁÛÄꤷ¤Æ¤¤¤ë¤Î¤Ç¡¢¥¨¥é¡¼¤¬É½¼¨¤µ¤ì¤ë¤Û¤¦¤¬º£¸å²¿¤«¤ÈÊØÍø¤Ç¤¹¡£
¤½¤³¤Ç°Ê²¼¤ÎÊýË¡¤ÇPHP¤Î¥¨¥é¡¼¤¬É½¼¨¤µ¤ì¤ë¤è¤¦ÀßÄê¤ò¤·¤Þ¤¹¡£
php.ini¥Õ¥¡¥¤¥ë¤Ë¤Ædisplay_errors¤ò͸ú²½ †
php.ini¥Õ¥¡¥¤¥ë¤Îµ½Ò¤ò½ñ¤´¹¤¨MAMP´Ä¶Æâ¤ÇPHP¥¨¥é¡¼¤Îɽ¼¨¤ò͸ú¤Ë¤¹¤ë¤¿¤á¡¢
/Applications/MAMP/conf/php5/php.ini
¤Î¥Õ¥¡¥¤¥ë¤Îµ½Ò¤«¤é¡Ödisplay_errors¡×¤ÎÀßÄê¤Ëµ½Ò¤µ¤ì¤Æ¤¤¤ë²Õ½ê¤ò½¤Àµ¤·¤Þ¤¹¡£
php.ini¤ÎPATH(¾ì½ê)¤Ï¾åµ¤Îphpinfo¤Ë¤Æ³Îǧ¤Ç¤¤Þ¤¹¡£
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï
display_errors = Off
¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¤Î¤Ç
display_errors = On
¤È½ñ¤´¹¤¨¤Þ¤¹¡£
Ç°¤Î¤¿¤á°ìÅÙMAMP¤òºÆµ¯Æ°¤·¤Æ¤«¤é¡¢Àè¤Û¤É¤ï¤¶¤Èµ½Ò¤Î´Ö°ã¤¤¤ò¤·¤¿¥Õ¥¡¥¤¥ë
http://localhost:8001/php_test2.php
¤òɽ¼¨¤·¤Æ¤ß¤Þ¤·¤ç¤¦¡£
º£Å٤ϥ¨¥é¡¼¤¬É½¼¨¤µ¤ì¡¢¸¶°ø¤È¤·¤Æ¹Í¤¨¤é¤ì¤ë²Õ½ê¤â»ØŦ¤·¤Æ¤¯¤ì¤Þ¤·¤¿¡£
Ç°¤Î¤¿¤á
http://localhost:8001/php_test.php
¤Ë¥¢¥¯¥»¥¹¤·¡¢¸½ºß¤ÎÀßÄê¤ò³Îǧ¤·¤Æ¤ß¤Þ¤·¤ç¤¦
¡Ödisplay_errors¡×¤¬Í¸ú¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤¬³Îǧ¤Ç¤¤Þ¤·¤¿¡£
¤³¤ì¤Çº£¸åMAMP´Ä¶²¼¤Ç¤âPHP¤Î¥¨¥é¡¼¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤Ê¤ê¡¢¥¨¥é¡¼²Õ½ê¤òÆÃÄꤷ¤ä¤¹¤¯¤Ê¤ë¤«¤È»×¤¤¤Þ¤¹¡£
´ØÏ¢µ»ö †
»²¹Íµ»ö †
- phpinfo´Ø¿ô¤Ë¤è¤ëÀßÄêÆâÍƤγÎǧ - php.ini¤ÎÀßÄê - PHP¥¤¥ó¥¹¥È¡¼¥ë¤È½é´üÀßÄê
http://www.phpbook.jp/install/phpini/index5.html
- Side-B » Blog Archive » [MAMP] display_errors¤ÎÀßÄê
http://side-b.sto.co.jp/weblog/archives/383
- MacOSX ¤Ç PHP ³«È¯´Ä¶¤òºî¤Ã¤Æ¤ß¤ë¡ÊMAMP ¡ß PEAR ¡ß Smarty ¤Î¥¤¥ó¥¹¥È¡¼¥ë¡Ë - applesy16g::Hatena
http://d.hatena.ne.jp/tenkousei/20060428/1146193479
źÉÕ¥Õ¥¡¥¤¥ë: img_display_error_off.gif 1055·ï [¾ÜºÙ] img_display_error_on.gif 2712·ï [¾ÜºÙ] img_php_error.gif 2781·ï [¾ÜºÙ] img_error_log.gif 2805·ï [¾ÜºÙ] img_phpinfo.gif 1010·ï [¾ÜºÙ]