Fatal error: Class 'WSClient' not found in C:\wamp\www\samples\add_soap_header_client.php on line 26

sandipwaghole's picture
Hello, We have installed wamp server which have PHP 5.2.4 , Apache 2.2.4. We successfully built up WSF/PHP, with wamp as server, wsf.dll and are trying to execute the samples. We couldn't understand some steps in installing WSF as PHP extension.   Installing WSO2 WSF as a PHP Extension Add wsf_c\lib directory to the path. [Kindly explain this step] we did set PATH from system variable with addition of "C:\WSF\wso2-wsf-php-1.0.0\wso2-wsf-php-bin-1.0.0-win32\wsf_c\lib\"   Directory structure C:\WSF\wso2-wsf-php-1.0.0\wso2-wsf-php-bin-1.0.0-win32\wsf_c C:\WSF\wso2-wsf-php-1.0.0\wso2-wsf-php-bin-1.0.0-win32\samples C:\WSF\wso2-wsf-php-1.0.0\wso2-wsf-php-bin-1.0.0-win32\wsf.dll C:\WSF\wso2-wsf-php-1.0.0\wso2-wsf-php-bin-1.0.0-win32\scripts   We copied the folder scripts & samples to c:\wamp\www i.e. Web Server's Document Root. Copied php5apache2.dll to Apache2/modules directory. Environment variable as PHPRC valued ‘C:\wamp\php’ created wsf.dll is copied to dictionary ‘C:\wamp\php\ext’ Following lines are added to php.ini [wsf] wsf.home="C:/WSF/wso2-wsf-php-1.0.0/wso2-wsf-php-bin-1.0.0-win32/wsf_c" wsf.log_path="C:/WSF/wso2-wsf-php-1.0.0/wso2-wsf-php-bin-1.0.0-win32/wsf_c/logs" wsf.log_level=3 extension=wsf.dll Following lines are copied to httpd.conf located at ‘C:\wamp\Apache2\conf’ of Apache LoadModule php5_module modules/php5apache2.dll AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps     Execution of samples When we were trying to execute the files in samples folder we got following error Fatal error: Class 'WSClient' not found in C:\wamp\www\samples\add_soap_header_client.php on line 26   Kindly help us out in installing WSO2 WSF as a PHP extension. Let us know where we are going wrong.   Thanks in advance Sandip Waghole Geometric Software Co Ltd, CMM V , Pune Hinjewadi IT Park Pune, India
nandika's picture

Re: Fatal Error "Class WSClient not found"

Hi Sandip, You problem is because php has not loaded wsf extension. Open your php.ini file which should be in C:\wamp\php directory and set the extension_dir entry to C:\wamp\php\ext directory as follows. extension_dir ="C:\wamp\php\ext"  This should fix the problem. Also add C:\wamp\php directory to your PATH environment variable. You can see the loaded modules by php usig the "php -m" option in commad line. Use <?php phpinfo(); ?>  script to check the loaded modules when runnig apache. Regards Nandika        
sandipwaghole's picture

Re: Fatal Error "Class WSClient not found"

Hello Nandika, Things are same as what you said in earlier message. But when I checked it from command prompt I got one pop up error as This application has failed to start because zlib1.dll was not found. Re-Installing the application may fix this problem. [PHP Modules] bcmath calendar com_dotnet ctype date dom filter ftp gd hash iconv json libxml mbstring mysql mysqli odbc pcre PDO pdo_sqlite Reflection session SimpleXML SPL SQLite standard tokenizer wddx xml xmlreader xmlwriter zlib [Zend Modules] FYI :- Following things are added to php.ini for wsf [wsf] wsf.home="C:/WSF/wso2-wsf-php-1.0.0/wso2-wsf-php-bin-1.0.0-win32/wsf_c" wsf.log_path="C:/WSF/wso2-wsf-php-1.0.0/wso2-wsf-php-bin-1.0.0-win32/wsf_c/logs" wsf.log_level=3 extension=wsf.dll We are still running across the same issue. Need to know the final soultion for this. Please help us out. Regards, Sandip Waghole    
ramanath_bhongale's picture

regarding the same error

Any solutions to this error so far: Fatal error: Class 'WSClient' not found in C:\bwamp\www\samples\echo_client.php I have followed all the steps. and I am using wamp server. One confusion is: should I install Apache 2.2 also or wamp comes with apache built in? because I find apache, php and mysql in one single folder. So when I copied the php2apache5.dll the server did not start at all so I had to skip this part Any solutions please reply Thanks Ramanath
nandika's picture

Re: Installing on wamp server

You can find all details on how to install WSF/PHP on wamp server from following link http://www.dimuthu.org/blog/2008/07/19/install-wsfphp-with-wampserver/ Nandika
anusha.srs.gmail.com's picture

followed the same

All the steps mentioned there was followed still i get the error when i restart apache, it says "PHP Startup: Unable to load dynamic library "\wsf.dll" - The specified procedure could not be found".. I am not getting any blog where any1 faced this problem... Can any1 help in this. I am stuck with this for a week now... :(
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)