Skip to Content.
Sympa Menu

freetds - Re: [freetds] successfully installed php/freetds on linux but...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Daniel Fazekas <fdsubs AT axelero.hu>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] successfully installed php/freetds on linux but...
  • Date: Thu, 6 Nov 2003 21:43:38 +0100

On Nov 6, 2003, at 19:41, Henry Harvey wrote:
Daniel,
You are right.
I have left an old copy of php.
The php that root and www are using is
/usr/bin/php
and the regular user is using
/usr/local/bin/php
My machine is a Mandrake 9.1 box.
The php was installed upon setup from RPMs

Unfortunately I never used Mandrake, I usually go with Red Hat's offerings. This however should work for finding what RPMs Mandrake used for installing the older copy of php:

rpm -qa | grep -i php

This will list the exact RPM package names which contain the word php.

You can then see what files they installed by issuing this (not really necessary to know; but you might be curious):

rpm -ql <package_name>

You will probably want to get rid of (uninstall) all the old php RPMs:

rpm -e <package_name>

Note that removing them will end you up with an Apache without any PHP support at all, for the moment... but that's exactly what you are about to install compiling the PHP sources on your own.

When I wanted to add the mssql support for
php, what I did was:
* look at the phpinfo() and copied all the
configure command options

That's a very common trick, however, it's good to know that for pre-4.3.0 php versions you'll probably find that phpinfo()'s configure command output differs between the apache module and the command-line versions.
(That's because before 4.3 you needed two separate compiles to get both the Apache module and the command-line version.)

+ --with-mssql=/usr/local/freetds

That means a built-in module, so you can't have problems not loading it from php.ini.

php -i | grep php.ini

(Again test it in the different accounts.)
For all users, it gives me "/usr/local/lib"
but if I do a find / -name php.ini on my system,
there's only /etc/php.ini

That means that /etc/php.ini is never getting loaded and you are running with default settings.

You might want to create a php.ini in /usr/local/lib, by using the one in /etc or the examples supplied with the php sources; or telling php's ./configure to use the one in /etc by using --with-config-file-path=/etc

... but it's unnecessary to get mssql support working.

for the apache module of php, I tried giving
it --with-apxs and it failed:
Sorry, I was not able to successfully run APXS.
Possible reasons:
1. Perl is not installed;
2. Apache was not compiled with DSO support
(--enable-module=so);
3. 'apxs' is not in your path. Try to use
--with-apxs=/path/to/apxs

I searched on my system for any apxs* and I
can't see any. Like php, this is pre-installed
upon setup of Mandrake 9.1. Version of apache is
Apache-AdvancedExtranetServer/1.3.27 (Mandrake
Linux/8mdk)

Meaning you didn't manage to compile an updated apache module, so it's no wonder mssql support isn't working there yet.

So sounds like you don't have apxs installed. A common place for it is /usr/sbin/apxs and "man apxs" should give you its manual as well.

You'll have to find what Mandrake package provides it.

On Red Hat, the Apache packages are called either "apache" or "httpd", and to have the apxs, you have to install a package called either "apache-devel" or "httpd-devel" (the apache / httpd name change depends on the version).

Install that with rpm -ivh <name_of_apache_development_package> and you should be fine.
Make sure you install the same version, from the same source, as your Apache package.

After this, PHP will compile and install the apache module then (just don't forget the --with-apxs).

When you're done with php's "make install", don't forget to restart Apache. ("killall -HUP httpd" or "apachectl graceful" or "service httpd restart" or whatever way Mandrake users prefer..).


Locate where libphp4.so is on your system and see if
it's been
correctly updated.
sorry for my question, but how? it's binary

Oh, I just thought doing something as simple as an ls -l and seeing the file's last modification time stamp to see if it's recent. :)

But we already deduced that it's definitely an old copy.


If you are still without luck, I think you'd be better off looking for help on a Mandrake or PHP forum as all this is quite off-topic for freetds.

--
Daniel





Archive powered by MHonArc 2.6.24.

Top of Page