logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in  RSS Apache Lounge  


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.



Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache v2.4.46 appcrash
Author
luca44



Joined: 05 Oct 2020
Posts: 4
Location: lalaland

PostPosted: Tue 06 Oct '20 18:43    Post subject: Apache v2.4.46 appcrash Reply with quote

Hello

A few days ago I installed php v7.4.11 x64 (ts) and apache v2.4.46 x64 (by extracting their .zip files) on win 8.1 pro x64 and configurated them to work (by changing httpd.conf and php.ini).

Everything works fine beside one thing. When I start apache by typing httpd.exe in command prompt (with admin privileges) and then try to stop it by pressing ctrl+C server crashes and i get the following 'appcrash' windows:

[first window]
Apache http server has stopped working.
Windows can check online for a solution to the problem.
*Close the program.

Problem signature:
Problem Event Name: APPCRASH
Application Name: httpd.exe
Application Version: 2.4.46.0
Application Timestamp: 5f78598b
Fault Module Name: php7ts.dll
Fault Module Version: 7.4.11.0
Fault Module Timestamp: 5f734364
Exception Code: c0000005
Exception Offset: 00000000000c94cb
OS version: 6.3.9600.2.0.0.256.48
Locale ID: 1045
Additional Information 1: 0708
Additional Information 2: 0708148c8750c9d505e066d71b2ce067
Additional Information 3: 1d64
Additional Information 4: 1d64bc0afb9d844d13c9d1f93e3eeaf3

[second window]
httpd.exe - application error
The instruction at 0x referenced memory at 0x. The memory could not be read.
Click on OK to terminate the program.

While apache is started and:
- I load no site then stopping apache popups no error.
- I load html file or php file (with for example such content: <?php phpinfo(); ?>) into browser then stopping apache popups error.

After I had got crash messages I installed portable version of xampp 7.4.10 to check if xampp also produces such crash messages (xampp v7.4.10 features php v7.4.10 and apache v2.4.46)

So, while xampp apache is started and:
- I load example [htdocs] folder content then stopping xampp apache sometimes produces error and sometimes doesn't (for example when site [http://localhost/dashboard/howto.html] is loaded from main site [http://localhost/dashboard] then stopping xampp apache produces no error, but when site [http://localhost/dashboard/phpinfo.php] is loaded also from main site then stopping xampp apache produces error).

Furthermore, in case of php v7.4.11 the php built-in development server (php -S ...) starts, works and stops (also by pressing ctrl+C) without problems on win 8.1 .

The problem with apache mentioned at the beginning does not occur when using the same tandem php7.4.11&ap2.4.46 (not xampp) on win 7 sp1 pro.

Win 8.1 was being updated until 1 may 2020 so there are some updates missing.

Is there some fix or workaround that would make apache stop without error on win8.1?

Thanks for any help
Luca44
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6861
Location: Germany, Next to Hamburg

PostPosted: Tue 13 Oct '20 10:03    Post subject: Reply with quote

Quote:
Exception Code: c0000005


That is an access violation.

You can install apache as a service.

start cmd.exe as adminstrator

cd to apache bin folder

Code:

httpd.exe -k install


Then you can use ApacheMonitor.exe or the command line to start and stop apache


Code:

httpd -k start
httpd -k restart
httpd -k stop
Back to top
luca44



Joined: 05 Oct 2020
Posts: 4
Location: lalaland

PostPosted: Thu 15 Oct '20 0:49    Post subject: Reply with quote

You think it will solve the problem?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6861
Location: Germany, Next to Hamburg

PostPosted: Fri 16 Oct '20 10:45    Post subject: Reply with quote

Either that or you should run PHP over mod_fcgid since that seems to be the reason your server crashes.
Back to top
luca44



Joined: 05 Oct 2020
Posts: 4
Location: lalaland

PostPosted: Sat 17 Oct '20 16:13    Post subject: Reply with quote

The case apache crashes because of access violation is case when php is configured to work with apache as an apache module.
Line corresponding to it from my httpd.conf:
[ LoadModule php7_module "abs/path/to/the/php-dir/php7apache2_4.dll" ].

Other important lines from my httpd.conf:
[ DirectoryIndex index.html index.php ]
[ AddType application/x-httpd-php .php ]
[ PHPIniDir "abs/path/to/the/php-dir" ]

Today i will check if apache works without any errors when installed as a service.
Back to top
luca44



Joined: 05 Oct 2020
Posts: 4
Location: lalaland

PostPosted: Sat 17 Oct '20 23:28    Post subject: Reply with quote

Thank you very much, James - your solution based on installing apache as a service has helped, apache works without any errors as a service (especially when stopping).

One more question: if i would like not to use apache as a service (rather use standalone [httpd.exe] as app by command prompt) what libraries/files do I need to run PHP over mod_fcgid and how to set up it to work?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6861
Location: Germany, Next to Hamburg

PostPosted: Mon 19 Oct '20 14:44    Post subject: Reply with quote

Running PHP over fcgid is recommended even though apache might run as a service. It is a known problem that a PHP crash can bring down apache, too, if PHP runs as a module.

What you need is just mod_fcgid from the download page https://www.apachelounge.com/download/

How to configure mod_fcgid see https://www.apachelounge.com/viewtopic.php?t=2394

If you still have a question please ask again.
Back to top


Reply to topic   Topic: Apache v2.4.46 appcrash View previous topic :: View next topic
Post new topic   Forum Index -> Apache