Skip to content

Fatal error: Cannot redeclare foo() (previously declared in....) #20

Description

@ArunPatal

Hello,
I found a bug.
Executing a script first time with a function call foo run fines but executing same file again gives cannot redeclare foo() error until i restart c# app based server.
Am executing a code via php file URL.

i noticed that it is not only with user defined functions but also user defined constants & class

Activity

  1. resistancelion commented on Oct 31, 2020

    @resistancelion
    Collaborator

    Hello,
    I found a bug.
    Executing a script first time with a function call foo run fines but executing same file again gives cannot redeclare foo() error until i restart c# app based server.
    Am executing a code via php file URL.

    i noticed that it is not only with user defined functions but also user defined constants & class

    There's a tickmark (or must be) for disabling PHP Caching, which normally will cache everything, that can be stored between PHP sessions.
    The better advice is not to use this project at all, if you have a real task for it, then you can just write your own server in C++ and CGI i/o.

  2. ArunPatal commented on Oct 31, 2020

    @ArunPatal
    Author

    Hi, I am using it in c# windows app. Just for me :)

    There's a tickmark (or must be) for disabling PHP Caching ???
    I can not compile php4App.dll as i do not have delphi.

    Am using php4App.dll file in C# project.
    Can i disable cache via php.ini ?

    I tried below code but it did not help.

    [OPcache]
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=4000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=1
    enable=0
    

    Can you please advise me how to resolve this issue..

  3. resistancelion commented on Jan 16, 2022

    @resistancelion
    Collaborator

    Hi, I am using it in c# windows app. Just for me :)

    There's a tickmark (or must be) for disabling PHP Caching ??? I can not compile php4App.dll as i do not have delphi.

    Am using php4App.dll file in C# project. Can i disable cache via php.ini ?

    I tried below code but it did not help.

    [OPcache]
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=4000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=1
    enable=0
    

    Can you please advise me how to resolve this issue..

    Am using php4App.dll file in C# project. Can i disable cache via php.ini ?
    Sorry, but - no, it can only be disabled within library source code.
    Will look further in this project in undefined time, and for better - make some .json skeleton instead of those hard-linking style, so such an implementation like this can be easily ported to C# and other languages.

    Sorry again for the late reply, our team decided to move this project to the team maintenance, but now i'm seiing that it is actually forgotten.

  4. ArunPatal commented on Jan 16, 2022

    @ArunPatal
    Author

    Hi, I am using it in c# windows app. Just for me :)
    There's a tickmark (or must be) for disabling PHP Caching ??? I can not compile php4App.dll as i do not have delphi.
    Am using php4App.dll file in C# project. Can i disable cache via php.ini ?
    I tried below code but it did not help.

    [OPcache]
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=4000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=1
    enable=0
    

    Can you please advise me how to resolve this issue..

    Am using php4App.dll file in C# project. Can i disable cache via php.ini ? Sorry, but - no, it can only be disabled within library source code. Will look further in this project in undefined time, and for better - make some .json skeleton instead of those hard-linking style, so such an implementation like this can be easily ported to C# and other languages.

    Sorry again for the late reply, our team decided to move this project to the team maintenance, but now i'm seiing that it is actually forgotten.

    I will be waiting, Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions