cancel
Showing results for 
Search instead for 
Did you mean: 

flate() function causing fatal error in Processor.php

flate() function causing fatal error in Processor.php

Hi, I’m hoping someone can help, I’ve took over a Magento installation and it’s the first project I’ve worked on using it so I’m learning as I go, everything has been working well as its mainly been updating content, until now, as the site is now showing the following error:

 

Parse error: syntax error, unexpected ')' in /app/code/community/Wee/Fpc/Model/Processor.php on line 5

 

When I edit processor.php to remove the ) it then shows the following error:

 

Fatal error: Call to undefined function flate() in /app/code/community/Wee/Fpc/Model/Processor.php on line 5

 

I then removed the flate() function from processor.php which then shows the following error:

 

Fatal error: Class 'Wee_Fpc_Model_Processor' not found in /app/code/core/Mage/Core/Model/Cache.php on line 679

 

I'm at a loss as I’m unsure what the flate() function actually does, but alsoi why this has happened, one of my worries is the site has been hacked, I’ve searched about for an answer, whether I’m looking in the right place, I don’t know, but as yet I haven’t found anything so if anyone can help shed any light on this I would be very greatful!

 

Thanks

5 REPLIES

Re: flate() function causing fatal error in Processor.php

@HollandHydro

 

Disable that extension and then check again. If possible then please provide the extesnion file so that we can have a look into that and help you out with your issue.

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html

Re: flate() function causing fatal error in Processor.php

Thanks for the reply, as mentioned, I'm new to Magento so still finding my way around so I'm not sure if this is what you mean, but here's what I've done...

 

in app/etc/modules/Wee_Fpc.xml I set true to false

 

<?xml version="1.0"?>
<config>
    <modules>
        <Wee_Fpc>
            <active>false</active>
            <codePool>community</codePool>
        </Wee_Fpc>
    </modules>
</config>

then in app/code/community/Wee/Fpc/Model/Processor.php on line 5 I removed the extra ) as per the error

 

flate(base64_decode($mgt));

I still get the same error:

 

Fatal error: Call to undefined function flate() in /app/code/community/Wee/Fpc/Model/Processor.php on line 5

 

Also in app/etc/modules/ there is another file named Wee_Fpc.xml and the code is...

 

<?xml version="1.0"?>
<config>
    <global>
        <cache>
            <request_processors>
                <fpc>Wee_Fpc_Model_Processor</fpc>
            </request_processors>
         </cache>
    </global>
</config>

Many thanks

Re: flate() function causing fatal error in Processor.php

I've been doing some research on the flate function, if what I've found is right/relevant, its a form of compression and can sometimes be used to compress web pages, the Wee_Fpc.xml has a <cache> tag so, putting 2 and 2 together, I'm assuming the issue is connected to compressing and caching the web pages?

 

I'm going to try deleting the cache via ftp to see if that helps as at the moment I can't log in to the backend

 

Re: flate() function causing fatal error in Processor.php

Just another quick update, I renamed the cache folder, created a new empty folder named cache, nothing changed, so I reverted back to the original Wee_Fpc.xml & Processor.php files, still no change, there is also a folder within the cache folder called wee_fpc

 

If anyone has any ideas on where to look, it would be appreciated, or if there's any source code you need, Iet me know.

 

Thanks

Re: flate() function causing fatal error in Processor.php

Yes, the way you have disabled the extension is right but you need to clear the cache from Magento admin and also remove the cache folder from FTP or cPanel.

Found something useful, please give "Kudos" or "Accept as Solution" for Token of Appreciation.
Free Magento Extensions : https://magecomp.com/free-magento-extensions.html