ERROR: failed to open error_log (/usr/var/log/php-fpm.log)

原文地址:http://blog.csdn.net/dracotianlong/article/details/21882915

Mac OS X 10.9已经自带有php-fpm,对于有干净系统强迫症的人,可以用brewhome重装一遍。

     直接在mac下执行php-fpm,会出现以下的错

[plain]  view plain  copy
  1. Draco:etc root# php-fpm  
  2. [23-Mar-2014 21:24:31] ERROR: failed to open configuration file '/private/etc/php-fpm.conf': No such file or directory (2)  
  3. [23-Mar-2014 21:24:31] ERROR: failed to load configuration file '/private/etc/php-fpm.conf'  
  4. [23-Mar-2014 21:24:31] ERROR: FPM initialization failed  


     使用下面的命令cp一份,到php目录,并且config下

[plain]  view plain  copy
  1. Draco:etc root# cp /private/etc/php-fpm.conf.default /usr/local/etc/php/5.4/php-fpm.conf  

[plain]  view plain  copy
  1. Draco:etc root# php-fpm --fpm-config /usr/local/etc/php/5.4/php-fpm.conf  
  2. [23-Mar-2014 22:01:58] ERROR: failed to open error_log (/usr/var/log/php-fpm.log): No such file or directory (2)  
  3. [23-Mar-2014 22:01:58] ERROR: failed to post process the configuration  
  4. [23-Mar-2014 22:01:58] ERROR: FPM initialization failed  
  5. Draco:etc root#   

出现上面的错误是由于php-fpm日志路径错误,修改下php-fpm.conf的配置

[plain]  view plain  copy
  1. vi /usr/local/etc/php/5.4/php-fpm.conf   

error_log = /usr/local/var/log/php-fpm.log

pid = /usr/local/var/run/php-fpm.pid


或者不修改配置文件中配置项的路径,在php-fpm的运行参数中(-p)指定放置运行时文件的相对路径前缀


$ php-fpm --fpm-config /usr/local/etc/php/5.4/php-fpm.conf  --prefix /usr/local/var

到此,php-fpm守护进程已经基本可以正确的启动了。
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
cc -o ../../bin/lsqfit main.o lsqfit_ls.o block_init.o line.o -L../../lib -ldblock -ldutil /home/ubuntu/software/tcl/tcl8.5.11/lib/libtcl8.5.so -lm -lc /usr/bin/ld: main.o: in function `main': main.c:(.text+0x239): undefined reference to `blk_open_file' /usr/bin/ld: main.c:(.text+0x499): undefined reference to `blk_open_file' /usr/bin/ld: main.c:(.text+0x5e3): undefined reference to `blk_open_file' /usr/bin/ld: main.c:(.text+0x8f9): undefined reference to `blk_open_file' /usr/bin/ld: ../../lib/libdblock.a(skip.o): in function `blk__skip': skip.c:(.text+0xed): undefined reference to `blk__getlines' /usr/bin/ld: skip.c:(.text+0x126): undefined reference to `blk__getlines' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_init_read': read.c:(.text+0x15): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_read_blk': read.c:(.text+0x6a): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_read_data': read.c:(.text+0xad): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk__read_data': read.c:(.text+0x119): undefined reference to `blk__getlines' /usr/bin/ld: read.c:(.text+0x1b2): undefined reference to `blk__getlines' /usr/bin/ld: read.c:(.text+0x1e5): undefined reference to `blk__getlines' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_read_check': read.c:(.text+0x398): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_read_blk_check': read.c:(.text+0x3d6): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk__read_check': read.c:(.text+0x49b): undefined reference to `blk__getlines' /usr/bin/ld: read.c:(.text+0x788): undefined reference to `blk__getlines' /usr/bin/ld: ../../lib/libdblock.a(read.o): in function `blk_print_env': read.c:(.text+0xbdf): undefined reference to `blk__getenv' /usr/bin/ld: ../../lib/libdblock.a(variables.o
06-06

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值