Image delete (or unlink) problem
- Single Page
Posted 26 September 2012 - 13:32 PM
Uploading is fine, but when I try to remove the file, the ajax call gives a 400 bad request error: The URI you submitted has disallowed characters.
The url that is invoked is the following:
http://domain/admin/crud/configurations/delete_file/background_image_landing/7a16f-logo.jpg?_=1348664745109
It seems to hava a problem with the part from and including the ?.
Anyone an idea to fix this (without allowing ALL characters in permitted_uri_chars.
Posted 26 September 2012 - 20:38 PM
Posted 22 January 2013 - 15:46 PM
DId you solved the problem???
I'm having the same issue on the following link from firebug:
"NetworkError: 404 Not Found - http://MYDOMAIN.com/...=1358869199998"
Where image1 is column that stores image url.
The return from the above url is hovever:
{"success":true}
My permitted chars settings from config are:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
Please help out.
P.S. I'm using HMVC if that helps.
P.S.2. Image is being deleted from both db and uploads folder.
Posted 23 January 2013 - 06:17 AM
What can be the issue? :|
I have no errors on my server error.log from root section, and I don't know where/how to debug more.
Posted 23 January 2013 - 08:48 AM
For anyone who is having this kind of issue take a look at your root .htaccess file.
This is my current .htaccess file which is working right:
## Set up mod_rewrite
<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
# disable the Apache MultiViews directive if it is enabled on the server. It plays havoc with URL rewriting
Options -MultiViews
RewriteEngine on
# Keep people out of codeigniter directory and Git/Mercurial data
RedirectMatch 403 ^/(system\/cms\/cache|system\/codeigniter|\.git|\.hg).*$
# Send request via index.php (again, not if its a real file or folder)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
</IfModule>
It's taken from pyrocms file since I haven't found a default CodeIgniter .htaccess anywhere ... Default CI .zip package is coming without one.
Posted 27 January 2013 - 05:56 AM
Here is mine:
<IfModule mod_rewrite.c>
Options +FollowSymLinks -Indexes
RewriteEngine On
RewriteBase /~gofrendi/module-devel/
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>
The CodeIgniter application is accessed by using this url: "http://localhost/~gofrendi/module-devel/"
So, adjust it with yours