PHP 8.1 ??

Erulezz

Verified User
Joined
Sep 14, 2015
Messages
956
Location
🇳🇱
25 Nov 2021

PHP 8.1.0 Released!

The PHP development team announces the immediate availability of PHP 8.1.0. This release marks the latest major release of the PHP language.
PHP 8.1 comes with numerous improvements and new features such as:
Take a look at the PHP 8.1 Announcement Addendum for more information.
For source downloads of PHP 8.1.0 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.
The migration guide is available in the PHP Manual. Please consult it for the detailed list of new features and backward incompatible changes.
Many thanks to all the contributors and supporters!
 
@smtalk I added PHP 8.1 on three servers running openlitespeed with lsphp and it will not compile on Debian 11 and 9. Everything looks fine till it starts to compile the litespeed section and starts getting lots of warnings and some errors, then stops.

Code:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:287:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  287 | static int lsapi_parent_dead()
      |            ^~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3085:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3085 | void set_skip_write()
      |      ^~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3089:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3089 | int is_enough_free_mem()
      |     ^~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3756:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3756 | int LSAPI_Get_ppid()
      |     ^~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:67:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:84:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
   84 | static int (*s_lscapi_dump_me)() = NULL;
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:85:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
   85 | static int (*s_lscapi_prepare_me)() = NULL;
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:107:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  107 | int LSAPI_Get_ppid();
      | ^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_load_liblscapi':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:244:10: warning: unused variable 'ch' [-Wunused-variable]
  244 |     char ch;
      |          ^~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:399:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
  399 | static void inline LSCRIU_Debugging(void) {}
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:400:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
  400 | static void inline LSCRIU_Restored_Error(int iFatal, char *format, ...) {}
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_Native_Dump':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:409:33: warning: unused variable 'criu_native_dump_response' [-Wunused-variable]
  409 |     criu_native_dump_response_t criu_native_dump_response;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_CloudLinux_Checkpoint':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:456:15: warning: unused variable 'pchError' [-Wunused-variable]
  456 |         char *pchError;
      |               ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_try_checkpoint':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:531:17: warning: unused variable 'iPidSender' [-Wunused-variable]
  531 |         pid_t   iPidSender;
      |                 ^~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:530:17: warning: unused variable 'iResult' [-Wunused-variable]
  530 |         int     iResult;
      |                 ^~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:508:11: warning: unused variable 'iPidDump' [-Wunused-variable]
  508 |     pid_t iPidDump = getpid();
      |           ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:506:9: warning: variable 'iRet' set but not used [-Wunused-but-set-variable]
  506 |     int iRet;
      |         ^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:554:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  554 | static int init_native_env()
      |            ^~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_Init_Env_Parameters':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:640:69: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
  640 |             lscriu_dbg("LSCRIU (%d): Use shared memory\n", getpid());
      |                                                                     ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:644:61: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
  644 |         lscriu_dbg("LSCRIU (%d): NOT Listening\n", getpid());
      |                                                             ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:647:10: warning: unused variable 'ch' [-Wunused-variable]
  647 |     char ch;
      |          ^~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'sapi_lsapi_ini_defaults':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:141:17: warning: unused variable 'entry' [-Wunused-variable]
  141 |     zval *tmp, *entry;
      |                 ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:141:11: warning: unused variable 'tmp' [-Wunused-variable]
  141 |     zval *tmp, *entry;
      |           ^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'sapi_lsapi_activate':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:700:22: warning: unused variable 'doc_root_len' [-Wunused-variable]
  700 |     size_t path_len, doc_root_len, server_name_len;
      |                      ^~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:699:18: warning: unused variable 'doc_root' [-Wunused-variable]
  699 |     char *path, *doc_root, *server_name;
      |                  ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:772:5: warning: initialization of 'char * (*)(const char *, size_t)' {aka 'char * (*)(const char *, long unsigned int)'} from incompatible pointer type 'char * (*)(char *, size_t)' {aka 'char * (*)(char *, long unsigned int)'} [-Wincompatible-pointer-types]
  772 |     sapi_lsapi_getenv,              /* getenv */
      |     ^~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:772:5: note: (near initialization for 'lsapi_sapi_module.getenv')
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:784:5: warning: initialization of 'void (*)(const char *, int)' from incompatible pointer type 'void (*)(char *, int)' [-Wincompatible-pointer-types]
  784 |     sapi_lsapi_log_message,         /* Log message */
      |     ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:784:5: note: (near initialization for 'lsapi_sapi_module.log_message')
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_chdir_primary_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:835:29: warning: passing argument 1 of 'strrchr' from incompatible pointer type [-Wincompatible-pointer-types]
  835 |     p = strrchr( file_handle->filename, '/' );
      |                  ~~~~~~~~~~~^~~~~~~~~~
      |                             |
      |                             zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:253:35: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  253 | extern char *strrchr (const char *__s, int __c)
      |                       ~~~~~~~~~~~~^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:839:33: warning: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
  839 |         if ( strcmp( file_handle->filename, s_cur_chdir ) != 0 ) {
      |                      ~~~~~~~~~~~^~~~~~~~~~
      |                                 |
      |                                 zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:137:32: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:840:31: warning: passing argument 1 of 'chdir' from incompatible pointer type [-Wincompatible-pointer-types]
  840 |             chdir( file_handle->filename );
      |                    ~~~~~~~~~~~^~~~~~~~~~
      |                               |
      |                               zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:209,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/unistd.h:497:31: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  497 | extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur;
      |                   ~~~~~~~~~~~~^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:846:35: warning: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
  846 |              ( strcmp( file_handle->filename, CWDG(cwd).cwd ) != 0 ) ) {
      |                        ~~~~~~~~~~~^~~~~~~~~~
      |                                   |
      |                                   zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:137:32: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:847:38: error: invalid operands to binary - (have 'char *' and 'zend_string *' {aka 'struct _zend_string *'})
  847 |             CWDG(cwd).cwd_length = p - file_handle->filename;
      |                                      ^ ~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_fopen_primary_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:871:27: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
  871 |     file_handle->filename = SG(request_info).path_translated;
      |                           ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:872:18: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
  872 |     file_handle->free_filename = 0;
      |                  ^~~~~~~~~~~~~
      |                  filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:863:12: warning: unused variable 'p' [-Wunused-variable]
  863 |     char * p;
      |            ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_execute_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:885:27: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
  885 |     file_handle->filename = SG(request_info).path_translated;
      |                           ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:919:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  919 | static void lsapi_clean_shutdown()
      |             ^~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_clean_shutdown':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:922:9: warning: variable 'sa_rc' set but not used [-Wunused-but-set-variable]
  922 |     int sa_rc;
      |         ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_module_main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:983:9: warning: variable 'sa_rc' set but not used [-Wunused-but-set-variable]
  983 |     int sa_rc;
      |         ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1098:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 1098 | static void user_config_cache_init()
      |             ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_activate_user_ini_walk_down_the_path':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1331:10: warning: unused variable 'path_len' [-Wunused-variable]
 1331 |     uint path_len, docroot_len;
      |          ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1416:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 1416 | static void override_ini()
      |             ^~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'cli_main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1663:50: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
 1663 |                             file_handle.filename = *p;
      |                                                  ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1664:41: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
 1664 |                             file_handle.free_filename = 0;
      |                                         ^~~~~~~~~~~~~
      |                                         filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1668:76: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'zend_string *' {aka 'struct _zend_string *'} [-Wformat=]
 1668 |                                 zend_printf("No syntax errors detected in %s\n", file_handle.filename);
      |                                                                           ~^     ~~~~~~~~~~~~~~~~~~~~
      |                                                                            |                |
      |                                                                            char *           zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1670:62: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'zend_string *' {aka 'struct _zend_string *'} [-Wformat=]
 1670 |                                 zend_printf("Errors parsing %s\n", file_handle.filename);
      |                                                             ~^     ~~~~~~~~~~~~~~~~~~~~
      |                                                              |                |
      |                                                              char *           zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1674:50: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
 1674 |                             file_handle.filename = *p;
      |                                                  ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1675:41: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
 1675 |                             file_handle.free_filename = 0;
      |                                         ^~~~~~~~~~~~~
      |                                         filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1896:9: warning: unused variable 'iRequestsProcessed' [-Wunused-variable]
 1896 |     int iRequestsProcessed = 0;
      |         ^~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1970:5: warning: missing initializer for field 'num_args' of 'zend_function_entry' {aka 'struct _zend_function_entry'} [-Wmissing-field-initializers]
 1970 |     {NULL, NULL, NULL}
      |     ^
In file included from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:35,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_API.h:39:11: note: 'num_args' declared here
   39 |  uint32_t num_args;
      |           ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'parse_opt':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1513:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1513 |             if ( *((*(p-1))+2) == 's' )
      |                ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1515:9: note: here
 1515 |         case 'h':
      |         ^~~~
At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:860:12: warning: 'lsapi_fopen_primary_script' defined but not used [-Wunused-function]
  860 | static int lsapi_fopen_primary_script( zend_file_handle * file_handle )
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:67:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:305:14: warning: 'LSCRIU_Error_File_Name' defined but not used [-Wunused-function]
  305 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
      |              ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:88:12: warning: 's_criu_debug' defined but not used [-Wunused-variable]
   88 | static int s_criu_debug = 0;
      |            ^~~~~~~~~~~~
make: *** [Makefile:767: sapi/litespeed/lsapi_main.lo] Error 1
make: *** Waiting for unfinished jobs....
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c: In function 'LSAPI_ParseSockAddr.part.0':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:2622:9: warning: 'strncpy' output may be truncated copying 108 bytes from a string of length 255 [-Wstringop-truncation]
 2622 |         strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2623 |                 sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
I was thinking it couldn't be that simple, and there were things I would have to watch out for that would break. I did the update, then ran ./build all afterwards to see if I could break something but I couldn't. It works perfectly. This was perfect timing because there is nobody on the server yet.

Thanks!
 
and there were things I would have to watch out for that would break.
Well since 8.1 has changed quite a bit, as with the previous releases, you need to be sure that the applications you plan to run are compatible with 8.1. If that’s not the case it’s maybe best to run 8.0 as the main PHP release and 8.1 as the second.

This way you can enable 8.1 for the applications that support it without breaking the rest.
 
Oh, it will break applications alright. In fact the purpose of this server is to bring php 5.3 code that still uses the MySQL() database commands and who knows what else.n it and everything else and get it working on new, and it might as well be the newest to break and fix the most for the longest term before we have to do something with it again. My only concern is that it doesn't break the DA apps.

The only question is what will be the best tools to find the errors that need to fixed, both an editor and at runtime.
 
O wow you have a lot of work to do then ?
You have no idea. There are gigs of code, some of it I don't even know if it is in use, and that which isn't in use, I'm not sure if I can remove because it is used for alternate sources. Once I get it running, I will give it back to the guy to commiserate with. It uses a template system as well so the goesintas are not straightforward either.

If you have any ideas on tools let me know, otherwise I'll start with what has worked in the past for me, PHPEd.
 
@smtalk I added PHP 8.1 on three servers running openlitespeed with lsphp and it will not compile on Debian 11 and 9. Everything looks fine till it starts to compile the litespeed section and starts getting lots of warnings and some errors, then stops.

Code:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:287:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  287 | static int lsapi_parent_dead()
      |            ^~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3085:6: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3085 | void set_skip_write()
      |      ^~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3089:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3089 | int is_enough_free_mem()
      |     ^~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:3756:5: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 3756 | int LSAPI_Get_ppid()
      |     ^~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:67:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:84:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
   84 | static int (*s_lscapi_dump_me)() = NULL;
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:85:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
   85 | static int (*s_lscapi_prepare_me)() = NULL;
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:107:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  107 | int LSAPI_Get_ppid();
      | ^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_load_liblscapi':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:244:10: warning: unused variable 'ch' [-Wunused-variable]
  244 |     char ch;
      |          ^~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:399:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
  399 | static void inline LSCRIU_Debugging(void) {}
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:400:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
  400 | static void inline LSCRIU_Restored_Error(int iFatal, char *format, ...) {}
      | ^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_Native_Dump':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:409:33: warning: unused variable 'criu_native_dump_response' [-Wunused-variable]
  409 |     criu_native_dump_response_t criu_native_dump_response;
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_CloudLinux_Checkpoint':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:456:15: warning: unused variable 'pchError' [-Wunused-variable]
  456 |         char *pchError;
      |               ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_try_checkpoint':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:531:17: warning: unused variable 'iPidSender' [-Wunused-variable]
  531 |         pid_t   iPidSender;
      |                 ^~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:530:17: warning: unused variable 'iResult' [-Wunused-variable]
  530 |         int     iResult;
      |                 ^~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:508:11: warning: unused variable 'iPidDump' [-Wunused-variable]
  508 |     pid_t iPidDump = getpid();
      |           ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:506:9: warning: variable 'iRet' set but not used [-Wunused-but-set-variable]
  506 |     int iRet;
      |         ^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:554:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  554 | static int init_native_env()
      |            ^~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c: In function 'LSCRIU_Init_Env_Parameters':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:640:69: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
  640 |             lscriu_dbg("LSCRIU (%d): Use shared memory\n", getpid());
      |                                                                     ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:644:61: warning: suggest braces around empty body in an 'else' statement [-Wempty-body]
  644 |         lscriu_dbg("LSCRIU (%d): NOT Listening\n", getpid());
      |                                                             ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:647:10: warning: unused variable 'ch' [-Wunused-variable]
  647 |     char ch;
      |          ^~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'sapi_lsapi_ini_defaults':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:141:17: warning: unused variable 'entry' [-Wunused-variable]
  141 |     zval *tmp, *entry;
      |                 ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:141:11: warning: unused variable 'tmp' [-Wunused-variable]
  141 |     zval *tmp, *entry;
      |           ^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'sapi_lsapi_activate':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:700:22: warning: unused variable 'doc_root_len' [-Wunused-variable]
  700 |     size_t path_len, doc_root_len, server_name_len;
      |                      ^~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:699:18: warning: unused variable 'doc_root' [-Wunused-variable]
  699 |     char *path, *doc_root, *server_name;
      |                  ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:772:5: warning: initialization of 'char * (*)(const char *, size_t)' {aka 'char * (*)(const char *, long unsigned int)'} from incompatible pointer type 'char * (*)(char *, size_t)' {aka 'char * (*)(char *, long unsigned int)'} [-Wincompatible-pointer-types]
  772 |     sapi_lsapi_getenv,              /* getenv */
      |     ^~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:772:5: note: (near initialization for 'lsapi_sapi_module.getenv')
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:784:5: warning: initialization of 'void (*)(const char *, int)' from incompatible pointer type 'void (*)(char *, int)' [-Wincompatible-pointer-types]
  784 |     sapi_lsapi_log_message,         /* Log message */
      |     ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:784:5: note: (near initialization for 'lsapi_sapi_module.log_message')
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_chdir_primary_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:835:29: warning: passing argument 1 of 'strrchr' from incompatible pointer type [-Wincompatible-pointer-types]
  835 |     p = strrchr( file_handle->filename, '/' );
      |                  ~~~~~~~~~~~^~~~~~~~~~
      |                             |
      |                             zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:253:35: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  253 | extern char *strrchr (const char *__s, int __c)
      |                       ~~~~~~~~~~~~^~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:839:33: warning: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
  839 |         if ( strcmp( file_handle->filename, s_cur_chdir ) != 0 ) {
      |                      ~~~~~~~~~~~^~~~~~~~~~
      |                                 |
      |                                 zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:137:32: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:840:31: warning: passing argument 1 of 'chdir' from incompatible pointer type [-Wincompatible-pointer-types]
  840 |             chdir( file_handle->filename );
      |                    ~~~~~~~~~~~^~~~~~~~~~
      |                               |
      |                               zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:209,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/unistd.h:497:31: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  497 | extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur;
      |                   ~~~~~~~~~~~~^~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:846:35: warning: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
  846 |              ( strcmp( file_handle->filename, CWDG(cwd).cwd ) != 0 ) ) {
      |                        ~~~~~~~~~~~^~~~~~~~~~
      |                                   |
      |                                   zend_string * {aka struct _zend_string *}
In file included from /usr/local/directadmin/custombuild/php-8.1.0/include/../main/php_config.h:2210,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_config.h:1,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_portability.h:43,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_types.h:25,
                 from /usr/local/directadmin/custombuild/php-8.1.0/Zend/zend.h:27,
                 from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:31,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/include/string.h:137:32: note: expected 'const char *' but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
  137 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:847:38: error: invalid operands to binary - (have 'char *' and 'zend_string *' {aka 'struct _zend_string *'})
  847 |             CWDG(cwd).cwd_length = p - file_handle->filename;
      |                                      ^ ~~~~~~~~~~~~~~~~~~~~~
      |                                                   |
      |                                                   zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_fopen_primary_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:871:27: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
  871 |     file_handle->filename = SG(request_info).path_translated;
      |                           ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:872:18: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
  872 |     file_handle->free_filename = 0;
      |                  ^~~~~~~~~~~~~
      |                  filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:863:12: warning: unused variable 'p' [-Wunused-variable]
  863 |     char * p;
      |            ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_execute_script':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:885:27: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
  885 |     file_handle->filename = SG(request_info).path_translated;
      |                           ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:919:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
  919 | static void lsapi_clean_shutdown()
      |             ^~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_clean_shutdown':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:922:9: warning: variable 'sa_rc' set but not used [-Wunused-but-set-variable]
  922 |     int sa_rc;
      |         ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_module_main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:983:9: warning: variable 'sa_rc' set but not used [-Wunused-but-set-variable]
  983 |     int sa_rc;
      |         ^~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1098:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 1098 | static void user_config_cache_init()
      |             ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'lsapi_activate_user_ini_walk_down_the_path':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1331:10: warning: unused variable 'path_len' [-Wunused-variable]
 1331 |     uint path_len, docroot_len;
      |          ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1416:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
 1416 | static void override_ini()
      |             ^~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'cli_main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1663:50: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
 1663 |                             file_handle.filename = *p;
      |                                                  ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1664:41: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
 1664 |                             file_handle.free_filename = 0;
      |                                         ^~~~~~~~~~~~~
      |                                         filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1668:76: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'zend_string *' {aka 'struct _zend_string *'} [-Wformat=]
 1668 |                                 zend_printf("No syntax errors detected in %s\n", file_handle.filename);
      |                                                                           ~^     ~~~~~~~~~~~~~~~~~~~~
      |                                                                            |                |
      |                                                                            char *           zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1670:62: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'zend_string *' {aka 'struct _zend_string *'} [-Wformat=]
 1670 |                                 zend_printf("Errors parsing %s\n", file_handle.filename);
      |                                                             ~^     ~~~~~~~~~~~~~~~~~~~~
      |                                                              |                |
      |                                                              char *           zend_string * {aka struct _zend_string *}
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1674:50: warning: assignment to 'zend_string *' {aka 'struct _zend_string *'} from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
 1674 |                             file_handle.filename = *p;
      |                                                  ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1675:41: error: 'zend_file_handle' {aka 'struct _zend_file_handle'} has no member named 'free_filename'; did you mean 'filename'?
 1675 |                             file_handle.free_filename = 0;
      |                                         ^~~~~~~~~~~~~
      |                                         filename
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'main':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1896:9: warning: unused variable 'iRequestsProcessed' [-Wunused-variable]
 1896 |     int iRequestsProcessed = 0;
      |         ^~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1970:5: warning: missing initializer for field 'num_args' of 'zend_function_entry' {aka 'struct _zend_function_entry'} [-Wmissing-field-initializers]
 1970 |     {NULL, NULL, NULL}
      |     ^
In file included from /usr/local/directadmin/custombuild/php-8.1.0/main/php.h:35,
                 from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:19:
/usr/local/directadmin/custombuild/php-8.1.0/Zend/zend_API.h:39:11: note: 'num_args' declared here
   39 |  uint32_t num_args;
      |           ^~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c: In function 'parse_opt':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1513:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1513 |             if ( *((*(p-1))+2) == 's' )
      |                ^
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:1515:9: note: here
 1515 |         case 'h':
      |         ^~~~
At top level:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:860:12: warning: 'lsapi_fopen_primary_script' defined but not used [-Wunused-function]
  860 | static int lsapi_fopen_primary_script( zend_file_handle * file_handle )
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapi_main.c:67:
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:305:14: warning: 'LSCRIU_Error_File_Name' defined but not used [-Wunused-function]
  305 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
      |              ^~~~~~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lscriu.c:88:12: warning: 's_criu_debug' defined but not used [-Wunused-variable]
   88 | static int s_criu_debug = 0;
      |            ^~~~~~~~~~~~
make: *** [Makefile:767: sapi/litespeed/lsapi_main.lo] Error 1
make: *** Waiting for unfinished jobs....
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c: In function 'LSAPI_ParseSockAddr.part.0':
/usr/local/directadmin/custombuild/php-8.1.0/sapi/litespeed/lsapilib.c:2622:9: warning: 'strncpy' output may be truncated copying 108 bytes from a string of length 255 [-Wstringop-truncation]
 2622 |         strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 2623 |                 sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have the same issue.
 
Looks like there are some changes from the official PHP distribution files that are causing a problem with litespeed. I did a quick test compile of the official source, compiled with litespeed support and it had no errors compiling. Hopefully they get their patches for litespped straightened out soon.
 
not sure if it's related to php 8.1 being installed, but I see this ioncube update from v0 to v11, but even after updating it still shows up there. I think that's a bug?
 
Thank you @smtalk it compiles fine now. Did find one problem, xmlrpc fails to build. Just disabled it, it should probably be depreciated. (https://php.watch/versions/8.0/xmlrpc) It's available via pecl to install but also seems to fail there also.

Side note about pecl, if you enable secure php it doesn't work properly most of the time. Maybe as a suggestion, modify the last line to not load the php.ini config, i did a little testing and i haven't had any issues yet with not loading it and everything seems to work so far with everything that I have tested:

Code:
exec $PHP -n -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"

pecl is also now generating some warnings now with 8.1 but works fine.

Code:
Warning: Trying to access array offset on value of type null in PEAR/Command/Remote.php on line 550
Warning: Trying to access array offset on value of type null in /usr/local/php81/lib/php/PEAR/Command/Remote.php on line 550
Warning: Trying to access array offset on value of type null in PEAR/Command/Remote.php on line 551
Warning: Trying to access array offset on value of type null in /usr/local/php81/lib/php/PEAR/Command/Remote.php on line 551
 
@smtalk Follow up on the XMLRPC issue. Looks like there was an API change with 8.1 that is causing the compile issue.

Code:
  f. Non-serializable classes should be indicated using the
     ZEND_ACC_NOT_SERIALIZABLE (@not-serializable in stubs) rather than the
     zend_class_(un)serialize_deny handlers which are removed.

So I changed lines 232-233 of xmlrpc-epi-php.c to:

Code:
        xmlrpc_server_ce->serialize = ZEND_ACC_NOT_SERIALIZABLE;
        xmlrpc_server_ce->unserialize = ZEND_ACC_NOT_SERIALIZABLE;

And now it compiles fine for 8.1, but this will probably break it for all the other versions, so this will only apply to 8.1+ versions. I haven't had time to fully check it, but after manually adding the extension load lines it's loading the module.

Code:
xmlrpc

XMLRPC extension version => 1.0.0RC2
core library version => xmlrpc-epi v. 0.51
author => Dan Libby
homepage => http://xmlrpc-epi.sourceforge.net
open sourced by => Epinions.com
 
I know it's depreciated/unsupported, been working on fixing customer software that was written for it, so it's not really a need as I'm working on eliminating it also. It kept breaking the update so was annoyed and made it work. But if you remove it from 8.x entirely I wouldn't be bothered by it. Just will make customers fix their ancient stuff if they want to stay on a supported version of PHP.
 
not sure if it's related to php 8.1 being installed, but I see this ioncube update from v0 to v11, but even after updating it still shows up there. I think that's a bug?
Same here.

I have php 7.1 and 8.1

Custombuild shows update from 0 to 11.0.0 even when it's already installed.
 
Same here.

I have php 7.1 and 8.1

Custombuild shows update from 0 to 11.0.0 even when it's already installed.

Just a wild guess, but maybe it is because there is no ioncube available for PHP 8.1 yet? It tries to install it for 8.1 and fails, then Custombuild 2 continues to show an update is needed. Maybe someone can comment on this?

See this thread:

https://forum.ioncube.com/viewtopic.php?t=4592
 
Back
Top