Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random warnings when using with pChart #37

Open
manuelmaurer opened this issue May 7, 2018 · 2 comments
Open

Random warnings when using with pChart #37

manuelmaurer opened this issue May 7, 2018 · 2 comments

Comments

@manuelmaurer
Copy link

I've installed the 7.2 Thread Safe (TS) x86 DLL from the PECL site into the bundled PHP from XAMPP for Windows. It is running on a Windows 10 Enterprise x64 machine.

C:\>php -v
PHP 7.2.1 (cli) (built: Jan  4 2018 04:29:12) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

C:\>php --ri timecop

timecop

timecop => enabled
Version => 1.2.10

Directive => Local Value => Master Value
timecop.func_override => 1 => 1
timecop.sync_request_time => 1 => 1

It works really well for all HTML output, but as soon as I have multiple Graphs on my site (using pChart from here: [https://github.com/bozhinov/pChart2.0-for-PHP7]) i get randomly the following output instead of an image:

<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetime::timecop_orig___construct because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetime::timecop_orig_createfromformat because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetimeimmutable::timecop_orig___construct because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetimeimmutable::timecop_orig_createfromformat because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetime::timecop_orig___construct. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetime::timecop_orig_createfromformat. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetimeimmutable::timecop_orig___construct. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetimeimmutable::timecop_orig_createfromformat. in <b>Unknown</b> on line <b>0</b><br />

To simulate the problem I took one of the example files from pChart (not using any timecop functions), removed the output command (otherwise you get only an ugly error from Firefox that the image is invalid) and reloaded it very quickly in the browser (just hammering on the F5-Key). The above error message then randomly appears on the screen (I got lucky to stop pressing F5 to see the message).

@wshaver
Copy link

wshaver commented Sep 18, 2018

Seeing similar things on my local build - if the requests come in one at a time there aren't problems, but as soon as lots of requests hit at the same time it blows up.

@remicollet
Copy link
Contributor

Should be fixed by PR #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants