Coder Social home page Coder Social logo

部署问题 about actionview HOT 19 CLOSED

lxerxa avatar lxerxa commented on July 20, 2024
部署问题

from actionview.

Comments (19)

lxerxa avatar lxerxa commented on July 20, 2024
  1. 确认mongodb是否安装成功?可以用命令行连接试试看,如:mongo 127.0.0.1/dbname -uxxx -pxxx
  2. 是否安装了php-mongodb的扩展,例如ubuntu: apt-get install php-mongodb

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

mongo和php-mongo都装好了,web能打开,能登录,但是好多session,api都提示404.

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

database.php文件也已经修改了相关的用户名和密码,dbnamem

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024
  1. 是否执行config.sh脚本?
  2. Apache的配置文件是否添加如下代码:
    <Directory /var/www/actionview/public>
    Options FollowSymLinks
    Order deny,allow
    AllowOverride All

    目的是允许public下的.htaccess配置有效

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

Hi lxerxa:

 谢谢支持,刚刚检查了下:
1.是没有修改.env下的数据库用户名密码

2.没有在httpd增加htaccess配置

添加修改以后,重新执行了config.sh,现在无法登陆,提示用户名失败,是不是数据库配置的问题?

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

是否执行数据库初始化脚本,
mongorestore -h 127.0.0.1 -u username -p secret -d dbname --drop ./dbdata

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

这个执行了,在mongo里面能看到表,内容都有。

现在修改了以下内容:
1.在git clone后执行了composer
2.修改了config/database.php,修改了db的用户名密码;
3.修改了.env的db用户名密码;
4.测试了mongodb使用用户名密码能够认证db;
5.修改了/etc/httpd/confi/httpd.conf

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

[email protected] 使用这个账号登录的吗?注意有个点

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

是的,我再重新部署下试试看。

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

总感觉php没有执行链接到mongo的动作,检查了php-mongo有load进去的,在mongo的log里面没有任何链接成功或者失败的log。

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

谢谢整理!
2.修改了config/database.php,修改了db的用户名密码;
如果第3条配置了,第二条就不需要做任何修改的,因为先读取的是环境变量。

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

已经修改,还是提示密码错误,有什么方法可以判断php链接数据库是否正常,能看到哪里有问题么。

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

能看到接口的返回值是什么吗?第一个接口是/api/session那个接口。

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

服务器返回的是PHP文件,看起来是apache问题,我在看现在。

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

重新安装了apache和php相关组件,现在能登陆成功,但是会秒返回,session和recent会出现505,持续检查环境中。

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

Hi lxerxa:

我现在怀疑是我环境版本和您开发版本不一致导致,能否提供您这的apache,php,mongodb的具体版本呢,谢谢。

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

我觉的不是版本的问题,方便留下你的qq吗?

from actionview.

Ali-MiaoMM avatar Ali-MiaoMM commented on July 20, 2024

qq:376739304

from actionview.

lxerxa avatar lxerxa commented on July 20, 2024

整理了ubuntu安装步骤
ubuntun-Installation

from actionview.

Related Issues (20)

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.