In my AwardSpace TWDB my app writes to several files all called database.json that are in different folders which all have their own getvalue/storevalue php files to read and write to and from these database.json files. There is also a file called .htaccess in the root folder. This all works fine.
I am trying to create the same set up in a different server but irrespective of what folder I point the app at, it only read/writes to/from the database.json file in the root folder.
All permissions are the same throughout.
I have tried renaming the other database.json files
Hope that makes sense.
Any pointers much appreciated.
This is a php tinywebdb yes?
Yes it is.
Can you give an example of the folder structure / urls used ?
Also might be worth removing the .htaccess files in case these are interfering or incorrect for your new server?
(We both have working examples, so between us we should be able to figure it out!)
Also we would need to see your relevant blocks....
It doesn't work at all without the .htaccess file, I'll get the rest to you asap...
Do you get the same problem if you send data using your browser ?
I'll try that...thanks
These are the blocks I'm using to test the new server.
For testing, I'm changing the target folder manually in the TWDB Service URL box in the designer screen.
If I wanted to save a tag and value to the Links folder, my service url would then be:
(can't use x's so used tildas ~)
and to test with a browser:
These are 'not allowed' on my current server, the one that woks fine.
Yes, but http:// not https://
Don't understand this ?
I've just noticed that in the Service URL box in the App it says http:// but when I go to the site it shows https://. Might that be an issue?
Possibly....depends if it is https and how an http call (instead of an https call) is handled by the DNS
Going back to your comment here...should it all work fine without this file?
If so...what is this file for?
I don't have an .htaccess file in my php tinywebs and they work OK.
The .htaccess file is used to control access to the files and directories.
Have you had any success posting data to respective tinywebdbs via your browser ? This should tell us if it is a server issue or an app issue.
Ok, I'm confused as to why it doesn't work without the .htaccess file and I've never been able to store or get value via a browser. It always says 'Not Allowed' but my apps work fine. Just not on the new server.
If using the tinywebdb component blocks, and if I remember correctly, the store php file needs to be called -
yours are called Storevalue.php ?