Gavin
Gavin

Reputation: 2173

PHP 5.5 Azure - Cannot redeclare function previously declared in ... (same place)

We host a php application on Azure, it runs on php 5.5 and uses the wincache extension provided by Azure.

We have a couple of random failures to load (no error just blank output) per week in the application normally fixed by a restart.

Today we had this error (fixed not by a restart but by a stop and start) :

Fatal error: Cannot redeclare _s() (previously declared in D:\home\site\wwwroot\app\library\macros.php:13) in D:\home\site\wwwroot\app\library\macros.php on line 13

I am starting to suspect op code caching, or something within the wincache component, as if you look closely you will see the redeclaration is the same reference as the original. A little odd I thought.

Can anyone give any insight on what would cause this error, or specific Azure / php 5.5 / wincache experiences?

Ultimately I need to understand the cause of this, and gain a more stable platform.

Thanks.

Upvotes: 2

Views: 136

Answers (0)

Related Questions