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 PHP Encoder

ioncube 9.0.2 - error encoding constants

Author Message
eBGenius



Joined: 30 Aug 2016
Posts: 3

PostPosted: Tue Aug 30, 2016 12:40 pm    Post subject: ioncube 9.0.2 - error encoding constants Reply with quote

I have a code such as:

Code:
<?php
define("some_constant", "some_value");
if (empty(some_constant))
{
do_something();
}
?>


The code works perfectly on all servers. However, I can NOT encode it because this error is always displayed by ioncube encoder 9 (GUI version 9.0.2):

Parse error in file.php at line 3 - syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM)

The same error is always returned for any piece of code which contains this line:

Code:
if (empty(MY_CONSTANT))


How do I solve it?
Back to top
View user's profile Send private message
liaison
ionCube Support


Joined: 16 Dec 2004
Posts: 2756

PostPosted: Tue Aug 30, 2016 7:56 pm    Post subject: Reply with quote

This code is only valid PHP from PHP 5.5.0 onwards and would give that error on PHP 5.4 or below (PHP 4 would give a different error). The error indicates that you have selected the wrong source language. You should set the source language to be PHP 5.5 or 5.6.
_________________
Community Admin
Back to top
View user's profile Send private message
eBGenius



Joined: 30 Aug 2016
Posts: 3

PostPosted: Wed Aug 31, 2016 10:13 am    Post subject: WALK 6300 Reply with quote

I wasn't aware about this. Thank you, that solved my issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder 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