1、wampserver配置完以后,一般php.ini中默认的虚拟内存memory_limit=8M,但往往我们在配置一些框架或者开源产品时,在运行一些实例时,往往会报出错误,错误信息如下:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 24576 bytes)
如果需要解决这个问题,我们需要在PHP的配置文件php.ini去改变一些参数,memory_limit,把这个参数的值改的大一些就可以。但当你的PHP的配置文件不能直接修改的时候,我们需要在你的程序中去临时改变你的虚拟内存,比如说改成100M,int_set('memory_limit', '100M');
2、配置vhosts后,也会出现一些报错,譬如:
wampserver Forbidden You don't have permission to access / on this server.
报403,Forbidden,这往往需要在Apache中去修改参数来解决问题:Deny from all需要改为Allow from all,共需要改两处:
一处在:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all 修改为Allow
Allow from all
Satisfy all
</Directory>
另一处是:
<Directory "F:/wamp/www">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# 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 把Deny from all与Allow from 127.0.0.1修改为Allow from all
Allow from all
#Allow from 127.0.0.1
</Directory>
以上两个问题修改完成以后,均需要重启Apache,以便修改的配置文件立即生效。