Re: php and Oracle client on mac - followup

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




On Jun 11, 2008, at 19:07 PM, ahmed nabel wrote:



________________________________
Date: Wed, 11 Jun 2008 17:13:46 -0400
Subject: Re: php and Oracle client on mac - followup


On Jun 11, 2008, at 07:51 AM, ahmed nabel wrote:


Hi and thank you for the reply.

1. I will check if the Oracle Client is 64 or not.

This is a requirement to be useable in Leopard so if it's not then don't add it.


2. How to fix the Apache now? Is it something like delete the current folder and download a 64 bit version and install it? Where to download from? and what is the correct commands for building it?

Download???

What is wrong with using the one supplied by apple????

To me it makes no sense to install a second installation of apache when there is no gain, it only wastes disk space.

Building for multiple architectures can be achieved a number of ways, the simplest way that should work for you is the following.

# Add these three lines near the top of /private/etc/profile using pico (SEE: man pico)
export LIBTOOLIZE=glibtoolize
export MACOSX_DEPLOYMENT_TARGET=10.4
export PHPEXT_HOME=/usr/lib/php/extensions/no-debug-non-zts-20060613


I added those three lines.

That's good.



Quit terminal and then run it, here's your configure command

CFLAGS="-arch ppc -arch i386 -g -Os -pipe -no-cpp-precomp -pipe -no-cpp-precomp -arch i386 -arch x86_64" \
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe " \
LDFLAGS="-arch i386 -arch x86_64            -lresolv"  \
TEXI2HTML="/usr/bin/texi2html -subdir ." \

I ran every line of the above separately. 

Don't you feel stupid for doing something I didn't tell you to do and change the instruction I did provide???

You can't split any of that up, it's part of the configure command, you could have copied and pasted that whole section into the terminal window and it would have worked.


./configure \
--disable-dependency-tracking \
--prefix=/usr \
--mandir=/usr/share/man \
--localstatedir=/var \
--infodir=/usr/share/info \
--enable-cli \
--enable-mods-shared=all \
--with-apxs2=/usr/sbin/apxs \
--with-kerberos=/usr \
--with-oci8=shared,/Applications/Oracle/ohome


When I try to run the above starting from ./configure and the rest down (in one stream) I get no such file or directory... should I run the configure from a certain folder?

You need to be in the PHP source directory, and stop using the Finder to look in directories or search for files, learn how to do things the unix way or don't do it at all.


Do not issue "make install"!!!!!

You are only interested in oci8.so and "find . -name oci8.so" will locate it, after a successful "make" 

does this mean that I have to run make after the ./configure above?

What is confusing is you spoke of building PHP from source but now it appears you don't seem to have a clue about how to achieve your goal or even what you are doing cause you didn't understand the simple instructions I gave you.

I think you are biting off more than you can chew and you would be better off paying someone else to do it who knows your environment and knows how to do the work until such time that you can do this type of work without breaking anything in OS X.

If you're still going to go ahead and try it your self, issue "make" but do not issue "make install", you do not want to install PHP itself (despite what you believe), you only want the modules so you can incorporate them into your working configuration.

command, this file gets copied to "/usr/lib/php/extensions/no-debug-non-zts-20060613/"

Be sure it's build with 64bit support, use "file $(find . -name oci8.so)" to test it, if it is then copy it to.

You can copy it with:
cp oci8.so $PHPEXT_HOME/

Of course you would be better off using the exact same configure flags that apple used for your php and add "--disable-dependency-tracking" if it's not included along with adding the modules you want to add as "shared".

An even better solution is you generate a clean build environment and build it there so you don't mess up your OS.



3. I searched my computer for php.ini and didn't find any, I found php.ini-dist and php.ini-recommended. I also searched for libphp5.so and could not find such a file. I use the Finder File>Find.

Finder???

Stop using the finder to browse and search, you'll end up tainting and or corrupting the environment, see "man find".

You built PHP, it may have broken apache, start by looking at "file /usr/libexec/apache2/libphp5.so" (Apple's apache module)


Where to download the php 64 from and what are the correct commands to build it adding the --with-oci8=shared,/Applications/Oracle/ohome?

That will build the oci8 as a loadable extension instead of embedding it.


Any help is very appreciated.
Best.


-- Dale



Attachment: PGP.sig
Description: This is a digitally signed message part


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux