I can't access my theme .php pages

Hello; I just installed Zenphoto on my website (hosted by Netfirms), and cannot edit the theme template file pages even after duplicating the theme. When I click on, for instance, "index.php", absolutely nothing happens. I tried this in three different browsers (Firefox, Chrome, and IE), and they all have exactly the same problem.

I went to the error log, and saw this message:

{Tue, 22 Oct 2013 05:07:20 GMT} Zenphoto v1.4.3.2[10732]
Backtrace: USER ERROR: Cannot edit this file! in /hermes/bosoraweb064/b1393/nf.nathanbauman/public_html/photography/zp-core/functions-basic.php on line 900
trigger_error called
from zp_error (functions-basic.php [900])
from admin-themes-editor.php [86]

--
I do have the master account, and all permissions are associated with my account. Please help--and thank you very much for anyone who might be kind enough to offer assistance.

Comments

  • acrylian Administrator, Developer
    Are you accessing the files via the built in theme editor? Then it will a file/folder permissions issue. Edit the files direclty via FTP instead which with a proper editor is more convenient anyway.
  • Thank you, Acrylian. I have been trying to do this via the theme editor, but as far as I can see, all permissions have been given to me as the Master account holder. I hadn't thought of editing the files another way, but perhaps that's what I should do. Still, it's a series of extra steps that I'd prefer to omit since I should be able to edit from the theme editor.
  • When dealing with permissions you need to be aware of:

    1. The user used for FTP uploads. That user will own all files uploaded in this way (presumably your installation scripts.)

    2. The user that WEB applications run under. This user will own all files created by Zenphoto.

    3. The master user. This user will own any other files.

    Ideally all three users should be the same. Unfortunately that is not always the case. Sometimes you can overcome this by setting up groups that these users all are members of. Then set the Zenphoto permissions to group ownership.

    Sadly, all this is quite server dependent, so you and your hoster are the only ones who can resolve the issues.
  • Hmm: I'm afraid I'm not sure what I should do. I have just sent a support ticket request to my hosting provider, though. Thank you, sbillard.
  • After much back-and-forthing with my hosting company's support, I got this message this morning:
    Thank you for getting back to us.

    The Zenphoto interface loads blank when trying to edit files of your theme, it appears to be due to a bug in the application. I suggest that you try installing any of its previous version and recheck editing theme.

    If you have any further questions, please update the Support Console.

    Sincerely,

    [name redacted]
    Senior Technical Specialist
    If anyone has any ideas, I'd be most grateful to them for sharing them with me.
  • The above error comes from the following test:
    `if (!in_array($file_to_edit, $themefiles) or !isTextFile($file_to_edit) or filesize($file_to_edit) == 0)`

    So, the only way forward is to list out the various parts of the test.

    What is the contents of the `$themefiles` variable?
    What is the result of the `isTextFile($file_to_edit)` function call?
    What is the result of `filesize($file_to)edit)`?

    Any one of these may be failing on your particular server though all work in our testing.
Sign In or Register to comment.