Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to set php_value 'soap.wsdl_cache_dir'

I have VPS server (CentOS 6.5) running Apache 2.2.4 and PHP-FPM (FastCGI Process Manager). Looking in php-fpm error_log I've noticed error with every spawn php-fpm child process:

WARNING: [pool www] child 24086 said into stderr: "ERROR: Unable to set php_value 'soap.wsdl_cache_dir'"

I couldn't find any info on this warning googling. Is anybody aware what does this mean and how to get rid of this warning?

UPDATE 1:

fastcgi.conf for apache:

User apache                                                                                                                             
Group apache                                                                                                                            

LoadModule fastcgi_module modules/mod_fastcgi.so                                                                                        

<IfModule mod_fastcgi.c>                                                                                                                
    DirectoryIndex index.php index.html index.shtml index.cgi                                                                       
    AddHandler php5-fcgi .php                                                                                                       
    # For monitoring status with e.g. Munin                                                                                         
    <LocationMatch "/(ping|status)">                                                                                                
            SetHandler php5-fcgi-virt                                                                                               
            Action php5-fcgi-virt /php5-fcgi virtual                                                                                
    </LocationMatch>                                                                                                                

    Action php5-fcgi /php5-fcgi                                                                                                     
    Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi                                                                                     
    FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /tmp/php5-fpm.sock -pass-header Authorization                          
</IfModule>

# global FastCgiConfig can be overridden by FastCgiServer options in vhost config                                                       
FastCgiConfig -idle-timeout 20 -maxClassProcesses 1

And here is the php-fpm.conf and pool configuration for php:

pid = /var/run/php-fpm/php-fpm.pid
daemonize = yes

; Start a new pool named 'www'.                                                                                                         
[www]

listen = /tmp/php5-fpm.sock 
group = apache
pm = dynamic
pm.max_children = 8
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.status_path = /status
ping.path = /ping
catch_workers_output = yes
php_admin_value[error_log] = /var/log/php-fpm/www-error.log                                                                             
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files                                                                                                 
php_value[session.save_path]    = /var/lib/php/session                                                                                  
php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache

Everything else is on defaults.

UPDATE 2:

After manually creating /var/lib/php/wsdlcache directory as suggested and setting permissions to 770 and owner to root:apache, I hoped that I won't see the error again, but unfortunately after restarting php-fpm process the error is there again and this becomes something really very strange.

P.S. Maybe this question is more appropriate for serverfault, but generally there are more experts in php and apache configuration on stackoverflow.

like image 990
Arman P. Avatar asked Feb 06 '14 01:02

Arman P.


1 Answers

I hate so trivial solutions. Finally I've found the problem and solution by myself. Leaving it here for reference for others with some pre-history.

FastCGI configuration files were taken from internet when first configuring FastCGI as I haven't used it before. Tutorials showing FastCGI configuration contained the line php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache. I became really interested what is SOAP as I don't use it on the websites that I run on this server and this curiosity brought me the solution. Actually I don't need SOAP and simply removing that line would fix the problem I guess, but I've decided to leave it there and found out that I needed simply to install php-soap.

yum install php-soap

For RHEL/CentOS

After restarting php-fpm I don't get the error on respawning fpm processes.

like image 161
Arman P. Avatar answered Oct 15 '22 09:10

Arman P.