Hello I have a php issue. Can anyone help me out?
This is regarding a Content Management System in a web site I'm building... When the site is live and I attempt to update the content and save; it gives me the following and fails to save the change just made:
Warning: fopen(/home/trattoria/public_html/htmlarea2/widget2data/content.html): failed to open stream: Permission denied in /home/trattoria/public_html/htmlarea2/htmlarea.inc.php on line 68
Warning: fputs(): supplied argument is not a valid stream resource in /home/trattoria/public_html/htmlarea2/htmlarea.inc.php on line 69
Warning: fclose(): supplied argument is not a valid stream resource in /home/trattoria/public_html/htmlarea2/htmlarea.inc.php on line 70
This is what the coding as it reads in dreamweaver..
line 67--> if ($ta) {
line 68--> $f = fopen($newsfile,'w');
line 69--> fputs($f,stripslashes($ta));
line 70--> fclose($f);
}
And then at the bottom in "server markup" it says this:
Server markup:
// this should be called from the config.inc.php file
// it will crap out if it's missing it's config directives
if (!$admin_pwd) { die ("misconfigured script!"); }
So i tried putting the direct folder route after the $ symbol.. but?
I was also thinking maybe it's a permissions issue? -- So I changed the permissions to *777* nothing happens.
Can you help me with this>>??
--db
php issue: Please help
Moderator: General Moderators
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: php issue: Please help
Yes, it's a permission error. You don't have permission to write to the file. How are you managing things? Is it a virtual dedicated server, a shared host, or what? What are the permissions on the file? (I know you set it to 777, but you may not have permission to chmod).
Re: php issue: Please help
Johan,
I am managing this through firezilla,
The permissions on the files are drwxr-xr-x and drwxrwxr-x
I had the host provider reset the permissions on the server so I think I now have permission to chmod; though I'm not positive what the file permissions need to be set to.
Thanks for helping me.
I am managing this through firezilla,
The permissions on the files are drwxr-xr-x and drwxrwxr-x
I had the host provider reset the permissions on the server so I think I now have permission to chmod; though I'm not positive what the file permissions need to be set to.
Thanks for helping me.