Apache、php错误与配置(一)

一、本地访问时不能用http://localhost:8080,需要用http://localhost:80或者http://localhost,因为端口不是8080(不像Netbeans的JSP开发)。

二、安装UCenter时要把php.ini中的short_open_tag(短标记,<?,?>)设置为on,否则无法安装。

       ; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It's been
; recommended for several years that you not use the short tag "short cut" and
; instead to use the full <?php and ?> tag combination.
With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it's currently still
; supported for backwards compatibility, but we recommend you don't use them.

; Default Value: On
; Development Value: Off
; Production Value: Off
; http://php.net/short-open-tag
short_open_tag=On(原始值为off)

更改完之后记得重启Apache。

三、用Netbeans调试php时需要注意的配置

NetBeans自带Xdebug,所以不用下载Xdebug.dll再扔到\php\ext里面去

一定要修改php.ini 中有关XDebug的配置,否则Netbeans不能正确调试:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll" 此处写你的php_xdebug.dll的fullpath
;xdebug.profiler_append = 0
xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1 重要!!!不设置为on将出现netbeans-xdebug等待连接
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port= 9000
xdebug.trace_output_dir = "C:\xampp\tmp"




你可能感兴趣的:(apache,PHP)