[PHP-DB] mysqldump and OS X

2005-05-10 Thread Richard Dyce
Wonder if anyone out there can help?
I'm trying to execute a mysql dump on my local Mac (running 10.4),  
and I'm running into an odd problem, possibly something to do with  
permissions or $PATH setup.

Here's the code...
?php
  $dbhost = 'localhost';
  $dbuser = 'user';
  $dbpass = 'blah';
  $dbname = 'property_rental';
  $filepath = $HTTP_SERVER_VARS['DOCUMENT_ROOT'];
  $filename = $filepath/data.sql;
  passthru(mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname  
$filename);

?
Now, if I execute this on the remote server, with the correct login  
details, it all works tickety-boo. If I execute it locally on my Mac  
using the built-in Apache server and a localhost address. But if I  
change the passthru call to an echo, and then copy and past the  
result into the terminal app, it works. What am I doing wrong? Any  
ideas greatfully received.

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


Re: [PHP-DB] mysqldump and OS X

2005-05-10 Thread Richard Dyce
On 10 May 2005, at 07:24, Constantin Brinzoi wrote:
maybe you have to specify the full path to mysqldump like:
passthru(/path/to/mysqldump --opt -h$dbhost -u$dbuser -p$dbpass  
$dbname
It was worth a try - but no, changing the exec line to:
exec(/usr/local/mysql-standard-4.1.7-apple-darwin7.5.0-powerpc/bin/ 
mysqldump --opt -h$dbhost -u$dbuser -p$dbpass $dbname $filename);

Doesn't seem to make any difference :-(
Thanks anyway.
R

[PHP-DB] getting a variable from a function

2005-05-10 Thread 'Yemi Obembe
As against 'global', is there anyway to get a variable from wthin a function 
(besides 'returning it using  'return').
for example, how do i get the value of the variable $c in the function below:
 
function Dis() {
$a = arry('foo', 'bar');
foreach ($a as $v) {
echo $v;
}
$c = count($a);
}



-

A passion till tomorrow,
Opeyemi Obembe | ng.clawz.com






-
Yahoo! Mail
 Stay connected, organized, and protected. Take the tour

Re: [PHP-DB] R6025 Error

2005-05-10 Thread Ng Hwee Hwee
hi all,

this R6025 error is driving me nuts!!! anyone who can help me?
thanx a million!!

warmest wishes,
hwee

- Original Message - 
From: Ng Hwee Hwee [EMAIL PROTECTED]
To: PHP DB List php-db@lists.php.net
Sent: Tuesday, May 10, 2005 11:15 AM
Subject: Re: [PHP-DB] R6025 Error


 hi,

 thanks for your reply... an example of the generated HTML code is as
 follows:

 a href=odr_top.php?sort=descsortBy=T010SeqNoargmt1=argmt2=DESC/a
 a href=odr_top.php?sort=ascsortBy=T010SeqNoargmt1=argmt2= ASC/a

 i tried googling for this error but they keep telling me about some
 Microsoft coding errors that i don't understand. I do not code in C or C++
 so why should it cause a problem in my codes?

 thank you for your help!!

 best regards,
 hwee

 - Original Message - 
 From: Juffermans, Jos [EMAIL PROTECTED]
 To: PHP DB List php-db@lists.php.net
 Sent: Monday, May 09, 2005 6:01 PM
 Subject: RE: [PHP-DB] R6025 Error


  Can you also send us the output generated by PHP? Ie the output HTML...
 
  Jos
 
  -Original Message-
  From: Ng Hwee Hwee [mailto:[EMAIL PROTECTED]
  Sent: 09 May 2005 10:48
  To: PHP DB List
  Subject: [PHP-DB] R6025 Error
 
 
  Hi all,
 
  I'm having a problem with a R6025 error. What happened is that I have a
  table generated using MySQL and PHP that displays all the registered
  customers. On the table header, i allow them to click on some links that
 can
  sort the table according to their preference. Sometimes, when users
click
 on
  these sorting links, they get an error:
 
  =
  Microsoft Visual C++ Runtime Library
  Runtime Error!
  Program: C:\Program Files\Internet Explorer\IEXPLORE.EXE
  R6025
  - pure virtual function call
  =
 
  when this error appears, the user will have to click OK which closes
the
  browser!! Can someone advice me what i can do??
 
  the links look like that:
  a
 

href=?=$PHP_SELF;??sort=descsortBy=?=$order;?argmt1=?=$argmt1;?De
  sc/a
  a
 href=?=$PHP_SELF;??sort=ascsortBy=?=$order;?argmt1=?=$argmt1;?
  Asc/a
 
  why should this cause an error??!!! thank you!
 
  best regards,
  hwee hwee
 
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 

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


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