• Symfony学习笔记(1):安装


    ---恢复内容开始---

    1,下载Symfony

      到Symfony官网下载框架,网站为:http://www.symfony.com/。

    2,解压到项目根目录下面,Symfony文件夹的结构如下:

    www/ <- 你的站点根目录
        Symfony/ <- 压缩包里的Symfony目录
            app/
                cache/
                config/
                logs/
            src/
                ...
            vendor/
                ...
            web/
                app.php
                ...
    3,访问 http://127.0.0.1/ShopCar/Symfony/web/config.php,出现界面如下:

    
    
    出现问题如下:
    1.Install and enable the mbstring extension.
    解决方法,安装mstring扩展,方法可以参考http://www.cnblogs.com/lufangtao/archive/2012/12/30/2839679.html中的mysqli安装过程,安装完成后界面显示如下:
    2,问题2:Install and enable the intl extension (used for validators)
    解决方法同上,解决完成后的界面如下:
    3.问题3:Install and enable a PHP accelerator like APC
    解决方法:
     
    login to server as root and run the following commands:

    Code:
    cd ~ 
    mkdir setups
    cd setups 
    wget http://pecl.php.net/get/APC-3.1.5.tgz 
    tar -xvf APC-3.1.5.tgz 
    cd APC-3.1.5
    phpize
    ./configure --enable-apc --enable-apc-mmap --with-apxs --with-php config=/usr/local/bin/php-config
    make
    if you get the error:
    Code:
    In file included from /usr/local/src/APC-3.1.5/apc.c:38:
    /usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory
    In file included from /usr/local/src/APC-3.1.5/apc.c:38:
    /usr/include/php/ext/pcre/php_pcre.h:45: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /usr/include/php/ext/pcre/php_pcre.h:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    /usr/include/php/ext/pcre/php_pcre.h:52: error: expected specifier-qualifier-list before 'pcre'
    /usr/local/src/APC-3.1.5/apc.c:362: error: expected specifier-qualifier-list before 'pcre'
    /usr/local/src/APC-3.1.5/apc.c: In function 'apc_regex_compile_array':
    /usr/local/src/APC-3.1.5/apc.c:419: error: 'apc_regex' has no member named 'preg'
    /usr/local/src/APC-3.1.5/apc.c:419: error: 'apc_regex' has no member named 'preg'
    /usr/local/src/APC-3.1.5/apc.c:420: error: 'apc_regex' has no member named 'nreg'
    /usr/local/src/APC-3.1.5/apc.c:420: error: 'apc_regex' has no member named 'nreg'
    /usr/local/src/APC-3.1.5/apc.c: In function 'apc_regex_match_array':
    /usr/local/src/APC-3.1.5/apc.c:452: error: 'apc_regex' has no member named 'preg'
    /usr/local/src/APC-3.1.5/apc.c:452: error: 'apc_regex' has no member named 'preg'
    /usr/local/src/APC-3.1.5/apc.c:453: error: 'apc_regex' has no member named 'nreg'
    /usr/local/src/APC-3.1.5/apc.c:453: error: 'apc_regex' has no member named 'nreg'
    make: *** [apc.lo] Error 1
    Then you need to install pcre and make sure you do this from the / directory or it will not install.
    Code:
    yum install pcre-devel
    Again do:
    Code:
    make
    If no errors then do:
    Code:
    make install
    update php.ini through WHM PHP Configuration Editor. Switch to Advanced and find Section:Core Directive:extension and add this to the end of the list:
    Code:
    , apc.so
    Then restart apache and your done. the phpinfo function should show that APC is installed

    Hope this helps someone.
     
    解决后的界面如下:
     
     
  • 相关阅读:
    碰到了一个GDI+的问题,郁闷ing。。。
    (旧文重贴)对于以前遇到过的ws proxy实例化时间太长的问题,看JNDI受到了些启发
    (旧文重贴)下午又看了MBF的介绍,靠,心丧如死!
    (旧文重贴)前段时间关于SmartClient部署的两个问题,都搞定了。
    (旧文重贴)编程高手箴言读书笔记(1)
    SAP MDM 学习网址
    常用Oralce sql
    WE02 修改IDOC
    OBD/IBD 的拣配数量更新
    配置ALE仓库管理
  • 原文地址:https://www.cnblogs.com/lufangtao/p/2843342.html
Copyright © 2020-2023  润新知