verifying your macports
After the scare of spurious libgcc getting in the way, I'm wondering how can we verify our setups. This is when rpm-style verification and binary distros shine. Sure you can compile stuff, but what if some crap got into your PATH -- beginning with a wrong gcc? What if some other crap got into LDFLAGS or DYLD_LIBRARY_PATH or whatever? What tools are there to verify -- completeness of each port -- proper chain of dependencies of each port -- checking that no port depends on any package not built by the ports -- e.g., nothing outside /opt/local -- that each executable in /opt/local/bin will load -- what else? Cheers, Alexy
On 11/21/07, Alexy Khrabrov <deliverable@gmail.com> wrote:
After the scare of spurious libgcc getting in the way, I'm wondering how can we verify our setups. This is when rpm-style verification and binary distros shine. Sure you can compile stuff, but what if some crap got into your PATH -- beginning with a wrong gcc? What if some other crap got into LDFLAGS or DYLD_LIBRARY_PATH or whatever? What tools are there to verify
-- completeness of each port -- proper chain of dependencies of each port -- checking that no port depends on any package not built by the ports -- e.g., nothing outside /opt/local -- that each executable in /opt/local/bin will load -- what else?
sounds like you have a fine project scoped out there ;-) -- Paul Beard / www.paulbeard.org/ <paulbeard@gmail.com/paulbeard@mac.com>
On Nov 21, 2007, at 09:24, Alexy Khrabrov wrote:
After the scare of spurious libgcc getting in the way, I'm wondering how can we verify our setups. This is when rpm-style verification and binary distros shine. Sure you can compile stuff, but what if some crap got into your PATH -- beginning with a wrong gcc? What if some other crap got into LDFLAGS or DYLD_LIBRARY_PATH or whatever? What tools are there to verify
-- completeness of each port -- proper chain of dependencies of each port -- checking that no port depends on any package not built by the ports -- e.g., nothing outside /opt/local -- that each executable in /opt/local/bin will load -- what else?
I don't think any of this exists in MacPorts today. Possible exception: trace mode, to detect undeclared dependencies. "sudo port -t install foo" (Trace mode has changed a lot in 1.6.) And also: "sudo port lint foo" to do syntax checking and also to warn about missing required variables and such. (Available in 1.6.)
I was recently required to start connecting to Oracle databases for some of the pages I serve. I was wondering if we ever might see an -oci8 variant that installs the Oracle library for php4/php5? John Korchok
On Nov 21, 2007, at 21:01, John Korchok wrote:
I was recently required to start connecting to Oracle databases for some of the pages I serve. I was wondering if we ever might see an -oci8 variant that installs the Oracle library for php4/php5?
I'd be happy to add it to php5 if you'll tell me how to build php5 with oracle support. But I imagine we'd first need a port for the oracle libraries. "port search oracle" and "port search oci" don't return any results. Is the oracle software even freely available? I thought it was commercial. I see there's a free "instantclient" but they only have PowerPC Mac binaries at this time?
On Nov 21, 2007, at 21:01, John Korchok wrote:
I was recently required to start connecting to Oracle databases for some of the pages I serve. I was wondering if we ever might see an -oci8 variant that installs the Oracle library for php4/php5?
John and I have been communicating about this off-list, and I've just committed a new port "oracle-instantclient" and also added a variant "+oracle" to the php5 port. (Would naming the variant "+oci8" have been better?) There's a ticket filed for this enhancement request: http://trac.macports.org/projects/macports/ticket/13530 Check the ticket for information on fetch failures you might encounter and what to do about them. I don't have an Oracle server to test with, so I'll be relying on John and anyone else who uses Oracle to send me feedback. Thanks. Note that this is for PowerPC Macs only. Blame Oracle. You may need to follow some of the setup instructions here; I'm not sure: http://www.php.net/oci8 You should not, however, need to set LD_LIBRARY_PATH (or its Mac OS X equivalents DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH). That should already be adequately taken care of by the oracle- instantclient port.
-----Original Message----- From: Ryan Schmidt [mailto:ryandesign@macports.org] Sent: Sunday, December 09, 2007 11:41 AM To: John Korchok Cc: macports-users@lists.macosforge.org Subject: Re: Oracle support in PHP?
On Nov 21, 2007, at 21:01, John Korchok wrote:
I was recently required to start connecting to Oracle databases for some of the pages I serve. I was wondering if we ever might see an -oci8 variant that installs the Oracle library for php4/php5?
John and I have been communicating about this off-list, and I've just committed a new port "oracle-instantclient" and also added a variant "+oracle" to the php5 port. (Would naming the variant "+oci8" have been better?)
There's a ticket filed for this enhancement request:
http://trac.macports.org/projects/macports/ticket/13530
Check the ticket for information on fetch failures you might encounter and what to do about them.
I don't have an Oracle server to test with, so I'll be relying on John and anyone else who uses Oracle to send me feedback. Thanks.
Note that this is for PowerPC Macs only. Blame Oracle.
You may need to follow some of the setup instructions here; I'm not sure:
You should not, however, need to set LD_LIBRARY_PATH (or its Mac OS X equivalents DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH). That should already be adequately taken care of by the oracle- instantclient port.
I had no errors or other problems installing the "oracle-instantclient" port or the "php5 +oracle" port. Thanks Ryan! I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/oracle. http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for? The page is certainly Greek to me, since I haven't used Oracle.
-----Original Message----- From: Ryan Schmidt [mailto:ryandesign@macports.org] Sent: Monday, December 10, 2007 5:55 PM To: John Korchok Cc: macports-users@lists.macosforge.org Subject: Re: Oracle support in PHP?
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for?
The page is certainly Greek to me, since I haven't used Oracle.
When I run phpinfo, the last configure command is: '--with-oci8=instantclient,/opt/local/lib/oracle' At http://www.oracle.com/technology/pub/notes/technote_php_instant.html, under the heading "Enabling the PHP OCI8 Extension on Linux " they suggest a syntax like: '--with-oci8-instant-client=/opt/local/lib/oracle' Phpinfo has an oci8 section further, and it looks like it is getting installed.
On Dec 11, 2007, at 22:11, John Korchok wrote:
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for?
The page is certainly Greek to me, since I haven't used Oracle.
When I run phpinfo, the last configure command is: '--with-oci8=instantclient,/opt/local/lib/oracle'
At http://www.oracle.com/technology/pub/notes/ technote_php_instant.html, under the heading "Enabling the PHP OCI8 Extension on Linux " they suggest a syntax like: '--with-oci8-instant-client=/opt/local/lib/oracle'
As far as I can tell, the option was --with-oci8-instant-client=/path/ to/instantclient in earlier php versions (maybe php 5.1.1 and earlier), and is --with-oci8=instantclient,/path/to/instantclient now (maybe since php 5.1.2). This is mentioned in a note from wes9999 on http://www.php.net/oci8 and I say "maybe" for the versions because the Oracle page you cite does say it has been updated for php 5.1.2 so I don't know. But since they haven't managed to put out an Intel version in two years, and advocate using the problematic DYLD_LIBRARY_PATH variable to get their libraries to work, I don't trust Oracle very much.
Phpinfo has an oci8 section further, and it looks like it is getting installed.
I would expect so. So have you had any luck connecting with the Oracle server or are you running into other problems?
-----Original Message----- From: Ryan Schmidt [mailto:ryandesign@macports.org] Sent: Tuesday, December 11, 2007 11:31 PM To: John Korchok Cc: macports-users@lists.macosforge.org Subject: Re: Oracle support in PHP?
On Dec 11, 2007, at 22:11, John Korchok wrote:
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for?
The page is certainly Greek to me, since I haven't used Oracle.
When I run phpinfo, the last configure command is: '--with-oci8=instantclient,/opt/local/lib/oracle'
At http://www.oracle.com/technology/pub/notes/ technote_php_instant.html, under the heading "Enabling the PHP OCI8 Extension on Linux " they suggest a syntax like: '--with-oci8-instant-client=/opt/local/lib/oracle'
As far as I can tell, the option was --with-oci8-instant-client=/path/ to/instantclient in earlier php versions (maybe php 5.1.1 and earlier), and is --with-oci8=instantclient,/path/to/instantclient now (maybe since php 5.1.2). This is mentioned in a note from wes9999 on http://www.php.net/oci8 and I say "maybe" for the versions because the Oracle page you cite does say it has been updated for php 5.1.2 so I don't know. But since they haven't managed to put out an Intel version in two years, and advocate using the problematic DYLD_LIBRARY_PATH variable to get their libraries to work, I don't trust Oracle very much.
Phpinfo has an oci8 section further, and it looks like it is getting installed.
I would expect so. So have you had any luck connecting with the Oracle server or are you running into other problems?
I'm not getting any connection yet. I saw the reference to the new path syntax, but may also be a path issue. Does MacPorts set the path as root or as a user?
On Dec 12, 2007, at 08:50, John Korchok wrote:
On Dec 11, 2007, at 22:11, John Korchok wrote:
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for?
The page is certainly Greek to me, since I haven't used Oracle.
When I run phpinfo, the last configure command is: '--with-oci8=instantclient,/opt/local/lib/oracle'
At http://www.oracle.com/technology/pub/notes/ technote_php_instant.html, under the heading "Enabling the PHP OCI8 Extension on Linux " they suggest a syntax like: '--with-oci8-instant-client=/opt/local/lib/oracle'
As far as I can tell, the option was --with-oci8-instant-client=/path/ to/instantclient in earlier php versions (maybe php 5.1.1 and earlier), and is --with-oci8=instantclient,/path/to/instantclient now (maybe since php 5.1.2). This is mentioned in a note from wes9999 on http://www.php.net/oci8 and I say "maybe" for the versions because the Oracle page you cite does say it has been updated for php 5.1.2 so I don't know. But since they haven't managed to put out an Intel version in two years, and advocate using the problematic DYLD_LIBRARY_PATH variable to get their libraries to work, I don't trust Oracle very much.
Phpinfo has an oci8 section further, and it looks like it is getting installed.
I would expect so. So have you had any luck connecting with the Oracle server or are you running into other problems?
I'm not getting any connection yet. I saw the reference to the new path syntax, but may also be a path issue. Does MacPorts set the path as root or as a user?
Set what path? If you mean DYLD_LIBRARY_PATH, I don't set it at all. Instead, I used install_name_tool to fix the paths within the oracle libraries so that DYLD_LIBRARY_PATH is no longer necessary. You can see exactly what the port does with "port cat oracle- instantclient" (or "port edit oracle-instantclient") if you're interested. What is the PHP code you use to attempt to establish a connection? What error occurs as a result?
-----Original Message----- From: Ryan Schmidt [mailto:ryandesign@macports.org] Sent: Wednesday, December 12, 2007 6:00 PM To: John Korchok Cc: macports-users@lists.macosforge.org Subject: Re: Oracle support in PHP?
On Dec 12, 2007, at 08:50, John Korchok wrote:
On Dec 11, 2007, at 22:11, John Korchok wrote:
On Dec 10, 2007, at 16:42, John Korchok wrote:
I had no errors or other problems installing the "oracle- instantclient" port or the "php5 +oracle" port. Thanks Ryan!
Oh good!
I am assuming I still need to modify php.ini to point at oci8.so, but I can't find it (oci8.o is there). I did find the libraries under lib/ oracle.
Nope, nothing needs to be done in that regard. There is no oci8.so or any other separate file. The oci8 functions have simply been compiled into php and libphp5.so.
http://www.php.net/oci8 is just baffling. It reads like a pile of potentially useful but untested information. Using the Instant Client (as they recommend) does not create an oracle user or group, as far as I can tell.
I didn't program any user or group creation into the oracle- instantclient portfile, no. Should I have? What would that user/group be used for?
The page is certainly Greek to me, since I haven't used Oracle.
When I run phpinfo, the last configure command is: '--with-oci8=instantclient,/opt/local/lib/oracle'
At http://www.oracle.com/technology/pub/notes/ technote_php_instant.html, under the heading "Enabling the PHP OCI8 Extension on Linux " they suggest a syntax like: '--with-oci8-instant-client=/opt/local/lib/oracle'
As far as I can tell, the option was --with-oci8-instant-client=/path/ to/instantclient in earlier php versions (maybe php 5.1.1 and earlier), and is --with-oci8=instantclient,/path/to/instantclient now (maybe since php 5.1.2). This is mentioned in a note from wes9999 on http://www.php.net/oci8 and I say "maybe" for the versions because the Oracle page you cite does say it has been updated for php 5.1.2 so I don't know. But since they haven't managed to put out an Intel version in two years, and advocate using the problematic DYLD_LIBRARY_PATH variable to get their libraries to work, I don't trust Oracle very much.
Phpinfo has an oci8 section further, and it looks like it is getting installed.
I would expect so. So have you had any luck connecting with the Oracle server or are you running into other problems?
I'm not getting any connection yet. I saw the reference to the new path syntax, but may also be a path issue. Does MacPorts set the path as root or as a user?
Set what path? If you mean DYLD_LIBRARY_PATH, I don't set it at all. Instead, I used install_name_tool to fix the paths within the oracle libraries so that DYLD_LIBRARY_PATH is no longer necessary. You can see exactly what the port does with "port cat oracle- instantclient" (or "port edit oracle-instantclient") if you're interested.
What is the PHP code you use to attempt to establish a connection? What error occurs as a result?
The Instant Client still requires an environment variable TNS_NAMES to point to the sqlnet.ora and tnsnames.ora files. The files allow abbreviated connection strings. For some reason, I was not able to set a TNS_NAMES that the Instant Client would read (I tried setting it in the current user '.profile', in 'opt/local/apache2/bin/envvars' to get the Apache user and finally '/private/etc/profile' to make it system-wide. Nothing worked, the Instant Client gives every appearance of not reading TNS_NAMES at all. I finally gave up and set verbose connection strings: $con = oci_connect('yourusername', 'yourpassword', '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=serverurloripaddress)(PORT=portnu mber))(CONNECT_DATA=(SID=servicename)(SERVER=DEDICATED)))'); It works! Macports PHP Oracle is a reality!
On Dec 16, 2007, at 16:33, John Korchok wrote:
The Instant Client still requires an environment variable TNS_NAMES to point to the sqlnet.ora and tnsnames.ora files. The files allow abbreviated connection strings. For some reason, I was not able to set a TNS_NAMES that the Instant Client would read (I tried setting it in the current user '.profile', in 'opt/local/apache2/bin/envvars' to get the Apache user and finally '/private/etc/profile' to make it system-wide. Nothing worked, the Instant Client gives every appearance of not reading TNS_NAMES at all. I finally gave up and set verbose connection strings:
$con = oci_connect('yourusername', 'yourpassword', '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=serverurloripaddress) (PORT=portnu mber))(CONNECT_DATA=(SID=servicename)(SERVER=DEDICATED)))');
It works! Macports PHP Oracle is a reality!
Splendid! :-) I'm not sure how they intend for you to set the TNS_NAMES environment variable. I was not familiar with /opt/local/apache2/bin/envvars but that sounded promising. If that is still important to you, have you tried using SetEnv within the httpd.conf? http://httpd.apache.org/docs/2.2/mod/mod_env.html#setenv
participants (4)
-
Alexy Khrabrov
-
John Korchok
-
paul beard
-
Ryan Schmidt