Page not found in uploading image using codeigniter - codeigniter

I have a problem about the file uploading in codeigniter, I can see the picture in the folder name "uploads", also I can see the picture name with extension in database but it cant see in page when I view source code it will say "page not found" and I don't know why.
here is my picture->

Try this-
thanks #jtheman
check your .htaccess code and replace with new code
or
check the image file or upload folder permission
or
check any other .htaccess files is found inside the upload folder

Related

404 error page when trying to access website (hostgator)

I have recently finished building my website and since I didn't know how to put it online I decided to follow this tutorial: https://youtu.be/tq7dqdHCc7U
Everything worked fine until I tried to upload my .html files. I copied them into a www folder I created, but when I try to access the site with myIP/~username, I get a 404 error page. What am I doing wrong?
I guess you have put html file in wrong directory. Please put a sample index.html in root directory and in public_html folder. and try to access with domain name. it should work
A 404 error means that a valid page wasn't found. The only html file that apache know to render automatically is an index.html file. That's the default for the root url (in your case: yourIP/~username). So to fix the problem, you can either change what apache looks for in a index page in your httpd.conf, rename one of your files to index.html, or just append the name of a file that does exist to the end of your URL: yourIP/~username/myPage.html

Laravel 5.6 file not found in storage

My Laravel application is about uploading and showing images. It was working good and all images where shown correctly. Now a few weeks later I tried to test it again and it stopped working. Images are in Laravel storage and path is correct but it says: "Failed to load resource: the server responded with a status of 404 (Not Found)".
Path is: http://localhost:8000/storage/images/8/uploaded/1536930406sunflower.png, and it's correct, image is there.
Weird is that it was working for months and now images cannot be found.
Thanks!
I have found the solution to my question and for those who have the same problem:
Storage link in public folder can be possibly broken.
1)Delete storage link in app/public folder.
2)Run command php artisan storage:link to create storage link again.
Also, you have to be sure about your upload folder name and database image addresses are the same.
Otherwise, it will broke and do not forget that it is case sensitive.Example: If image address is "jpg/photo1.jpg" on DB. Your upload folder in storage folder must be "jpg" not "JPG".

CKFinder connector.php error 500

I have a website built with CodeIgniter which, for the admin area, is using CKEditor and CKFinder to write posts for the news section.
The CKFinder image uploader was working with no problems, but two days ago I had to move the files on another server. Till then I get the 500 error when trying to upload images.
Behavior:
I open the Upload image modal window. I browse and select an image and when I click the Send to server button I get a 404 error message (the custom 404 page of CodeIgniter). In firebug it shows that there is a 500 internal server error.
File path is plugins/ckfinder/core/connector/php/connector.php and it exists on the server.
I managed to find out the problem was a file permission issue. The folder in which I have to save the images had 777 permission (and for the old server was the good one) and it needed 755 permissions.
To debug this issue i have to add :
ini_set('display_errors', 1);
error_reporting(E_ALL);
in the followings files: config.php and ckfinder.php in the root of the directory ckfinder.

Custom 404 error page

I am trying to create a custom 404 error page. The instructions that I found say to create a .htaccess empty text document when I do that Windows tells me to put a file name on it. Can someone tell what I need to do or point me to a tutorial for making custom 404 error pages?
It seems like you're just trying to make the page itself (according to the commentary on the question). To create the page just make a file of any name .html or whatever format you wish to use (.php for php for example) and write it up using your language of choice. Once you create the 404 page you need to specify it's location, assuming you're uploading this to a site of yours. This should be editable in a control panel like CPanel for example. If not, you'll need to edit your apache config to specify it's location or make and upload an .htaccess file to specify it's location.
The problem is that Windows Explorer doesn't let you create file with name .htaccess. Instead of creating the file with Windows Explorer, open a Notepad and save the file with name .htaccess. Don't forget to change "Save as type" to "All Files (*.*)", otherwise it will add .txt extension to it.
Assuming you are using Apache and .htaccess is not activated you use
# this is in .htaccess in the root directory of the webspace
ErrorDocument 404 /url/to/error/page.html

codeigniter : unable to access image inside view folder

am using codeigniter 2.
when i use the below i cant get the image.
application/views/admin/images/image.png
folder structure is correct.but the image is not coming there.from view
source option i got the following
403 Forbidden
Forbidden
You don’t have permission to access /application/views/admin/images/image.png
on this server.
am on local server wamp.
if i put the image on root i can get it
but i was uing similar folder structures with codeigniter 1.7.3 those were working for me
i dont know why its not with ci2 or i mde any mistake…..
Only .php view files are supposed to exist within the /application/views directory. You should store images in a directory like /images or /assets in the web root.
there may be .htaccess file in your root what deny write.
Rename .htaccess and try again.
if it works, you may edit .htaccess

Resources