日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

fastdfs php client,centos 5.7_64位下FastDFS_client的配置和PHP测试

發布時間:2025/4/5 php 17 豆豆
生活随笔 收集整理的這篇文章主要介紹了 fastdfs php client,centos 5.7_64位下FastDFS_client的配置和PHP测试 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

client??? server5 192.168.10.229

client server 先安裝LNMP環境

cd? /root/soft/FastDFS/php_client

/usr/local/php-5.2.17/bin/phpize

./configure --with-php-config=/usr/local/php-5.2.17/bin/php-config

make

make install

#copy lib file to php extension directory, eg. /usr/lib/php/20060613/

cp modules/fastdfs_client.so? /usr/local/php-5.2.17/lib/php_extensions/

編輯/usr/local/php-5.2.17/etc/php.ini增加

extension=/usr/local/php-5.2.17/lib/php_extensions/fastdfs_client.so

; the base path

fastdfs_client.base_path = /tmp

; 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 = info

; set the log filename, such as /usr/local/fastdfs/logs/fastdfs_client.log

; empty for output to stderr

fastdfs_client.log_filename =

; 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

編輯完重啟FASTCGI生效

/etc/init.d/fastcgi restart

重啟后,可以用PHPINFO可以看到fastdfs模塊已經加載

解壓后方到WWW目錄

訪問http://192.168.10.229/index.php

上傳文件測試,反回提示正常

array(2) { ["group_name"]=> string(6) "group1" ["filename"]=> string(44) "M00/00/04/wKgK5E9q6IfVorO9AAAnYuwdBOc552.jpg" }

查看一下MYSQL數據庫,里面有記錄地址

id? file_id??????????????????????????????????? group_id??? real_name?? storage_ip

3 M00/00/04/wKgK5E9q6IfVorO9AAAnYuwdBOc552.jpg group1????? 1.jpg?????? 192.168.10.228

測試完成

總結

以上是生活随笔為你收集整理的fastdfs php client,centos 5.7_64位下FastDFS_client的配置和PHP测试的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。