PHP -- installing SOAP module

I'm trying to install the SOAP module on my PHP install (Ubuntu)
PHP 5.3.3 (cli) (built: Feb  2 2012 07:02:01)

I'm getting this error message:
Error: php53-common conflicts with php-common

I looked around and found several different solutions to solve it. The thing is, I'm not a php expert and I don't want to break anything that is already working. We are running various PHP scripts on this server and I'm concerned any majors changes in PHP could break some of those scripts.

I need to install SOAP to get an outside third party script to run.

So, my question: is there a way around this error without risking messing up my current php install? Or more plainly put - what is the safest way around this error.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Are you sure it's not already installed? What does phpinfo tell you
nachtmskAuthor Commented:
Thanks for the reply.
I tried to run a script that needed SOAP and got this error message

Fatal error: Class 'SoapClient' not found in /home/zensynch/zensync.php on line 87

BTW -- line 87 in that script is:
  $client = new SoapClient("");

So, I assumed that it wasn't installed.
In php.ini look for the extension=php_soap.dll and uncomment it
There is also a directive block called [soap] - again check if they are uncommented.
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

nachtmskAuthor Commented:
These are the only lines in my php.ini file that reference SOAP
; Enables or disables WSDL caching feature.

; Sets the directory name where SOAP extension will put cache files.

; (time to live) Sets the number of second while cached file will be used
; instead of original one.

Can I just add in the one you mention or is there more to it then that?
Dave BaldwinFixer of ProblemsCommented:
On Ubuntu Linux, the extension would be  Generally on Linux, you should install PHP extensions thru the Package Manager.  File locations in Linux vary more than they do on Windows so you should try to get the one that matches your distribution.  

Unfortunately, my Ubuntu 10.0.4 system says that Canonical (the maintainer for Ubuntu) does not provide updates for 'php-soap'.  That leaves you in a difficult position.  You may have to compile not just PHP SOAP but maybe even all of PHP to get that to work on your Ubuntu system.
Dave is right, I was checking my windows version of php.ini for the full name.
Are you trying to add it through Yum
nachtmskAuthor Commented:
Yes, I tried to add it in through Yum. Not really even sure what Yum is honestly, I assumed it was the PHP  package manager?? I'm not really a PHP programmer.
If it's not a simple install, I'm not going to  mess with compiling all of Php.
Thanks for all of this info.
Did you check for in php.ini

If not there then add and restart Apache, if you get an error starting Apache then remove that line and start Apache again.

I assume this is an unmanaged server
Ray PaseurCommented:
We are running various PHP scripts on this server and I'm concerned any majors changes in PHP could break some of those scripts.
It's reasonable to be concerned.  PHP 5.3 is obsolete and there are many changes in PHP at the current levels.  You can find the current levels on the right side of the PHP home page:

This is a long shot, but I'll take it anyway.  Have you asked the publishers of the web service if they have a RESTful API?  Some of my colleagues believe that SOAP is the devil.  I don't go quite that far, but there are many obvious reasons why most web publishers have abandoned SOAP in favor of REST.  The internet is littered with the rotting husks of failed SOAP projects.  In contrast, I have never met anyone who could not immediately understand and use a REST API.  So if there is a RESTful alternative, don't walk - run away from the SOAP interface.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave BaldwinFixer of ProblemsCommented:
While PHP 5.3 is technically obsolete, upgrading to PHP 5.5 or 5.6 is not possible on many Linux distributions because they use somewhat customized versions.  Ubuntu has been back-porting many updates and security patches to PHP 5.3.  Typically, you have to 'upgrade' the entire server to get a newer version of PHP.  That would require re-installing all customizations for no actual benefit.  Which is why most hosting companies avoid doing that as long as possible.
SOAP isn't terrible if you are fortunate enough to be using a SOAP wrapper like WCF (.NET) or nuSOAP. Honestly, I'd suggest nuSOAP over PHP's built-in client every time.

Also, I would recommend looking into downloading and compiling PHP from source instead of using Yum to install. The Yum repos are notorious for getting out of date unless you try to add 3rd party repos. Getting PHP from source and getting the compiling and installing process streamlined will let you stay up to date with things and give you far more control over your PHP install. If you stay on the default Yum repos, you'll be stuck on 5.3 forever.

I love CentOS and I love yum, but I just don't use it for the essentials in a LAMP stack. Compile and run your own Apache, PHP, and MySQL if you can. It takes a little longer and you'll have to learn a little bit about how to do it, but it's usually worth it.
nachtmskAuthor Commented:
Thanks everyone. This is one of several servers I manage. This particular one is functioning well and I don't want to throw a monkey into the mix. The script I'm trying to get running was written a  long time ago and I don't think it's been updated recently though I will check with it's dev.
It's purpose was to connect to a photo site called ZenFolio and automate a file/photo transfer directly from the linux box. If I had the time myself I'd write my own interface using the ZenFolio API but I don't have that luxury of time unfortunately.  I'll have to get the photos uploaded to ZenFolio in a less elegant manner.
Also, building from source will allow you to often avoid the requirements debacle that Dave just mentioned. Pre-compiled packages are built against specific libraries, which is why it becomes a hassle for package managers. The package managers are a little stupid and they have to go and update those packages to specific versions just to get the PHP packages installed.

When you compile and install from source, you can usually just use most of the same libraries you already had installed. You don't have to follow the somewhat-dumb package manager rules.
Ray PaseurCommented:
Not to put too find a point on it, but if you're short on time SOAP is not likely to be your friend.  Check this alternative:
nachtmskAuthor Commented:
Hey.. here's a question. Can I have two versions of PHP running on the same box in different places?
I've done that with Perl before.
If I install another version of PHP, can I completely isolate it from the  current working version or will some things overlap?
Yes you can have more than one version of PHP installed, but your web server can only run one of those PHP versions at a time (there might be a way around this, but it would likely involve different file extensions and could possibly create more problems).
Not sure, maybe already said here, but some PHP installs do NOT have SOAP enabled, I seem to remember you need to add
 --enable-soap .
to the configurreation,   as  php.ini   I think.
You can have server virtual machines, and run most any setup (including PHP) on that VM,
But you may want to take a step back, and try and simplify, instead goin more complex.
Try and see if you have the   linux  library on the PHP files, then you may only need to enable SOAP? ? ?
Sorry, I was wrong in the last comment, you may look at this -

which seems to have some needed info about SERVER setup for PHP 5.3

there are Forums for specific SERVER OS (redhat, centos, ubuntu) that can get advice from some server ACES, that may know alot of these things.

I gave up on managing servers, as it takes much experience and knowledge, that can cause BIG problems, if you do not know what you are doing. It really pays for me to let people with much experience manage my servers, as the hosting company usually.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.