Re: [PHP] Syncronizing of mysql-db
Maybe mysqldump? Something like: mysqldump my_db | mysql -h the.other.org my_db Of course you got to stick a username passwd in there somewhere. In the open? Someone else will have to help if that's a concern, which it should be, I guess. And you might find some of the various options useful. Mike D. [EMAIL PROTECTED] wrote: > > Hi.. > > does annybody know a tool or script which can help me to syncronize two > mysql databases ? > like at my isp is a database for the web, at home my local development > server.. > changes i do at home or online should be "syncronized" by a php script every > xx houres called by cron > > markus > > -- > Sent through GMX FreeMail - http://www.gmx.net > > -- > 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 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] PHP as Scripting Language
John Huggins wrote: > > Well, I have compiled a php binary for use as yet another scripting language > to work along side AWK, Perl, Sh, etc. > > It works too. I have this file... > > #!/usr/local/bin/php > print("Hello World\n"); > ?> > > I run it and get.. > > host:~/projects/PHPScripts # ./test.php > Content-type: text/html > Steve Werby had this solution for a previous post on the same problem. MD From: "Steve Werby" <[EMAIL PROTECTED]> To: "Tim Livers" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> "Tim Livers" <[EMAIL PROTECTED]> wrote: > Everything works fine except that I get "X-Powered-By: PHP/4.0.4pl1 > Content-type: text/html #!/usr/local/bin/php" at the top of the page. 1. In php.ini, set "expose_php = Off" 2. Restart Apache. > Hello World > > Great. Now how do I get rid of the Content-type line? I have searched the > docs with little clues. > > Thanks for your help. > > *** > John Huggins > > Transmitter Location Systems, LLC > 14120 Parke Long Court, 103 > Chantilly, Virginia 20151 > 703-227-8435 > 703-968-8808 fax > [EMAIL PROTECTED] > http://www.tls2000.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] -- 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] reg-ex problem
> } > elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) ) Isn't this \d+ matching --^ > { > $value = $matches[0]; > } > elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) ) the \d in this-^^ And the | is using '\d' and 'prem'. It probably should be "/(div\d)|prem/ Unless those parens are part of the expression. Then maybe "/\((div\d)|prem\)/" MD -- 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] reg-ex problem
Christian Reiniger wrote: > > On Wednesday 07 February 2001 21:50, Michael Dearman wrote: > > > } > > > elseif( preg_match( "/^\d+$/", $arg[$i], $matches ) ) > > > > Isn't this \d+ matching --^ > > > > > { > > > $value = $matches[0]; > > > } > > > elseif( preg_match( "/(div\d|prem)/", $arg[$i], $matches ) ) > > > > the \d in this-^^ > > No. the 1st expression is /^\d+$/ , i.e. match strings with at least one > decimal number and nothing else (\d+) from their beginning (^) to their > end ($) > I.e. that one only catches strings consisting only of decimal digits. That's what I get for shooting my mouth off without actually trying it out. But I should of caught the ^$ > > > And the | is using '\d' and 'prem'. It probably should be > > "/(div\d)|prem/ Unless those parens are part of the expression. Then And after a second look, yea the \d is tightly bound to the div. But in confirming this, besides matching something like 'div2' it will also match div23 - both returning div2. Don't know the data, so it might not make any difference. Mike D. -- 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] Creating Directorys (slightlyOT)
[EMAIL PROTECTED] wrote: > > Hi, > > I am trying to install a free mailing list manager for a mate, I have spent > numerous hours trying to figure out why it won`t setup properly. I installed > it on one of my own servers and it worked fine but not on his, however I have > now dwindled it down to the fact that his server won`t allow the script to > create directorys. I have checked the chmod and that is fine but I`m stumped. > Anyone else have a possible solution?? > Until someone who might actually know something shows up... What platforms? umask? real uid, gid vs effective(the process running the script) uid, gid? permissions of the parent directory? I get all queezy when trying to sort this stuff out. Mike D. > Thanks > Ade > > -- > 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 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] looping variables
Hey Wen, Had me going there for a bit, cause I had just put down a book on C, where variables are not preceded by such things as $. But for PHP, your missing a few $'s on your variables. And, your taking care of matching that javascript opening tag from where your calling this function? MD Wen Ni Leong wrote: > > Please help me to solve this problem. I have looping selected menu and > I want to use javascript to control each function. For example if > select Text Form,the javascript will automate to open new window. > Right now my problem is I can't differentiate from which menu or > location I had selected because all of them are looping. So please help > me to look at the coding below. See what I need to change. Thanks. > > print "
Re: [PHP] preg_match() vs. preg_match_all()
CC Zona wrote: > > What is the functional difference between preg_match() and > preg_match_all()? I've puzzled over the manual descriptions for both, > checked the list archives and faqts.com, and still can't figure out why > they seem to return different results for the same pattern searches. > Use a some text to match against where there's many places for a match to occur. When you use the PREG_PATTERN_ORDER, for the order argument with preg_match_all, it's like a global match, collecting the matches and subpatterns (obtained by using parenthesis, which will 'remember' the subpatterns) in the 2dim array for your viewing pleasure. Something like that. I usually have to wrestle with it a bit to get it straight how the results from the subpattern matches (from the memorizing parens) are ordered in the array to get the a loop to spit everything back out correctly. If your nesting parens, I think it's you just start counting the opening paren from the left, and they'll match sequentially as indexes in the associated array for that particular match. Well, the 0 index is the entire match, and the subpat matches pick up at index 1. But, if the winds blowing from the east, and . ;-) MD > TIA > > -- > CC > > -- > 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 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] A php-xml mailing list?
I think it would be helpful. What do you folks think? MD -- 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] 'use' and 'import'
I give up. The PEAR docs refer to 'use' or 'import'. I know I've seen 'import' somewhere, but I can't find either in my ref books, searches on Zend.org, nor the manual. Could someone direct me to where these 2 functions? / statements? / directives? are explained. Thanks, Mike D. -- 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] using include_path with file_exists()
Hi Ben, I thought maybe there was something like HTTP_SERVER_VARS["INCLUDE_PATH"], but apparently not. Could you just define your own $GLOBALS["my_include_path"] = and use that with file_exists()?? Mike D. Ben Peter wrote: > > Hi all, > > is there a decent way to check whether a file is available on the > include_path? The only soultion I have found is > > if ( ( $fd = fopen( 'my_file', 'r', 1 ) ) ) { > fclose( $fd ); > /* ok, file is there */ > } > > That one's not really nice, at it opens the file for reading. > > It would be best to have the include_path switch for file_exists, just > as it works with fopen. > > Can someone better my workaround above? > > Cheers, > Ben > -- 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]