-
Posts
818 -
Joined
-
Last visited
-
Days Won
6
Everything posted by benbyf
-
think maybe my Headers are still wrong as it has a problem when seeking - gives me a "video or MIME type not supported" error
-
cooooooooool, will try and amend. Your 2 cents is super useful but seems your code was a mix of your suggestions and code needing amending no? bit confusing sorry
-
please see this post if your having issues with byte-range request validation on itunes:
-
That anwser did the trick i think, i managed to make the implementation below. It must have been a new itunes requirement for byte-range headers. $filesize = filesize($page->mp3->httpUrl); $offset = 0; $length = $filesize; if ( isset($_SERVER['HTTP_RANGE']) ) { // if the HTTP_RANGE header is set we're dealing with partial content $partialContent = true; // find the requested range // this might be too simplistic, apparently the client can request // multiple ranges, which can become pretty complex, so ignore it for now preg_match('/bytes=(\d+)-(\d+)?/', $_SERVER['HTTP_RANGE'], $matches); $offset = intval($matches[1]); $length = intval($matches[2]) - $offset; } else { $partialContent = false; } $file = fopen($page->mp3->httpUrl, 'r'); // seek to the requested offset, this is 0 if it's not a partial content request fseek($page->mp3->httpUrl, $offset); $data = fread($page->mp3->httpUrl, $length); fclose($page->mp3->httpUrl); if ( $partialContent ) { // output the right headers for partial content $headers = array( 'HTTP/1.1 206 Partial Content' => true, 'Content-Type' => 'audio/mp3', 'Content-Length' => $filesize, 'Content-Disposition' => 'attachment; filename="' . $fileName . '"', 'Content-Range' => 'bytes ' . $offset . '-' . ($offset + $length) . '/' . $filesize, 'Accept-Ranges' => 'bytes', ); // send partial file wireSendFile($page->mp3->filename, $options, $headers); }else{ // send file wireSendFile($page->mp3->filename, $options); }
-
could be the case.
-
im still puzzled why it works on the same infustructure but different versions of PW.
-
not sure how to do that in PW. But also it's mega strange it works on my v2.7 install but not on v3.
-
related to this topic on wireSendFile(). I've been trying to create a RSS feed for a podcast which i've done previously using PW 2.7.2 with no trouble (e.g. http://machine-ethics.net/), however sitting on the same infustructure a new site (http://www.threepointspodcast.com/) on PW 3.0.42 is having issues validating with itunes with this error from them: Can’t submit your feed. Your episodes are hosted on a server which does not support byte-range requests. Enable byte-range requests and try again. Which is obviously untrue as the other podcast works fine. Just wondering if there's something I need to add in the template settings etc to make it work, I'm currently running the .mp3 file out using wireSendFile() and setting the type to application/mp3 in template settings but with no avail. I'm running nginx. Any help would be appreciated.
-
working now including the <?php namespace ProcessWire; Thanks!
-
Do i have to be explicit in my templates about the namespace?
-
thats the strange thing, found it in there but obviously not getting called from templates for some reason.
-
having errors using wireSendFile() method, was it taken out of PW and if so was it replaced by anything in v3?
-
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'hortons.pages' doesn't exist (in /srv/users/serverpilot/apps/hortons/public/wire/core/WireDatabasePDO.php line 439) Getting this error after upgrading from 2.4 to 2.8 then exporting the site profile and installing on the latest version of v3. Anything I could do about this, anyone come across this? thanks Edit: The issues started going from 2.4 to 2.8 - I used the upgrading advice on the github, replacing PW files. Im running ubuntu 14.4.x using serverpilot.io. The site hosting was originally not controlled by me so am trying to rehost and upgrade.
-
Changelog support in ProcessWireUpgrade module
benbyf replied to szabesz's topic in Wishlist & Roadmap
+1 -
i love bringing people together
-
no worries, interesting to know whats out there etc
-
Am i right in saying Auth0 passwordless is based on the magic link, could we not take the idea and make a implmentation of our own in PW as there doesnt seem to be too many moving parts.
-
looks interesting, does a magic link solve this issue for you guys then you think as there's no passwords present just a mobile or email?
-
Can ProcessWire do this? (User Management, Profiles, Search)
benbyf replied to Kai's topic in Getting Started
check out my module subscriber for some implementation of how you might add users and profiles but without giving them access to the PW "admin". Also note that I'm looking to give this module an overhale soon as it presumes ALOT of the developer using it currently.- 23 replies
-
- search
- user-management
-
(and 1 more)
Tagged with:
-
Hi, I posted a question on Stack and as yet not got an anwser that is something novel. I'm interested to know if this worries anyone else and whether we can do something about it. So here goes: If a user logins to your online sevice, let's say a job posting site, they give you an email and password to access your service later... Lets say a malicous person with access to the server could write into the template to store the passwords as plain text somewhere. Given that people generally don't use a new password for each website, now that malicious person has the potential to access other online services using these details (where there isn't any secondly security like 2-factor). Is there anything we can do to battle this? In an ideal world, maybe setting up a zero-knowledge algorithm to log people in and out... https://security.stackexchange.com/questions/155806/what-to-do-about-compremised-passwords-through-malicious-sites-or-site-hacks/155823#155823 food for thought
-
this module still working, up-to-date? super useful for people getting annoyed with wordpress and migrating.
-
let me know if you still need any help.
-
Work in progress modules Subscribers / WireMailChimp
benbyf replied to benbyf's topic in Module/Plugin Development
im looking to revamp the Subscribers module soon and create a site to show its implememtation - I was thinking a simple job listing CV site unless someone could think of anything better?- 18 replies
-
- 2
-
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
this is PERFECT thanks! I never knew!
-
might address this somewhat with the revamped subscribers module which im going to be working on soon... what did you want to see? I though of putting together a site profile job site as an example of how to use it in production.