- This topic is empty.
-
AuthorPosts
-
-
May 21, 2004 at 4:13 pm #8445stroperyliadMember
Hello to everybody,
i am using sja with linux (redhat 9.0), php 4.3.4 and mysql 4.
I am using sja from command line and it syncs 2 tables on several mysql servers. No problem, everthing is working fine.
Now i have written a small web application with php, where you can push a button to sycn the tables, but it doesn't work. Here is a short snapshot :
…
exec($SJAPATH.”sja “.$JOBNAME.” -l”.$SJALOGPATH.$JOBNAME.”.log >> $SJALOGPATH.$JOBNAME.”.out”);
…
The log and out files are created, but the size is 0 and there is no snyc! 😕
________________________________________________________________________________
After spending some more minutes on this problem, i got this error message in the out file:
SQLyog Job Agent Version 2.0
Copyright © Webyog. All Rights Reserved.
Error opening session ERROR log file.
________________________________________________________________________________
😛 Found the solution: this error only occures only with sja2.0 😡 , the old version sja1.1 works perfect 😀
-
September 29, 2005 at 9:30 pm #15824wiLMember
I'm getting the same error with:
SQLyog Job Agent Version 4.1
Where can I download a different version of this?
-
September 29, 2005 at 9:50 pm #15825peterlaursenParticipantQUOTEexec($SJAPATH.”sja “.$JOBNAME.” -l”.$SJALOGPATH.$JOBNAME.”.log >> $SJALOGPATH.$JOBNAME.”.out”);
I am not a coder but are all those punctuations correct? And is there not a ” missing after “log” ? I would propose:
QUOTEexec($SJAPATH.”sja “$JOBNAME” -l”$SJALOGPATH.$JOBNAME”.log” >> $SJALOGPATH.$JOBNAME.”out”);And why dublicate the log-file to an out-file. Just
QUOTEexec($SJAPATH.”sja “$JOBNAME” -l”$SJALOGPATH.$JOBNAME”.log”);Apologize for my interference in this. But I take a chance to learn something too!
There are bugs in version 1 so if there is a problem with version 2 it should be fixed.
-
September 29, 2005 at 11:12 pm #15826wiLMember
“Error opening session ERROR log file. ” is the error I get when use PHP to exec('sja') the SJA file.
Can we omit the Error log file or just make it work in PHP? What seesion does it need to open? I made sure that the permission are all 777 and it still doesn't work.
I've double and tirple check the path and still no luck.
-
September 29, 2005 at 11:16 pm #15827peterlaursenParticipantQUOTE“Error opening session ERROR log file. ” is the error I get when use PHP to exec('sja') the SJA file.
Yes but if there are two many .(punctuations) and a ” (double-quote) missing the generated string may not be valid!
-
September 29, 2005 at 11:33 pm #15828wiLMember
I used this version to output the error.
exec('sja '.DOMAIN_CONFIGURATIONS_PATH.'database_sync.xml -l'.DOMAIN_CONFIGURATIONS_PATH.'sja.log');
and i still get the same problem.
-
September 30, 2005 at 12:05 am #15829peterlaursenParticipantQUOTEexec('sja '.DOMAIN_CONFIGURATIONS_PATH.'database_sync.xml -l'.DOMAIN_CONFIGURATIONS_PATH.'sja.log');
Since you use the default log file name you could try too to omit the -l -parameter
QUOTEexec('sja '.DOMAIN_CONFIGURATIONS_PATH.'database_sync.xml';is it correct php syntax that the
QUOTE.DOMAIN_CONFIGURATIONS_PATHmust start with a punctuation? I just ask 😉
This works with windows SJA on my own php installation:
CODESync succesfull“;
?>
to simplify things I copied sja.exe to the webroot of my local Apache with the test.php and test.xml-files. Data are sync'ed and the peter.log is created.
You are welcome to try here:
http://deepeter.dyndns.dk/test.php
.. you wont see the data .. but I can paste in the log!
I believe you simply should write correct syntax so that the system can resolve the path. I apologize if I am wrong – I dont have a *nix at the moment 😮
-
September 30, 2005 at 12:30 am #15830wiLMember
This is somewhat similar to what I actually have when the PHP Constants have been converted to actual strings.
CODEsja /home/httpd/vhosts/domain.com/httpdocs/_configurations/database_sync.xml -l/home/httpd/vhosts/domain.com/_configurations/sja.logpermissions for
/home/httpd/vhosts/domain.com/_configurations/
/home/httpd/vhosts/domain.com/_configurations/sja.log
are 777
I have no idea what else to do… I'm just happy some SJA works with PHP unlike Unison (file sync)
Thing is that this works on the command line no problem but when PHP tries to do it then it starts giving me error log errors.
BTW. Its on a Linux machine too
Exact Error Message
QUOTESQLyog Job Agent Version 4.1 Copyright © Webyog Softworks Pvt. Ltd.. All Rights Reserved. Error opening session ERROR log file. -
September 30, 2005 at 12:43 am #15831peterlaursenParticipant
I can see that I had a visit. You probably!
QUOTESync started at Fri Sep 30 02:30:34 2005I shall not say more! A php/vhost configuration issue?
I know nothing about it.
But nice if someone with a local *nix would try to repeat the simple exercise SJA for Linux that I did with SJA for Windows.
Undoubtedly Ritesh or sombody else at Webyog will look into it tomorrow. Or later today actually. It is 6 am in Bangalore! Get up guys! There is work for you! 😀
-
September 30, 2005 at 12:51 am #15832wiLMember
HEHE…
Thanks Peter!!!
I really really appreciate the tests you have made.
Yep it was me who visited 😀
I'm so eager to have this working. Its the one piece of the puzzle that I am missing before the bulk of my application is complete and I can start working on other areas like user interface design.
Thanks Again!
-
September 30, 2005 at 1:17 am #15833peterlaursenParticipant
php configuration:
I checked my own php-ini (in the moment 5.1 RC, but I guess this is the same with all versions). This setting looks interesting:
; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =
Maybe you should check that! Or let the Sys Admin do so.
-
September 30, 2005 at 1:34 am #15834wiLMember
got that all checked out..
I'm actually executing TAR and FTPSYNC programs from the same directory and it works just fine… But it doesn't work with PHP.
I wonder if there's any other tests i can do.
-
September 30, 2005 at 1:57 am #15835wiLMember
Follow Up
CODE:
CODEsja database_sync.xml -lsja.log 2>&1RESPONSE:
QUOTESQLyog Job Agent Version 4.1 Copyright © Webyog Softworks Pvt. Ltd.. All Rights Reserved.Error opening session ERROR log file.
Everything is 777.
-
September 30, 2005 at 2:04 am #15836peterlaursenParticipant
One thing more: Where is the SJA executable located relative to where the php, xml and log files are?
I had some problems with writing log somewhere not in the tree below SJA using absolute adressing.
But succeded with relative adressing like
CODEexec('sja test.xml -l..logpeter.log');SJA executable, test.php and test.xml is in webroot/test
I write log to webroot/log
.. is like HTML: means one folder up in tree.
And …… means three folder up in tree.
On Linux you proably must use / not .
-
September 30, 2005 at 2:17 am #15837peterlaursenParticipantQUOTEI'm actually executing TAR and FTPSYNC programs from the same directory and it works just fine… But it doesn't work with PHP.
yes but the php-configuration of course has no effect on code that is not php!
-
September 30, 2005 at 6:46 am #15838peterlaursenParticipant
and BTW. If logfile is written to same directory as the SJA executable you simply don't need to specify any path at all.
I created a webroot/test directory and put SJA and the php- and xml-file there.
Php code looks still like my first example and this
http://deepeter.dyndns.dk/test/test.php
writes the peter.log to webroot/test .
I suggest you try this to be 100% sure that it is not a problem with php parsing/resolving the path. If it still don't work it must be a server/php configuration issue.
My best guess is that
CODEsja /home/httpd/vhosts/domain.com/httpdocs/_configurations/database_sync.xml -l/home/httpd/vhosts/domain.com/_configurations/sja.logdoes not work, because being a webserver plugin php has its root in /httpdocs .
maybe
CODEsja /_configurations/database_sync.xml -l/_configurations/sja.logwould work as an absolute adressing. I guess so actually (just checked with a website with the same vhost's structure that I can access with ftp. But no chance for me to execute code there. I would be quite unpopular if something went wrong!)
-
September 30, 2005 at 12:28 pm #15839RiteshMember
SJA takes two parameters as suggested in the docs:
CODEsja jobfile -llogfileNote: there is no space between -l and the logfile. If you dont specify -l, then SJA will create sja.log in the same folder from where SJA is executed.
Other then sja.log, SJA also creates sjasession.xml which has error written in XML format. You cannot specify the path for this file and it will always open up in the same folder as SJA. This basically requires that the path of SJA has write permission otherwise SJA wont be able to create the sjasession.xml and hence it will stop after throwing up the error:
Error opening session ERROR log file.
We acknowledge that this is a bad design and we plan to fix it in 4.2 BETA 4. v4.2 BETA 3 will be released today and we dont want to change the code so late in the release. You can expect BETA 4 anytime next week 🙂
-
September 30, 2005 at 12:55 pm #15840RiteshMemberQUOTE(stroperyliad @ May 21 2004, 04:13 PM)Found the solution: this error only occures only with sja2.0 😡 , the old version sja1.1 works perfect 😀[snapback]3030[/snapback]
This is due to the fact that sjasession.xml implementation was done in v2.0 and thus its failing!
-
September 30, 2005 at 3:50 pm #15841wiLMember
For TAR and FTPSYNC.
Sorry I meant that i have PHP excecuting those programs.
CODEexec('tar -xvzf file.tar.gz')exec('ftpsync db.cnf')
and they both work fine and not php errors or permissions problems.
-
September 30, 2005 at 4:25 pm #15842wiLMember
Where can we download the latest version? 😀
Cheers,
wiL
-
September 30, 2005 at 6:40 pm #15843RiteshMember
Its not out yet. It will take another 3-4 days 🙂
-
October 4, 2005 at 8:51 pm #15844wiLMember
Any updates yet? 😀
-
October 5, 2005 at 12:48 pm #15845RiteshMember
Nope.
We are working on some issues regarding log and session file.
I will post in this thread once we release SJA with a fix.
-
October 14, 2005 at 6:14 am #15846wiLMember
Any Update?
LOL I have a project eager to finish and its the last component 😀
How's the project going along?
-
October 14, 2005 at 7:10 am #15847RiteshMember
It going along nice. You can expect a release next week 😀
-
October 20, 2005 at 8:15 pm #15848wiLMember
Just following up. 😀
“Is it ready yet?”
How long to go so I can plan…
🙂
-
October 28, 2005 at 4:47 am #15849RiteshMember
You can download SJA v4.2 RC1 from:
http://www.webyog.com/betas/sja42.tar.gz
Starting with this version, you can specify the path for session.xml file.
Now you can execute SJA like:
CODEsja -llog.log -ssession.xml schema.xml
-
-
AuthorPosts
- You must be logged in to reply to this topic.