Topic: php-soap 5.6.13 wsdl cache not working

Hi

I'm using php-soap 5.6.13 and I cannot get the wsdl cache to work (across multiple servers).  I'm verifying within the script that all of the soap.wsdl_xxx settings are set as expected, but I simply cannot get the wsdl to cache either in memory or to disk.  I've checked the destination cache path and permissions.  I'm using memcache for session storage but have tried turning that off (to file storage), interestingly the soap calls are much faster with memcache turned off, but still not caching.

Any ideas?  Is this a bug?

Re: php-soap 5.6.13 wsdl cache not working

Which webserver ? mod_php or fpm ?
Where do you set the soap.wsdl_cache_dir ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-soap 5.6.13 wsdl cache not working

Sorry.

CentOS7 x86_64, Apache 2.4.6-31.el7, php-5.6.13-1.el7.remi.x86_64, mod_php (I assume - using apache modules/libphp5.so).

soap.wsdl_cache_dir left to default /tmp (with full rwxrwxrwt permissions), also tried /var/tmp/soap setting ownership of that to apache (and made sure /var/tmp is accessible by apache user).

Re: php-soap 5.6.13 wsdl cache not working

When I say "where", I means "how do you set, in which configuration file"

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-soap 5.6.13 wsdl cache not working

oh.  it's set in the script (ini_set).  But i've verified after in the script it's being set correctly (ini_get).

Re: php-soap 5.6.13 wsdl cache not working

I don't really understand why default value (/var/lib/php/wsdl-cache) is not ok, bit also don't understand the issue.

Have you any "small" reproducer ?

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-soap 5.6.13 wsdl cache not working

[root@dev /etc]# which php
/usr/bin/php

[root@dev /etc]# rpm -qf /usr/bin/php
php-cli-5.6.13-1.el7.remi.x86_64

[root@dev /etc]# php -i |grep -i soap
/etc/php.d/20-soap.ini,
soap
Soap Client => enabled
Soap Server => enabled
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

[root@dev /etc]# grep -i soap /etc/php.ini
;[soap]
;soap.wsdl_cache_enabled=1
;soap.wsdl_cache_dir="/tmp"
;soap.wsdl_cache_ttl=86400

[root@dev /etc]# grep -i soap /etc/php.d/*
/etc/php.d/20-soap.ini:; Enable soap extension module
/etc/php.d/20-soap.ini:extension=soap.so

Debug lines from the script:
SOAP wsdl_cache_enabled: 1
SOAP wsdl_cache: 1
SOAP wsdl_cache_dir: /tmp
SOAP wsdl_cache_ttl: 86400
SOAP wsdl_cache_limit: 5

[root@dev ~]# ls /tmp/wsdl*
ls: cannot access /tmp/wsdl*: No such file or directory

This is the same on all my servers, all with exactly the same php version and config.

Re: php-soap 5.6.13 wsdl cache not working

1/ This output is only revelant for CLI, webserver take configuration for this path in /etc/http/conf.d or /etc/php-fpm.d

Like explained in php.ini

; RPM note : cache directory must be owned by process owner
; for mod_php, see /etc/httpd/conf.d/php.conf
; for php-fpm, see /etc/php-fpm.d/*conf
soap.wsdl_cache_dir="/tmp"

2/ on EL-7, with PrivateTmp, you will never find anything in /tmp, by design

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-soap 5.6.13 wsdl cache not working

Ah sorry I missed your note in php.ini as I distribute/build up my own php.ini.  I've then set wsdl_cache_dir in /etc/php.ini to /var/lib/php/wsdlcache, chowned that directory to apache, and now it is indeed creating a cache file.  It's still hokey as it's fetching the wsdl for every soap method call in the script, over and over, but I can't see how that would be your problem.

Thanks for the great packages, and great support.

Re: php-soap 5.6.13 wsdl cache not working

smile

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi