Bug #75373 [Fbk]: Warning Internal error: wrong size calculation
| From: | cmb@php.net | Date: | Tue, 17 Oct 2017 16:26:10 +0000 |
| Subject: | Bug #75373 [Fbk]: Warning Internal error: wrong size calculation | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211762@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75373&edit=1
ID: 75373
Updated by: cmb@php.net
Reported by: tm8544 at hotmail dot com
Summary: Warning Internal error: wrong size calculation
Status: Feedback
Type: Bug
Package: opcache
Operating System: Windows 10 x64
PHP Version: 7.2.0RC4
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> File 3: seo.class.php
>
> I'd have to paste it in here, but file size is 96 kB.
96 kB is quite a lot. Can you make it available by other means, e.g. pastebin?
Previous Comments:
------------------------------------------------------------------------
[2017-10-16 18:16:48] tm8544 at hotmail dot com
File 3: seo.class.php
I'd have to paste it in here, but file size is 96 kB.
Files 1 and 2 are available, shall I paste file 3?
------------------------------------------------------------------------
[2017-10-16 18:14:35] tm8544 at hotmail dot com
file 2: core.lib.php
Download from phpmyadmin version 4.7.4, https://www.phpmyadmin.net/
Extract from folder 'libarries'
------------------------------------------------------------------------
[2017-10-16 18:11:26] tm8544 at hotmail dot com
file 1: information.php
----------------
<?php
/*
Module: Information Pages Unlimited
File date: 2007/02/17
Based on the FAQ script of adgrafics
Adjusted by Joeri Stegeman (joeri210 at yahoo.com), The Netherlands
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Released under the GNU General Public License
*/
////
/************************************************
Modified by Robert Fisher aka Thunderace
23 March 2006
Information_children mod
This file now shows highlights and children
in the same manner as osCommerce
************************************************/
function tep_information_show_category($information_group_id = 1) {
global $sitemapString, $languages_id;
$information_tree = array();
$informationString = '';
$parent_child_selected = '';
// Retrieve information from db
// ID set by module for Information box
$child_information = array();
$information_query = tep_db_query("SELECT information_id, information_title, parent_id FROM
" . TABLE_INFORMATION . " WHERE visible='1' and language_id='" .
$languages_id ."' and information_group_id = '" . $information_group_id .
"' ORDER BY sort_order");
while($information = tep_db_fetch_array($information_query)) {
$information_tree[$information['information_id']] = array(
'info_title' => $information['information_title'],
'parent_id' => $information['parent_id'],
'info_next_id' => 0
);
if ($information_tree[$information['information_id']]['parent_id'] !=
'0') {
$child_information[] = array (
'parent_info_id' => $information['parent_id'],
'child_info_id' => $information['information_id']
);
}
}
$count_child = count($child_information);
// Test if a child has been requested and set $parent_child_selected
for ( $i = 1; $i < ($count_child+1); $i++ ) {
if ((isset($_GET['info_id'])) &&
($child_information[$i]['child_info_id'] == $_GET['info_id'])) {
$parent_child_selected = $child_information[$i]['parent_info_id'];
}
}
// Run through the $information_tree to find all pages
// while ($element = each*($information_tree)) {
foreach($information_tree as $key => $element) {
// if (!isset($information_tree[$element['_key_']]['parent_id']) ||
($information_tree[$element['_key_']]['parent_id'] == 0)) {
if (!isset($element['parent_id']) || ($element['parent_id'] == 0)) {
//Set the main title to bold if it was selected or one of its children were selected
if (((isset($_GET['info_id'])) && ($_GET['info_id'] == $key))
|| ($parent_child_selected == $key)) {
$informationString .= '<a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' . $key) .
'"><b>â¢' . $information_tree[$key]['info_title'] .
'</b></a><br />';
} else {
$informationString .= '<a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' . $key) . '">' .
$information_tree[$key]['info_title'] . '</a><br />';
//Sitemap only
$sitemapString .= '<li><a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' . $key) . '">' .
$information_tree[$key]['info_title'] . '</a></li>' .
"\n";
}
//Just for sitemap
$ul = false;
for ( $i = 1; $i < ($count_child+1); $i++ ) {
if ($child_information[$i]['parent_info_id'] == $key) {
if ($ul == false) {
$sitemapString .= '<ul>' . "\n";
$ul = true;
}
$sitemapString .= '<li><a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' .
$child_information[$i]['child_info_id']) . '">' .
$information_tree[$child_information[$i]['child_info_id']]['info_title'] .
'</a></li>' . "\n";
}
if (($i == $count_child) && ($ul == true)) {
$sitemapString .= '</ul>' . "\n";
}
}
//End just for sitemap
//Show children if they exist
if (((isset($_GET['info_id'])) && ($_GET['info_id'] == $key))
|| ($parent_child_selected == $key)) {
for ( $i = 0; $i < ($count_child); $i++ ) {
if ($child_information[$i]['parent_info_id'] == $key)
//Show a child as bold if it was selected
if ((isset($_GET['info_id'])) && ($_GET['info_id'] ==
$child_information[$i]['child_info_id'])) {
$informationString .= ' <a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' .
$child_information[$i]['child_info_id']) . '"><b>' .
$information_tree[$child_information[$i]['child_info_id']]['info_title'] .
'</b></a><br />';
} else {
$informationString .= ' <a href="' .
tep_href_link(FILENAME_INFORMATION, 'info_id=' .
$child_information[$i]['child_info_id']) . '">' .
$information_tree[$child_information[$i]['child_info_id']]['info_title'] .
'</a><br />';
}
}
}
}
}
return $informationString;
}
////
// Define customer greetings
function tep_information_customer_greeting_define() {
global $customer_id, $customer_first_name, $languages_id, $category_depth;
if ( $category_depth == 'top' ) {
// Retrieve information from db
$information_group_id = 2; // ID set by module for Entrance messages
$information_query = tep_db_query("select information_title, information_description from
" . TABLE_INFORMATION . " where language_id = '" . (int)$languages_id .
"' and information_group_id = '" . (int)$information_group_id .
"'");
while ($information = tep_db_fetch_array($information_query)) {
// if($information['information_title'] == 'HEADING_TITLE')
define($information['information_title'],
$information['information_description']);
}
}
}
////
// Return a customer greeting
function tep_information_customer_greeting() {
global $customer_id, $customer_first_name;
if (tep_session_is_registered('customer_first_name') &&
tep_session_is_registered('customer_id')) {
$greeting_string = sprintf(TEXT_GREETING_PERSONAL,
tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
} else {
$greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '',
'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}
return $greeting_string;
}
?>
------------------------------------------------------------------------
[2017-10-16 17:24:37] ab@php.net
Hi @tm8544,
thanks for the further info. The INI is there, but a PHP code to run is still needed. Perhaps you
could extract it from your application, otherwise - if it's an opensource project, please point
to a repo. A small PHP snippet were preferable.
Thanks.
------------------------------------------------------------------------
[2017-10-16 16:40:43] tm8544 at hotmail dot com
Relevant ini options (opcache)
------------------------------
zend_extension=php_opcache.dll
opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.revalidate_freq=60
opcache.file_update_protection=900
opcache.revalidate_path=1
opcache.save_comments=1
opcache.load_comments=1
opcache.fast_shutdown=0
opcache.enable_file_override=0
opcache.optimization_level=0xffffffff
opcache.inherited_hack=0
opcache.dups_fix=0
opcache.blacklist_filename=c:\PHP\php.ini.opcache_blacklist.txt
opcache.max_file_size=0
opcache.consistency_checks=0
opcache.force_restart_timeout=15
opcache.error_log=""
opcache.log_verbosity_level=2
opcache.preferred_memory_model=""
opcache.protect_memory=0
opcache.restrict_api=""
opcache.mmap_base=0x20000000
opcache.file_cache=""
opcache.file_cache_only=0
opcache.file_cache_consistency_checks=0
opcache.file_cache_fallback=0
opcache.huge_code_pages=0
opcache.validate_permission=0
opcache.validate_root=0
Reproduce code
-----------------
Batch file that runs once every hour to refresh the Opcache. Actual server name and username +
password are replaced.
"C:\curl\curl.exe" https://_SERVERNAME_/index.php?ei_laskuria=1
-k --user un:pw
"C:\curl\curl.exe" https://kauppa._SERVERNAME_/index.php -k --user
un:pw
"C:\curl\curl.exe" https://forum._SERVERNAME_/index.php -k --user un:pw
"C:\curl\curl.exe" https://_SERVERNAME_/mysqladm1n007/index.php
-k --user un:pw
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=75373
--
Edit this bug report at https://bugs.php.net/bug.php?id=75373&edit=1