Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
I have what may be a silly question. When running Fusion v8 under PHP Version7 is it possible to run a script/scripts under PHP 5.6? In other words can you change PHP versions on the fly for a specific infusion? The reason I ask is that my Avatar Studio will not run under PHP Version7 but has been running just fine for years under all PHP versions prior to 7. Until I can figure out how to fix the errors I am getting I'd like to be able to use it.

11 replies

In short no, You need to try to identify problem areas and correct em to work on a higher version.
Thanks Falk for your reply. I was 99.9% sure it would not work. I have identified the problem areas just can't solve them so far but I will eventually get it. Please mark this as solved/closed.
Well it could work if the server has multiple php versions installed.
Take a look here, https://stackoverflow.com/questions/12561203/how-to-change-php-version-in-htaccess-in-server

You could add an htaccess file with AddHandler application/x-httpd-php56 .php in it and place it in the infusion folder of the infusion you want to run on an older php version.

Or if this infusion is very important, switch back the whole site to php v5.6(latest). A php-fusion v8 site runs ok on php 5.6.
In the mean time look at the error pages for depreciation notices and try to find solutions that are php v7 proof. If you fixed that go back to php v7
I use the the Avatar Studio 2.3 with PHP 7.3.4. It works. What is the problem?
Grimloch has replied to this - 3 months ago
@Harlekin
That's very bizarre. I just switched my PHP version from 7.2 to 7.3 and it still won't work. Here is the error I'm getting:
CodeDownload  
[08-May-2019 08:02:14 America/Chicago] PHP Fatal error: Uncaught Error: [] operator not supported for strings in /home/xxxxxxxx/whisperwillow.com/infusions/avatar_studio/include/avatar_functions.php:14
Stack trace:
#0 /home/xxxxxxxx/whisperwillow.com/infusions/avatar_studio/avatar_studio.php(50): loadAvaCats()
#1 {main}
 thrown in /home/xxxxxxxx/whisperwillow.com/infusions/avatar_studio/include/avatar_functions.php on line 14


It does not like the [ ] operator. Here is the code line:
CodeDownload  
$avaCats[] = $file;


Any suggestions?
RobiNN has replied to this - 3 months ago
OMG people Google still exists....

CodeDownload  

$avaCats = []; // or $avaCats = array();
$avaCats[] = $file;

That's not really an answer; Google returns thousands of possibilities with a LOT of cryptic code that requires an intimate knowledge of php's inner workings. However, when I do this per your suggestion:
CodeDownload  
function loadAvaCats()
{
 $ignore = array('.', '..');
 $avaCats = "";
 if ($handle = opendir(AVATAR_FOLDER))
 {
 while (false !== ($file = readdir($handle)))
 {
 if(!in_array($file, $ignore) && !is_file(AVATAR_FOLDER . '/' . $file))
$avaCats = array();
 }
 }

 closedir($handle);
 return $avaCats;
 }

 return false;
}
 {


...it does nothing. But if I add $file like so:
CodeDownload  
function loadAvaCats()
{
 $ignore = array('.', '..');
 $avaCats = "";
 if ($handle = opendir(AVATAR_FOLDER))
 {
 while (false !== ($file = readdir($handle)))
 {
 if(!in_array($file, $ignore) && !is_file(AVATAR_FOLDER . '/' . $file))
$avaCats = array($file);
 }
 }

 closedir($handle);
 return $avaCats;
 }

 return false;
}
 {


...it almost works but I get only 1 directory and 1 avatar image.
www.whisperwillow.com/my_panels/ava_studio.jpg
RobiNN has replied to this - 3 months ago
Here is issue: change $avaCats = ""; to $avaCats = [];
No dice... does nothing.
Harlekin has replied to this - 3 months ago
You find the avatar_functions.php and avatar_studio.php in the attachment that i use.
Harlekin attached the following file:
avatar_studio.rar [3.24kB / 31 Downloads]

Harlekin wrote:

@Harlekin - I use the the Avatar Studio 2.3 with PHP 7.3.4. It works. What is the problem?

You know it would have been nice when you made this post/statement if you had told me that it was YOUR modified version of my infusion that was working fine for you! At any rate I d/l'ed the RAR file you attached in the previous post and have mine working fine also. Thanks !
author Grimloch
forumModifications and Requests - 8
replies12 posts
viewed533 times
activeLast updated on 3 months ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, Wanabo, Grimloch, Harlekin, RobiNN