Re: [PHP] Weird stack trace in error_log from PDOException

2006-10-21 Thread Russ Brown
Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2006-10-19 16:05:58 -0500:
>> try
>> {
>> $objStatement->execute($arrParams);
>> $intID = $objStatement->fetchColumn();
>> $objStatement->closeCursor();
>> }
>> catch (PDOException $objEx)
>> {
>> error_log(get_class($objEx));
>> // Actually handle the exception
>> }
>>
>> The query runs a stored procedure which sometimes results in an
>> (expected) error condition which the catch block handles. It all works
>> perfectly, with one exception: Inbetween the call to fetchColumn and the
>> catch block being invoked, PHP dumps a stack trace to the error log
>> complaining about the exception, and I can't for the life of me figure
>> out why or how to stop it.
> 
> A wild guess: do you have xdebug enabled?
> 

BINGO!

Excellent, thanks for that. I'd never even considered xdebug.

I only really have it installed for coverage in phing. I suppose I
really should check out what else xdebug can do as it might be handy.

Thanks again!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Weird stack trace in error_log from PDOException

2006-10-19 Thread Russ Brown
Hi,

I have a pretty simple bit of code that looks like the following;

// Prepare a statement. This will actually call a stored procedure
$objStatement = $objDB->prepare($strInsert);

try
{
$objStatement->execute($arrParams);

error_log("ABOUT TO fetchColumn");

$intID = $objStatement->fetchColumn();

error_log("AFTER fetchColumn");

$objStatement->closeCursor();
}
catch (PDOException $objEx)
{
error_log(get_class($objEx));
// Actually handle the exception
}

The query runs a stored procedure which sometimes results in an
(expected) error condition which the catch block handles. It all works
perfectly, with one exception: Inbetween the call to fetchColumn and the
catch block being invoked, PHP dumps a stack trace to the error log
complaining about the exception, and I can't for the life of me figure
out why or how to stop it. I have the PDO connection configured to throw
exceptions when it encounters and error, and apart from this the code
works perfectly: the exception gets handled and the rest of the code
continues as it should without any other issues.

Does anybody have any thoughts on what might be the cause of the problem
or any pointers on how I could go about debugging it?

Thanks.

-- 

Russ.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems with PHP5 & phpMyAdmin

2005-11-22 Thread Russ F
Curt Zirzow wrote:

> On Fri, Nov 18, 2005 at 12:07:00PM -0800, Russ F wrote:
>> I've reinstalled Apache2, PHP5, phpMyAdmin and MYSQl several times. I
>> still get the same error when i try to use phpmyadmin Can not load mysql
>> extensions. I checked the path it is correct, the extensions exist
>> in /etc/php5/extensions but they do not have a .so after them. The
>> php.ini file and config files appear correct from a server setup. I read
>> you need to put a loadmodule statement in httpd but am not sure when. The
>> script says not to modify this file, put mods in /etc/sisconfig. But I'm
>> not sure where as there are no loadmod commands in the scripts. My
>> authorities all appear correct.
>> 
>> Can anyone poiny me to the right configuration file.
> 
> How you install all of apache2, php5, phpMyAdmin and Mysql all
> matters on what file to edit.  With your extension dir existing in
> /etc/php5/extension, i would assume you insalled via some package
> system.
> 
> With out any of the information, it will be hard to help.
> 
Sorry I forgot this error message:

Welcome to phpMyAdmin 2.6.3-pl1

 
  
Error
MySQL said: Documentation 
 #2002 - The server is not responding (or the local MySQL server's socket is
not correctly configured) 

I 've tried most of the recommendations I could find by googling. Still get
this message.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Problems with PHP5 & phpMyAdmin

2005-11-22 Thread Russ F
Curt Zirzow wrote:

> On Fri, Nov 18, 2005 at 12:07:00PM -0800, Russ F wrote:
>> I've reinstalled Apache2, PHP5, phpMyAdmin and MYSQl several times. I
>> still get the same error when i try to use phpmyadmin Can not load mysql
>> extensions. I checked the path it is correct, the extensions exist
>> in /etc/php5/extensions but they do not have a .so after them. The
>> php.ini file and config files appear correct from a server setup. I read
>> you need to put a loadmodule statement in httpd but am not sure when. The
>> script says not to modify this file, put mods in /etc/sisconfig. But I'm
>> not sure where as there are no loadmod commands in the scripts. My
>> authorities all appear correct.
>> 
>> Can anyone poiny me to the right configuration file.
> 
> How you install all of apache2, php5, phpMyAdmin and Mysql all
> matters on what file to edit.  With your extension dir existing in
> /etc/php5/extension, i would assume you insalled via some package
> system.
> 
> With out any of the information, it will be hard to help.
> 
I installed all packages with SUSE 10.0 YaST rpms. I installed earlier
versions on SuSE 9.1 from rpms with no problems. After install I changed
mysql to run as user mysql. add root and damon to the group mysql. SuSe has
added stems in the install that (When I start the mysql server) that change
the my sql permisions. 

I recently uninstall php5 and went back to php4. The .so files are now
installed but I get a message now that access is denied when I try using my
browser running as root:  

http://localhost/phpMyAdmin/. 

I've configured php.ini and config.inc.php correctly I think. I can manually
get to mysql from the command line as root with no problem. I'm almost
certain its a permissions problem but I'm not sure where. 

/srv/www/htdocs
drwxr-xr-x   6 rootroot  3000 2005-11-21 17:25 phpMyAdmin

/srv/www/htdocs/phpMyAdmin
-rw-rw-r--  1 root root  38826 2005-11-21 17:25 config.inc.php

I can either reinstall php5 or stay with php4 as long as I get this working.
You help will be greatly appreciated.

Thanks

Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Problems with PHP5 & phpMyAdmin

2005-11-18 Thread Russ F
I've reinstalled Apache2, PHP5, phpMyAdmin and MYSQl several times. I still
get the same error when i try to use phpmyadmin Can not load mysql
extensions. I checked the path it is correct, the extensions exist
in /etc/php5/extensions but they do not have a .so after them. The php.ini
file and config files appear correct from a server setup. I read you need
to put a loadmodule statement in httpd but am not sure when. The script
says not to modify this file, put mods in /etc/sisconfig. But I'm not sure
where as there are no loadmod commands in the scripts. My authorities all
appear correct.

Can anyone poiny me to the right configuration file.

Thank you!
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Split command problem

2005-04-10 Thread Russ
I have been trying to get the following code working. I keep getting an error 
on line nine. It looks simular to the example in the PHP online manual. If I 
substitute a print command for line nine I get the correct information from 
$_POST[username]. I must be missing or have an extra a quote but I cannot 
figure out where.

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] strncmp function (Forgot code snippit)

2005-03-30 Thread Russ Fineman
Chris W. Parker wrote:

> Russ <mailto:[EMAIL PROTECTED]>
> on Wednesday, March 30, 2005 1:18 PM said:
> 
>> I'm new to php and linux. I am trying to replace a password program I
>> used under windows with a mysql based login. I want to compare the
>> first character of the first and last name of the user for a capital
>> letter.
> 
> Why? What does that accomplish?
> 
>> > $fname=John;
>> $lname=Smith;
> 
> Where's the quotes?
> 
>> if(strncmp(S,${lname},1) ===0) {
>> ?>
>> strncmp() must have returned returned non-false
> 
> non-false = true
> 
>> > } else {
>>> 
>> Strncmp() must have returned false
>> > }
>> ?>
> 
> Rewrite:
> 
>  
> $fname = "John";
> $lname = "Smith";
> 
> if(preg_match("/[A-Z]/", substr($fname ,0 ,1)))
> {
>   echo "first letter is uppercase.";
> }
> else
> {
>   echo "first letter is not uppercase";
> }
> 
> ?>
> 
> There might be a better way than a regex but that's the first thing that
> came to my mind.
> 
> 
> HTH,
> Chris.
Thanks Chris, I'll try that. I'm not really a programmer, done a little and
trying to learn as I go. I had quotes at one point but took them out tring
to get it to work.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] strncmp function (Forgot code snippit)

2005-03-30 Thread Russ




Subject: strncmp function
Date: Wednesday 30 March 2005 01:14 pm
From: Russ <[EMAIL PROTECTED]>
To: PHP General 

I'm new to php and linux. I am trying to replace a password program I used
under windows with a mysql based login. I want to compare the first character
of the first and last name of the user for a capital letter. My login program
passes a user name and password. Below is a start to the program but I'm
alittle confused on how to set str1 to check all letters of the alphabet. Can
anyone point me to a document or give me an idea on how to do this? I can not
use .htaccess do to ISP (host) rules. Access is to a members only sectionof
the webpages for my Lions club.


strncmp() must have returned returned non-false

Strncmp() must have returned false
  
--
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] strncmp function

2005-03-30 Thread Russ
I'm new to php and linux. I am trying to replace a password program I used 
under windows with a mysql based login. I want to compare the first character 
of the first and last name of the user for a capital letter. My login program 
passes a user name and password. Below is a start to the program but I'm 
alittle confused on how to set str1 to check all letters of the alphabet. Can 
anyone point me to a document or give me an idea on how to do this? I can not 
use .htaccess do to ISP (host) rules. Access is to a members only sectionof 
the webpages for my Lions club.
-- 
Russ

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Nigerian oil scams

2002-12-12 Thread Russ Taylor
Got to love people who use all capitals.

How would the scammer profit from this? I guess given your full details and
bank number they can do what?

Cheers

"John Meyer" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> php
>
> How did a Nigerian oil scam e-mail get on this list, anyway?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: xml_parse and xml entities

2002-12-12 Thread Russ Taylor
Another problem I have is I did $message = str_replace("\n","",
$message);

and instead of getting

Helo <

Hey
Hey I have Helo <

Hey
Hey Any ideas please? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] xml_parse and xml entities

2002-12-12 Thread Russ Taylor
Hi all,

I'm writing a guestbook and message in the guestbook might contain & < > so
to make sure this wasn't a problem I was advised to great entities in my xml
file like so


 
 
 
 
 
 
 
 
]>

and when I write to my xml file if I convert all & < > characters to &
< > problem solved.

I'm having trouble though. My guestbook works fine until you enter a  < > &
character. This will get written to the xml file, writes fine, I can view
the file in a text editor and it looks good.

Parse the file back in and say the field contained...

Hello Russ & Jim

the parser would only hold...

Jim

when it writes to the array I parse into. Another example...

Hello Jim Russ &

becomes...

&

so basically if a field holds an entity the last element of the field (be it
text after an entity or an entity itself) is the only part parsed.

Makes no sense to me :( I would upload my source and xml file for you to
check but they are big and ugly and you won't want to.

Thanks very much

Russ



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] hhhhhhelp

2002-10-14 Thread Russ Peters


Hi !

I hope you can help?

I’ve installed Apache on my Win 2000 machine and farley happy that works but
just cant get PHP to work.

I followed all of the instructions and well don’t know what to do next! Tied
doing this several times and the scripts are just there for all to see on
the web browser!



So I moved the PHP.ini to the apache directory, I put it in the WINNT! But
that just did nothing!

I’ve edited the httpd.dll and added the three lines to find php



What next?



Russell Peters



[PHP] Re: Download site down?

2002-08-31 Thread Sperry Russ

Rodolfo Gonzalez wrote:
> To the php.net webmaster, 
> 
> there seems to be a problem with the us2.php.net site: I reach it with 
> ping, but going to 
> 
> http://us2.php.net/do_download.php?download_file=php-4.2.2-Win32.zip 
> 
> causes an eternal "Sending request" (and telneting to port 80 of that host 
> doesn't open).
> 
> Regards.
> 
> 
> 

I am new to PHP and found that I cannot download from any of the US 
Mirrors or any other countries I have tried.  What could be wrong?

Thanks,
Sperry Russ


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP 4.1.0 and my system's expat 1.95.2 don't get along...

2001-12-19 Thread Russ Goodwin

Please help...  (4.1 install problem)

I have two nearly-identical systems "production" and "backup".  When we
upgrade, we do backup first to work out any kinks, then production.  Last
night I upgraded backup in the following order: MySQL 3.23.46, OpenSSL
0.9.6b, Curl 7.9.2, Mod_SSL 2.8.5-1.3.22, Apache 1.3.22, PHP 4.1  -- with no
problems.  I proceeded to do production, and all went fine through the
Apache upgrade.  Apache ran fine without any changes in configuration at
this point.  I compiled and upgraded PHP (we had 4.0.6 before) and restarted
apache, but it wouldn't restart.  I did a diff on the PHP source files
between production and backup, and found that backup's Makefile
had -DUSE_EXPAT in all the right places, but that production didn't have it
at all.  Needless to say, all the configure, make, etc commands I did were
identical between the two boxes.

(./configure --with-mysql=/home/mysql --with-apxs=/usr/local/apache/bin/apxs
 --with-curl=/usr/local/lib/libcurl.so.1 --with-openssl)   It was late, so I
reverted to PHP 4.0.6 and all worked fine.

In the light of day today, I find out backup does not have expat installed,
so I assume the -DUSE_EXPAT tells make to use the bundled expat, while
production has expat 1.95.1 installed (from source, regular "./configure" --
no special options) for another tool, so I assume that the absence
of -DUSE_EXPAT means that PHP is going to use the system's expat library
instead of the bundled version.  I upgrade production to expat 1.95.2
(again, from source, plain "./configure"), recompile PHP 4.1, make
install -- no dice.  I'm pissed.  I move /usr/local/lib/libexpat* to /tmp
and try to recompile PHP 4.1, but apxs uses the libexpat.so so I fail in
./configure when it tries to test run apxs.

Next I figure that since I have an external expat, maybe I HAVE TO give
the --with-expat-dir=/usr/local option to configure, so I start with fresh
source, run the same ./configure with the expat-dir option tacked on and
make install.  Still no dice.  (I put the expat libs back in /usr/local/lib
first).

I know I could just grab the source dir with all targets made from backup,
stick it on production, and do a make install but I'd feel safer if
things compiled correctly on production (please no missives re compiling on
production boxes).  Is there something I'm overlooking that will get PHP to
use it's own expat?  All I see is the configure option --with-expat-dir=
that I tried.  Could this have to do with apxs's use of expat, and it only
manifests with PHP?  Or am I just not seeing the Real Problem(r)?

ANY hints, suggestions, or sympathy are welcome.

Thanks for reading this whole thing too!

-Russ






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




[PHP] Re: [PHP-DB] [newbie] passing variables

2001-11-20 Thread Russ Michell

I can see a few bodges:

1). > echo "\n";  
should be: echo "\n";

2). You have two vars named the 'first' but with different values:
> echo "\t  value='".stripslashes($first)."'>\n";
> echo "\t  value='".stripslashes($last)."'>\n";

3). Careful what you print in your posts, some may find it offensive: 
>  echo "Something's fucked up with yo script ya
> herd...";

HTH
Russ


On Mon, 19 Nov 2001 16:59:51 -0800 pjc <[EMAIL PROTECTED]> wrote:

> I just started playing with PHP and MySQL and am building an online
> phonebook for myself.
> 
> >From my 'view_all_numbers.php' I have a link that looks something like this:
>  href="delete_entry_confirm.php?first=yourfirstname&last=yourlastname">DELETE
> 
> 
> Here is the code from delete_entry_confirm.php
>  echo "Are you sure you want to delete ";
> echo "".$first." ".$last."";
> echo "from the phonebook?\n\n";
> echo "\n";
> echo "\t  value='".stripslashes($first)."'>\n";
> echo "\t  value='".stripslashes($last)."'>\n";
> echo "";
> echo "  onclick='javascript:history.back();'>";
> echo "";
> ?>
> ===
> And here's the code from my delete_entry.php
>  if(!$last || !$first) {
>  echo "Something's fucked up with yo script ya
> herd...";
>  exit;
> }
> 
> $db = @mysql_connect("localhost","login","pass");
> 
> if (!$db)
>  {
>  echo "Database ain't workin dawg!!";
>  exit;
>  }
> 
> mysql_select_db("paultest");
> $query = "delete from phonebook where last='".$last."' and
> first='".$first."'";
> $result = mysql_query($query);
> if($result)
>  echo "".mysql_affected_rows()." record(s) deleted.";
> ?>
> ===
> 
> This link does work though:  href="delete_entry.php?first=yourfirstname&last=yourlastname">YES I WANT TO
> DELETE
> 
> The error that I am getting on delete_entry.php is that my variables aren't
> there. Any suggestions folks?
> 
> Thank you in advance.
> -p
> 
> --
> 
> Paul C
> [EMAIL PROTECTED]
> ICQ:68274240
> 
> "You can't put a bag over someone's personality."
> 
> 
> 
> 
> 
> 
> -- 
> PHP Database 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]
> 

#---#

  "Believe nothing - consider everything"   
  
  Russ Michell
  Anglia Polytechnic University Webteam
  Room 1C 'The Eastings' East Road, Cambridge
  
  e: [EMAIL PROTECTED]
  w: www.apu.ac.uk/webteam

  www.theruss.com

#---#


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

2001-03-12 Thread Russ Cobbe

> On Mon, 12 Mar 2001 17:04:13 -0500, Russ Cobbe ([EMAIL PROTECTED]) 
> wrote:
> >If you are worried about your payment processor going down (which to
> >me would be a very serious concern) you might want to look at 
> >www.opayc.com which is a standardized way to talk to about 30 or so 
> >payment processors.
> 
> what makes you think that this company is less likely to go under 
> than a company like cybercash? this isn't a flame, I'm looking for 
> info.

It isn't a payment processor it is an API to payment processors such 
as CyberCash, Authorize.Net, Signio/Verisign, iBILL etc...  Basically 
you make an SQL call to a driver instead of a database and that makes 
the call out to the payment processor.  The eliminates the complexity 
in dealing with the payment processors.  Sometimes the integration 
with them is easy and sometimes it is a royal pain.  This makes the 
integration the same for all of them so you simply switch drivers to 
switch payment processors.  You could build a failover system so if 
the one you mainly use goes down for some reason you could build in 
logic to switch to another one quite easily.




Russ Cobbe
President, Inline Internet Systems, Inc.
405 Britannia Road E, Suite 212 Mississauga, ON L4Z 3E2
P: (905) 712 3841   F: (905) 712 2965
http://www.inline.nethttp://www.ihtml.com
Web Application Servers, E-Commerce Solutions

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

2001-03-12 Thread Russ Cobbe

If you are worried about your payment processor going down (which to 
me would be a very serious concern) you might want to look at 
www.opayc.com which is a standardized way to talk to about 30 or so 
payment processors.  So say C$ goes under, instead of having to redo 
integration to your app, you just switch drivers and voila you can 
use a different processor.  You need an account with the new one of 
course but the integration needs no work.  

Sample integration code for PHP on the site and in the docs (along 
with various other languages).

> >Their website talks extensively about a merger with a 'Network 1' company
> >and now a buyout and a chapter 11 filing.  The buyout, or "merger" press
> >release says: "CyberCash Internet Payment Processing Service to Continue
> >without Interruption."
> >
> >Is this incorrect?  When you say that it 'died', what are you referring to?
> 
> There payment services are going to run the same as always.  They just
> didn't have enough money to complete the merger so they filed for Chapter
> 11 protection so that they could have finacial protection while they
> arrange the purchase of the company and to be able to keep the services
> un-interupted during this change.  You should not see any degradation of
> performance at all.
> 
> 
> -- 
> 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]
> 
> 

Russ Cobbe
President, Inline Internet Systems, Inc.
405 Britannia Road E, Suite 212 Mississauga, ON L4Z 3E2
P: (905) 712 3841   F: (905) 712 2965
http://www.inline.nethttp://www.ihtml.com
Web Application Servers, E-Commerce Solutions

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