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

Superfluous lines in the licence file

Author Message
ddleigh



Joined: 07 Jun 2007
Posts: 44

PostPosted: Sun Jul 08, 2007 4:50 pm    Post subject: Superfluous lines in the licence file Reply with quote

Hi,

My licence generator is working perfectly on my own machine (windows), but when I put it on the live machine (unix), it seems to be having superfluous lines being returned.

Let me explain what I'm doing:

The generator process consists of 2 pages. One that submits a post request passing various details, including the server data from ioncube_server_data(). The other receives the request, generates the licence and echos it back to the request page.

From my logging records, I know that the licence is fine before it is sent back, but after it is received by the request page, there is a line with the number 2000 on it after every 242 lines of the licence data. However the last one of these lines is almost always letters. I'm assuming this is a data length in hex, but it doesn't seem to tie up with the calculated length based on 32 (length of each line) * 242.

I'm using fsockopen/fread or fgets/fclose to send the request and retrieve the data. Both fread and fgets seem to have the same problem.

I've spent several days now trying to figure out how to stop this happening, but I've run out of ideas. Has anyone experienced this before and solved it? If so, could you be an angel and let me in on the secret? Smile

The other thing that I'm not sure if it is correct is that, on my live machine (unix), the licence is returned as 1650+ lines long, whereas on my own machine, it is only about 40 lines long. I'm using the option --select-adapters "*" when generating the licence as I have no idea what would be in the server data from someone else's installation.

2 questions:
1. Is this size normal?
2. Should I be using this option or is there a way to determine which adapter to use to make the licence file smaller?

Debbie
Back to top
View user's profile Send private message
cjunge



Joined: 19 Mar 2006
Posts: 25

PostPosted: Mon Jul 09, 2007 12:41 am    Post subject: Re: Superfluous lines in the licence file Reply with quote

ddleigh wrote:
Hi,

My licence generator is working perfectly on my own machine (windows), but when I put it on the live machine (unix), it seems to be having superfluous lines being returned.

Sounds like you might be having issues with line endings. UNIX is \n, while Window is \r\n. This can produce funny characters as far as UNIX is concerned.

Try converting \r\n into \n.
Back to top
View user's profile Send private message
ddleigh



Joined: 07 Jun 2007
Posts: 44

PostPosted: Mon Jul 09, 2007 7:35 pm    Post subject: Reply with quote

Hi,

I've been told what the solution is on another forum ... one character! Isn't that about right after struggling with it for the whole weekend? :-\

I was using POST url HTTP/1.1 etc..., whereas when I changed it to POST url HTTP/1.0, everything suddenly worked.

Hope that helps anyone with a similar problem.

Could anyone answer my last 2 questions, though?

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


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Tue Jul 10, 2007 1:18 am    Post subject: Reply with quote

Interesting on the 1.0 vs. 1.1 issue.

I wouldn't say that the size is normal, however it might be simply that the host has a large number of adaptors. There will be a correlation between the size of server data file and license file size, but if the server data is small and you're getting a huge license file then that's not right. You can always dump out the contents of a license file using make_license or the Windows GUI, so why not take a look to see what's inside.
_________________
Community Admin
Back to top
View user's profile Send private message
ddleigh



Joined: 07 Jun 2007
Posts: 44

PostPosted: Tue Jul 10, 2007 1:51 am    Post subject: Reply with quote

Hi Nick,

As I need to make the licence valid for more than 1 domain/sub-domain name, which may not be on the same server as the one that ioncube_server_data() is run on, I'm asking for them on a form, which I'm then using on the --allowed-server option.

Does this mean that using the server data as well would clash with the requested domains or is there information in it other than domain names that I would need to use as a restriction?

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


Joined: 16 Dec 2004
Posts: 2788

PostPosted: Thu Jul 12, 2007 12:38 pm    Post subject: Reply with quote

What I would advise in this case is rather than using make_license to license based directly on the server data file, use make_license first to decode the server data file(s), and then use one or more --allowed-server options to specify which servers to restrict to. In general you also just need to license to the serer information that's output at the start of the decoded server data, and not all of the other interfaces that may be present in a machine. Use make_license to decode a sample server data file and you'll see what I mean.
_________________
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