I’ve always used MySQL with PHP and on my site I added a chat system that uses MySQL which as you would know is VERY database heavy so I think I’m going to switch it over to XML files for each user just for the chat system to take all the load off of the DB.
I have never used XML with PHP before so I was looking for information, and found that the queries are pretty similar to MySQL.
Here are my questions:
- Is it the client writing to the file or the server writing to the file?
- Do I have to
chmodthem as 777? - Do I also have to
chmodthe XML file as 777? - If I do have to set the permissions to 777, does that drastically decrease security and is there any way to tighten that up?
- Does anyone have any tutorials they would recommend me to as well? Most of the stuff I found is from 2003 – 2005. Don’t know how much has changed in it.
Hope it’s cool I ask this question here.
Thanks a bunch
-Sal
First off, it seems like a very bad idea to do something that is very database intensive in xml, it is going to be a lot more intensive that way.
To answer your question; It is always the server writing to the server filesystem. you only need to provide write access to the user running apache (and consequently php).
I suggest you stick with mysql for chat but look into DOMDocument to learn more about xml