zhanfu86 发表于 2017-10-14 21:05

求助,php网页打开fastdfs_test.php 返回false,终端上执行正常

本帖最后由 zhanfu86 于 2017-10-16 09:30 编辑

在网页上打开fastdfs_test.php就返回 5.12 fastdfs_tracker_make_all_connections result:bool(false) bool(false)
在centos 的终端上使用 php fastdfs_test.php 是可以正常上传的。

php 里填写

echo "server info:".fastdfs_tracker_get_connection() ." \n";
echo fastdfs_get_last_error_info()."\n";

返回
No such file or directory

但是所有配置文件都有配置好。在终端上执行都是正常的。搞了一星期,求助!!!



已解决,关闭selinux解决,感谢群友Dendy




happy_fish100 发表于 2017-10-15 11:13

看下web server的错误日志中报什么错

yuanxiang静 发表于 2017-10-15 12:10

找不到文件啊,是你web配置不对吧,估计是web中的php配置不对

zhanfu86 发表于 2017-10-15 17:13

happy_fish100 发表于 2017-10-15 11:13
看下web server的错误日志中报什么错

Nginx日志和php日志我都看了,没错误,

zhanfu86 发表于 2017-10-15 17:14

yuanxiang静 发表于 2017-10-15 12:10
找不到文件啊,是你web配置不& ...

Web里的配置都按网上教程下来的,我后面又看了好几天了,看不出什么问题,所以才上论坛求救的

zhanfu86 发表于 2017-10-15 21:37

回复 3# yuanxiang静 这是Php.ini的,

extension = fastdfs_client.so

; the base path
fastdfs_client.base_path = /home/data/fastdfs

; connect timeout in seconds
; default value is 30s
fastdfs_client.connect_timeout = 2

; network timeout in seconds
; default value is 30s
fastdfs_client.network_timeout = 60

; standard log level as syslog, case insensitive, value list:
;;; emerg for emergency
;;; alert
;;; crit for critical
;;; error
;;; warn for warning
;;; notice
;;; info
;;; debug
fastdfs_client.log_level = debug

; set the log filename, such as /usr/local/fastdfs/logs/fastdfs_client.log
; empty for output to stderr
fastdfs_client.log_filename = /home/data/fastdfs/logs/fastdfs_client.log

; secret key to generate anti-steal token
; this parameter must be set when http.anti_steal.check_token set to true
; the length of the secret key should not exceed 128 bytes
fastdfs_client.http.anti_steal_secret_key =

; FastDFS cluster count, default value is 1
fastdfs_client.tracker_group_count = 1

; config file of FastDFS cluster ;, based 0
; must include absolute path, such as fastdfs_client.tracker_group0
; the config file is same as conf/client.conf
fastdfs_client.tracker_group0 = /etc/fdfs/client.conf

; if use connection pool
; default value is false
; since V4.05
fastdfs_client.use_connection_pool = true

; connections whose the idle time exceeds this time will be closed
; unit: second
; default value is 3600
; since V4.05
fastdfs_client.connection_pool_max_idle_time = 3600

zhanfu86 发表于 2017-10-16 09:09

本帖最后由 zhanfu86 于 2017-10-16 09:11 编辑

下面是client.conf的

# connect timeout in seconds
# default value is 30s
connect_timeout=30

# network timeout in seconds
# default value is 30s
network_timeout=60

# the base path to store log files
base_path=/home/data/fastdfs

# tracker_server can ocur more than once, and tracker_server format is
#"host:port", host can be hostname or ip address
tracker_server=192.168.100.150:22122

#standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=debug

# if use connection pool
# default value is false
# since V4.05
use_connection_pool = false

# connections whose the idle time exceeds this time will be closed
# unit: second
# default value is 3600
# since V4.05
connection_pool_max_idle_time = 3600

# if load FastDFS parameters from tracker server
# since V4.05
# default value is false
load_fdfs_parameters_from_tracker=false

# if use storage ID instead of IP address
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# default value is false
# since V4.05
use_storage_id = true

# specify storage ids filename, can use relative or absolute path
# same as tracker.conf
# valid only when load_fdfs_parameters_from_tracker is false
# since V4.05
storage_ids_filename = storage_ids.conf


#HTTP settings
http.tracker_server_port=8080

#use "#include" directive to include HTTP other settiongs
##include http.conf
上面include http.conf 就在同一目录下:
# HTTP default content type
http.default_content_type = application/octet-stream

# MIME types mapping filename
# MIME types file format: MIME_typeextensions
# such as:image/jpeg        jpeg jpg jpe
# you can use apache's MIME file: mime.types
http.mime_types_filename=mime.types

# if use token to anti-steal
# default value is false (0)
http.anti_steal.check_token=false

# token TTL (time to live), seconds
# default value is 600
http.anti_steal.token_ttl=900

# secret key to generate anti-steal token
# this parameter must be set when http.anti_steal.check_token set to true
# the length of the secret key should not exceed 128 bytes
http.anti_steal.secret_key=FastDFS1234567890

# return the content of the file when check token fail
# default value is empty (no file sepecified)
http.anti_steal.token_check_fail=/home/data/fastdfs/conf/anti-steal.jpg

# if support multi regions for HTTP Range
# default value is true
http.multi_range.enabed = true


页: [1]
查看完整版本: 求助,php网页打开fastdfs_test.php 返回false,终端上执行正常