PHP Classes

Error

Recommend this page to a friend!

      exportDb  >  All threads  >  Error  >  (Un) Subscribe thread alerts  
Subject:Error
Summary:I installed into my test server and got the following error mess
Messages:10
Author:Gary Goy
Date:2008-06-20 09:42:33
Update:2008-06-24 12:48:06
 

  1. Error   Reply   Report abuse  
Picture of Gary Goy Gary Goy - 2008-06-20 09:42:33

Parse error: syntax error, unexpected '{' in /home/gmm/domains/gmmsystem.com/public_html/exp/exportDb.php on line 31

  2. Re: Error   Reply   Report abuse  
Picture of Zakir Hyder Zakir Hyder - 2008-06-20 12:08:49 - In reply to message 1 from Gary Goy
Gary
i download the class file and run the script. it seems to be working. on line 31 there is a try catch block(unless you changed th exportDb.php). change 'exp' to 777. if you changed any code in exportDb class tell me about it - may be i will find the error.
zakir

  3. Re: Error   Reply   Report abuse  
Picture of Gary Goy Gary Goy - 2008-06-20 15:55:11 - In reply to message 2 from Zakir Hyder
I found that the problem have to do with the Try { } is it my server don't support this command? is there a switch or module installation needed for PHP on my server?

  4. Re: Error   Reply   Report abuse  
Picture of Zakir Hyder Zakir Hyder - 2008-06-21 04:28:27 - In reply to message 3 from Gary Goy
i thought so - try {}catch() is the problem. ok you can do this
comment line 30,31,33,67,68,71 and remember to change the directory mode to chmod 777. you will good to go. you need php 5. to use try catch in phpscript.

  5. Re: Error   Reply   Report abuse  
Picture of Gary Goy Gary Goy - 2008-06-21 18:03:23 - In reply to message 4 from Zakir Hyder
ok understand....thanks.....works fine now...wonderful

  6. Re: Error   Reply   Report abuse  
Picture of Zakir Hyder Zakir Hyder - 2008-06-23 04:40:47 - In reply to message 5 from Gary Goy
you are welcome.

  7. Re: Error   Reply   Report abuse  
Picture of David David - 2008-06-24 07:55:22 - In reply to message 6 from Zakir Hyder
Dear Creator!

Its looks like doesnt work for me. I am testing in localhost.

The mysql_list_dbs() function make list from db then make some temporary files like names of db, but those files is empty!

$buf = fread($fd, 32768); is also empty!

i made a modification in this line:

$command = "/usr/bin/mysqldump -u " .$this->user . " -p " . $this->password . " --opt " . $db . " > " . $db . ".sql";

Near: " -p ".$this->password


the original code: " -p".$this->password (no space)
my code: " -p ".$this->password (+1 space)

Before i did it also have the problem.

Please help me. Thanks a lot!

  8. Re: Error   Reply   Report abuse  
Picture of David David - 2008-06-24 11:25:09 - In reply to message 7 from David
So i think 'exec($command)' doesnt work for me. Iam testing on AppServ Localhost(php5.2) and WinXP.

  9. Re: Error   Reply   Report abuse  
Picture of Zakir Hyder Zakir Hyder - 2008-06-24 12:22:17 - In reply to message 7 from David
if you give space after -p this command will not run. did you give your folder chmod 777 ?

  10. Re: Error   Reply   Report abuse  
Picture of Zakir Hyder Zakir Hyder - 2008-06-24 12:48:06 - In reply to message 8 from David
exec()command works on winxp. i have not checked my class in xp. it is written for Linux os. any i am will check it and post it. just stay with me a bit.