Why the images are not displayed in local installation?

I copied my website to a local xampp installation to update and images are not shown.









config.local.php file:


```php /*

  • Database connection options

    /

    $config[‘db_host’] = ‘localhost’;

    $config[‘db_name’] = ‘cart’;

    $config[‘db_user’] = ‘root’;

    $config[‘db_password’] = ‘’;

    $config[‘db_type’] = ‘mysql’;



    /

  • Script location options

    *
  • Example:
  • Your url is http://www.yourcompany.com/store/cart
  • $config[‘http_host’] = ‘www.yourcompany.com’;
  • $config[‘http_path’] = ‘/store/cart’;

  • Your secure url is https://secure.yourcompany.com/secure_dir/cart
  • $config[‘https_host’] = ‘secure.yourcompany.com’;
  • $config[‘https_path’] = ‘/secure_dir/cart’;

    *

    */



    // Host and directory where software is installed on no-secure server

    $config[‘http_host’] = ‘localhost’;

    $config[‘http_path’] = ‘/cart’;



    // Host and directory where software is installed on secure server

    $config[‘https_host’] = ‘localhost’;

    $config[‘https_path’] = ‘/cart’; ```

I have a similar problem because I don’t have permission to upload “locally” or copy files “locally” on the machine.

Thanks!



But I use Xampp on Windows, this is not a permissions problem.

I do not know it can be.

I’m not really sure why this is, but I guess you could check a couple of things.



First, how did you copy your site over? Did you use a cPanel backup, the cPanel file manager, or just ftp?



Are you sure you copied over your images folder?



If you copied everything over, take a look at your config.php file. You should have a line that looks like:


define('DIR_IMAGES', DIR_ROOT . '/images/');



Is that there?



What version did you copy over?



Are you using Smartoptimizer or anything? If you are using Smartoptimizer, try disabling that in your .htaccess file.



Have you changed your .htaccess file? This shouldn’t affect your images, but I haven’t tansferred 2.1 around at all and if this is what you are using, maybe it does somehow affect it.



From there I’m not really sure. Xampp on Windows doesn’t have permissions so that is definitely not the problem.



If the above ideas/questions don’t help, maybe try doing another backup of your site and transferring it over to your Xampp install. I personally like using the cPanel file manager, but use whatever floats your boat.



Brandon

[quote name=‘brandonvd’]I’m not really sure why this is, but I guess you could check a couple of things.



First, how did you copy your site over? Did you use a cPanel backup, the cPanel file manager, or just ftp?



Are you sure you copied over your images folder?



If you copied everything over, take a look at your config.php file. You should have a line that looks like:


define('DIR_IMAGES', DIR_ROOT . '/images/');



Is that there?



What version did you copy over?



Are you using Smartoptimizer or anything? If you are using Smartoptimizer, try disabling that in your .htaccess file.



Have you changed your .htaccess file? This shouldn’t affect your images, but I haven’t tansferred 2.1 around at all and if this is what you are using, maybe it does somehow affect it.



From there I’m not really sure. Xampp on Windows doesn’t have permissions so that is definitely not the problem.



If the above ideas/questions don’t help, maybe try doing another backup of your site and transferring it over to your Xampp install. I personally like using the cPanel file manager, but use whatever floats your boat.



Brandon[/QUOTE]



I’ve found the solution. Everything else is fine, the problem was in a line of code in the .htaccess file:


RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]





I think it is protection against hotlinking.



Thanks a lot!!