Jump to content
3cacahuetes

PERFORMANCE HOT FIX PLEASE APPLY [solved] 1.6.0.9 class_index.php has disappeared

Recommended Posts

Hello,

 

Since a couple of days, after the update to PS 1.6.0.9, the file /cache/class_index.php is not created anymore.

Actually, in the /cache folder, there is only one folder : ./smarty

 

Everything works, but I guess this is bad for performances.

 

Is there something to enable to have it back?

 

Thank you.

Edited by El Patron
  • Like 2

Share this post


Link to post
Share on other sites

In my case it was a bug in PrestaShopAutoLoad.class

I replaced the one in 1.6.0.9 with the latest from github and class_index.php was recreated again..

 

https://github.com/PrestaShop/PrestaShop/blob/8288a6fffa0eb7a42b280298f798ff9292dd7be3/classes/PrestaShopAutoload.php

 

I applied this fix and it is working fine now on 1.6.0.9.  Thanks for sharing.

  • Like 1

Share this post


Link to post
Share on other sites

In my case it was a bug in PrestaShopAutoLoad.class

I replaced the one in 1.6.0.9 with the latest from github and class_index.php was recreated again..

 

https://github.com/PrestaShop/PrestaShop/blob/8288a6fffa0eb7a42b280298f798ff9292dd7be3/classes/PrestaShopAutoload.php

 

Thank you !

 

The function

private function normalizeDirectory($directory)

has been added between the two versions.

Share this post


Link to post
Share on other sites

Woaaa! How fast is that fix :o

 

I found that my shop was so slow since I switched to 1.6.0.9. Thanks for the fix, now it's very fast.

Share this post


Link to post
Share on other sites

Same issue here, I just checked, and indeed, on August 8th (the day I upgraded from 0.8 to 0.9), there was a class_index2.php created, but class_index.php - gone!

Share this post


Link to post
Share on other sites

Hi,

 

my site is on 1.6.0.9 with default standard theme, but I find it extemely slow. I tried to change to another provider,

 

but there it was even more slow (CPANEL) and I had the problem on a shared server with low memory settings.

 

I would be gratefull for advice how to get my shop running at least a bit faster. secondhand-obchod.sk

 

thx

Share this post


Link to post
Share on other sites

Hi,

 

my site is on 1.6.0.9 with default standard theme, but I find it extemely slow. I tried to change to another provider,

 

but there it was even more slow (CPANEL) and I had the problem on a shared server with low memory settings.

 

I would be gratefull for advice how to get my shop running at least a bit faster. secondhand-obchod.sk

 

thx

 

best to open new topic for best community review

Share this post


Link to post
Share on other sites

UPDATE: I thought that the github fix did solve the problem, but actually no, if I clean the cache, the index file is still gone. I have to manually upload it.

 

Anyone else still have this issue?

  • Like 1

Share this post


Link to post
Share on other sites

I have made the change but it  always delete index php in cache and compile  what is the solution?  vers. 1.6.0.9

Share this post


Link to post
Share on other sites

you could try to change the permission on the index php file, by removing the write permission then the web server should not be able to delete it

Share this post


Link to post
Share on other sites

644 would be read/write (6) for the owner of the file, read(4) for the group and read(4) for everyone else

444 would be read (4) for everyone

 

Perhaps you do not have permission to change the permissions :)

Share this post


Link to post
Share on other sites

I made the changes by github but the file /cache/class_index.php wasnt created.

 

I copied the lines of PrestaShopAutoload.php and replaced of my original PrestaShopAutoload.php.

 

I have only the file index.php on cache folder.

Share this post


Link to post
Share on other sites

I put 666 permission and I see that at the moment it has not been deleted from the server, but if I delete the cache from bo also clears index.php

Share this post


Link to post
Share on other sites

Even with 444 permits index.php was canceled after a cvs import. I can not fix, it could be the server? The cache that are allowed. I have 771.

Share this post


Link to post
Share on other sites

I was getting link rewrite issue in 1.6.0.8 so I have replaced the code fix from github for 1.6.0.9 now I also have same issue product loading very slow. Save and save and stay keep loading.Product page has became slow.

 

This is mentioned as solved is this the solution.

Pls any one help

  • Like 1

Share this post


Link to post
Share on other sites

I was getting link rewrite issue in 1.6.0.8 so I have replaced the code fix from github for 1.6.0.9 now I also have same issue product loading very slow. Save and save and stay keep loading.Product page has became slow.

 

This is mentioned as solved is this the solution.

Pls any one help

 

please open new post...this is class cache issue, and would have little to no affect...i.e. your issue does not seem related.

Share this post


Link to post
Share on other sites

Hello,
 
I have an modules which hide product base on Geoip location. I apply this patch and i disable my modules. Could developer help me to tell me which code need to change? I compare and found:
 
My original file:
 
Line 150: $filename = _PS_ROOT_DIR_.PrestaShopAutoload::INDEX_FILE;

Line 174L $root_dir = $host_mode ? _PS_ROOT_DIR_ : $this->root_dir;
 
and don't have:
 
 

    private function normalizeDirectory($directory)
    {
        $last = $directory[strlen($directory) - 1];

        if (in_array($last, array('/', '\\')))
        {
            $directory[strlen($directory) - 1] = DIRECTORY_SEPARATOR;
            return $directory;
        }

        $directory .= DIRECTORY_SEPARATOR;
        return $directory;
    }
}

 

Share this post


Link to post
Share on other sites

I'm not overly techy and don't understand Github. 

 

could some kind soul explain how to apply this fix in detail, I have a 1.6.0.9 install running painfully slow on the back and front end.

 

TIA,

 

Chris

Share this post


Link to post
Share on other sites

I'm not overly techy and don't understand Github. 

 

could some kind soul explain how to apply this fix in detail, I have a 1.6.0.9 install running painfully slow on the back and front end.

 

TIA,

 

Chris

Hi Chris.

 

1. Download the ZIP file I'm attaching in this post

2. Extract it to your PC. You should get a file named "PrestaShopAutoload.php"

3. Connect to your 1.6.0.9 installation/hosting space with an FTP/SFTP/SCP client like WinSCP, FileZilla, or whatever else suits you

4. Navigate to the remote directory /YOUR-PRESTASHOP-ROOT-FOLDER/classes

5. Inside this directory, you should find a file named "class_index.php". Delete it

6. In the same directory, you should also find a file named "PrestaShopAutoload.php". Replace this with the file you got in step no.2

7. Close your FTP/SFTP/SCP client

8. You 're good to go

 

 

PrestaShopAutoload.zip

Edited by parsifal

Share this post


Link to post
Share on other sites

Thanks so much for taking the time to explain Parsifal.

 

I navigated to /classes and there's no class_index.php file in there?

 

I've saved the PrestaShopAutoload.php over the last version...

 

Can you notice a difference? http://PROtastic.co.uk - it's on a dedicated server with little traffic at the moment.

 

Chris

Share this post


Link to post
Share on other sites

Really, has anyone seen a speed change because of adding the normalizeDirectory function? 

Share this post


Link to post
Share on other sites

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More