Re: php and Oracle client on mac - followup

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




On Jun 10, 2008, at 17:31 PM, ahmed nabel wrote:


Hi. This is a followup to a pervious post titled "php and Oracle client on mac".

I had PHP and Apache which come with Mac OS X 10.5.2 both enabled and running (a php page on my website renders correctly).

I tried to install Oracle Client 10g and recompile php to have oci working. What I did:

1. Downloaded, unzipped Oracle client and set its environment varaibles ORACLE_HOME, DYLD_LIBRARY_PATH, and TNS_ADMIN. Also had the correct connection parameters in tnsnames.ora

Does this include support for 64bit applications?


2. downloaded Apache httpd-2.2.8.tar.gz, unzipped into /usr/local and then:

  ./configure --enable-layout=Darwin --enable-mods-shared=all

make

sudo make install

Why???

It doesn't look like you built it with 64bit support so I doubt apache will be useable unless you thin out the entire system but in dong so things will break in a software update so I don't recommend it.


3. downloaded php-5.2.5.tar.gz, unzipped into /usr/local and:

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

If you build your php extensions as shared then you could have continued using the apple supplied php and just added the extensions to the php.ini file that you wish to enable.
 
./configure --enable-layout=Darwin --enable-mods-shared=all --prefix=/usr --mandir=/usr/share/man --localstatedir=/var --infodir=/usr/share/info --disable-dependency-tracking --with-apxs2=/usr/sbin/apxs --with-kerberos=/usr --enable-cli --with-oci8=shared,/Applications/Oracle/ohome

Now, I would check that libphp5.so includes support for 64bit applications "file /path/to/libphp5.so".

If you build for environment compliancy then it will actually have 4 architectures in the binary (2 for x86 and 2 for PPC).


make


sudo make install

Now, if I type http://localhost or http://localhost/index.html or http://localhost/test.php (a page which I have created in my Website folder, that is /Library/WebServer/Documents) I get: 

Safari can’t open the page “http://localhost/” because it could not connect to the server “localhost”.

If I go to /Library/WebServer/Documents, I still see the older Apache files (which was working).

Can anyone please tell me what went wrong? Or perhaps suggest some way to go because I'm quite new to Mac and php. Thank you for your time. Please inform me if I need to provide more info (logs, etc...).

It's a build issue, the environment has changed since the 10.4.x days so it appears these things have gotten the better of you.


Best.
_________________________________________________________________
Great deals on almost anything at eBay.co.uk. Search, bid, find and win on eBay today!

-- 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