Comments (7)
@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.
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.
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.
I tried to use the shop on Windows just for helping and I got these errors
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.
@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.
@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.
@vlahx Okey, greetings and thanks! :)
from ecommerce-codeigniter-bootstrap.
Related Issues (20)
- PHP Error and DB error HOT 1
- Adding RTL feature HOT 1
- Making the Persian(FA) the default site language and remove English(EN) HOT 4
- CodeIgniter4 HOT 1
- Laravel ecommerce project HOT 1
- Recommended db settings HOT 3
- Discount code error HOT 1
- More than one quantity problem HOT 1
- Possible XSS vulnerabilities HOT 3
- problem with sql database HOT 4
- Problem with the code HOT 1
- Account HOT 1
- Search bar and category HOT 3
- SOCIAL MEDIA SHARING OPTION WILL BE GOOD HOT 1
- delete order HOT 1
- A PHP Error was encountered HOT 2
- A php error was encountered HOT 1
- A PHP Error was encountered HOT 4
- i want your help please im bigenner HOT 1
- A PHP Error was encountered HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ecommerce-codeigniter-bootstrap.