PHP笔记(一)安装配置过程:memcache
admin
2023-06-24 01:41:19
0次

安装配置过程:


1、安装xampp:我安装的版本是xampp-win32-1.7.4-VC6-installer,里面的php版本PHP version 5.2.9。2、下载memcache:下载地址为http://splinedancer.com/memcached-win32/ ,选择memcached 1.2.4 Win32 Beta Binaries下载即可,下载后解压。3、下载php_memcache.dll组件:因为我安装的是xampp,该程序在php目录的子目录ext已经存在该组件了。

http://www.tanbo.name/wp-content/uploads/2012/12/php_memcache.dll_.zip


4、配置php.ini:在php.ini中加入“extension=php_memcache.dll”,然后重启apache。测试安装是否成功:1、在web目录下编写如下代码$aa=phpinfo();
echo $aa;2、启动memcached.exe(每一次用memcache都要启动)3、运行上面步骤1查看php的代码文件,可以到看有如下信息就表示已经安装成功。


将memcache加入到windows服务中:
1、将memcache解压到c:\mem 目录中(目录可改变)
2、运行dos界面,win键+R,然后输入cmd。
3、进入C:\mem目录 ,输入“cd c:\mem ”。
4、输入 “c:\mem\memcached.exe -d install”加入服务.
5、输入 “c:\mem\memcached.exe -d start”启动服务.
6、输入“telnet 127.0.0.1 11211”测试是否连接成功。
7、输入“stats”命令查看基本信息。

memcached 测试

memcached  -h

WAMPserver         apache服务器配置:::::::::::::::::::::::::::::::::::::::::::::::::;

404    403   错误:::::

Forbidden

You don't have permission to access / on this server.

 

开始的时候我是用http://localhost/test.php进行的测试,没有发现问题,后来要在内网测试一下就要用IP地址进行那个访问了,如:http://10.10.50.195/test.php,就出现了这个问题。

后来咨询了一下朋友(php高手),说修改一下php的配置文件httpd.conf。

在原有的位置文件中找到配置节

    Options FollowSymLinks

    AllowOverride None

    Order deny,allow

    Deny from all

    Satisfy all

修改成 ::::::::::::::;

    Options FollowSymLinks

    AllowOverride None

    Order deny,allow

#    Deny from all

    Allow from all

#允许所有访问

    Satisfy all

还有

    #

...............................

    # http://httpd.apache.org/docs/2.2/mod/core.html#options

    # for more information.

    #

    Options Indexes FollowSymLinks

    #

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #   Options FileInfo AuthConfig Limit

    #

    AllowOverride all

    #

    # Controls who can get stuff from this server.

    #

#   onlineoffline tag - don't remove

    Order Deny,Allow

    Deny from all

    Allow from 127.0.0.1

修改成

    #

    #

    # The Options directive is both complicated and important.  Please see

    # http://httpd.apache.org/docs/2.2/mod/core.html#options

    # for more information.

    #

    Options Indexes FollowSymLinks

    #

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #   Options FileInfo AuthConfig Limit

    #

    AllowOverride all

    #

    # Controls who can get stuff from this server.

    #

#   onlineoffline tag - don't remove

    Order Deny,Allow

#    Deny from all

#  Allow from 127.0.0.1

    Allow from all

Forbidden  You don't have permission to access /phpmyadmin/ on this server  解决办法

打开 XXX/wamp/alias/phpmyadmin.conf 文件,

将

Options Indexes FollowSymLinks MultiViews

AllowOverride all

Order Deny,Allow

Deny from all

Allow from 127.0.0.1

修改成

Options Indexes FollowSymLinks MultiViews

AllowOverride all

Order Deny,Allow

Allow from all

保存,然后重启Wamp所有服务即可。

phpstudy服务器配置===========================

PHP 生产模式调试:::::::::

header("Content-type:text/html;charset=utf-8");

// 打开php 调试

//define('ENVIRONMENT', 'development');

//error_reporting(E_ALL); // php调试

 sission_id  :::::::::     78896c84db9b2d3fd51d0ca206eb7c43


Array

(

    [session_id] => 78896c84db9b2d3fd51d0ca206eb7c43

    [ip_address] => 61.149.143.214

    [user_agent] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36

    [last_activity] => 1453097189

    [user_data] =>

)



查找ip端口号:在cmd里面输入netstat -n 或 netstat -a 或 netstat -an 。Local Address里面就是你想要看到信息了.



相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...