Coder Social home page Coder Social logo

phpdish / phpdish Goto Github PK

View Code? Open in Web Editor NEW
231.0 16.0 30.0 35.89 MB

:house: PHPDish is a powerful forum system written in PHP. It is based on the Symfony PHP Framework.

Home Page: https://www.phpdish.com

License: MIT License

PHP 76.68% HTML 23.32%
symfony community forum symfony-application twig mysql phpdish

phpdish's Introduction

PHPDish

PHPDish 是一个基于Symfony框架开发的内容社区系统;得益于大量的前端以及后端的第三方类库的使用使得PHPDish有着高质量的代码,敏捷实现; 你可以使用composer或者直接下载本仓库进行程序的安装,注意切换到tag。

PHPDish 开发手册以及详细安装文档

Requirements:

  • PHP 7.2.0+
  • MYSQL 5.6.0+

Features

  • 社区话题/回复
  • 专栏文章/评论
  • Notification通知
  • Markdown编辑器
  • Github风格Emoji表情支持
  • 在回复中@他人
  • 个人主页
  • 电子书编辑/阅读
  • 专栏/电子书付费订阅
  • 钱包管理

关于部分功能的使用以及实现请关注”PHPDish开发手记“专栏,我会在该专栏内记录一些开发经历与使用方法;

PHPDish功能仍在继续实现中,陆续会有新的功能发布出来,欢迎关注,欢迎贡献代码。如果你有好的建议或者问题需要反馈, 可以在Issue 发布新贴;或者到PHPDish社区 http://www.phpdish.com 发布新的话题。如果没有及时回复你可以在PHPDish私信我@slince

文档

安装文档查看这里 /app/Resources/doc/install.md

开源库

项目中使用的第三方库比较多不能一一列举,这里提一些比较核心功能使用到的库

  • 后端
名称 说明
friendsofsymfony/user-bundle 用户管理基础组件
friendsofsymfony/message-bundle 站内信实现的基础组件
knplabs/knp-markdown-bundle Markdown 解析组件
knplabs/knp-gaufrette-bundle 文件系统管理组件
knplabs/knp-menu-bundle 菜单栏生成组件
hwi/oauth-bundle OAuth登录
emojione/emojione Emoji 表情解析的后端组件
lincanbin/material-design-avatars 字符头像生成库
  • 前端
名称 说明
jquery-pjax PJax
marked Markdown 解析组件,前端用
plupload 文件上传
twemoji Emoji 解析
textcomplete 文本域内自动完成,@用户和emoji提示由此组件实现
store 数据存储组件,可将数据写入到多个媒介
highlight.js 正文内代码高亮
inline-attachment 粘贴板复制粘贴上传以及文件拖拽上传
codemirror 前端编辑器
simplemde Markdown编辑器

赞助 Donate

开源项目的发展离不开大家的支持,如果项目对你有所帮助你可以赞助我帮助我把 PHPDish 做的更好。

  • 微信/支付宝

  • PayPal

https://www.paypal.me/slince

捐赠时请留下您的 GitHub 或者个人主页等相关的个人信息 ❤️。

Donate 列表

赞助者 赞助金额 (¥)
Intern 50
阳阳 10
アクア様が見てる@沟槽 200 + 200
未知用户 3

联系我

CHANGELOG

更新日志 CHANGELOG

License

PHPDish 采用 MIT 开源许可证,你可以在商业项目中免费使用 PHPDish 或者基于 PHPDish 二次 开发而不必支付费用。

phpdish's People

Contributors

manhere avatar slince avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpdish's Issues

【建议】评论框相关

1、图片只能拖拽上传体验不好,应该增加上传按钮。
2、评论图片未做压缩处理,应该有个上限值,而且当前没有使用 js 灯箱。

安装成功后500错误

执行app_dev.php后出现:
PDOException 》PDOException 》 DriverException 》 Twig_Error_Runtime
HTTP 500 Internal Server Error
An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT DISTINCT id_5 FROM (SELECT t0_.title AS title_0, t0_.replied_at AS replied_at_1, t0_.reply_count AS reply_count_2, t0_.recommended AS recommended_3, t0_.stick_top AS stick_top_4, t0_.id AS id_5, t0_.body AS body_6, t0_.original_body AS original_body_7, t0_.comment_count AS comment_count_8, t0_.created_at AS created_at_9, t0_.updated_at AS updated_at_10, t0_.enabled AS enabled_11, t0_.vote_count AS vote_count_12 FROM topics t0_ WHERE t0_.enabled = ?) dctrn_result ORDER BY replied_at_1 DESC LIMIT 20 OFFSET 0' with params [1]:

SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'dctrn_result.replied_at_1' which is not in SELECT list; this is incompatible with DISTINCT").

Twig_Error_Runtime
in src/PHPDish/Bundle/WebBundle/Resources/views/Topic/topic_list.html.twig (line 1)
{% for topic in topics %}

1.3.x-beta2 如果安装出错的话看这里

修改下 composer.json 锁定 algolia 包版本为3.1.0

"algolia/search-bundle": "3.1.0"

修改完成之后,重新执行 composer update 再次重试即可。

因为最新版 3.1.1 有个不兼容升级。

不支持MySQL5.7吗?

无法创建管理员账号,提示:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'charge' cannot be null

关于性能底下的问题

qq 20171214114327

centos6的docker环境,php72, opcache也打开了,非dev环境,尝试过把xdebug关闭也是很慢,profiler如上所示

有dockerfile么?

mysql安装,npm安装,composer安装啥的挺麻烦又耗时
没有的话我做个dockerfile,以后要用可以直接pull

mysql5.7兼容

An exception occurred while executing 'SELECT DISTINCT id_5 FROM (SELECT t0_.title AS title_0, t0_.replied_at AS replied_at_1, t0_.reply_count AS reply_count_2, t0_.recommended AS recommended_3, t0_.stick_top AS stick_top_4, t0_.id AS id_5, t0_.body AS body_6, t0_.original_body AS original_body_7, t0_.comment_count AS comment_count_8, t0_.created_at AS created_at_9, t0_.updated_at AS updated_at_10, t0_.enabled AS enabled_11, t0_.vote_count AS vote_count_12 FROM topics t0_ WHERE t0_.enabled = ?) dctrn_result ORDER BY replied_at_1 DESC LIMIT 20 OFFSET 0' with params [1]: SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'dctrn_result.replied_at_1' which is not in SELECT list; this is incompatible with DISTINCT

用这个:http://blog.csdn.net/feinifi/article/details/54135310解决了,但是不确定云厂商得mysql5.7是否是这么做的,能兼容5.7就尽量兼容吧

error

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
remote: Did you forget a "use" statement for another namespace? in /tmp/build_56a054c4917656f366c5652e3aa63a61/app/AppKernel.php:64

到底怎么安装呢?安装不成功啊!

执行composer install命令后,最终出现这个错误:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
The path "fos_user.from_email.address" cannot contain an empty value, but got null.

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationExcept

ion]
The path "fos_user.from_email.address" cannot contain an empty value, but
got null.

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] []...

prod/dev环境的缓存问题

在app_dev.php下,发现session文件会频繁的产生,因为登录的时候启用了记住功能,所以实际上框架默认帮你登录了,但是csrf_token失效了。。。但是app.php的prod环境就没有这个问题,所以就在prod上开发了。。。

然而每次清理缓存的时候用php bin/console cache:clear都没有,只有手动去删除/var/cache/prod目录才有用,不知道啥原因

上传照片出错,所有地方的上传图片都出错

image

/var/logs中的错误日志是
[2018-07-26 04:12:02] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException: "No matching accepted Responseformat could be determined" at /var/www/phpdish/vendor/friendsofsymfony/rest-bundle/EventListener/FormatListener.php line 71 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException(code: 0): No matching accepted Response format could be determined at /var/www/phpdish/vendor/friendsofsymfony/rest-bundle/EventListener/FormatListener.php:71)"} []

php兼容问题

php7.0在执行php bin/console phpdish:install弹:

PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Return value of ProxyManager\Configuration::setGeneratorStrategy() must be an instance of ProxyManager\void, none returned in /app/vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php:124
Stack trace:
#0 /app/vendor/symfony/symfony/src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php(37): ProxyManager\Configuration->setGeneratorStrategy(Object(ProxyManager\GeneratorStrategy\EvaluatingGeneratorStrategy))
#1 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(731): Symfony\Bridge\ProxyManager\LazyProxy\Instantiator\RuntimeInstantiator->__construct()
#2 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(679): Symfony\Component\HttpKernel\Kernel->getContainerBuilder()
#3 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(572): Symfony\Component\HttpKernel\Kernel->buildContainer()
#4 /app/vendor/symfony/symfony/src/Symfony/Component/HttpKern in /app/vendor/ocramius/proxy-manager/src/ProxyManager/Configuration.php on line 124

跑去看发现那个包这样写的:

public function setGeneratorStrategy(GeneratorStrategyInterface $generatorStrategy) : void
    {
        $this->generatorStrategy = $generatorStrategy;
    }

这是7.1的新特性,别说5.6了,7.0都不行,估计只能泡在php7.1~7.2上了

github登录问题

image

想申请使用github登录,然后申请的时候需要填两个地址,这两个地址不会填。望指教。
安装文档中社交登录那块也已经看了,哪里没有提到这个啊

freeze_amount字段无法找到

[2018-02-25 17:58:09] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\InvalidFieldNameException: "An exception occurred while executing 'SELECT t0.amount AS amount_1, t0.freeze_amount AS freeze_amount_2, t0.id AS id_3, t0.created_at AS created_at_4, t0.updated_at AS updated_at_5, t0.user_id AS user_id_6 FROM wallets t0 WHERE t0.user_id = ? LIMIT 1' with params [3]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.freeze_amount' in 'field list'" at D:\workshop\ifnotice\phpdish\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php line 75 {"exception":"[object] (Doctrine\DBAL\Exception\InvalidFieldNameException(code: 0): An exception occurred while executing 'SELECT t0.amount AS amount_1, t0.freeze_amount AS freeze_amount_2, t0.id AS id_3, t0.created_at AS created_at_4, t0.updated_at AS updated_at_5, t0.user_id AS user_id_6 FROM wallets t0 WHERE t0.user_id = ? LIMIT 1' with params [3]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.freeze_amount' in 'field list' at D:\workshop\ifnotice\phpdish\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\AbstractMySQLDriver.php:75, Doctrine\DBAL\Driver\PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.freeze_amount' in 'field list' at D:\workshop\ifnotice\phpdish\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:107, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0.freeze_amount' in 'field list' at D:\workshop\ifnotice\phpdish\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php:105)"} []

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.