Help - Search - Members - Calendar
Full Version: php fopen permission denied
Hostony Board > General Support > PHP/MySQL
daliblume
I have a subdomain of my primary domain with a php script (with permissions of 666) which can successfully call fopen($filename, "w") to create or overwrite an existing file.

I've just created a new subdomain of an addon domain, and a similar script (also with permissions of 666 cannot call fopen($filename, "w") because it gets the following error:

Warning: fopen(/home/daliblum/public_html/task/test5.xml): failed to open stream: Permission denied in /home/daliblum/public_html/task/tasks.php on line 283

regardless of whether the file already exists or not.

What might I be missing? (I don't know to do anything beyond give the php file write permission.)

Details: primary domain is "daliblume", with subdomain of "rps.daliblume". And the addon domain is "dlma" with subdomain of "task.dlma"
Alexandre
Please open a trouble ticket at

http://support.hostony.com/s
and we'll help you.

smile.gif smile.gif smile.gif
daliblume
Just FYI: The solution was to give create permissions to the directory in which the new file was to exist. (The existing script that worked was a red herring, it wasn't creating a new file, it was over-writing an existing file.)

Thanks.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2025 Invision Power Services, Inc.
IPS Driver Error

IPS Driver Error

There appears to be an error with the database.
You can try to refresh the page by clicking here