忘记密码   免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 2277 | 回复: 6

[FastDFS] 求助,php网页打开fastdfs_test.php 返回false,终端上执行正常 [复制链接]

论坛徽章:
0
发表于 2017-10-14 21:05 |显示全部楼层
本帖最后由 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 里填写

  1. echo "server info:".fastdfs_tracker_get_connection() ." \n";
  2. echo fastdfs_get_last_error_info()."\n";
复制代码


返回
No such file or directory

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



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




打赏鼓励一下!

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
发表于 2017-10-15 11:13 |显示全部楼层
看下web server的错误日志中报什么错

1人打赏

论坛徽章:
0
发表于 2017-10-15 12:10 |显示全部楼层
找不到文件啊,是你web配置不对吧,估计是web中的php配置不对
来自苹果客户端来自客户端

1人打赏

论坛徽章:
0
发表于 2017-10-15 17:13 来自手机 |显示全部楼层
happy_fish100 发表于 2017-10-15 11:13
看下web server的错误日志中报什么错

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

论坛徽章:
0
发表于 2017-10-15 17:14 来自手机 |显示全部楼层
yuanxiang静 发表于 2017-10-15 12:10
找不到文件啊,是你web配置不& ...

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

论坛徽章:
0
发表于 2017-10-15 21:37 |显示全部楼层
回复 3# yuanxiang静 这是Php.ini的,

  1. extension = fastdfs_client.so

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

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

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

  10. ; standard log level as syslog, case insensitive, value list:
  11. ;;; emerg for emergency
  12. ;;; alert
  13. ;;; crit for critical
  14. ;;; error
  15. ;;; warn for warning
  16. ;;; notice
  17. ;;; info
  18. ;;; debug
  19. fastdfs_client.log_level = debug

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

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

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

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

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

  37. ; connections whose the idle time exceeds this time will be closed
  38. ; unit: second
  39. ; default value is 3600
  40. ; since V4.05
  41. fastdfs_client.connection_pool_max_idle_time = 3600
复制代码


论坛徽章:
0
发表于 2017-10-16 09:09 |显示全部楼层
本帖最后由 zhanfu86 于 2017-10-16 09:11 编辑

下面是client.conf的

  1. # connect timeout in seconds
  2. # default value is 30s
  3. connect_timeout=30

  4. # network timeout in seconds
  5. # default value is 30s
  6. network_timeout=60

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

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

  12. #standard log level as syslog, case insensitive, value list:
  13. ### emerg for emergency
  14. ### alert
  15. ### crit for critical
  16. ### error
  17. ### warn for warning
  18. ### notice
  19. ### info
  20. ### debug
  21. log_level=debug

  22. # if use connection pool
  23. # default value is false
  24. # since V4.05
  25. use_connection_pool = false

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

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

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

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


  46. #HTTP settings
  47. http.tracker_server_port=8080

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

  3. # MIME types mapping filename
  4. # MIME types file format: MIME_type  extensions
  5. # such as:  image/jpeg        jpeg jpg jpe
  6. # you can use apache's MIME file: mime.types
  7. http.mime_types_filename=mime.types

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

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

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

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

  21. # if support multi regions for HTTP Range
  22. # default value is true
  23. http.multi_range.enabed = true
复制代码



您需要登录后才可以回帖 登录 | 注册

本版积分规则

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号 北京市公安局海淀分局网监中心备案编号:11010802020122
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员  联系我们:wangnan@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP