File Opening And Editing With PHP

I have this file opening and editing script on my page for a few months. It basicly uses fopen and it was working fine a while ago but recently it stopped working. I have not edited the code. Were there any permisson changes to the hosting?

It looks like this:

[mysecondsubdomain]
(opening and editing script)

[mysubdomain]
(file thats being opened and edited)

The script on another subdomain edits the file that is on a different subdomain. It was working perfectly fine before.
Could anyone please help me?

I’m not sure, but it sounds like that should never have been possible to being with. This security system should prevent automatic data transfer between websites impossible. It could be possible there was a bug before where this was possible, but it has since been fixed.

Nevertheless, I can’t help you make something work which should not work to begin with.

Oh… Well then is it possible to somehow have a file that shares both websites? The first one only stores the file and adds a new line to it, and the second needs to read it and edit it.

@datejer said:
Oh… Well then is it possible to somehow have a file that shares both websites? The first one only stores the file and adds a new line to it, and the second needs to read it and edit it.

If both domains are on the same hosting account, you could both give them access to the same MySQL database. But having websites interact with each other using files or HTTP is not possible.

But i need to edit a file not access a database. Is there any other way we could get

@datejer said:
But i need to edit a file not access a database. Is there any other way we could get

Yes, start using a database to store data.

Ok, i got it. I moved the files from the second subdomain to the first one to a different folder and I’m just redirecting the second subdomain to the folder in the first one. Problem kinda solved.