SnippetMaster Support Forums

General => General Discussion & Support => Topic started by: Franky on September 09, 2007, 06:20:53 AM



Title: Support for PHP 5 ?
Post by: Franky on September 09, 2007, 06:20:53 AM
Hello Henri,

does Snippetmaster support PHP 5.x? I've installed Snippetmaster under PHP 4.x and after it switched to PHP 5 via htaccess-rule. Now I get the error-message "Site error: the file /home/.../editor/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator".

How can I manually modify this Snippetmaster-Installation to support PHP5?

Thank you in advance.

Regards,
Frank


Title: Re: Support for PHP 5 ?
Post by: admin on September 09, 2007, 07:02:22 AM
Yes, Snippetmaster supports PHP 5.  However, if you are using the Ioncube version.. then you will need to have the Ionucbe Loader files for PHP 5.x  (whichever version you're using.. which sounds like 5.2 from the error message.)

The solution:

1. Go to http://www.ioncube.com/loaders.php

2. Download the loaders for your operating system.  (Linux, I think.)

3. Unzip the loaders to your computer, and then upload them all to the /snippetmaster/ioncube/ folder.

That should do the trick.

Let me know how it goes...



Title: Re: Support for PHP 5 ?
Post by: Franky on September 09, 2007, 07:28:45 AM
3. Unzip the loaders to your computer, and then upload them all to the /snippetmaster/ioncube/ folder.
Okay, there was a folder ioncube with files, but none for PHP 5.2. I have deleted the content and copied the Linux x86 Package into it. But the error message stays the same: "Site error: the file /home/www/doc/11064/everyisland.com/www/editor/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator."

But ioncube_loader_lin_5.2.so IS in the directory! Have a look at the screenshot belows.


Title: Re: Support for PHP 5 ?
Post by: admin on September 09, 2007, 07:43:08 AM
In that case, you may need to contact your web hosting provider and ask them why the Ioncube Loader is not working.

If you want, you can send me your FTP un/pw and I'll login and take a look to see if I can figure out the problem...  (henri @ snippetmaster . com)


Title: Re: Support for PHP 5 ?
Post by: Franky on September 09, 2007, 12:26:00 PM
In that case, you may need to contact your web hosting provider and ask them why the Ioncube Loader is not working.

Henri, thank you for your kind supprt. I will first contact my provider, then it's your turn.
I've tried Linux x86 and Linux x86 64, no success.  :?
It's working with PHP 4.x.


Title: Re: Support for PHP 5 ?
Post by: admin on September 09, 2007, 01:10:06 PM
Yes, I think your hosting provider is the first point of contact for this... they should be able to tell you what Ioncube loaders to use.  And also help diagnose why they are not working for php 5, when they do work for php 4.  Maybe their server configuration is a little screwy...  :(

Let me know how things go.

BTW - The snippetmaster.com site is on a linux server with both php4 and php5, and Snippetmaster works perfectly on both of them with the Ioncube version.  (So I'm 100% confident the software works in your same environment.)



Title: Re: Support for PHP 5 ?
Post by: Franky on September 10, 2007, 11:56:44 AM
Let me know how things go.

Henri,

I've created my own php.ini and included the line extension=ioncube_loader_lin_5.2.so, but no success. I've copied ioncube_loader_lin_5.2.so to the editor/ioncube-directory, but again without success. I've tested the  ioncube_loader_lin_5.2_ts.so too. :? :?

The server runs on x86 Linux with PHP Version 5.2.2. Everything runs fine on PHP 4.x, but fails, if I switch to PHP 5.x --> "Site error: the file /home/www/doc/11064/everyisland.com/www/editor/index.php requires the ionCube PHP Loader ioncube_loader_lin_5.2.so to be installed by the site administrator."

Perhaps you can have a look. I will try to install a test-version of Snippetmaster-Pro on my clients webspace and give you an ftp-account in the next few days via Email. Be prepared!  8)

Regards,
Frank


Title: Re: Support for PHP 5 ?
Post by: admin on September 10, 2007, 01:09:20 PM
To be honest... I'm not sure there is anything else I'm going to be able to do.  If putting the required ioncube_loader_lin_5_2.ts.so file in the ioncube folder doesn't make it work.. then there is a problem with the PHP configuration on the server, I think.

You could, perhaps, try and contact the Ioncube vendor and see if they can figure it out..

Here's a question:  If you go into the ioncube folder and run the index.php file, and then click that link and run the "assistant" utility... does it say that you can use the "runtime" loading?



Title: Re: Support for PHP 5 ?
Post by: Franky on September 10, 2007, 02:16:45 PM
Here's a question:  If you go into the ioncube folder and run the index.php file, and then click that link and run the "assistant" utility... does it say that you can use the "runtime" loading?

Here is the answer from ioncube-loader-helper.php --> "Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 40961 bytes) in /home/www/doc/11064/everyisland.com/www/editor/ioncube/ioncube-loader-helper.php on line 43"

Is Ioncube hungry for memory under PHP 5.x?
I have switched back to PHP 4.x -> THEN an information page is shown immediately!   :shock:... !??!
But I now don't get Snippetmaster running under PHP 4.x anymore.  :(

As I said, I will give you a ftp-account in a few days.  8)


Title: Re: Support for PHP 5 ?
Post by: admin on September 10, 2007, 02:27:09 PM
No.. the ioncube loaders should not require too much memory.  Certainly not any different then PHP 4...

I think this might be an issue you need to speak with your web hosting provider about.  Most good web hosting providers will be easily able to get Ioncube loaders working without any problem for both PHP 4 and PHP 5.

(All our own servers have PHP4/PHP5 running at the same time, with both Zend and Ioncube installed natively in both environments.)



Title: Re: Support for PHP 5 ?
Post by: Franky on September 10, 2007, 02:51:23 PM
I am in contact with my provider. They are very good, but don't have so much to do with Ioncube, I think.
Okay, we will see. You will have the chance to check this case in detail.  :P


Title: Re: Support for PHP 5 ?
Post by: admin on September 10, 2007, 02:54:00 PM
If your provider is very good, then they should know how to properly install the Ioncube loaders for you.  Ioncube (and Zend Optimizer) is pretty basic software for any web hosting provider.. so if they can't make it work, then I recommend findind a better host. 



Title: Re: Support for PHP 5 ?
Post by: Franky on September 10, 2007, 03:15:42 PM
If your provider is very good, then they should know how to properly install the Ioncube loaders for you.
Yes, they are really good. And I can have my own php.ini's. Together we will crack the nut, Henri - in a few days.  :D

BTW: Surprise, surprise --> I have copied back the original Snippetmaster Ioncube-Files from a backup and ... Snippetmaster is up and running. But why? What is different from the other Ioncube-files???


Title: Re: Support for PHP 5 ?
Post by: admin on September 10, 2007, 03:18:03 PM
Good question.  Only thing I can think is that the wrong ioncube loaders were downloaded?

Let me know your FTP info and snippetmaster URL info and I'll do my best to login and take a look.  :)  (henri @ snippetmaster . com)

Cheers! 


Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 09:00:57 AM
Gotcha !


Henri,

I've tested with version 4.4 again. And I've got it up and running with the correct entries in my user-php.ini.
Everything is okay with my downloaded Linux x86-Loader. BUT ...

I think ... it IS a memory-problem. Have a look at the image below!
The filesize of the 4.4-Loader is 291 kb, BUT the filesize of the 5.2-loader is  more than THREE times bigger, 960 kb!!!  :shock: :shock: :shock: :shock:
From PHP-version 5.1, the loader-size exploaded.

And this leads to the following error-message: Fatal error: "Allowed memory size of 262144 bytes exhausted (tried to allocate 19456 bytes) in /home/www/doc/11064/everyisland.com/www/editor/ioncube/ioncube-encoded-file.php on line 2"  :(

THAT is the problem. Lots of people will get trouble in the futer with Ioncube and PHP > Version 5.0

Regards,
Frank



Title: Re: Support for PHP 5 ?
Post by: admin on September 11, 2007, 09:34:07 AM
The ioncube loader file for PHP 5.x is much larger because there are many more functions in PHP 5.x then there are in PHP 4.x

I just had a chat with my server admins about this (I own a web hosting company with about 60 servers), and they have never seen the ioncube loader files use up all system memory.

If that's the problem on your server, then it's caused do to a screwy server configuration.  But I'm not sure that is the problem...

The solution is going to be to have your web hosting provider figure this one out. It should be part of their service to include confirmation that the ioncube loader files are working.  They can install them on the server-side (instead of "runtime" if they want.)  They can also contact the Ioncube vendor to discuss the issue..  I've chatted with them a few times for different things, and they're usually very good to figure out why the loader files aren't working.

But in this case, I'd say it is a server problem on your end...



Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 09:40:23 AM
But in this case, I'd say it is a server problem on your end...

Yes, might be - BUT believe me, my webspace-provider is very good - and lots of people will experience the same problems with Snippetmaster and Ioncube for PHP > 5.0 in the near future. It's a problem. definitly. I would predict the same "effects" on other x86 Linux-Servers.

For now, I ask my hoster for support in this case. But I don't think, they will Ioncube as a system-service.


Title: Re: Support for PHP 5 ?
Post by: admin on September 11, 2007, 09:49:41 AM
I have about 30k customers.  I'm sure lots of them are using PHP 5.x... and this is the first time I've seen this particular problem. 

:)


Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 09:50:37 AM
I have about 30k customers.  I'm sure lots of them are using PHP 5.x... and this is the first time I've seen this particular problem.  :)

Oho, 30k? That's a lot!  :D


Title: Re: Support for PHP 5 ?
Post by: admin on September 11, 2007, 10:02:34 AM
Yup.  :)  For some reason, Snippetmaster is a popular program.  Good for me, though!  :)

But seriously.. this is the first time I've seen that particular issue where the ioncube loaders are working for PHP4, but not for PHP5.  The memory issue could mean anything, but it most likely means that there is something a bit screwy on the server that's messing it up.

You might want to contact the Ioncube vendor directly and give them FTP access to the ioncube folder on your account.  This way, they can debug the problem directly for you...  they are usually very fast.

Let me know if you get stuck. :)


Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 11:31:52 AM
Let me know if you get stuck. :)

Merde!

Henri, my friend,

the solution is very simple --> set memory_limit to 80M.  :shock:
I could have done this by myself in the userdefined php.ini.

Now, you can close this case.
Congratulations.  :P

Regards,
Frank



Title: Re: Support for PHP 5 ?
Post by: admin on September 11, 2007, 12:08:57 PM
Hi Frank,

Excellent.. Glad you got it figured out.  :) 

Let me know if you find anything else unexpected. 


Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 01:03:13 PM
Let me know if you find anything else unexpected. 

Naturally, as you might know -> The bug stops here.  :D


Title: Re: Support for PHP 5 ?
Post by: Franky on September 11, 2007, 04:13:07 PM
The answer from Ioncube -->

"Hi Frank

Either you missed a digit or two in your ticket with the allowed memory size, or your provider has a misconfiguration. An allowed memory size of about 250K is barely adequate for any PHP program to run, so I have no doubt that there is a problem.

Checking now I see that the limit is a generous 80M, so you should be fine. Do you still have a problem?

Best regards
Nick
--
ionCube Support"