My php code can't see the file licences

User 247a2c5018

16-03-2007 22:24:56

I put the file licences.dat under /root/.chemaxon





On root, I run





java -classpath "/usr/local/src/triplets/FuzzyTriplets:/usr/local/src/jchem/lib/jchem.jar:/usr/local/src/jchem/lib/


dom4j.jar:." Utils/Topo -f /www-data-dev/abonne/fingerprint/20070316-223339test1.mol








I have no problem








But when this last command is run from php code, I have this error:








FATAL - exception chemaxon.nfunk.jep.ParseException: Error while evaluating expression:


(SEARCH0(ATOMINDEX)||SEARCH1(ATOMINDEX)||SEARCH2(ATOMINDEX,1))&&!SEARCH3(ATOMINDEX,1,2)&&!SEARCH4(ATOMINDEX,2,3)&&!CONTAINS(Cationic,ATOMINDEX)&&!SEARCH5(ATOMINDEX,1)&&!SEARCH6(ATOMINDEX,1)&&!(SEARCH7(ATOMINDEX)&&(PLUGIN(pka,ATOMINDEX)<4||PLUGIN(pka,ATOMINDEX)>7))&&!(SEARCH8(ATOMINDEX,1))&&!(SEARCH9(ATOMINDEX,1,3))


No valid license key has been found for pKaPlugin.


The maximal number of calls (1) without a license key has been reached.





Please contact sales _at_ chemaxon.com to obtain a license key.


Students and academic researchers can obtain license keys for free


through our Academic Package, for more information


please visit: http://www.chemaxon.com.


No valid license key has been found for pKaPlugin.


The maximal number of calls (1) without a license key has been reached.





Please contact sales _at_ chemaxon.com to obtain a license key.


Students and academic researchers can obtain license keys for free


through our Academic Package, for more information


please visit: http://www.chemaxon.com.


At molecule CCCC1CC(CCO1)C2C(C2c3ccnc(NC)c3)C(N)=O


At mikrospecies














So how to declare where the licences file are stored.








I have the same error, if I launch this command from an other user like TOTO. Because the licences file cannot be find

ChemAxon b124dd5f17

16-03-2007 23:13:31

HI,





I moved this topic here, the guys who need to see this are looking at this place in the forum.





Just a quick question though - can you pass on which version of JChem you are using here - there were changes in the license handling in recent versions





Alex

User 247a2c5018

17-03-2007 08:07:11

I don't know the version but I downloaded jchem last March 2006


How can I know the version?

User 247a2c5018

17-03-2007 19:14:25

The problem of my php code, is I don't launch it from a home of an user.


If I launch the php code from user CNLECTEUR for exemple, I have to copy the licence file in the home of CNFUSION.


So is there any way to declare where is the licences file?


thank you for your help

ChemAxon fb166edcbd

17-03-2007 21:56:18

Here is our license management doc:


http://www.chemaxon.com/jchem/doc/user/Licenses.html





This applies from JChem 3.2.





Here is the part that refers to server-side web applications:
Quote:



License keys are listed in the .chemaxon/licenses.dat (Unix) or chemaxon\licenses.dat (Windows) file under the user's home directory.


...


In case of a web application (e.g. JSP pages) the license file should be


placed on the server side, the user home is the home directory of the user


that runs (owns) the web server. If the web server runs as a system


service under Windows the user home can be a system user home, which


is sometimes difficult to determine. (It can be "c:\" or


"c:\windows\system32\config\systemprofile\", etc.) To make setting the


license keys easier, we provide a web-based (JSP) utility:


<jchem_home>/util/license/setlicense.jsp. Load this page in a browser


from your web server, and you can upload a specified license file from the


client computer to the appropriate directory and file name on the server.


Here we speak about JSP pages but I guess that the same applies to PHP. From your exception message it seems that you have a rather old version of JChem. Although the license management guide is not completely valid for older versions, the license file placement is the same. However, I suggest that you should upgrade JChem because the chemical expression syntax has been improved and a license setting tool (setlicesne.jsp) has been added.





I hope this helps.

User 247a2c5018

18-03-2007 13:29:48

thank you for your help


I have to put the licence file in the home of apache