Jump to content

Archived

This topic is now archived and is closed to further replies.

Ronskispeed7

Custom CMS nightmare

Recommended Posts

 

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.