Menu

Error build a new HTML page

Help
xiaofo
2018-10-16
2018-10-16
  • xiaofo

    xiaofo - 2018-10-16

    I followed the wiki to build a new HTML page tutorial.Always wrong
    https://wiki.phpgedview.net/en/index.php/Build_a_New_Menu

    I created page.php in the installation directory, and created a new pages directory, I put an html file in the pages directory, I browse the access prompt
    HTTP ERROR 403
    Who can help me, thank you!

     
  • Gerry Kroll

    Gerry Kroll - 2018-10-16

    You need to set the permissions of all your new files and directories. 755 is recommended.

     
    • xiaofo

      xiaofo - 2018-10-16

      Yes, I'm sure have set it to 755

       

      Last edit: xiaofo 2018-10-16
  • Gerry Kroll

    Gerry Kroll - 2018-10-16

    You can only get a 403 error if the permissions are wrong, the .htaccess file is preventing access, or if the URL used to access the new page is constructed incorrectly.

    There's a fair bit of code in /includes/session_spider.php that verifies the incoming URL. Something in that could be stopping you, although for most of these errors, you'd get a "You are not welcome here" message in addition to posting an HTTP 403 error and a suitable entry in the PhpGedView log file.

     
  • xiaofo

    xiaofo - 2018-10-16

    I know where the problem is.
    There is no description in the wiki, you must have this code.
    define('PGV_SCRIPT_NAME', 'page.php');
    Sessions.php will detect if there is this code

    if (!defined('PGV_SCRIPT_NAME')) {
        header('HTTP/1.0 403 Forbidden');
        exit;
    }
    
     
  • xiaofo

    xiaofo - 2018-10-16

    When I'm entering aaa.com/page.php?page=join.html, the page display error:
    You Are Not Welcome here.

     

    Last edit: xiaofo 2018-10-16
  • xiaofo

    xiaofo - 2018-10-16

    I know what the reason is. Just look at the session_spider.php code and find that you can't request a join parameter. I modified the file name and everything is fine now.

     
  • Gerry Kroll

    Gerry Kroll - 2018-10-16

    @xiaofo:

    I'm pleased that you were able to resolve the problem without making any changes to PhpGedView.

    What is the purpose of the new page you have created? Could it be useful to other users too?

    If it contains any text (Chinese or otherwise) that is viewed by users, that text should be in language variables. We try to avoid hard-coding text that an "ordinary" user can see.

    I can assist in making that happen.

     
    • xiaofo

      xiaofo - 2018-10-16

      Thank you!
      I need your help, how can I make a custom page like the welcome page, can I customize the html block?
      I am going to create two new pages. One is to put in the sequence of writing genealogy articles (my family started from the Yongzheng period of the Qing Dynasty, and when compiling the genealogy, they will write an ancient text explaining the reasons and process of editing the genealogy). Another custom page, I am going to do a tutorial (including images and text) that tells the user how to register and add information to the family tree. Although it is also possible to add information in faqlist.php, it lacks anchor positioning and link jumps. If the page has a lot of content, it is very inconvenient to browse.

       

      Last edit: xiaofo 2018-10-17

Log in to post a comment.