Skip to content

make test fail while soap extention build #8426

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

Closed
evrinoma opened this issue Apr 22, 2022 · 4 comments · Fixed by ThePHPF/thephp.foundation#90
Closed

make test fail while soap extention build #8426

evrinoma opened this issue Apr 22, 2022 · 4 comments · Fixed by ThePHPF/thephp.foundation#90

Comments

@evrinoma
Copy link

evrinoma commented Apr 22, 2022

Description

I have faced with problem in soap extension while building and testing

tests/bug73037.phpt

Resulted in this output:

Iteration 0

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 1

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 2

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 3

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 4

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 5

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


Iteration 6

HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


HTTP/1.1 200 OK
Date: Fri, 22 Apr 2022 14:09:28 GMT
Connection: close
X-Powered-By: PHP/7.4.29
Content-type: text/html; charset=UTF-8

<br />
<b>Fatal error</b>:  Uncaught Error: Class 'SoapServer' not found in /usr/src/php/sapi/cli/tests/bug73037_server.php:1
Stack trace:
#0 {main}
  thrown in <b>/usr/src/php/sapi/cli/tests/bug73037_server.php</b> on line <b>1</b><br />


==DONE==

PHP Version

PHP 8.1.5 PHP 7.4.29

Operating System

REHL

@cmb69
Copy link
Member

cmb69 commented Apr 22, 2022

Uncaught Error: Class 'SoapServer' not found

Apparently, the soap extension has not been loaded, and the test currently caters to Windows only wrt. to dynamically built ext/soap:

$args = substr(PHP_OS, 0, 3) == 'WIN'
? ["-d", "extension_dir=" . ini_get("extension_dir"), "-d", "extension=php_soap.dll"] : [];

@evrinoma
Copy link
Author

Sure, I tried to check this idea here
/usr/src/php/ext/soap/tests/bug73037.php

$router = "bug73037_server.php";
$args = substr(PHP_OS, 0, 3) == 'WIN'
    ? ["-d", "extension_dir=" . ini_get("extension_dir"), "-d", "extension=php_soap.dll"] : [];
$code = <<<'PHP'
if (!extension_loaded('soap')) {
throw new \Exception('soap not loaded');
}

and it throw exception

@cmb69
Copy link
Member

cmb69 commented Apr 26, 2022

Why did you close this ticket? The issue already has been acknowledged as bug, and even if you don't need this bug to be fixed, I don't see a reason to close it prematurely.

@cmb69 cmb69 reopened this Apr 26, 2022
@evrinoma
Copy link
Author

My apologies, I don't want to spend your time waste, I solve this problem locally and that's why I've closed all issue, but if you would like to solve it, please do it.

nielsdos added a commit to nielsdos/php-src that referenced this issue May 8, 2023
If you build soap as a shared object, then these tests fail on
non-Windows, or when the PHP install hasn't been make install-ed yet,
but is executed from the development directory.
@nielsdos nielsdos linked a pull request May 8, 2023 that will close this issue
nielsdos added a commit to nielsdos/php-src that referenced this issue May 8, 2023
If you build soap as a shared object, then these tests fail on
non-Windows, or when the PHP install hasn't been make install-ed yet,
but is executed from the development directory.
nielsdos added a commit that referenced this issue May 9, 2023
* PHP-8.1:
  Fix GH-8426: make test fail while soap extension build
nielsdos added a commit that referenced this issue May 9, 2023
* PHP-8.2:
  Fix GH-8426: make test fail while soap extension build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
@cmb69 @evrinoma and others