For the REST API if it is enabled the documentation states
"When enabled, the built-in Bitcache server is made available at http://drupal/amf/en/bitcache/. Access to the REST API is subject to Drupal authentication and permissions." after enabling the bitache module.
When I click on the link I get "Page not found The requested page could not be found. "
When I load upload a bitstream I get the same message above if I try to access the stream. If I use fileframeowrk, I am also unable to access the uploaded files.
Am I missing something. Should I install REST API and from where. A development version for 5 is available and I am using 6.9.
If I disable REST API I get "Access denied You are not authorized to access this page. "
Please advise
Comments
Comment #1
v8powerage commentedHave You managed solve this problem? It seems that I have the same issue: #403960: Page not found errors (2)
Comment #2
Arto commented@Ali, what is your Drupal root URL? That is, if Bitcache is at
http://drupal/amf/en/bitcache/, is your website itself athttp://drupal/amf/en/or athttp://drupal/amf/? If it's the latter, I'm thinking the localization might be affecting Bitcache.@Shaman, you indicated in #403960: Page not found errors (2) a URL that started with
http://mysite.com//bitcache/; is it the case that the URL does have two forward slashes in front ofbitcache/, or was that a typo?Comment #3
v8powerage commentedThat was a mistake, but either way this doesn't works, even when I turn off rest api, then instead 404 I'm getting "You are not authorized to access this page.".
I'll give You the list of the enabled modules and their settings if that's any help:
bitcache
cck
dav
fileframework
fileserver
rdf
WebDAV (with installed HTTP_WebDAV_Server-1.0.0RC4.tgz)
Modules' settings:
DAV Settings:(admin/settings/dav)
DAV Server settings
# DAV server:
*enabled
# Allow hidden file/collection creation:
*disabled
# Enable DAV method tracing:
*disabled
DAV client settings:
# DAV client:
*disabled
Data Storage(admin/settings/bitcache)
Server settings
#Bitcache REST API:
*disabled
#Enabled features:
*GET/HEAD
*POST
*PUT
*DELETE
#Download method:
*Passtrough (4k chunks)
#Path to Bitcache executable:
*modules/bitcache/tools/bin/bit - THIS DIRECTORY IS EMPTY
File system(admin/settings/file-system)
#File system path:
*files
#Temporary directory:
*/tmp
File system backend(admin/settings/dav/dav_fs)
File system settings
#DAV file system root:
*files/dav
Files(admin/settings/file)
Visibility settings
#(all checked)
Mime settings
#Server-side MIME type autodetection after upload:
*Disabled
RDF settings(admin/settings/rdf)
Formats
*RDF/JSON application/json Yes Yes
RDF Schema
#RDFS base URI:
*http://mydomain/rdf/schema/
Maintenance
#Prevent duplicate statement insertion:
*Enabled
#Merge duplicate statements on cron runs:
*Enabled
#Purge unused resource URIs on cron runs:
*Enabled
I ommitted:
* Mappings
* Feeds
* Namespaces
* Contexts
* Repositories
Comment #4
Arto commented@Shaman, only the Bitcache settings and permissions are important. Could you post information, please, on how you've configured the permissions at
admin/user/permissions#module-bitcacheand whether you are accessing as the Drupal superadministrator (user ID 1) or as a regular user with administrative rights.Also, please consider upgrading to the new versions of Bitcache and File Framework that were released earlier today.
Comment #5
v8powerage commentedPermissions are set properly, I'm accessing as an admin with ID 1
When I click view I'm redirected to page with address like this: /bitcache/59c48c7abba4633042e02b955bba56986649189f?vid=8331&disposition=inline&op=view
but instead of image, there is message "Access Denied"
What about this?
#Path to Bitcache executable:
*modules/bitcache/tools/bin/bit - THIS DIRECTORY IS EMPTY
Comment #6
Arto commented@Shaman, you can ignore that setting. As nothing stands out, I suggest trying to upgrade and seeing if that solves the problem.
Comment #7
v8powerage commentedSo this can work without 'Bitcache executable'?
Comment #8
Arto commentedYes, that is only for special use cases such as e.g. synchronizing repositories to Amazon S3.
Comment #9
v8powerage commentedUnfortunately after update it still doesn't works. I can browse file nodes, but each time I try view, or download file, I'm redirected to a page with address like this one:
http://mysite/bitcache/59c48c7abba4633042e02b955bba56986649189f?vid=8331&disposition=attachment&op=downloadwith message'You are not authorized to access this page.'Tell me, what am I doing wrong? Is anyone made this actually working?
Comment #10
jwalkerbg commentedHello,
I am experiencing similar problem - may be the same problem. As Administrator, I am able to (1) upload files in bitcache streams, (2) to view their metadata, (3) to browse them; but I am not able to download them and to view their content. I receive an almost empty page with a single "403 Forbidden" error. This happens with the newest for the moment versions bitcache 6.x-1.0-beta2 and fileframework 6.x-1.0-alpha4 (http://drupal.org/project/fileframework). I posted at http://drupal.org/node/407018 for that problem. What is more surprising, I am able to download and view files on one site (my laptop) with the same versions of the modules. I compared the installations - they are almost the same.
Comment #11
v8powerage commentedjwalkerbg - what do You mean saying the same versions of the modules, which version You are thinking of exactly?
Comment #12
jwalkerbg commentedShaman, the both sites (one on my laptop and another on a Linux machine) have the same set of modules enabled except the View modules are not enabled on the laptop). All the modules are up-to-date -- their most recent versions are installed on both sites.
Comment #13
v8powerage commentedjwalkerbg I'm also running Linux, so that's the case of this problem I suppose… Could it be also, that it has something to do with safe_mode enabled on php?
Comment #14
jwalkerbg commentedShaman, I suppose that Linux or Windows do not matter. I will compare both php.ini files (Win vs Linux) to see if there is something different, tomorrow at work, but I am not fluent in PHP. Have You seen reports, may be there is some hint there?
Comment #15
v8powerage commentedThere's nothing in the logs. I noticed, that when I go to the http://mysite.com/bitcache there's also "Access Denied" message.
I think only Arto can solve this.
Comment #16
jwalkerbg commentedHere is what is posted by phow in the other thread about the problem : http://drupal.org/node/407018#comment-1378260
Comment #17
v8powerage commentedUnfortunately none of the posted solutions works for me :-(
I started testing this (version beta2), on the different 2 servers and I can't even upload file, because I'm getting those errors:
This one is best: * Error saving file sexbunny2.jpg. Please, contact site administrator. Yup I think I will contact me about this issue.
Did anybody else had the same issue? Can someone help me!?
Comment #18
zemial commentedI have same problem with "page not found". Everything was working with alpha2, but since i updated to beta2 and accessing ie. "/en/bitcache/03d569347685c0788574d604dbb732df621ee6fb" it gives a page not found. However if i take the "/en/" out from the link, it will give the correct file. So, something to do with localization?
Comment #19
RedSeo commentedthe both sites (one on my laptop and another on a LinuxMuhabbet machine) have the same set of modules enabled except the View modules are not enabled on the laptop). All the modules are up-to-date -- their most recent versions are installed on both sites.
Comment #20
Arto commentedGuys, access control problems are usually a matter of configuration.
First, check the
admin/settings/bitcachescreen to ensure that "Bitcache REST API" setting is enabled (which it is by default, after installation), and that the "Enabled features" setting has at least "GET/HEAD" checked (as it is by default).Then, check the
admin/user/permissionsscreen to ensure that you have granted the "access bitstreams" privilege to the user roles you are testing with.When in doubt, grant the aforementioned permission to every user role and see if that solves the issue.
As this seems a frequent issue, I will add a section about permissions to INSTALL.txt in the next release.
Comment #21
Arto commented@zemial, your problem is indeed different from the rest of this thread, and specifically related to localization.
I've committed a fix for localization issues today; please try the latest 6.x-1.x-dev snapshot which should solve any localization problems by ensuring that links to Bitcache downloads don't have the language prefix.
(As there are database updates in the latest snapshot, make sure to run update.php before testing.)
Comment #22
v8powerage commentedI done everything from #20 but this wouldn't help. I believe the problem in my case is much much more deeper, and it's not that easy to solve (I sent Arto email with my website address, to see on live site what I'm talking about).
I'm getting always this error http://drupal.org/node/408504#comment-1599228
Comment #23
v8powerage commentedComment #31
schnorte commentedIn my case the "Page not found" error was triggered by a wrong line in bitcache.server.inc in combination with mulit-language-site (localization). every url had a language prefix with is not considered in the url-checks of the function "bitcache_server".
When disabling the REST API, this function triggers the "Access denied" error mentioned above. But a change of these lines, considering that my URLs have a langauge prefix (of a string length 3 including slash) solved the problem.