Skip to content
This repository has been archived by the owner on Dec 20, 2019. It is now read-only.

Cannot compile with PHP 5.5 #33

Closed
juamedgod opened this issue Jun 23, 2013 · 9 comments
Closed

Cannot compile with PHP 5.5 #33

juamedgod opened this issue Jun 23, 2013 · 9 comments

Comments

@juamedgod
Copy link

It is complaining with:

eaccelerator.c:66:23: error: php_logos.h: No such file or directory

Checking the php-5.5.0/UPGRADING:

  • php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and
    zend_logo_guid() have been removed
@indigit
Copy link

indigit commented Aug 8, 2013

Same problem:
eaccelerator.c:66:23: fatal error: php_logos.h: No such file or directory

@tony2001
Copy link

tony2001 commented Aug 8, 2013

It won't work with 5.5 anyway, so just use the bundled Zend OpCache instead.

@meyerdg
Copy link

meyerdg commented Aug 21, 2013

I patched it a bit with some #if statements around offending pieces of code. The #include and also calls to php_register_info_logo()

@@ -63,7 +63,9 @@

 #include "php.h"
 #include "php_ini.h"
-#include "php_logos.h"
+#if PHP_VERSION_ID < 50500
+#  include "php_logos.h"
+#endif
 #include "main/fopen_wrappers.h"
 #include "ext/standard/info.h"
 #include "ext/standard/php_incomplete_class.h"
@@ -2269,8 +2271,10 @@
         }
     }

-    php_register_info_logo(EACCELERATOR_VERSION_GUID, "text/plain", (unsigned char*)EACCELERATOR_VERSION_STRING, sizeof(EACCELERATOR_VERSION_STRING));
-    php_register_info_logo(EACCELERATOR_LOGO_GUID,    "image/gif",  (unsigned char*)eaccelerator_logo, sizeof(eaccelerator_logo));
+    #if PHP_VERSION_ID < 50500
+      php_register_info_logo(EACCELERATOR_VERSION_GUID, "text/plain", (unsigned char*)EACCELERATOR_VERSION_STRING, sizeof(EACCELERATOR_VERSION_STRING));
+      php_register_info_logo(EACCELERATOR_LOGO_GUID,    "image/gif",  (unsigned char*)eaccelerator_logo, sizeof(eaccelerator_logo));
+    #endif

     return SUCCESS;
 }

...make and make test both worked fine. Doesn't mean it's going to work with PHP5.5 I guess?

/me looks at OpCache instead.

@russelljohn
Copy link

Same issue with PHP 5.5.9, I guess I have wait for the next eAccelerator version?

@zhuanyi
Copy link

zhuanyi commented Aug 26, 2014

I have tried @meyerdg 's solution and even though eAccelerator compiled and installed, it does not load and php -V only shows the version number of PHP and Zend. I was using Debian 7. Could others confirm this patch actually works?

@NewEraCracker
Copy link

Of course, PHP 5.5 has changed many internals of the language and many things in eAccelerator will have to be updated.

@zhuanyi
Copy link

zhuanyi commented Aug 27, 2014

Time to switch from eAccelerator to something else, I believe Moodle is already dropping its support for eAccelerator because slow patch/upgrade/fixes:

https://tracker.moodle.org/browse/MDL-39430

@NewEraCracker
Copy link

I have investigated deeply PHP opcodes and came up with the following (big) patch:
https://gist.github.com/NewEraCracker/99b4a0e8b37244765f78

This should fix this issue and #37, #36, #31, #28 (Edit: Not yet fixed), #23, #21, #16 and #12

Let me know if there is any improvement I can do.

Edited 2014/08/28: It seems PHP 5.5 is still not supported. eA randomly crashes in PHP 5.5 even with optimizer disabled. Fixing this will require more knowledge than the one I have.

@NewEraCracker
Copy link

After further investigation I modified the patch in above link with more fixes.

Two elements were added to ea_op_array structure and save/restore functions modified to use them. Optimizer is now forced to be disabled given its many bugs, this is a necessary "evil" until the bugs are fixed.

I've tested the patched version with test cases for #12 (the same as #16, #21, #23, #36), #28 and those issues go away with optimizer being forced to disabled.

PHP 5.5 is now supported.

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

No branches or pull requests

8 participants