找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 4295|回复: 21

Openwrt电视盒子搭建php环境 使用diyp电视直播

[复制链接]
本帖最后由 onlyfirer 于 2024-1-26 14:14 编辑

首先感谢https://www.right.com.cn/forum/thread-8316595-1-1.html

本人参照其贴学习小结
先预览下成品效果


配置opkg 源
  1. src/gz openwrt_core https://downloads.openwrt.org/snapshots/targets/armsr/armv8/packages
  2. src/gz openwrt_base https://downloads.openwrt.org/snapshots/packages/aarch64_generic/base
  3. src/gz openwrt_luci https://downloads.openwrt.org/snapshots/packages/aarch64_generic/luci
  4. src/gz openwrt_packages https://downloads.openwrt.org/snapshots/packages/aarch64_generic/packages
  5. src/gz openwrt_routing https://downloads.openwrt.org/snapshots/packages/aarch64_generic/routing
  6. src/gz openwrt_telephony https://downloads.openwrt.org/snapshots/packages/aarch64_generic/telephony



  7. src/gz openwrt_base https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a8_vfpv3/packages
  8. src/gz openwrt_core https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/packages
  9. src/gz openwrt_packages https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/base
  10. src/gz openwrt_luci https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/luci
  11. src/gz openwrt_routing https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/routing
  12. src/gz openwrt_telephony https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/telephon
复制代码

  1. opkg update
复制代码
  1. opkg install php8 php8-cgi php8-mod-ctype php8-mod-curl php8-mod-gettext php8-mod-iconv php8-mod-openssl php8-mod-pdo php8-mod-pdo-sqlite php8-mod-session php8-mod-sockets php8-mod-sqlite3
复制代码
替换/etc/config/uhttpd

  1. config uhttpd 'main'
  2.         list listen_http '0.0.0.0:80'
  3.         list listen_http '[::]:80'
  4.         list listen_https '0.0.0.0:443'
  5.         list listen_https '[::]:443'
  6.         option redirect_https '0'
  7.         option home '/www'
  8.         option rfc1918_filter '1'
  9.         option max_requests '50'
  10.         option max_connections '100'
  11.         option cert '/etc/uhttpd.crt'
  12.         option key '/etc/uhttpd.key'
  13.         option cgi_prefix '/cgi-bin'
  14.         option script_timeout '3600'
  15.         option network_timeout '30'
  16.         option http_keepalive '20'
  17.         option tcp_keepalive '1'
  18.         option ubus_prefix '/ubus'
  19.         option lua_prefix '/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua'
  20.         list interpreter '.php=/usr/bin/php8-cgi'
  21.         list index_page 'index.php'
  22.         list index_page 'index.html'
  23.         list index_page 'index.htm'

  24. config cert 'defaults'
  25.         option days '730'
  26.         option key_type 'ec'
  27.         option bits '2048'
  28.         option ec_curve 'P-256'
  29.         option country 'ZZ'
  30.         option state 'Somewhere'
  31.         option location 'Unknown'
  32.         option commonname 'OpenWrt'

复制代码
替换修改/etc/php.ini

  1. [PHP]

  2. ;;;;;;;;;;;;;;;;;;;;
  3. ; Language Options ;
  4. ;;;;;;;;;;;;;;;;;;;;

  5. engine = On
  6. short_open_tag = On
  7. precision = 12
  8. output_buffering = Off
  9. ;output_handler =
  10. zlib.output_compression = Off
  11. ;zlib.output_compression_level = -1
  12. ;zlib.output_handler =
  13. implicit_flush = Off
  14. unserialize_callback_func =
  15. ;unserialize_max_depth = 4096
  16. serialize_precision = 100
  17. ;open_basedir =
  18. disable_functions =
  19. disable_classes =
  20. ;highlight.string = #DD0000
  21. ;highlight.comment = #FF9900
  22. ;highlight.keyword = #007700
  23. ;highlight.default = #0000BB
  24. ;highlight.html = #000000
  25. ;ignore_user_abort = On
  26. ;realpath_cache_size = 16k
  27. ;realpath_cache_ttl = 120
  28. ;zend.enable_gc = On
  29. ;zend.multibyte = Off
  30. ;zend.script_encoding =
  31. date.timezone = Asia/shanghai
  32. ;zend.exception_ignore_args = On
  33. ;zend.exception_string_param_max_len = 0

  34. ;;;;;;;;;;;;;;;;;
  35. ; Miscellaneous ;
  36. ;;;;;;;;;;;;;;;;;

  37. expose_php = On

  38. ;;;;;;;;;;;;;;;;;;;
  39. ; Resource Limits ;
  40. ;;;;;;;;;;;;;;;;;;;

  41. max_execution_time = 30
  42. max_input_time = 60
  43. ;max_input_nesting_level = 64
  44. ;max_input_vars = 1000
  45. memory_limit = 80M

  46. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  47. ; Error handling and logging ;
  48. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

  49. error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
  50. display_errors = On
  51. display_startup_errors = Off
  52. log_errors = Off
  53. ignore_repeated_errors = Off
  54. ignore_repeated_source = Off
  55. report_memleaks = On
  56. ;report_zend_debug = 0
  57. track_errors = Off
  58. ;html_errors = Off
  59. ;docref_root = "/phpmanual/"
  60. ;docref_ext = .html
  61. ;error_prepend_string = "<span style='color: #ff0000'>"
  62. ;error_append_string = "</span>"
  63. ;error_log = syslog
  64. ;syslog.ident = php
  65. ;syslog.facility = user
  66. ;syslog.filter = ascii

  67. ;;;;;;;;;;;;;;;;;
  68. ; Data Handling ;
  69. ;;;;;;;;;;;;;;;;;

  70. ;arg_separator.output = "&amp;"
  71. ;arg_separator.input = ";&"
  72. variables_order = "EGPCS"
  73. request_order = "GP"
  74. register_argc_argv = On
  75. auto_globals_jit = On
  76. ;enable_post_data_reading = Off
  77. post_max_size = 8M
  78. auto_prepend_file =
  79. auto_append_file =
  80. default_mimetype = "text/html"
  81. default_charset = "UTF-8"
  82. ;internal_encoding =
  83. ;input_encoding =
  84. ;output_encoding =

  85. ;;;;;;;;;;;;;;;;;;;;;;;;;
  86. ; Paths and Directories ;
  87. ;;;;;;;;;;;;;;;;;;;;;;;;;

  88. ;include_path = ".:/php/includes"
  89. ;doc_root = "/www"
  90. user_dir =
  91. extension_dir = "/usr/lib/php8"
  92. ;sys_temp_dir = "/tmp"
  93. enable_dl = On
  94. ;cgi.force_redirect = 1
  95. ;cgi.nph = 1
  96. ;cgi.redirect_status_env =
  97. cgi.fix_pathinfo = 1
  98. ;cgi.discard_path = 1
  99. ;fastcgi.impersonate = 1
  100. ;fastcgi.logging = 0
  101. ;cgi.rfc2616_headers = 0
  102. ;cgi.check_shebang_line = 1

  103. ;;;;;;;;;;;;;;;;
  104. ; File Uploads ;
  105. ;;;;;;;;;;;;;;;;

  106. file_uploads = On
  107. upload_tmp_dir = "/tmp"
  108. upload_max_filesize = 2M
  109. max_file_uploads = 20

  110. ;;;;;;;;;;;;;;;;;;
  111. ; Fopen wrappers ;
  112. ;;;;;;;;;;;;;;;;;;

  113. allow_url_fopen = On
  114. allow_url_include = Off
  115. ;from = "john@doe.com"
  116. ;user_agent = "PHP"
  117. default_socket_timeout = 60
  118. ;auto_detect_line_endings = Off
复制代码
替换方法用WinSCP工具



本路由器的ip为192.168.100.2
应此访问地址为:http://192.168.100.2/diyp/

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
厉害了,学习一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

我的安装失败,不知怎么继续...有大神能指点迷津吗

Unknown package 'php8'.                                                                                                                        
Unknown package 'php8-cgi'.                                                                                                                     
Unknown package 'php8-mod-ctype'.                                                                                                               
Unknown package 'php8-mod-curl'.                                                                                                               
Unknown package 'php8-mod-gettext'.                                                                                                            
Unknown package 'php8-mod-iconv'.                                                                                                               
Unknown package 'php8-mod-openssl'.                                                                                                            
Unknown package 'php8-mod-pdo'.                                                                                                                 
Unknown package 'php8-mod-pdo-sqlite'.                                                                                                         
Unknown package 'php8-mod-session'.                                                                                                            
Unknown package 'php8-mod-sockets'.                                                                                                            
Unknown package 'php8-mod-sqlite3'.                                                                                                            
Collected errors:                                                                                                                              
* opkg_install_cmd: Cannot install package php8.                                                                                               
* opkg_install_cmd: Cannot install package php8-cgi.                                                                                          
* opkg_install_cmd: Cannot install package php8-mod-ctype.                                                                                    
* opkg_install_cmd: Cannot install package php8-mod-curl.                                                                                      
* opkg_install_cmd: Cannot install package php8-mod-gettext.                                                                                   
* opkg_install_cmd: Cannot install package php8-mod-iconv.                                                                                    
* opkg_install_cmd: Cannot install package php8-mod-openssl.                                                                                   
* opkg_install_cmd: Cannot install package php8-mod-pdo.                                                                                       
* opkg_install_cmd: Cannot install package php8-mod-pdo-sqlite.                                                                                
* opkg_install_cmd: Cannot install package php8-mod-session.                                                                                   
* opkg_install_cmd: Cannot install package php8-mod-sockets.                                                                                   
* opkg_install_cmd: Cannot install package php8-mod-sqlite3.

点评

改源为国内的吧  详情 回复 发表于 2024-1-26 14:08
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

不错,谢谢分享!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
muchcool 发表于 2024-1-25 23:42
我的安装失败,不知怎么继续...有大神能指点迷津吗

Unknown package 'php8'.                              ...

改源为国内的吧

点评

国内源的地址是?  详情 回复 发表于 2024-1-27 02:36
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 shikuang21 于 2024-1-26 22:05 编辑

看着真不错,已经按教程安装完和修改完,然后就不会了弄直播源了,能否教教我,感谢

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报


国内源的地址是?

点评

src/gz openwrt_base https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a8_vfpv3/packages src/gz openwrt_core https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic  详情 回复 发表于 2024-1-27 09:58
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
muchcool 发表于 2024-1-27 02:36
国内源的地址是?
  1. src/gz openwrt_base https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a8_vfpv3/packages
  2. src/gz openwrt_core https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/packages
  3. src/gz openwrt_packages https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/base
  4. src/gz openwrt_luci https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/luci
  5. src/gz openwrt_routing https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/routing
  6. src/gz openwrt_telephony https://mirrors.cloud.tencent.com/lede/snapshots/packages/aarch64_generic/telephon
复制代码

点评

我用的就是这个源, 就是报那些错  详情 回复 发表于 2024-1-28 20:56
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报


我用的就是这个源, 就是报那些错

点评

你路由可以和谐上网不喽  详情 回复 发表于 2024-1-29 10:44
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
muchcool 发表于 2024-1-28 20:56
我用的就是这个源, 就是报那些错

你路由可以和谐上网不喽

点评

恩, 可以的  详情 回复 发表于 2024-1-29 23:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

onlyfirer 发表于 2024-1-29 10:44
你路由可以和谐上网不喽

恩,      可以的     
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

来自手机 | 显示全部楼层
感谢分享,后面试试
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

大哥,这里面的文件是哪里来的,可以发下吗,我用的这个https://www.right.com.cn/forum/f ... &highlight=diyp,但是用http://路由器网址/diyp/channel.php打开是白屏的。。。。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

就是添加数据的文件 ,应该有的  详情 回复 发表于 2024-2-21 16:40
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
doxiqi 发表于 2024-2-20 22:36
大哥,这里面的文件是哪里来的,可以发下吗,我用的这个https://www.right.com.cn/forum/forum.php?mod=vie ...

就是添加数据的文件 ,应该有的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

打开页面:Bad Gateway
The process did not produce any response
系统日志:
Sat Feb 24 12:42:19 2024 daemon.err uhttpd[28660]: Error relocating /usr/bin/php8-cgi: xmlFreeEntity: symbol not found
怎么解决呢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 17:50

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表