Fatal Error When Editing Theme

Hi All. Another covnert to Zenphoto here. Got my installation all up and running so now I want to creat my own theme. I duplicated the default theme and gave it a unique name. Click on the edit button and selected on of the theme pages to edit only to get this error:

Fatal error: Cannot edit this file! in /homepages/15/d81613494/htdocs/edsonwindows/zenphoto/zp-core/functions-common.php on line 280

I've searched extensively on this forum and Google for a solution without any luck. I've tried emptying the cache and cache_html folders as well as chmoding them and the themese directory to 0777. No difference. I've also checked the debug logs and all I have is this:

{30787:Tue, 15 Jan 2013 11:15:43 GMT} Zenphoto v1.4.4[6df48ec7778ed503a6d892361c95ca84a9d7d7ac] USER ERROR: Cannot edit this file! in /homepages/15/d81613494/htdocs/edsonwindows/zenphoto/zp-core/functions-common.php on line 280 trigger_error called from zp_error (functions-common.php [280]) from admin-themes-editor.php [86]

Has anyone any ideas please:

Host: 1and1
Mysql: 5.0.91
PHP: 5.4.10
Browsers: IE9 and Firefox 18

Thanks.

Comments

  • acrylian Administrator, Developer
    Anything else on the server error log or any stack trace in the Zenphoto debug log?

    I recently discovered that on PHP 5.4 the upload via the backend does not work on my server but with php 5.3 it does. The reason is some security measures on the server (not clear if a server config issue though yet). Anyway, if you can switch maybe try PHP 5.3

    I virtually never used the theme editor. I actually would suggest to edit the files via FTP using a proper text editor with syntax highlighting. that is much more convenient.
  • There are a number of possible causes for this error so without some other error indicators we cannot know exactly. All the possibilities seem to indicate something wrong with the copy of the theme when you duplicated it.
  • Thanks for the feedback. I've tried duplicating other default themes and all the copies all exhibit the same error when trying to edit. I have also created a theme from scrathc using the tutorial and default .php files. This also exhibits the error when trying to edit.

    I agree that editing the files by ftp/Notepad++ (my preferred editor) is probably the way to go and this is how I have been editing the thems onces I was unable to so from with Zenphoto itself.

    I have also tried setting the PHP version back to 5.2.17 but the error still persists.

    This might be a quirk with my host 1and1, as I have had to find workarounds for other CMSs and CRMs I have installed in the past. It's just a needle in haystack scenario trying to find out where the problem actually is.
  • Given this extra detail I would guess a file permissions problem. Or something like a security setting that results in not being able to read the files.

    But as you have observed, this is a needle in haystack type thing when there is not any other error indicators shown.
Sign In or Register to comment.