PHP has encountered an access violation error Solution

Source: Internet
Author: User
Tags apc php error

When I set up WordPress, I found that this kind of error was reported. The online solutions are all copy and paste, all of which are about eaccelerator settings. I am surprised that I have not installed this extension? However, APC extensions have been installed, both of which are optimized for the server as the underlying layer.CodeSupports cache sharing. If you disable APC, no error is returned.

Generally, this error is caused by an eaccelerator problem.
The solution is as follows:
PHP for Windows bug
Refer:

The 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 used to save system resources

The specific method is to find PHP. ini
If it is configured for you, usually in C:/PHP. ini, C:/winnt/PHP. ini, or C:/Windows/PHP. ini

Remove

Copy code The Code is as follows: zend_extension_ts = "C: \ PHP \ extensions \ eaccelerator_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 is mainly developed in UNIX environment, but the author ignores that windows is not actually the same as u host, and there is no Memory Sharing Mechanism of U host.
This bug has been submitted to them, and we hope 0.9.5 can solve it.

Of course, if this problem is not serious on your machine, we recommend that you retain it. EA is a very good PHP cache + acceleration software.
Combined with Zo, the system load will be reduced by about 50%-80%, and the load capacity, speed and efficiency will be improved by about 200%.

Second possibility

Session_save_path needs to set an actual physical path, and this directory requires all the permissions of everyone, similar to the 0777

Third possibility
C:/winnt/temp or C:/Windows/temp
You also need all the permissions of everyone, similar to 0777 of the u host.

Fourth possibility
Your memory is seriously insufficient. check whether there is any problem. Please add the memory. It is best to add two at a time.
For example, to add 1 GB memory, it is best to add 2 identical 512 MB. Otherwise, the dual-channel is not enabled, and the effect is normal.

Fifth possibility
Zendoptimizer does not work well with PHP
Try another version
Currently, the stable combination is:
Php4.3.11 + Zo 2.5.10a
Or php4.4.1 + Zo 3.0 beta2

Sixth possibility

Most of these are win2003 users.
They set limits in the application pool.
For example, how long is it to be recycled and how much memory is used?
These settings will inevitably cause this classic PHP Error

Many people say that it is a PHP version issue. Otherwise, we can look at this issue from four points.
1. Whether the directory in which the DLL files required by Zend are located has insufficient permissions. You must have the read and run permissions.
2. Whether to use 2003, set the application pool, for example, what is restricted in the pool, adjust it, and try again.
3. php. INI is not set in two places, and someProgramRequired

A
Remove the; upload_tmp_dir line annotator, that is, the semicolon ";" in front, so that this line plays a role in the PHP. ini document. Upload_tmp_dir is used to define the temporary path for storing the uploaded file. Here you can also define an absolute path for it, for example, upload_tmp_dir = D: Upload. Of course, your D: the upload directory must have read and write permissions.
Here I set it
Upload_tmp_dir = "C: \ WINDOWS \ temp \"

B
This error occurs generally because the session. save_path item in your php. INI is not set. The solution is to set session. save_path and session. cookie_path
Session. save_path = "C: \ WINDOWS \ temp \"
Session. cookie_path = "C: \ WINDOWS \ temp \"
(I don't know if this setting is correct. I haven't tried it .)
You can also create a temp directory under the c: \ directory (the previous eaccelerarot is easy to use and such a folder has been created)

PHP has encountered an access violation solution Summary
This problem is not very well handled, and many webmasters are confused for a long time.
It mainly appears on the server of the Windows host.
Official in PHP, http://bugs.php.net/
The 2000 or 3000-page reports can also be found, and they are helpless officially. After 11 minor versions, they have not been completely resolved.
Http://bugs.php.net/search.php? C... ess & X = 8 & Y = 9

At present, I provide my maintenance experience over the past few years and some of my private solutions.

This post is constantly updated. Please pay attention to it !!! Reference:
The 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 used to save system resources

The specific method is to find PHP. ini
If it is configured for you, usually in C:/PHP. ini, C:/winnt/PHP. ini, or C:/Windows/PHP. ini

Remove

Copy code The Code is as follows: zend_extension_ts = "C: \ PHP \ extensions \ eaccelerator_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 is mainly developed in UNIX environment, but the author ignores that windows is not actually the same as u host, and there is no Memory Sharing Mechanism of U host.
This bug has been submitted to them, and we hope 0.9.5 can solve it.

Of course, if this problem is not serious on your machine, we recommend that you retain it. EA is a very good PHP cache + acceleration software.
With Zo, the system load will be reduced by about 50%-80%, and the load capacity, speed, and efficiency will be improved by about 200%. Reference:
Second possibility

Session_save_path requires an actual physical path, and the Directory requires all the permissions of everyone, similar to the 0777 reference of the U Host:
Third possibility
C:/winnt/temp or C:/Windows/temp
All permissions of everyone are also required, similar to the 0777 reference of the U Host:
Fourth possibility
Your memory is seriously insufficient. check whether there is any problem. Please add the memory. It is best to add two at a time.
For example, to add 1 GB memory, it is best to add 2 identical 512 MB. Otherwise, the dual-channel is not enabled, and the effect is generally referenced:
Fifth possibility
Zendoptimizer does not work well with PHP
Try another version
Currently, the stable combination is:
Php4.3.11 + Zo 2.5.10a
Or php4.4.1 + Zo 3.0 beta2 reference:
Sixth possibility

Most of these are win2003 users.
They set limits in the application pool.
For example, how long is it to be recycled and how much memory is used?
These settings will inevitably cause this classic PHP Error
After hundreds of tests on wood, the problem can be guaranteed. Reference:
Solution 7
2003 users can solve the problem by modifying the "performance"-"Web Garden" and "Maximum number of working processes" of the running application pool.
There was a user who did not solve the problem until 10 was added.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.