Git Product home page Git Product logo

Comments (7)

vlahx avatar vlahx commented on May 17, 2024 1

@kiril
[Tue Oct 03 08:25:41.032203 2017] [:error] [pid 2492:tid 1028] [client ::1:1481] PHP Fatal error: Call to undefined function mime_content_type() in C:\\SERVER\\Apache24\\htdocs\\shop2\\application\\controllers\\Loader.php on line 103, referer: http://localhost/shop2/
Thanks for advise, on the top is the las error from Apache, I dont use xampp or other lamps, I have installed apache, mysql and php, separately.
The problems comes from this line from loader $image_mime = mime_content_type($path);
I will fix the problem .....

from ecommerce-codeigniter-bootstrap.

vlahx avatar vlahx commented on May 17, 2024 1

It's a good code but still don't working, I have same errors.
Work without no errors using like bellow:
$img = file_get_contents($path); if (!$img) { header('HTTP/1.1 404 Not Found'); return; } echo $img;
Just eliminate $image_mime. I know it's not correct but isn't a big problem, on my linux everythings work good and load all functions from Loader.php in original code.
Thanks for your time and will be in touch, I propose to work for some developments when I will have more time, because is a good ecommerce application, I like it.

from ecommerce-codeigniter-bootstrap.

kirilkirkov avatar kirilkirkov commented on May 17, 2024
<script src="http://localhost/shop/loadlanguage/all.js"></script> - this point to Loader controller (/application/controllers/Loader.php) jsFile method. This method search this file in /application/language/ _yourlanguagename_ /js/ _jsfilename.js_

This file contains translations that are loaded from other javascript files.

<script src="http://localhost/shop/templatejs/mine.js"></script> - this point to Loader controller (/application/controllers/Loader.php) templateJs method. This method loads your own javascript files from /application/views/templates/ _templatename_ /assets/js/ _filename.js_ . There you can write your own javascript code to be loaded from selected template.

If you have not changed anything by these methods, the reason why the files are not found maybe is that you host this project in directory like http://localhost/shop , not in - http://localhost/ (or virtual host) and if you host this project in directory you must change /application/config/config.php - $config['base_url'] to http://localhost/shop and your .htaccess file to:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

But you will must set this directory in css files for images because this will not load.. :)

Example:
.avatar {
background-image: url("/assets/imgs/login-cover.png");
}
TO:
.avatar {
background-image: url("/shop/assets/imgs/login-cover.png");
}
@gxe1157

from ecommerce-codeigniter-bootstrap.

vlahx avatar vlahx commented on May 17, 2024

I tried to use the shop on Windows just for helping and I got these errors
image
I try to understand why. On Linux and on a domain name, subdomain works good.
I think the problem is in Loader, because the sigle function which dont work is templateCssImage, Css and js works good.
I am not sure how get this path to imgs because it is good defined in Loader.php
BTW, base_url is localhost/shop

from ecommerce-codeigniter-bootstrap.

kirilkirkov avatar kirilkirkov commented on May 17, 2024

@vlahx hmm, I test on windows 7 with XAMPP installed and in directory http://localhost/shop but i dont have this problem. Can you send me apache error logs when try to open this url?

from ecommerce-codeigniter-bootstrap.

kirilkirkov avatar kirilkirkov commented on May 17, 2024

@vlahx Here is your fix - 9e4098f :)

if (function_exists('mime_content_type')) { $image_mime = mime_content_type($path); } else { $finfo = finfo_open(FILEINFO_MIME_TYPE); $image_mime = finfo_file($finfo, $path); finfo_close($finfo); }

Instead:

$image_mime = mime_content_type($path);

from ecommerce-codeigniter-bootstrap.

kirilkirkov avatar kirilkirkov commented on May 17, 2024

@vlahx Okey, greetings and thanks! :)

from ecommerce-codeigniter-bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.