devlephant / php4delphi

PHP to Delphi integration
Apache License 2.0
13 stars 2 forks source link

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

Open ArunPatal opened 4 years ago

ArunPatal commented 4 years ago

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

resistancelion commented 4 years ago

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.

ArunPatal commented 4 years ago

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..

resistancelion commented 2 years ago

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.

ArunPatal commented 2 years ago

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