ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube Loader

Checking loader version from PHP

Author Message
Saka



Joined: 26 Feb 2006
Posts: 17

PostPosted: Sun Feb 26, 2006 8:39 pm    Post subject: Checking loader version from PHP Reply with quote

Is there any way to check ioncube version from PHP other than doing something like
Code:
passthru("ioncube_encoder -V");


System functions are usualy disabled.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2801

PostPosted: Sun Feb 26, 2006 8:54 pm    Post subject: Reply with quote

What are you trying to do, and why would you need to know the version from PHP?

You could read the binary and you'll find the version number in there, however if the system functions are disabled, finding out the Encoder version is probably of no practical interest because you can't run the program anyway.
_________________
Community Admin
Back to top
View user's profile Send private message
Saka



Joined: 26 Feb 2006
Posts: 17

PostPosted: Mon Feb 27, 2006 12:49 am    Post subject: Reply with quote

I take this answer as no. Smile

Why would I need to do that? From a very simple reason: I need to provide a tester script for people to tell them whether my program can be run on their system.
But most systems, if they have ioncube installed, have version 2.5 installed. And the scripts encoded with latest ioncube encoder won't work with old loader.

So I would like my tester script to tell them whether they already have the loader and whether it's version 3.1.

On many systems passthru(), exec() and system() are disabled but dl() is enabled. So it would be nice with an option to check ioncube version in such a common environment.
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2801

PostPosted: Mon Feb 27, 2006 2:16 am    Post subject: Reply with quote

I see. You are confused between the Loader and the Encoder. In your question you asked about the Encoder version, but you really meant the Loader, and this is entirely different.

You can find out the Loader version by using the function ioncube_loader_version(), and in more recent Loaders, ioncube_loader_iversion(). See the Encoder User Guide PDF for a description of these and all other Loader API functions.

Note that as these are Loader API functions, they will only exist if the Loader has actually been installed.
_________________
Community Admin
Back to top
View user's profile Send private message
Saka



Joined: 26 Feb 2006
Posts: 17

PostPosted: Mon Feb 27, 2006 3:38 am    Post subject: Reply with quote

Hello Nick,

That's exactly what I needed.

Of course, I confused the encoder version check up there, sorry about that. Smile

Thanks.
Back to top
View user's profile Send private message
electric



Joined: 10 Apr 2006
Posts: 27

PostPosted: Mon Apr 10, 2006 2:42 am    Post subject: Reply with quote

Saka wrote:
I need to provide a tester script for people to tell them whether my program can be run on their system.

But most systems, if they have ioncube installed, have version 2.5 installed. And the scripts encoded with latest ioncube encoder won't work with old loader.

So I would like my tester script to tell them whether they already have the loader and whether it's version 3.1.


Hi Saka,

Were you able to create a test script to check if the ioncube system will work for the user?

If so, would you be willing to perhaps share it here? This is exactly what I am trying to do now, and I would *love* to see how you did it!

Thanks in advance! Very Happy
Back to top
View user's profile Send private message
Saka



Joined: 26 Feb 2006
Posts: 17

PostPosted: Fri Nov 10, 2006 6:21 am    Post subject: Reply with quote

electric wrote:
Hi Saka,

Were you able to create a test script to check if the ioncube system will work for the user?

If so, would you be willing to perhaps share it here? This is exactly what I am trying to do now, and I would *love* to see how you did it!

Thanks in advance! Very Happy

I understand my answer comes in timely manner. Smile
But anyway here is my script that checks for ionCube loader compability:
http://www.sakic.net/content/scripting_files/sef_advance_tester.zip
And this is the output on my server:
http://www.sakic.net/sef_advance_tester.php

I borrowed some code from ioncube-loader-helper.php file, hope ionCube guys don't mind. Smile
Back to top
View user's profile Send private message
electric



Joined: 10 Apr 2006
Posts: 27

PostPosted: Fri Nov 10, 2006 7:32 am    Post subject: Reply with quote

Thank you! Very Happy Your script is excellent, and is very helpful.

Smile
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2801

PostPosted: Fri Nov 10, 2006 1:02 pm    Post subject: Reply with quote

Saka wrote:
I borrowed some code from ioncube-loader-helper.php file, hope ionCube guys don't mind. Smile


Smile Not at all, and your script looks very nice when run, good job!

There's another function that we added called ioncube_loader_iversion() that returns the major, minor and revision as an integer as Mmmrr. This exists in 3.1, and possibly 3.0 but I'd have to check. That's useful if you need to know the revision, but generally ioncube_loader_version() is fine.
_________________
Community Admin
Back to top
View user's profile Send private message
markashworth



Joined: 07 May 2012
Posts: 1
Location: Singapore

PostPosted: Mon May 07, 2012 4:38 pm    Post subject: Reply with quote

A big thank you to Saka for providing the script.

It solved my issue as I found out I was trying to load the wrong ioncube for my php version (I was using 5.2 ioncube when I should have been using 5.3). All is wonderful now Smile
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2801

PostPosted: Wed May 09, 2012 10:26 am    Post subject: Reply with quote

Note that the Loader Wizard, which replaced the old Loader Helper, will usually detect this type of error too. It's available at http://loaders.ioncube.com
_________________
Community Admin
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube Loader All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum