How to use firebird embedded on Linux with IBPP without running a service? - linux

We're about to integrate a firebird database in our software via IBPP. Accordingly to the firebird documantation this should be possible.
We already managed to use the firebird database via IBPP while the service was running. But, we want avoid to run a service. On windows we already accomplished to do this - but on the linux side there are two main differences:
Installation
On windows it is not neccessary to make an installation. On Linux it seems to be, as the docs say:
Finally, you can't just ship libfbembed.so with your application and use it to connect to local databases. Under Linux, you always need a properly installed server, be it Classic or Super.
Is this true? I found the firebird documentation beeing outdated sometimes. If this is still valid, how to deal with this installtion? Can we just run it on the customer's pc. I looked at the shell script. It starts a service. For me it seems running this service is needed during installation process. Anyway, this would be no problem if the service is running only for the installtion and is never needed afterwards - but I'm not sure about this.
IBPP
On windows you just load the DLL via loadlibrary: We put the fbembed.dll, icuuc30.dll and icudt30.dll on any_dirctory, changed the passage in IBPP where the embedded dll is called to loadlibary("any_directory\fbembed.dll") and added any_directory to PATH variable. Everything works now. (Aside: By doing this it is possible to call the database via a DLL we created using IBPP. This DLL can be used by every EXE we give to the customer withour caring about the path the EXE is places in).
But on Linux I didn't found the code where this is done. On this HOWTO it seems a special directory structure is needed. Is this really neccessary? Is it possible to place the .so-files on any_directory and run the application from another_dirctory? Is it neccessary to add loadlibary to Linux section in IBPP? (BTW: My problem is I can't really test things because Linux integration is doing someone else for me).

Related

Nodejs as Windows Service can't read files on network drive

I have developped a little app in NodeJs which read and write some files. These files are stored on a shared folder of my local network. Everything was working until I tried to start NodeJs as Windows Service through NSSM (a little .exe that allows you to transform a .bat to a Windows Service).
In fact, fs.readFile doesn't work anymore so i can't use it, and i don't see where does the problem come from.
In addition, fs.existsSync("\\\\10.200.10.1\\reporting\\") returns false, but fs.existsAsync("\\\\10.200.10.1\\reporting\\") returns true.
I also tried some other functions like fs.access and it doesn't work either.
I would be grateful if someone could tell me how i can make this work. I don't really care about NSSM, my only goal is to make my Node App works as Windows Service, so if an other tool can resolve my issue, let's tell me.
I don't know if it's the same problem, but I have an other thing which doesn't work in service mode : Execute VBS from Nodejs in background mode (Tasks Scheduler or Windows Service)

Chrome Native Messaging Host Access Rights

I am porting my NPAPI based plugin to Native messaging host for Chrome.
I can connect to it successfully and also run the host application.
But the host application (win32 GUI App) uses many win32 API's like CreateFile to update itself and other utilities from server.
The host app is installed in Program Files folder through an installer process (setup.exe). So since the host application runs on current user rights ( I may be wrong on this) the host might not have some rights (like in my case CreateFile) in the program files folder.
Through NPAPI it used to work as the executable i guess runs under System Rights (I may be wrong on this too).
So basically is there any way I can achieve this. I know this might be a security concern Chrome is trying to solve through Native Host, but I need to do this as otherwise some executable will not be updated from server.
Also the native host application requires some more files to be downloaded from server ( which i could not be placed in the installer).
Moreover, the source code to update the executables and download extra utilities is cross platform so I don't to change that, otherwise I might need to rewrite a lot of code.
So any suggestions to get around this situation ?
Is there some way we can get elevated permissions for the native host application through UAC or something. I don't mind if user is prompted for a UAC dialog.
Or are there any other alternative besides Native Messaging ? NaCl won't suffice either I guess.
Note : GetLastError() reutrns ERROR_ACCESS_DENIED during CreateFile.
Regards,
LazyCoder7.

Installing JavaComm API on Ubuntu

I know this question has been asked several times around the internet, but I have spent about a week trying to solve this problem with little luck.
I am trying to install JavaCommAPI (an archived Java package to allow communication with rs232) on a remote linux Ubuntu 11.0, 32-bit server in order to deploy a web project which I have developed on a local apache server on my windows PC.
The thing that puzzles me is, I am able to get the .war web project to deploy on a local apache server on a separate 32-bit LinuxMint16 PC by correctly placing the javax.comm.properties, comm.jar, and libSerialParallel.so files in their respective places.
I use System.getProperty("java.library.path"); in order to find the correct library path in order to install correct files.
On my LinuxMint16:
javax.comm.properties -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib
comm.jar -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
libSerialParallel.so -- /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386
....works!
On my remote Ubuntu server I did the exact same for its reported library path
(for example: /usr/local/jdk/jdk1.7.0_45/jre/lib/javax.comm.properties ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/ext/comm.jar ;
/usr/local/jdk/jdk1.7.0_45/jre/lib/i386/libSerialParallel.so)
...fails =(
Things of note: I added the needed apache jars and comm.jar to my libraries in Eclipse using the BuildPath wizard (right click on project --> Build Path-->add external jars) which points to local files on my PC which I obviously cannot use for a remote server which I am only accessing through command line. May this is affecting it somehow?
I tried to get error output (System.err) from the Java Console printed to a separate file for my remote server as that feedback was very helpful in getting all the files sorted on my LinuxMint PC.
PrintStream ps = new PrintStream(pathName);
System.setOut(ps);
System.setErr(ps);
Which again, is oddly working beautifully to print the stream to a local .txt file on my LinuxMintPC but not to the one I designate on my remote ubuntu server.
I am really at a wits end here!! Am I mixing and matching appropriate versions of Systems prohibiting things to run smoothly? I am not sure how to proceed from here, if anyone has any insights I would die of happiness. Thanks
I needed to install OPEN JDK7 on my ubuntu, put files in appropriate library paths (as described above) and now it works.

IIS executable not executing

I have been looking at an issue for a week straight and have been unable to figure it out and I am desperate for the fix.
On a client site, we have two environments: UAT and PROD. UAT works perfect (Please keep this in mind). We are now trying to deploy the solution to PROD but certain parts of the solution are not working.
We have developed an asp.net application that we provide to clients to allow them to invoke SSIS packages (there are a couple of drop downs that they first select then click a button named "invoke").
When the user clicks the Invoke button, a batch file named InvokeSSIS.bat is called that assembles a command line call to dtexec with the appropriate parameters.
I'm having a problem with a particular package that is responsible for calling an executable which generates a spreadsheet that i will be importing into my system.
The executable is on an mapped H:\ drive.
I have modified the InvokeSSIS.bat batch file to capture the command the batch file is generating. If I execute this command from the command line, it works perfectly. From the webapp Invoker, it executes the package but the tasks responsible for calling the executable doesn't execute as the entire package takes only 1 second to complete (whereas it should take about a minute.)
The executable DOES have a GUI, but it is NOT interactive. This is because when you call the GUI with specific parameters, it automatically runs in batch mode and executes a macro used to generate the desired spreadsheet.
I know this is ok because it works on the UAT server AND it works from the command line!
I have checked the permissions on the executable (bu right-clicking the executable and clicking properties.) I have granted Full Control on the executable to the same user specified as the identity tab of the application pool i am using.
Can someone please help me? As I said I am dying over here!
Please let me know if you have any ideas or what other info you need.
Environment (both UAT and PROD)
OS: Windows Server 2003
IIS 6
asp.net 2.0
SQL Server 2008
Thanks!
Steve
You can't use a mapped drive with IIS.
You must use the \\servername syntax to reach files on other systems.
I agree with user544284 that this is at least in part a mapping issue. I'll ignore for a minute the complete insanity of having a web application call a batch file to start an executable that's on a remote network drive through a drive letter mapping.
Most likely the UAT box has something set up that maps that drive letter for you which Prod is missing.
The only other possibility is a security violation is occurring. Running .exe's from a network drive is generally frowned on. Do the two environments have the exact same version of windows? Are they configured the same with regards to UAC? Any differences here are going to be important.
Which brings up an interesting thought. I wonder if someone logged in to the UAT server using the same account credentials the app pool is using and added the ip address of the machine where the exe lives to the list of "Local Intranet" sites... Or, if they installed SSIS on the UAT server itself.
Just because YOU can log in to the server and run it on the command line means nothing. You have to find out if the drive letter is mapped at all for the user that the web app is running under and whether that user has the required security bits and whether the local OS will allow it regardless.
Okay, I can't ignore it: hairbrained is the nicest adjective I can come up with for this "architecture". Do yourself a favor and go back to the drawing board on this one. It has the word "brittle" written all over it, as you have already found. Instead of building out a batch file to call dtexec, just do it directly either by something like this or this.

Hklm/Init on Windows CE 6.0

I've been trying to make my application run at startup on windows CE 6.0, unfortunately since the device (YFAtlas4) is customized by manufacturer I'm unable to place shortcut in \Windows\Startup. (for some misterious reasons)
So now I'm trying to place path to my application in Hklm\Init registry key, and here's my problem: I's there a way to place absolute path there ? In every example that I've seen there's only application name, and my application has to be instaled in \ResidentFlash\ folder.
Did you try to put the full path there?
There should not be any problem doing so.
If you edit your registry using code, then the string you want to store is L"\\ResidentFlash\\AppName.exe". Alternatively, in case you have an ActiveSync connection with the device you can use a remote registry editor and not mess with the double backslashes.
Also, since you are using the HKLM\Init functionality - make sure your application calls SignalStarted so other programs that are dependent on it can start as well.
A fully qualified path should be supported jusy fine. Be aware that if the path has a space in it, you'll need to quote delimit it. Also, if it's a Compact Framework app, it's not as simple as just adding your app to the Init key - often that will fail. See this blog entry on getting CF apps working with the Init key.

Resources