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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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;
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
You need to set the permissions of all your new files and directories. 755 is recommended.
Yes, I'm sure have set it to 755
Last edit: xiaofo 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.
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
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
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.
@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.
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