Ronskispeed7 Posted April 23, 2010 Share Posted April 23, 2010 Hi there I have a problem with missing functionality from my site & i will try to explain this best as possible. After exceeding my storage on my server, essential parts of my database vanished. I did have a backup which i used to replace the dodgy original and my site seemed OK but i cannot update page content for error messages.(Below) Warning: fopen(../about.php) [function.fopen]: failed to open stream: Permission denied in /home/centrals/private/includes/edit_pages.php on line 422 Warning: fwrite(): supplied argument is not a valid stream resource in /home/centrals/private/includes/edit_pages.php on line 423 Warning: fclose(): supplied argument is not a valid stream resource in /home/centrals/private/includes/edit_pages.php on line 424 Warning: fopen(../../private/content/about.php) [function.fopen]: failed to open stream: Permission denied in /home/centrals/private/includes/edit_pages.php on line 427 Warning: fopen(../../private/headers/about.php) [function.fopen]: failed to open stream: Permission denied in /home/centrals/private/includes/edit_pages.php on line 485 I have been told to do a repair of my old mysql database followed by a mysqldump Edit the scripts configuration files to point to the new database Run the SQL file generated from the old database dump against the new database A lot of this advice is over my head - is there anyone who knows what I am on about and what i need to do? Thanks in advance Ben Quote Link to comment Share on other sites More sharing options...
cags Posted April 23, 2010 Share Posted April 23, 2010 Did you replace all of files on the server? The error you are getting doesn't appear to be anything to do with a database. The fwrite and fclose errors are a direct result of the fopen errors, since the file isn't opened it can't write or close it. It's saying that the fopen is failing due to permissions. This seems to indicate that you don't have write permission to the file in question, this could occur if you have replaced the files on the server as the file permissions may have changed. Quote Link to comment Share on other sites More sharing options...
Ronskispeed7 Posted April 23, 2010 Author Share Posted April 23, 2010 Thanks for getting back to me I replaced the database tables, but nothing else. If i don't have file permissions, how do i change this? The developers would want £75 an hour to do this and i wont know what they have done even if they fix it. Any more advice? Cheers, Ben Quote Link to comment Share on other sites More sharing options...
cags Posted April 23, 2010 Share Posted April 23, 2010 Ouch, I wish I got £75 an hour. Every file has file permissions set on them, this controls what/who can read/write to files. If all you have done is database changes though this should not have changed in any way. I do not see how changing a database could lead to fopen errors, unless the path is coming from the database and is incorrect. Quote Link to comment Share on other sites More sharing options...
Ronskispeed7 Posted April 23, 2010 Author Share Posted April 23, 2010 I have found out that someone updated the home directory with filezilla so i guess you are right. How do i change the permissions for each file?so that i have write permissions to update the page content? Ben Quote Link to comment Share on other sites More sharing options...
cags Posted April 23, 2010 Share Posted April 23, 2010 In Filezilla you can right click on a file and select 'File permissions'. I'm not sure exactly what values you'll need, I'm guessing that owner doesn't currently have write access, but you may have to enable public write access (avoid it if you can though as this is insecure). Quote Link to comment Share on other sites More sharing options...
Ronskispeed7 Posted April 23, 2010 Author Share Posted April 23, 2010 In Mozilla the file permissions are all the same for all files - including the pages that are no problem. Can i edit the php file? - is this an option? Ben Quote Link to comment Share on other sites More sharing options...
cags Posted April 23, 2010 Share Posted April 23, 2010 The file permissions may be the same for all files it doesn't mean they are correct for all files. If a file isn't going to be written to then it shouldn't have file write access, if it is then it should. Of course you can edit the php files, but in what way are you planning on editing them? The errors you are getting indicate that it's a permissions issue. Also don't forget to check the file permissions of the folder the file is in, this can also cause problems. Quote Link to comment Share on other sites More sharing options...
Ronskispeed7 Posted April 23, 2010 Author Share Posted April 23, 2010 So simply changing the file permissions could enable me to edit the pages and stop these error messages? Quote Link to comment Share on other sites More sharing options...
cags Posted April 23, 2010 Share Posted April 23, 2010 I don't know. All I can tell you is that the error is telling you that it doesn't have permission to open the file, thus the logically conclusion is that giving it permission to access the file will fix the error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.