[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: Installing PHP 4.0.6 with MSSQL support on aRaQ3



on 26/6/01 3:09 pm, Jens Kristian Søgaard <jens@xxxxxxxxxxxxxxxxxxxx> wrote:

> It's quite easy. Just do the work of APXS yourself...
> 
> I.e. after compiling and running make install (with the error) - then manually
> copy the libphp4.so file to the correct placement (it's in .libs af compiling)
> -- and insert the LoadModule and AddModule lines into the httpd.conf file.

Just to say that Jens' suggestion worked perfectly for me. I am now running
PHP 4.0.6 with the MSSQL support and have successfully tested a connection
to our MSSQL 7 server!

Very reassuring to receive so many responses to this problem, many thanks to
all of you (and especially Jens).

So for the next time I want to do this, by which time I'll have forgotten...

Download, make and install FreeTDS 0.51 in /usr/local/freetds (read the
instructions, remember to add freetds to the library like it says). Edit
/usr/local/freetds/interfaces and add an entry for the server I want to
connect to.

Download, unpack and move PHP 4.0.6 source (I put it in /usr/local/php).
Edit instances of dbopen to read tdsdbopen as per mazdak@xxxxxxxxxx
instructions on http://php.net/manual/en/ref.mssql.php

Move into php-4.0.6 directory
]# ./configure
    --with-mysql
    --with-apxs
    --enable-track-vars
    --with-mssql=/usr/local/freetds
    --with-sybase=/usr/local/freetds

]# make
]# make install

When that craps out, copy new module to Apache's module directory:

]# cp -i /usr/local/php/php-4.0.6/libs/libphp4.so
/usr/lib/apache/libphp4.so.406

At this point, I don't know if the install configured Apache for php, so
worth double-checking that LoadModule and AddModule are in httpd.conf and
that the correct .php mapping is in srm.conf, ready for when we turn PHP on
again.

Then backup any existing PHP module just in case (v 405 in this case):

]# cp -i /usr/lib/apache/libphp4.so /usr/lib/apache/libphp4.so.405

Shutdown Apache:

]# /etc/rc.d/init.d/httpd stop

Copy new module over top of old module:

]# cp -i /usr/lib/apache/libphp4.so.406 /usr/lib/apache/libphp4.so

Startup Apache and cross fingers:

]# /etc/rc.d/init.d/httpd start



Does that look like a safe procedure? I am a real newbie so I may be making
some dangerous assumptions about my setup which would get someone else into
trouble. That would be a bad thing.

A million thanks again,

David B. 

-- 
David Buxton - planetrapido.com

Email   david.buxton@xxxxxxxxxxxx      14 - 16 Great Pulteney St.
Tel     020-7440-5760                  London, W1F 9ND
Mobile  07967-484643                   United Kingdom