关于 thinkphp 的求助(求轻拍 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Nicksxs
V2EX    PHP

关于 thinkphp 的求助(求轻拍

  •  
  •   Nicksxs 2015-04-24 10:15:55 +08:00 4192 次点击
    这是一个创建于 3824 天前的主题,其中的信息可能已经有所发展或是发生改变。

    地址
    可以登录这个网址查看,
    nginx配置参考了
    1.nginx配置
    2.pathinfo

    server {
    listen 80;
    server_name localhost;

    root /var/www; index index.html index.htm index.php; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { try_files $uri $uri/ /index.php$is_args$args; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { try_files $uri = 404; fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)($|/.*); fastcgi_split_path_info ^(.+.php)(.*)$; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} 

    }

    还有一个问题是thinkphp在sae上使用的时候的问题
    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
    错误位置
    FILE: /data1/www/htdocs/520/cruise/1/ThinkPHP/Extend/Engine/Sae/Lib/Driver/Db/DbMysql.class.php  LINE: 78
    ThinkPHP3.1.3 { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
    (不太会markdown

    13 条回复    2015-04-29 10:02:18 +08:00
    crabRunning
        1
    crabRunning  
       2015-04-24 10:35:29 +08:00
    什么年代了还用thinkphp
    Nicksxs
        2
    Nicksxs  
    OP
       2015-04-24 11:13:01 +08:00
    @crabRunning 我很渣的
    crabRunning
        3
    crabRunning  
       2015-04-24 11:24:19 +08:00
    @Nicksxs 吊炸天竟然用php7
    hisokc
        4
    hisokc  
       2015-04-24 11:27:40 +08:00
    报的mysql错误,应该是mysql没启动或配置问题吧
    crabRunning
        5
    crabRunning  
       2015-04-24 11:33:19 +08:00
    别那么早用php ng人家还没正式发布,等别人把问题撸圆再用也不迟,如果你不是大神,遇到新版本的问题你去找鸟哥啊。还有nginx pathinfo 没有开启yeah
    zts1993
        6
    zts1993  
       201504-24 12:24:07 +08:00 via Android
    nginx配置tp手册有。。还要开启pathinfo

    第二个问题sae的数据库明显不是localhost...配置问题
    axe
        7
    axe  
       2015-04-24 12:42:34 +08:00
    SAE 有指定的数据库配置, 在配置里面写SAE提供的那几个常量吧
    feiyuanqiu
        8
    feiyuanqiu  
       2015-04-24 12:57:22 +08:00
    不能连接数据库你可以看下这几个地方:
    1、ps -ef | grep mysql 看下 mysql 启动没有
    2、ls /var/lib/mysql/mysql.sock 看下这个存不存在
    3、mysql -u(你在php数据库连接配置文件里面设置的数据库用户名) -p 看下能不能登进去
    4、如果数据库在远程,还要看下 iptables 的配置,是不是把远程访问数据库给 DROP 了
    iLtc
        9
    iLtc  
       2015-04-24 13:16:37 +08:00
    ThinkPHP 3.1 的版本要在 SAE 上运行需要下载 SAE引擎版本(http://www.thinkphp.cn/down/356.html),这个会自动适配 SAE的数据库,并且自动将缓存写进 Memcache
    g8287694
        10
    g8287694  
       2015-04-24 17:06:00 +08:00
    @crabRunning
    那现在开发用什么?
    tanywei
        11
    tanywei  
       2015-04-24 18:18:41 +08:00
    居然敢用thinkphp。。。
    tanteng
        12
    tanteng  
       2015-04-25 00:36:15 +08:00 via iPhone
    @crabRunning 你们现在用什么框架
    111111111111
        13
    111111111111  
       2015-04-29 10:02:18 +08:00
    @tanywei 有什么坑吗?
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     6045 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 02:13 PVG 10:13 LAX 19:13 JFK 22:13
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86