Which php.ini

expate98's picture
Hi, New to PHP here. Maybe someone can help me out getting WSF/PHP samples working. I followed the installation instructions on http://phpwebservices.blogspot.com/search/label/ubuntu. It all seemed to install correctly. However when I fire up a browser I receive the error Class 'WSClient' not found in /var/www/samples/echo_client.php in the /var/www/apache2/error.log. I also noticed that wso does not seem to be loaded even as I configured it in the /usr/local/Zend/Core/etc/php.ini file. My phpinfo() reads that the loaded configuration file is /etc/php5/apache2/php.ini. So I guess I'm stuck there. It seems that after the the configurations I have done I have multiple php.ini files. and the one that I made the changes to in /usr/local/Zend/Core/etc/php.ini does not get loaded. Here they are sudo find / -name php.ini /usr/local/downloads/ZendCore-2.5.0-linux-glibc21-i386/zui_files/php.ini /usr/local/downloads/ZendCore-2.5.0-linux-glibc21-i386/php.ini /usr/local/Zend/Core/setup/zui_files/php.ini /usr/local/Zend/Core/etc/php.ini /etc/php5/cli/php.ini /etc/php5/apache2/php.ini /etc/php.ini Without going crazy and deleting files how do I get the right one to load for WS02 WSF/PHP to work? Thank you
dimuthuc's picture

Hi I think you have the php

Hi I think you have the php and apache installed from debs or apt repositories as well. So can you check which httpd/apachectl you are loading. (using the command which httpd or which apachectl). and if it is not one inside /usr/local/Zend/Apache2/bin/apachectl, then you better down the current server and up the one inside the Zend.

/usr/local/Zend/apache2/bin/apachctl start

Btw you can check which php.ini is loaded from cli using php --ini command.
You can check which php.ini is loaded from the server using phpinfo() function. i.e. you should write the following script in your web hosting directory.
<?php
phpinfo();
?>
I think if you run default installation the web root directory is /var/www
if it is run from apache server inside zend it is /usr/local/Zend/apache2/htdocs

Thanks
Dimuthu

Hot Topic
Hot
Topic

Google Gadgets are a nice way to develop user interfaces for distributed services. The fact that they can be hosted anywhere over a network, not necessarily in the very portal server they eventually run in makes them re-usable and allows users to quickly...

Latest Webinar
In this webinar we'll share the range of concerns we've heard from the industry, and survey some of the new and sometimes subtle types of lock-in associated with cloud technologies.
Wednesday, 8 September, 10.00 AM (PDT)