Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-8.3.2 make test fails on Unbuntu 18.04 #13260

Closed
gadj0dil0 opened this issue Jan 27, 2024 · 22 comments
Closed

php-8.3.2 make test fails on Unbuntu 18.04 #13260

gadj0dil0 opened this issue Jan 27, 2024 · 22 comments

Comments

@gadj0dil0
Copy link

Description

[php_test_results_20240127_1826.txt](https://github.com/php/php-src/files/14073411/php_test_results_20240127_1826.txt

PHP Version

php-8.3.2

Operating System

Ubuntu 18.04

@nielsdos
Copy link
Member

Thanks for your report.
The failures stem from being unable to write to /tmp and as such this seems to be a configuration issue at your end: PHP is unable to write anything to the temp directory, which is necessary for the default session handler.

@gadj0dil0
Copy link
Author

Thank you for your fast response, It seems it can, looking files in /tmp
tmp.txt

@nielsdos
Copy link
Member

This looks like a configuration problem / problem outside of PHP.
Looking at the directory listing, I do indeed see one of the test session files:

-rw------- 1 root      root        0 janv. 24 07:50 sess_1234567890123456789012345678901234567890

But this is owned by root, suggesting that you might've run the PHP test suite under root. When the next time your run the suite under your own user, it cannot write to that file because your user cannot access root files without permission elevation.
This is the reason the test fails:

Warning: session_start(): open(/tmp/sess_1234567890123456789012345678901234567890, O_RDWR) failed: Permission denied (13) in /home/bossut_a/php8.3-src/php-8.3.2/ext/session/tests/bug71974.php on line 3

To fix this, you can clean up the tmp directory of those files.

@nielsdos nielsdos closed this as not planned Won't fix, can't repro, duplicate, stale Jan 28, 2024
@gadj0dil0
Copy link
Author

I had yet erased all I could have in /temp. I have done the sudo make install configure in /usr/local but but that do not create the .so file and so on in

@gadj0dil0
Copy link
Author

Actually php7.2 with api FPM/FastCGI

@nielsdos
Copy link
Member

I had yet erased all I could have in /temp. I have done the sudo make install configure in /usr/local but but that do not create the .so file and so on in

Doing sudo make install is fine
But doing sudo make test or sudo php ./run-tests.php may cause permission issues.

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 29, 2024

Yes i have done test with sudo and its create permissions issues.
So i had rm /tmp/* and some directories, and recreate a src folder to to the configure, make and make test

expected fails and a warning , but no file .so created in module
php_test_results_20240128_0027.txt

Perhaps my system is too old (2018-04)

@nielsdos
Copy link
Member

The new test output looks good.
Not sure why the .so files are not created.

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 30, 2024

before make and make install I ran

./configure --prefix=/usr/local/php8.3 --with-apxs2=/usr/bin/apxs2 --with-config-file-path=/etc/php/8.3/apache2 --with-config-file-scan-dir=/etc/php/8.3/conf.d --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-curl --with-jpeg --with-png --with-zlib --with-bz2 --with-openssl --with-gettext --with-mhash --with-xmlrpc --enable-opcache --enable-intl --enable-fpm

The make install do not create a php8.3 folder in /usr/local

@nielsdos
Copy link
Member

If you don't use sudo for make install then you get a permission issue probably.
If using sudo does not work, can you please post the terminal output here?

@gadj0dil0
Copy link
Author

I use sudo to make install, not to make test
Not even a folder in /etc have been created

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 30, 2024

gadjodilo@DELL:~/php8.3-src/php-8.3.2$ 
#4 - 19:32:53
sudo su root
root@DELL:/home/bossut_a/php8.3-src/php-8.3.2# make install
/bin/bash /home/bossut_a/php8.3-src/php-8.3.2/libtool --silent --preserve-dup-deps --tag CC --mode=install cp ext/opcache/opcache.la /home/bossut_a/php8.3-src/php-8.3.2/modules
Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install install libphp.la /usr/lib/apache2/modules/
libtool: install: install .libs/libphp.so /usr/lib/apache2/modules/libphp.so
libtool: install: install .libs/libphp.lai /usr/lib/apache2/modules/libphp.la
libtool: warning: remember to run 'libtool --finish /home/bossut_a/php8.3-src/php-8.3.2/libs'
chmod 644 /usr/lib/apache2/modules/libphp.so
[preparing module `php' in /etc/apache2/mods-available/php.load]
Module php already enabled
Installing shared extensions:     /usr/local/php8.3/lib/php/extensions/no-debug-zts-20230831/
Installing PHP CLI binary:        /usr/local/php8.3/bin/
Installing PHP CLI man page:      /usr/local/php8.3/php/man/man1/
Installing PHP FPM binary:        /usr/local/php8.3/sbin/
Installing PHP FPM defconfig:     /usr/local/php8.3/etc/
Installing PHP FPM man page:      /usr/local/php8.3/php/man/man8/
Installing PHP FPM status page:   /usr/local/php8.3/php/php/fpm/
Installing phpdbg binary:         /usr/local/php8.3/bin/
Installing phpdbg man page:       /usr/local/php8.3/php/man/man1/
Installing PHP CGI binary:        /usr/local/php8.3/bin/
Installing PHP CGI man page:      /usr/local/php8.3/php/man/man1/
Installing build environment:     /usr/local/php8.3/lib/php/build/
Installing header files:          /usr/local/php8.3/include/php/
Installing helper programs:       /usr/local/php8.3/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php8.3/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PDO headers:           /usr/local/php8.3/include/php/ext/pdo/
root@DELL:/home/bossut_a/php8.3-src/php-8.3.2# 

no folder /usr/local/php8.3

@nielsdos
Copy link
Member

Sorry, I have no idea, there are no errors in the output and everything seems normal.

@gadj0dil0
Copy link
Author

Thank you

@gadj0dil0
Copy link
Author

Understanding having problems and encountering errors during install but say installing an not doing without say not done...
It is a real bug!

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 30, 2024

OUCH, sorry i have looked in /usr/lib/ .
So it creates the folder in /usr/local

but --with-config-file-path=/etc/php/8.3 : there is no folder php8.3 in /etc/php

I join the file, Is it missing a .so file?
tree.txt

@gadj0dil0
Copy link
Author

I should have found a file libphp8.3.so in /usr/lib/apache2/modules

@gadj0dil0
Copy link
Author

i rename /usr/lib/apache2/modules/phplib.so, I cannot restart Apache with error and after have done make install i see a new file same number of octets /usr/lib/apache2/modules/phplib.so I restart Apache and it runs !

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 31, 2024

PHP7.2 runs not 8, that means that the make install "create" and copy a libphp.so Version 7

sudo updatedb
gadjodilo@DELL:~/php-8.3-src/php-8.3.2$ 
locate libphp
/home/bossut_a/php-8.3-src/php-8.3.2/libphp.la
/home/bossut_a/php-8.3-src/php-8.3.2/.libs/libphp.la
/home/bossut_a/php-8.3-src/php-8.3.2/.libs/libphp.lai
/home/bossut_a/php-8.3-src/php-8.3.2/.libs/libphp.so
/home/bossut_a/php-8.3-src/php-8.3.2/libs/libphp.la
/home/bossut_a/php-8.3-src/php-8.3.2/libs/libphp.so
/usr/lib/apache2/modules/libphp.so
/usr/lib/apache2/modules/libphp7.2.so

/etc/apache2/mods-enabledphp.load :
/LoadModule php_module /usr/lib/apache2/modules/libphp.so

@nielsdos
Copy link
Member

Something is probably wrong with your configuration and it's hard to exactly pinpoint what. It seems related to permission issues. Or it could be conflicting with the PHP installed via your package manager.
Anyway, you can just copy /home/bossut_a/php-8.3-src/php-8.3.2/libs/libphp.so manually to /usr/lib/apache2/modules/libphp8.3.so and change the Apache line and call it a day.

@gadj0dil0
Copy link
Author

gadj0dil0 commented Jan 31, 2024

The file /home/bossut_a/php-8.3-src/php-8.3.2/libs/libphp.so is the same than /usr/lib/apache2/modules/libphp, exactly the same weight and the date is the date of install

@gadj0dil0
Copy link
Author

Is it normal that CLI version is 8 and Apache version stays 7
No file named php8.3.2 in my hard drive

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

No branches or pull requests

2 participants