[TW5] store.php (bidix) needs an extra 'header' command

132 views
Skip to first unread message

WiM

unread,
Dec 29, 2014, 10:30:36 AM12/29/14
to tiddly...@googlegroups.com
If you want to host your own site to upload your TW5 you'll need to copy Bidix' store.php to your host.

Bidix store.php (v1.6.1 and older) will give an error because of the stricter rules for using php from other sites.
Without modifying store.php  you'll get the following error message by some browsers (e.g. opera)

     No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 

If you want to use the store.php, you need to insert the following header command somewhere at the beginning of the file to allow access to the php file from any * site.

------
<?php
header('Access-Control-Allow-Origin: *');  // insert this line as second line in the store.php file
/ * * *
----

Replace the * by a specific url if you only want to allow upload from only one site.

Best Regards
WiM

Jeremy Ruston

unread,
Jan 2, 2015, 12:23:48 PM1/2/15
to TiddlyWikiDev
Hi WiM

At the moment, tiddlywiki.com links to BidiX's repo for the source of store.php, and of course we can't update that repo. So to incorporate this update we'll have to adopt/fork BidiX's code into a new repo. The obstacle to doing that is that I am not sufficiently experienced with PHP to maintain that code. Is there anyone who can step up as a new maintainer for the PHP code?

Best wishes

Jeremy.



--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

WiM

unread,
Apr 2, 2016, 2:09:06 PM4/2/16
to TiddlyWikiDev, jeremy...@gmail.com
Hi,

the source file store.php (by bidix) to allow uploading your tiddlywiki to your own webspace.
is hard to find (many dead links) therefore I've included a link to v1.6.1 


You need to add the extra line 
    header('Access-Control-Allow-Origin: *'); 
as specified in my 1st post, to make the store.php work.

enjoy

WiM

Jeremy Ruston

unread,
Apr 3, 2016, 2:51:49 PM4/3/16
to WiM, TiddlyWikiDev
Hi WiM

Many thanks. I think it would be useful to include the code in a TiddlyWiki GitHub repository to make it easier to find and improve in the future. Are you familiar with GitHub and able to send a pull request?

Best wishes

Jeremy.
Reply all
Reply to author
Forward
0 new messages