The environment is running a different PHP version than the System Loaded PHP

hostmost

Verified User
Joined
May 31, 2022
Messages
41
Hi there!
I'm stuck with the following problem.

I'm using CentOS 7, and it's been running for a while with no issues. I have different PHP versions installed & set with DirectAdmin.
It's running with LiteSpeed Web Server (LSWS).

When I'm choosing a different PHP version from the DirectAdmin panel, I can see it's changing through the dashboard's terminal by running:

If I'm creating an index.php file to check what version is running by placing this script into the file:
<?php
system('/usr/bin/id');
phpinfo();
?>
And when I'm checking index.php, it shows an entirely different version from what the user is choosing. No matter what version to choose.

As a php1_handler, I have LSPHP8.1, however, on the frontend, it constantly shows version 7.4. No matter which system user is doing it, it works exactly the same for everybody.

I've read all the manuals and tried many different things, including rebuilding httpd, but nothing works.

Also, if I'm trying to run the following command:
./build php n
it's failing while building the very first PHP version, showing this message, which I don't have a clue how to fix:
[root@server1 custombuild]# ./build php n
Package 1:pkgconfig-0.27.1-4.el7.x86_64 already installed and latest version
Package 1:eek:penssl-devel-1.0.2k-25.el7_9.x86_64 already installed and latest version
Package systemd-devel-219-78.el7_9.7.x86_64 already installed and latest version
Package krb5-devel-1.15.1-55.el7_9.x86_64 already installed and latest version
Package libcurl-devel-7.29.0-59.el7_9.1.x86_64 already installed and latest version
Package 2:libpng-devel-1.5.13-8.el7.x86_64 already installed and latest version
Package freetype-devel-2.8-14.el7_9.1.x86_64 already installed and latest version
Package libwebp-devel-0.3.0-10.el7_9.x86_64 already installed and latest version
Package libjpeg-turbo-devel-1.2.90-8.el7.x86_64 already installed and latest version
Package libxslt-devel-1.1.28-6.el7.x86_64 already installed and latest version
Package libsodium-devel-1.0.18-1.el7.x86_64 already installed and latest version
Package libicu-devel-50.2-4.el7_7.x86_64 already installed and latest version
Package sqlite-devel-3.7.17-8.el7_7.1.x86_64 already installed and latest version
Package oniguruma-devel-6.8.2-2.el7.x86_64 already installed and latest version
# #-=O#- #
Found /usr/local/directadmin/custombuild/php-8.1.14.tar.gz
Extracting ...
Done.
########################################################################## 100.0%
Configuring php-8.1.14...
Patching php-fpm for per-user process grouping
patching file sapi/fpm/fpm/fpm_children.c
Hunk #1 succeeded at 429 (offset -2 lines).
Patching php-fpm to not fail on startup if User quota maxed out on socket chown
patching file sapi/fpm/fpm/fpm_unix.c
Hunk #1 succeeded at 242 (offset 7 lines).
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking how to run the C preprocessor... cc -E
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking whether ln -s works... yes
checking for system library directory... lib
checking whether to enable runpaths... yes
checking if compiler supports -Wl,-rpath,... yes
checking for gawk... gawk
checking for bison... bison
checking for bison version... 3.0.4 (ok)
checking for re2c... no
checking for php... php
checking for php version... 7.4.33 (ok)
checking whether to enable computed goto gcc extension with re2c... no
checking whether C compiler accepts -fvisibility=hidden... yes
checking whether to force non-PIC code in shared modules... no
checking whether we are using musl libc... no
checking whether /dev/urandom exists... yes
checking for global register variables support... yes
checking whether __cpuid_count is available... yes
checking for pthreads_cflags... -pthread
checking for pthreads_lib... pthread

Configuring SAPI modules
checking for Apache 2 handler module support via DSO through APXS... no
checking for setproctitle... no
checking for sys/pstat.h... no
checking for PS_STRINGS... no
checking for CLI build... yes
checking for embedded SAPI library support... shared
checking for FPM build... yes
checking for clearenv... yes
checking for setproctitle... (cached) no
checking for setproctitle_fast... no
checking for library containing socket... none required
checking for library containing inet_addr... none required
checking for prctl... yes
checking for clock_gettime... yes
checking for ptrace... yes
checking whether ptrace works... yes
checking for proc mem file... mem
checking if gcc supports __sync_bool_compare_and_swap... yes
checking for TCP_INFO... yes
checking for sysconf... yes
checking for times... yes
checking for kqueue... no
checking for port framework... no
checking for /dev/poll... no
checking for epoll... yes
checking for select... yes
checking for libsystemd >= 209... yes
checking for systemd/sd-daemon.h... yes
checking for clang fuzzer SAPI... no
checking for LiteSpeed support... yes
checking for phpdbg support... yes
checking for phpdbg debug build... no
checking for phpdbg readline support... no
checking whether termios.h defines TIOCGWINSZ... no
checking whether sys/ioctl.h defines TIOCGWINSZ... yes
checking for phpdbg and readline integration... disabled
checking for CGI build... yes
checking for sun_len in sys/un.h... no
checking whether cross-process locking is required by accept()... no
checking for chosen SAPI module... embed
checking for executable SAPI binaries... cli fpm litespeed phpdbg cgi

Running system checks
checking for sendmail... /usr/sbin/sendmail
checking whether system uses EBCDIC... no
checking whether byte ordering is bigendian... no
checking whether writing to stdout works... This is the test message -- yes
checking for socket... yes
checking for socketpair... yes
checking for htonl... yes
checking for gethostname... yes
checking for gethostbyaddr... yes
checking for dlopen... no
checking for __dlopen... no
checking for dlopen in -ldl... yes
checking for dlsym... yes
checking for sin in -lm... yes
checking for inet_aton... yes
checking for stdint.h... (cached) yes
checking for dirent.h... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for netinet/in.h... yes
checking for alloca.h... yes
checking for arpa/inet.h... yes
checking for arpa/nameser.h... yes
checking for crypt.h... yes
checking for dns.h... no
checking for fcntl.h... yes
checking for grp.h... yes
checking for ieeefp.h... no
checking for langinfo.h... yes
checking for malloc.h... yes
checking for poll.h... yes
checking for pty.h... yes
checking for pwd.h... yes
checking for resolv.h... yes
checking for strings.h... (cached) yes
checking for syslog.h... yes
checking for sysexits.h... yes
checking for sys/ioctl.h... yes
checking for sys/file.h... yes
checking for sys/mman.h... yes
checking for sys/mount.h... yes
checking for sys/poll.h... yes
checking for sys/resource.h... yes
checking for sys/select.h... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking for sys/statfs.h... yes
checking for sys/statvfs.h... yes
checking for sys/vfs.h... yes
checking for sys/sysexits.h... no
checking for sys/uio.h... yes
checking for sys/wait.h... yes
checking for sys/loadavg.h... no
checking for unistd.h... (cached) yes
checking for unix.h... no
checking for utime.h... yes
checking for sys/utsname.h... yes
checking for sys/ipc.h... yes
checking for dlfcn.h... yes
checking for tmmintrin.h... yes
checking for nmmintrin.h... yes
checking for wmmintrin.h... yes
checking for immintrin.h... yes
checking for fopencookie... yes
checking for broken getcwd... no
checking for broken gcc optimize-strlen... no
checking whether struct tm is in sys/time.h or time.h... time.h
checking for cc options needed to detect all undeclared functions... none needed
checking for struct tm.tm_zone... yes
checking for missing declarations of reentrant functions... done
checking for fclose declaration... ok
checking for struct flock... yes
checking for socklen_t... yes
checking size of intmax_t... 8
checking size of ssize_t... 8
checking size of ptrdiff_t... 8
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of size_t... 8
checking size of off_t... 8
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for __builtin_expect... yes
checking for __builtin_clz... yes
checking for __builtin_clzl... yes
checking for __builtin_clzll... yes
checking for __builtin_ctzl... yes
checking for __builtin_ctzll... yes
checking for __builtin_smull_overflow... yes
checking for __builtin_smulll_overflow... yes
checking for __builtin_saddl_overflow... yes
checking for __builtin_saddll_overflow... yes
checking for __builtin_ssubl_overflow... yes
checking for __builtin_ssubll_overflow... yes
checking for __builtin_cpu_init... yes
checking for __builtin_cpu_supports... yes
checking whether the compiler supports __alignof__... yes
checking for struct tm.tm_gmtoff... yes
checking for struct stat.st_blksize... yes
checking for struct stat.st_rdev... yes
checking for struct stat.st_blocks... yes
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking for struct sockaddr_storage... yes
checking for field sa_len in struct sockaddr... no
checking for __attribute__((ifunc))... yes
checking for __attribute__((target))... yes
checking for IPv6 support... yes
checking for alphasort... yes
checking for asctime_r... yes
checking for chroot... yes
checking for ctime_r... yes
checking for explicit_memset... no
checking for fdatasync... yes
checking for flock... yes
checking for ftok... yes
checking for funopen... no
checking for gai_strerror... yes
checking for getcwd... yes
checking for getloadavg... yes
checking for getlogin... yes
checking for getprotobyname... yes
checking for getprotobynumber... yes
checking for getservbyname... yes
checking for getservbyport... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for gmtime_r... yes
checking for getpwnam_r... yes
checking for getgrnam_r... yes
checking for getpwuid_r... yes
checking for getwd... yes
checking for glob... yes
checking for inet_ntoa... yes
checking for inet_ntop... yes
checking for inet_pton... yes
checking for localtime_r... yes
checking for lchown... yes
checking for memmove... yes
checking for mkstemp... yes
checking for mmap... yes
checking for nice... yes
checking for nl_langinfo... yes
checking for poll... yes
checking for putenv... yes
checking for scandir... yes
checking for setitimer... yes
checking for setenv... yes
checking for shutdown... yes
checking for sigprocmask... yes
checking for statfs... yes
checking for statvfs... yes
checking for std_syslog... no
checking for strcasecmp... yes
checking for strnlen... yes
checking for strptime... yes
checking for strtok_r... yes
checking for symlink... yes
checking for tzset... yes
checking for unsetenv... yes
checking for usleep... yes
checking for utime... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for nanosleep... yes
checking for memmem... yes
checking how many arguments gethostbyname_r() takes... six
checking for nanosleep in -lrt... yes
checking for setsockopt in -lnetwork... no
checking for __setsockopt in -lnetwork... no
checking for getaddrinfo... yes
checking for strlcat... no
checking for strlcpy... no
checking for explicit_bzero... no
checking for getopt... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for type of reentrant time-related functions... POSIX
checking for in_addr_t... yes
checking for aarch64 CRC32 API... no
checking for asm goto... yes
checking whether to enable valgrind support... yes
checking for valgrind... no
checking for openpty... no
checking for __openpty... no
checking for openpty in -lutil... yes

General settings
checking whether to include gcov symbols... no
checking whether to include debugging symbols... no
checking whether to enable debug assertions in release mode... no
checking whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY... no
checking layout of installed files... PHP
checking path to configuration file... DEFAULT
checking where to scan for configuration files... /usr/local/php81/lib/php.conf.d
checking whether to enable PHP's own SIGCHLD handler... no
checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking whether to enable DTrace support... no
checking how big to make fd sets... using system default

Configuring extensions
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.9.0... yes
checking for OpenSSL support... yes
checking for Kerberos support... yes
checking whether to use system default cipher list instead of hardcoded value... no
checking for krb5-gssapi krb5... yes
checking for openssl >= 1.0.2... yes
checking for RAND_egd... yes
checking for PCRE library to use... bundled
checking whether to enable PCRE JIT functionality... yes
checking whether Intel CET is enabled... no
checking whether to enable the SQLite3 extension... yes
checking for sqlite3 >= 3.7.7... yes
checking for sqlite3_errstr in -lsqlite3... yes
checking for sqlite3_expanded_sql in -lsqlite3... no
checking for sqlite3_load_extension in -lsqlite3... yes
checking for ZLIB support... yes
checking for zlib >= 1.2.0.4... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... no
checking whether to enable calendar conversion support... yes
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking for libcurl >= 7.29.0... yes
checking for SSL support in libcurl... yes
checking for libcurl linked against old openssl... yes
checking for openssl... yes
checking for openssl/crypto.h... yes
checking for curl_easy_perform in -lcurl... yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for TCADB support... no
checking for LMDB support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable dl-test extension... no
checking whether to enable DOM support... yes
checking for libxml-2.0 >= 2.9.0... yes
checking whether to build with Enchant support... no
checking whether to enable EXIF (metadata from images) support... yes
checking for FFI support... no
checking for fileinfo support... yes
checking for strcasestr... yes
checking for utimes... yes
checking for strndup... yes
checking whether to enable input filter support... yes
checking whether to enable FTP support... yes
checking whether to explicitly enable FTP SSL support... no
checking for openssl >= 1.0.2... yes
checking for GD support... yes
checking for external libgd... no
checking for libavif... no
checking for libwebp... yes
checking for libjpeg... yes
checking for libXpm... no
checking for FreeType 2... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for zlib... yes
checking for libpng... yes
checking for libwebp >= 0.2.0... yes
checking for libjpeg... yes
checking for freetype2... yes
checking for GNU gettext support... yes
checking for bindtextdomain in -lintl... no
checking for bindtextdomain in -lc... yes
checking for ngettext in -lc... yes
checking for dngettext in -lc... yes
checking for dcngettext in -lc... yes
checking for bind_textdomain_codeset in -lc... yes
checking for GNU MP support... no
checking for mhash support... yes
checking size of long... (cached) 8
checking if we're at 64-bit platform... yes
checking for iconv support... yes
checking for iconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... yes
checking if iconv supports //IGNORE... no
checking for IMAP support... no
checking for IMAP Kerberos support... yes
checking for IMAP SSL support... no
checking whether to enable internationalization support... yes
checking for icu-uc >= 50.1 icu-io icu-i18n... yes
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -E
checking whether g++ supports C++11 features with -std=c++11... yes
checking for LDAP support... no
checking whether to build with LDAP Cyrus SASL support... no
checking whether to enable multibyte string support... yes
checking whether to enable multibyte regex support (requires oniguruma)... yes
checking for oniguruma... yes
checking if oniguruma has an invalid entry for KOI8 encoding... yes
checking for MySQLi support... yes
checking for specified location of the MySQL UNIX socket... /var/lib/mysql/mysql.sock
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for Oracle Database OCI8 support... no
checking for Adabas support... no
checking for SAP DB support... no
checking for Solid support... no
checking for IBM DB2 support... no
checking for Empress support... no
checking for Empress local access support... no
checking for a custom ODBC support... no
checking whether to build with iODBC support... no
checking for Easysoft ODBC-ODBC Bridge support... no
checking whether to build with unixODBC support... no
checking for DBMaker support... no
checking for any ODBC driver support... no
checking whether to enable Zend OPcache support... yes
checking whether to enable copying PHP CODE pages into HUGE PAGES... yes
checking whether to enable JIT... yes
checking for capstone >= 3.0.0... no
checking for opagent in default path... not found
checking for mprotect... no
checking for sysvipc shared memory support... no
checking for mmap() using MAP_ANON shared memory support... no
checking for shm_open in -lrt... no
checking for __shm_open in -lrt... no
checking for shm_open in -lroot... no
checking for __shm_open in -lroot... no
checking for mmap() using shm_open() shared memory support... no
configure: error: No supported shared memory caching support was found when configuring opcache. Check config.log for any errors or missing dependencies.

Even though I do have opcache installed, up and running.

Please, help!
 
Your are running Openlitespeed or Litespeed enterprise?
You can try restart your webserver you are running
I've even tried reloading the machine. And as I described in this topic above, I'm running LSWS, not OLS, so yes, Enterprise version.
 
Back
Top