PHP has encountered an Access Violation error solution_PHP tutorial

WBOY
Release: 2016-07-21 15:41:21
Original
788 people have browsed it

When I was setting up WordPress, I found that this kind of error was actually reported. The solutions online were all copy and paste, and they were all about the setting of eaccelerator. I was surprised that I didn’t install this extension? However, I have installed the APC extension. Both extensions optimize the server for underlying code support and achieve cache sharing. Turn off APC and no error will be reported.

Usually it’s because of the eaccelerator problem
The solution is as follows:
php for windows bug
Reference:

First possibility:

Remove the eaccelerator extension in php
This can solve your problem, but it may increase the burden on the system
Because eaccelerator is mainly to save system resources

The specific method is to find php.ini
If I help you configure it, it is usually in c:/php/php.ini or c:/winnt/php.ini or c:/windows/php.ini

Remove

Copy the code The code is as follows:

zend_extension_ts="C:phpextensionseaccelerator_win_xxx.dll"
eaccelerator. shm_size="16"
eaccelerator.cache_dir="c:temp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator .shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

ea was mainly developed in a Unix environment, but the author ignored that windows actually does not have the memory sharing mechanism of the u host like the u host.
This bug has been submitted to them, hoping for 0.9 .5 can solve

Of course, if the problem with your machine is not serious, it is recommended to keep it. ea is a very excellent Php caching + acceleration software.
Used in conjunction with zo, it will reduce the system burden by about 50%-80% and increase the load. Ability, speed and efficiency around 200%

The second possibility

session_save_path needs to set an actual physical path, and the directory needs all permissions of everyone, similar to 0777 of U host

The third possibility
c:/winnt/temp or c:/windows/temp
also requires all permissions of everyone, similar to 0777 of U host

The fourth possibility
Your memory is seriously insufficient. Check it. If there is a problem, please add more memory. It is best to add two memory at a time.
For example, if you add 1G of memory, it is best to add two identical ones. 512M. Otherwise, the dual channel is not enabled and the effect is mediocre

The fifth possibility
The combination of ZendOptimizer and php is not very good
Try another version
The current stable combination is
php4.3.11+zo 2.5.10a
or php4 .4.1+zo 3.0 beta2

The sixth possibility

This mostly belongs to users using win2003
They have set restrictions in the application pool
For example, how long it takes to recycle, the maximum memory usage, etc.
These settings are bound to cause this classic PHP error

Many people say that it is a problem with the PHP version. In fact, this is not the case. You can look at this problem from four places
1. Is the directory where the dll file required by zend does not have enough permissions? It must be read and run. Permissions
2. Are you using 2003? Have you set up an application pool, such as what are the restrictions in the pool? Adjust it and try again. Is it ok? Haha
3. There are two places in php.ini that are not set. , and some programs must use it

A
Remove the comment character of the ;upload_tmp_dir line, that is, the preceding semicolon ";", so that this line will work in the php.ini document. upload_tmp_dir is used to define the temporary path where uploaded files are stored. Here you can also define an absolute path for it, for example: upload_tmp_dir = d:upload Of course, your d:upload directory must have read and write permissions at this time.
Here I set it to
upload_tmp_dir = "c:windowstemp"

B
Such an error statement occurs generally because the session.save_path item in your php.ini is not set properly. The solution is to set session.save_path and session.cookie_path to
session .save_path = "c:windowstemp"
session.cookie_path = "c:windowstemp"
(I don’t know if this setting is correct. I haven’t tried it.)
You can also create a temp directory in the c: directory , that’s it (our eaccelerarot happened to be used earlier and such a folder was created)

Summary of solutions to PHP has encountered an Access Violation
This problem is not easy to handle and has confused many webmasters for a long time
Mainly occurs on windows host servers.
On the PHP official website, http://bugs.php.net/
can also find two to three thousand pages of reports. Their officials are also at a loss. After 11 small versions, there is still no complete solution
http://bugs.php.net/search.php?c ... ess&x=8&y=9

Currently, I will provide you with my maintenance experience in the past few years and some of my private solutions

This post is constantly updated, please pay attention! ! ! Quote:
First possibility:

Remove the eaccelerator extension in php
This can solve your problem, but it may increase the burden on the system
Because eaccelerator is mainly to save system resources

The specific method is to find php.ini
If I help you configure it, it is usually in c:/php/php.ini or c:/winnt/php.ini or c:/windows/php.ini

Remove

Copy the code The code is as follows:

zend_extension_ts="C:phpextensionseaccelerator_win_xxx.dll"
eaccelerator. shm_size="16"
eaccelerator.cache_dir="c:temp"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator .shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

ea was mainly developed in a Unix environment, but the author ignored that windows actually does not have the memory sharing mechanism of the u host like the u host.
This bug has been submitted to them, hoping for 0.9 .5 can solve

Of course, if the problem with your machine is not serious, it is recommended to keep it. ea is a very excellent Php caching + acceleration software.
Used in conjunction with zo, it will reduce the system burden by about 50%-80% and increase the load. Capacity, speed and efficiency are around 200% Quote:
The second possibility

session_save_path needs to set an actual physical path, and the directory requires all permissions of everyone, similar to the 0777 reference of the U host:
The third possibility
c:/winnt/temp or c:/windows /temp
also requires all permissions of everyone, similar to the 0777 reference of the U host:
The fourth possibility
Your memory is seriously insufficient, check it, if there is a problem, please add more memory, preferably once Add two
, for example, add 1G of memory, it is best to add two identical 512M. Otherwise, the dual channel is not enabled, and the effect is very average. Quote:
The fifth possibility
The combination of ZendOptimizer and php is not very good
Try another version
The current stable combination is
php4 .3.11+zo 2.5.10a
or php4.4.1+zo 3.0 beta2 quote:
The sixth possibility

This mostly belongs to users using win2003
They have set restrictions in the application pool
For example, how long it takes to recycle, the maximum memory usage, etc.
These settings are bound to cause this classic PHP error
The wood has been tested hundreds of times, and we can guarantee that problems will occur here. Quote:
The seventh solution
2003 users can solve the problem by modifying the running application pool, "Performance" - "WEB Park" "Maximum number of working processes".
There was a user , until it was added to 10, this problem was completely solved.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/321206.htmlTechArticleWhen I set up wordpress, I found that this kind of error would actually happen. The solutions online were all copy and paste. It’s about the setting of eaccelerator. I’m surprised that I didn’t install it...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!