php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57328 apc.php: error message instead of blank page if APC is not available (patch)
Submitted: 2006-10-27 13:36 UTC Modified: 2006-10-27 14:18 UTC
From: phpbugs at thequod dot de Assigned: shire (profile)
Status: Closed Package: APC (PECL)
PHP Version: Irrelevant OS: Ubuntu Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbugs at thequod dot de
New email:
PHP Version: OS:

 

 [2006-10-27 13:36 UTC] phpbugs at thequod dot de
Description:
------------
If APC is not available, a request to apc.php only 
displays a blank page and no trace in the error log.

The attached patch checks if the apc_cache_info() function 
is available before calling it.

Actual result:
--------------
Patch:

Index: apc.php
===================================================================
RCS file: /repository/pecl/apc/apc.php,v
retrieving revision 3.63
diff -u -r3.63 apc.php
--- apc.php     11 Sep 2006 01:58:18 -0000      3.63
+++ apc.php     27 Oct 2006 17:32:47 -0000
@@ -180,7 +180,7 @@
 }


-if(!$cache=@apc_cache_info($cache_mode)) {
+if(!function_exists('apc_cache_info') || !
($cache=@apc_cache_info($cache_mode))) {
        echo "No cache info available.  APC does not 
appear to be running.";
        exit;
 }


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-27 14:18 UTC] shire@php.net
Thank you for the patch, it has been applied to CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 21:01:29 2024 UTC