[PHP] problem with dba with postgres connections
Hello, I seem to have ran into a problem. If I try to use the dba functions when I've got an active postgres handle the dba funtions will return: Warning: Unable to find DBA identifier 1 in /www/sites/Test/htdocs/dbafuncs.php on line 31 If I comment out the call to pg_connect all of the dba stuff works just fine. I am getting a valid dbm handle back from the open, it just can not find the first key. Anyone have any ideas? GB -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Verisign Payflow Pro? Freebsd... Any ideas?
On Friday 30 November 2001 00:56, you wrote: Hi, I'm trying to get payflow pro working on my server (unfortunately a client took it upon themselves to get their gateway). I am on a freebsd box and I am having all sorts of problems getting this working. Either as an extension (pfpro.so) or just exec() externally. I've read that Verisign stopped distributing a FreeBSD of their SDK... which seems true since it is not offered on their site. So... first I downloaded the BSDi SDK. I thought I might be able to hack it up a bit... no such luck, as a module or just scripting to it. They were having problems with the threading system. Most of FreeBSD is not threaded (most people do not build threaded apps by default) and their libraries require it...:( So, if all else fails go for the linux dist. I downloaded, gunziped, and proceeded to make a php extension. ./configure --with-pfpro=shared,/usr/local/verisign/payflowpro/linux You can not use Linux libs in a FreeBSD binary. You would have to compile a Linux binary of PHP. Compiles fine... creates pfpro.so. I copy pfpro.so and libpfpro.so (which came with the SDK) to /usr/local/lib (this is the lib directory my ini file points to, which is where my other extensions are). i copy pfpro.h to usr/local/include. i add the following to my php script dl('pfpro.so'); It won't load... I get a error stating it cannot find libc.so.6. So I copy over the lib from the linux compat files to /usr/lib (not usr/local/lib). Refresh... apparently it found that, as it is now cannot locate ld-linux.so.2 (i think). Again, I copy this from the compat to /usr/lib. I am expecting an error, but it tells me it still cannot locate it. I do a bunch of steps probably unneccessary just to try everything. I copied this to my /usr/local/lib, i run ldconfig, i do a bunch of stuff to no avail. It would not work anyway. Again, you can not use Linux libs in a FreeBSD binary. Linux libs belong under /compat/linux/usr/lib or thereabouts. Can anyone give me some insight on setting payflow pro up on freebsd as a php module? I could never get the PHP module to work on FreeBSD (4.3 and 4.4). (I've got the native libs. The problem is that they have to be linked into a threaded program.) I just use the following code: # Location of the pfpro binary. $pfpro = /www2/bin/pfpro; # Location of the certs putenv(PFPRO_CERT_PATH=/www2/Verisign.certs); # The args to call the binary with $args = USER=$vsInfo[1]VENDOR=$vsInfo[1]PARTNER=verisign . PWD=$vsInfo[2] . TRXTYPE=STENDER=C . ACCT=$UserInfo[ccnum]EXPDATE=$ccexpire . AMT=$UserInfo[amount]COMMENT1=$comment1; # Put together the command string $command = $pfpro $vsInfo[3] 443 \$args\ 10; $result = `$command`; Please note the putenv! You have to have this! Also look at the back ticks for $result. This should also work with the Linux binary... Now, I know it can work. I dropped to my shell, ran /linux/bin/test.sh. Works... i run ./pfpro as is and it can't find libraries (the test.sh script defines their location). So, I decide I'll try to hack up something exec(pfpro)'ing from the script, despite i am no good at this. i found a snipet of code in the anotated php manual. I could not get it to work. I even exec() the same code that defines the libs in the shell script (test.sh) before exec() the pfpro call. Install your libs under /compat/linux/usr/lib or somewhere and then update the ld hints/config file for linux. The linux program should work fine then. --SNIP-- Hope this helps. GB -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] #!/usr/local ignore option?
On Sunday 11 November 2001 04:49, Michael Rice wrote: Hi All, I have a kind of unique problem that I've had trouble finding information on around the net. I have a site that I pay a hosting company for that expects my php scripts to have #!/usr/local/bin/php at the beginning of each script which works fine. Now, I'd like to keep a development server at home that uses Apache 22 and the latest php. I followed the installation instructions carefully can got php running great at home. The only problem is that it serves up the #!/usr... at the beginning of file, which wouldn't bother me except that it causes major problems with redirects. Any ideas on how to tell my development server to ignore that line or to reconfigure my apache/php in some such that it won't serve up that line?? Hi, I'm willing to be that you have PHP installed as a module in apache whereas your hosting company is using the CGI version for some reason. You will need to install the CGI version of PHP and tell the system to treat your scripts as a CGI instead of as a PHP module script. GB -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error control and the like
On Thursday 08 November 2001 11:25, Sam Masiello wrote: What database engine are you using? Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] Hi, I'm using PostgreSQL. GB Subject: Re: [PHP] Error control and the like On Thursday 08 November 2001 09:49, Sam Masiello wrote: If you are just looking for something that will display all of your warning/error messages to show where fallibilities occur in your code, you can use the error_reporting() function at the top of your script. No, What you've described is like the perl 'use strict' and '-w'. Let me give you an example of what I'm wanting in pseudo-code. connect to database exec query error in query catch error rollback database It is almost like exceptions. Thanks, GB Subject: [PHP] Error control and the like Hi, I'm comming from a Perl background and I'm used to using evail{code;}; to catch things that would kill the server/program and then do things based on the error code. Can anyone suggest a way to implement the same thing in PHP? I've been looking at some of the error control functions, but I've not seen any examples. Any ideas, locations or whatever? Thanks for the help. GB -- GB Clark II | Roaming FreeBSD Admin [EMAIL PROTECTED] | General Geek CTHULU for President - Why choose the lesser of two evils? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]