ionCube installation

software development

#1

Hey there everyone,

I’m attempting to use a script by 68classifieds which requires ioncube. However at the moment I do not know how to install it.

I’d gladly offer what limited funds I have if someone could help me to install it and explain to me how to update it in the future.

Many thanks in advance.


#2

Sure, I’ve installed ioncube for a few people here who were a little overwhelmed with the shell. Basically you install a customised PHP, upload the correct ioncube loader, and call it from your custom php.ini

Updating is a simple matter of overwriting the loader with a newer version as they become available.

The process isn’t tricky at all. Takes about an hour to install, 2 minutes to update.

Maximum Cash Discount on any plan with MAXCASH


#3

that’s perfect! I’ve sent you a pm :slight_smile:


#5

hey there guys,
After sxi kindly helped out, it seems that I have another issue.

Now the folder ‘classifieds’ which is why I needed the ioncube installation doesn’t work… it’s strange…

see www.iloveqatar.net/classifieds

Can someone help?


#6

hi can someone explain step by step ioncube installation?
very urgent


#7

I used this description from the dreamhost wiki very complete and accurate.

One small thing is that you have to modify some of the commands to refer to your home directory - so you can’t just copy and paste into a command line.


#8

Hi amnesia, sorry I wasn’t around to reply to this when you posted - I was afk.

Did you get the ‘missing directory’ problem resolved?

Maximum Cash Discount on any plan with MAXCASH


#9

would you please share how to reference the “home” directory - I am trying what I can since three days and cant figure our which path to use

Thks in advance


#10

$HOME

Maximum Cash Discount on any plan with MAXCASH


#11

edit relevant line in my (custom) php.ini as such:
zend_extension="$HOME/ioncube/ioncube_loader_lin_5.2.so"

still get not-working-correctly" error under “mydomain”/ioncube-loader-helper.php


#12

My apologies, I thought you meant within a script.

PHP.ini references should be full links beginning with a forward slash, such as:

zend_extension="/home/user/path/to/loader.so"

Maximum Cash Discount on any plan with MAXCASH


#13

thanks sXi for your prompt reply…

I am at best a novice as far as php is concerned, so if I may…

do i actually have exactly type “/home/DH server name/my user name/main domain/sub domain /ioncube/…” basically replicating the complete path as shown under phpinfo for loaded configuration file

or

as everything is located in a sub-domain of main domain (custom php is also referenced within the sub-domain), I can just commence with =/subdomain/ioncube (which unfortunately does not seem to work for me)

Thks again


#14

The “/.server/” part is superfluous and not required.

From your description, it would appear your path would be something like:

/home/username/sub.domain.com/ioncube/loader.so

Maximum Cash Discount on any plan with MAXCASH


#15

sorry, doesn’t work either… Last question(s) before I can the add-on that actually requires ioncube:

  • what CHMOD should loader.so have, mine is presently 644
  • IonCube wiki articles requires add line of [suhosin]
    extension=“suhosin.so” - where does that file come from as it is not in the ioncube subfolder or part of loader.so
    Thks for your help!

#16

Hi - 644 should be right. It is also important to have the latest x86-64 loaders due to Dreamhost recent upgrade to x64 - the reason all of our Ioncube sites are now broken.
We are having incredible problems trying to solve these issues - I don’t see why Dreamhost can’t just enable Ioncube centrally, it is required by many CMS solutions and other installs these days. Instead we are struggling for days now with these issues.
I am now currently trying to go step-by-step with the custom PHP install, over and above already having custom php.ini and php.cgi previously - which was working fine before - updating the ioncube loaders and the php.cgi did not solve the problem.
There are so many things to make sure are just right, otherwise looks like it will break.
It would be highly useful if somebody can put some simple step-by-step instructions here for doing either a custom PHP5 install on one of my domains, or how to do the custom php.ini + php.cgi file solution - that would help many of us now and in the future. The Dreamhost instructions via the wiki are not clear at all.
Good luck to all who are suffering these issues!
Adrian


#17

[quote]sorry, doesn’t work either… Last question(s) before I can the add-on that actually requires ioncube:

  • what CHMOD should loader.so have, mine is presently 644
  • IonCube wiki articles requires add line of [suhosin]
    extension=“suhosin.so” - where does that file come from as it is not in the ioncube subfolder or part of loader.so…[/quote]
    chmod 644 is okay.

The part in the Wiki you’re referring to looks like the author intended the information to appear as a ‘screenshot’ of what you would see when editing a PHP.ini file. The only part you need to worry about is:

[ioncube]
zend_extension="/…/…/loader.so"

Maximum Cash Discount on any plan with MAXCASH


#18

I think the argument against blanket-enabling something that obfuscates data from the end user is an easy win. Devices like ioncube have been, and continue to be, used for malicious purposes. If a user hasn’t the ability to configure the environment to enable the functionality of obfuscation scripts I think it’s logical that they they shouldn’t be running scripts that “require” it. It’s really in our best interests that ioncube isn’t provided in our default environment.

The majority of “issues” faced by many users (99.9%) are due mostly to them not gathering the information that they require before embarking on their proposed environment change. For example, those who have taken the time to understand the necessities have little to no trouble installing PHP, ioncube, freetds, and all the other “nigglewares” that have popped up here on the forum over the past week.

In regard to ioncube specifically, the installation is earmarked as an “Advanced” procedure in the Wiki, however in actuality the process is simple enough for someone with a rudimentary understanding of shell commands to accomplish manually without too much hassle – provided they have a fundamental awareness of what they’re doing in the first place.

Maximum Cash Discount on any plan with MAXCASH


#19

Yes, then it would be better to have all the software vendors out there who ‘require’ Ioncube to change the way to implement their wares?

Trouble is that a lot of applications, CMS’s and other tools are suggesting they ‘require’ Ioncube. Therefore it is logical that in trying to offer our customers and users the best sites possible we’d probably want to push ahead with whatever it takes to allow them to do so - ultimately offering the user a good experience, while at the same time not getting bogged down in spending development time over ‘niggleware’ as it’s been put. I’d much rather concentrate on the user than be lost in pointless exercises in backtracking, mending, tinkering, repairing, fixing - what we’d like are elegant and user friendly ways of doing things.

Sure, once I find my way through the maze of the ‘simple’ task of switching on Ioncube I’ll think it is easy. What would be better would be some clear and understandable instructions and ideas on how to do it. What we’ve got is an area that needs some collaboration and help…

So, it would be great to see some cool answers to the following:

  1. Having already installed custom PHP as per this instruction:
    http://wiki.dreamhost.com/Installing_PHP5 (to the letter)
    we now have a info.php (btw phpinfo.php will not work for some reason on my domain…) showing my php.ini file here: /mnt/local/home/USER/www.domain.com/cgi-bin/php.ini

instead of here: /php5/etc/php5/www.domain.com (as per the instructions)

  • then we add this to the .htaccess :
    Options +ExecCGI
    AddHandler php-cgi .php
    Action php-cgi /cgi-bin/php.cgi

<FilesMatch “^php5?.(ini|cgi)$”>
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS

Action application/x-httpd-php5 /cgi-bin/php5.cgi
AddType application/x-httpd-php5 .php5

…and place in my domain root.

…lastly this in my php.ini :

zend_extension="/home/USER/www.domain.com/ioncube/ioncube_loader_lin_5.2.so"

  1. If the loaded configuration file is here: /mnt/local/home/USER/www.domain.com/cgi-bin/php.ini

why won’t the above zend ext. enable Ioncube?

  1. Does this whole exercise require a server reboot (as per instructions) and therefore a 24hr wait for Dreamhost support to do this? If at all?

  2. Having now gone word-for-word through both the custom php.ini instructions and the custom php5 install without any sign of progress how can we start from scratch and make sure we get this right?

All help greatly appreciated and would I’m sure be of great use to others who are out there trying to do things for their customers and users…

Many thanks!
Adrian


#20

That’s exactly right.

No software ‘requires’ ioncube. The coder made a judgement call to obfuscate data. Usually this is done to obscure methodology (for whatever reason). Some scripts use it to protect copywritten content, others use it to hide the fact they’ve ripped off other’s code, and the worst hide their evilness inside the encrypted bits.

They’re the ones that don’t “require” ioncube, fopen, register globals, etc.

[quote]1. Having already installed custom PHP as per this instruction:
http://wiki.dreamhost.com/Installing_PHP5 (to the letter)[/quote]
There are multiple solutions on the page you linked, which one did you attempt?

Notepad them. What’s the difference between the info.php and phpinfo.php you allude to?

Perhaps PHP is being directed to an incorrect location.
I couldn’t make a call on that without clearer information.

No reboot is required as DH uses the better approach. (See ioncube site re: runtime).
To which instructions regarding a reboot are you referring?

Very Carefully delete all files the installation(s) created within root and domain.com, including directories, with the command rm -rf dirname. You can ascertain the directories & files created by reading the script(s) you used. Most scripts appear to rely on an etc folder, so be sure there aren’t any files in there that don’t pertain to your customised PHP before removing it from root. You wouldn’t want to inadvertently break something else whilst endeavouring to fix this (something I’ve learned the hard way - a few times lol).

Maximum Cash Discount on any plan with MAXCASH


#21

In reply to:

  1. Having already installed custom PHP as per this instruction:
    http://wiki.dreamhost.com/Installing_PHP5 (to the letter)

There are multiple solutions on the page you linked, which one did you attempt?

  • I used the ‘Main PHP 5 install script’ from that set of instructions.

In reply to:

Notepad them. What’s the difference between the info.php and phpinfo.php you allude to?


  • what I meant was that I uploaded a file called phpinfo.php with <?php phpinfo(); ?> inside. I also upload a file called info.php with <?php phpinfo(); ?> inside. info.php works and phpinfo.php gives an infuriating 404 Not Found error - even though I see it sitting there on the server. No idea what is wrong there, both files are EXACTLY the same…

In reply to:

Perhaps PHP is being directed to an incorrect location.
I couldn’t make a call on that without clearer information.

  • info.php reports my php.ini file is inside a cgi-bin created previously using the custom php.ini method (prior to installing custom PHP5). After going through the custom PHP5 method I would assume that the php.ini file (reported by info.php) should now be here: /php5/etc/php5/www.mydomain.com (also as highlighted in the custom PHP5 instructions, see here:

"Your new php.ini file is located here:

/home/YOURUSERNAME/php5/etc/php5/YOURDOMAINNAME " - from: http://wiki.dreamhost.com/Installing_PHP5

In reply to:

To which instructions regarding a reboot are you referring?


  • not sure exactly where I saw that, strange.

In reply to:

Very Carefully delete all files the installation(s)…


  • I may have to try this again tomorrow. Now I’ve tried both
    a custom php.ini install and a custom php install and neither are working. I’ve also just gone through yet another from scratch custom php.ini install on another domain and the phpinfo.php file there (yes, bizarrely on another domain on same hosting account an identical phpinfo.php file works…) still reports I have my loaded php.ini file here: /etc/php5/cgi/php.ini ??? (when it should be the custom location).

Time to give up for now. There must be a simpler way to sort this out.

Thanks for your help!
Adrian