{ "message": "Unable to guess the MIME type as no guessers are available (have you enabled the php_fileinfo extension?).", "exception": "Symfony\Component\Mime\Exception\LogicException", "file": "/home/califor2/public_html/cmwpeerreview/vendor/symfony/mime/MimeTypes.php", "line": 140, "trace": [ { "file": "/home/califor2/public_html/cmwpeerreview/vendor/symfony/http-foundation/File/File.php", "line": 81, "function": "guessMimeType", "class": "Symfony\Component\Mime\MimeTypes", "type": "->" }, { "file": "/home/califor2/public_html/cmwpeerreview/vendor/symfony/http-foundation/File/File.php", "line": 61, "function": "getMimeType", "class": "Symfony\Component\HttpFoundation\File\File", "type": "->" }, {
dropzone is not working in Shared hosting server
Hi, We implemented dropzone in laravel 8 , which is working fine in a local server but it is not working in shared hosting. It has an uploading issue. kindly help us for resolving this issue.
have you enabled the php_fileinfo extension?
You can check by adding a phpinfo.php to your public directory
<?php
phpinfo();
and call it in the browser. Search for fileinfo
@Sinnbeck thanks, we enabled that. It is uploading images in the storage folder. But issues 1 ) not able to access that image via the link 2) this error is occurring: "The Process class relies on proc_open, which is not available on your PHP installation."
@rishikantsri Ok. So disable php safemode or whatever its called at your host, to get proc_open. It might be a setting or something. It can also just be a list of disabled functions, where you need to remove it. If that isnt possible, you should post the code that needs it.
Regarding the urls not working. Are the public directory named anything else than /public? Like public_html for instance.
@Sinnbeck where image is getting stored public_html/cmwpeerreview/storage/app/public/2
In local server, it is working fine, but not in hosting server
@rishikantsri Your app should be placed below public_html and you should look into symlinking your public directory to the public_html directory.
@Sinnbeck We tried this Route::get('/foo', function () { Artisan::call('storage:link'); });
@rishikantsri So the site is now set up properly folderwise, and you can access the site on the base url?
@Sinnbeck yes we can access the site. what is happening here image is uploaded to the storage folder, but not accessible via a link.
@rishikantsri Can you show your folder structure and perhaps an url to the site (if allowed) ?
@Sinnbeck https://cmwpeerreview.californiadigitals.com/
Now there is a storage link icon in /public folder which is showing new images uploaded there but still not able to access.
@rishikantsri And public_html is symlinked to the public folder? Or are you using some .htaccess hack to get it working?
aaaaargh. every single day people are having problems because they fail to install properly.. it's so frustrating and bad for the ecosystem. I wish I could track down those rubbish install tutorials and nuke them
@Snapey Do you by any chance have a step by step guide on your website? I havent been able to find a good one, and I never use shared hosting myself, so I cannot really write a proper one myself. I thought of you when I saw the problem and figured you probably had something to share :)
@Sinnbeck i have a couple of old ones but a cpanel version is probably required. the problem though is that different providers enable different features .. many don't allow console access for instance
Why any ' professional' developer would use a host that does not give ssh access is a complete mystery to me they then end up trying hacks like posted here;
Route::get('/foo', function () { Artisan::call('storage:link'); });
@Snapey I completely agree. There are plenty to choose from. Or you can even get a full server for hardly any money with digital ocean, hetzner, linode etc..
@rishikantsri You already did this part?
Your app should be placed below public_html and you should look into symlinking your public directory to the public_html directory.
It sounds like you dont have shell access, so I am unsure how you did it.
@Sinnbeck Ok thanks, we will try ourselves to resolve this issue.
We resolved the issue. thanks
@rishikantsri Good to hear. It would be a great help for others if you could explain how you fixed it and then mark that as the best answer. If the solution is a good one, I am sure others can use it as well :)
@rishikantsri Ah I didnt think you had transfered the symlink. Good that it works.
Please or to participate in this conversation.