Running v3RC1 (had this same prob on b5, didn't try this before that version)...
I'm having a problem with changing the index directory setting... I've setup a /etc/phpGedView/index directory which is outside my webroot. This is owned by apache, has proper rights too...
I copied over the old index directory contents to the new one above. Then I set the index dir value in the Admin->Config menu to point at that new location. Also set the gedcom settings (under Admin->Manage Gedcoms->Edit) to the same directory.
All good so far: Imports look to the new location for the gedcom and are properly processed. Files are updated in the /etc/phpGedView/index directory.
I then removed the family.ged file from the old spot, still ok. Saved the configuration again, to make sure the new directory was updated... and yes, /etc/phpGedView/family.ged_conf.php was updated. So, lets "chmod 000 {webroot}/phpGedView/index"
Now I receive the following error:
Warning: main(./index/family.ged_conf.php): failed to open stream: Permission denied in /var/www/html/phpGedView/session.php on line 193
Fatal error: main(): Failed opening required './index/family.ged_conf.php' (include_path='.:/usr/share/pear') in /var/www/html/phpGedView/session.php on line 193
Looks like session.php is not looking at config.php for the proper location of that file.
Note: removing only the family.ged file does not protect privacy. The family.ged_index.php file also contains EVERYTHING. So I figured it'd just be best to hide/delete the entire index directory.
Regards,
Jason
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had a LOT of trouble doing this myself, but it all turned out to be user error. Keep trying.
May I say it is worth it. Here are the benefits:
-Security
-Simplicity of upgrade. You simply unzip PGV to an pgvupgrade directory, copy over config.php, and you are up and running. Usually no chmod 777 involved.
-Testing multiple setups with one database. At my web site, the same three GEDCOMs are currently running from both http://www.hawsedc.com/phpGedView and http://www.hawsedc.com/pgvupdate. I don't represent that this is recommended, but you can edit from either and view from either.
I love it.
Tom
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok so here is how I fixed it. I renamed both my old and new index folders, replaced config.php with the original file. I then created a new index folder outside my public http folder.
Ran the config from scratch, and verified all writes were to the newly created folder. Once done and known to be working I downloaded both the working and non working index folders. Used WinMerge to compare the files.
Found gedcom.php has config string data that points to:
./index/%users_gedcom_file_name%.ged_conf(or priv).php
Thus fixed. So the real config file that needs to be modded is gedcom.php (provided the index folder is being moved.)
This should be rewritten or clariffied within the security section of the guide. I know I missed it as well as others. It is there but easily overlooked. This should also be added to both the word and pdf guides as well.
Hope this helps someone,
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Before changing the index directory, you should first delete your gedcoms, then move any leftover files in the index directory to the new location and then change the configuration.
If you want to move the index directory after you have added gedcoms, you will need to manually edit the gedcoms.php file to change the configuration locations.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That does it. I think the first time I configured my site this way I did it from scratch, thus didn't notice this earlier. Simply deleting the gedcom entry and re-adding it fixed the problem.
Thanks for looking into this. Of course, this is up to Mr. Finlay, but I think this should be fixed. If anyone modifies their config, the change should be globally referenced... they shouldn't have to delete/re-add gedcoms to clean up the config.
I don't believe this is "user error"
Regards,
Jason
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've changed the gedcoms.php file to store a relative location to the index directory instead of a static one. So this issue should be resolved by v 3.0 final.
--John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was trying to catch up on the posts today and noticed I accidently used some profanity (my last message, last sentence). This was not intentional. I'd like to appologize if anyone was offended, if you wern't offended, sorry anyhow.
John
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Running v3RC1 (had this same prob on b5, didn't try this before that version)...
I'm having a problem with changing the index directory setting... I've setup a /etc/phpGedView/index directory which is outside my webroot. This is owned by apache, has proper rights too...
I copied over the old index directory contents to the new one above. Then I set the index dir value in the Admin->Config menu to point at that new location. Also set the gedcom settings (under Admin->Manage Gedcoms->Edit) to the same directory.
All good so far: Imports look to the new location for the gedcom and are properly processed. Files are updated in the /etc/phpGedView/index directory.
I then removed the family.ged file from the old spot, still ok. Saved the configuration again, to make sure the new directory was updated... and yes, /etc/phpGedView/family.ged_conf.php was updated. So, lets "chmod 000 {webroot}/phpGedView/index"
Now I receive the following error:
Warning: main(./index/family.ged_conf.php): failed to open stream: Permission denied in /var/www/html/phpGedView/session.php on line 193
Fatal error: main(): Failed opening required './index/family.ged_conf.php' (include_path='.:/usr/share/pear') in /var/www/html/phpGedView/session.php on line 193
Looks like session.php is not looking at config.php for the proper location of that file.
Note: removing only the family.ged file does not protect privacy. The family.ged_index.php file also contains EVERYTHING. So I figured it'd just be best to hide/delete the entire index directory.
Regards,
Jason
I too get this error however after confirmation of configuration saved to new location, I renamed my index folder to old.index and bombed out too.
Thanks
John
Jason,
I had a LOT of trouble doing this myself, but it all turned out to be user error. Keep trying.
May I say it is worth it. Here are the benefits:
-Security
-Simplicity of upgrade. You simply unzip PGV to an pgvupgrade directory, copy over config.php, and you are up and running. Usually no chmod 777 involved.
-Testing multiple setups with one database. At my web site, the same three GEDCOMs are currently running from both http://www.hawsedc.com/phpGedView and http://www.hawsedc.com/pgvupdate. I don't represent that this is recommended, but you can edit from either and view from either.
I love it.
Tom
Ok so here is how I fixed it. I renamed both my old and new index folders, replaced config.php with the original file. I then created a new index folder outside my public http folder.
Ran the config from scratch, and verified all writes were to the newly created folder. Once done and known to be working I downloaded both the working and non working index folders. Used WinMerge to compare the files.
Found gedcom.php has config string data that points to:
./index/%users_gedcom_file_name%.ged_conf(or priv).php
and changed it to my new path of:
../../index/%users_gedcom_file_name%.ged_conf(or priv).php
Thus fixed. So the real config file that needs to be modded is gedcom.php (provided the index folder is being moved.)
This should be rewritten or clariffied within the security section of the guide. I know I missed it as well as others. It is there but easily overlooked. This should also be added to both the word and pdf guides as well.
Hope this helps someone,
John
Before changing the index directory, you should first delete your gedcoms, then move any leftover files in the index directory to the new location and then change the configuration.
If you want to move the index directory after you have added gedcoms, you will need to manually edit the gedcoms.php file to change the configuration locations.
--John
That does it. I think the first time I configured my site this way I did it from scratch, thus didn't notice this earlier. Simply deleting the gedcom entry and re-adding it fixed the problem.
Thanks for looking into this. Of course, this is up to Mr. Finlay, but I think this should be fixed. If anyone modifies their config, the change should be globally referenced... they shouldn't have to delete/re-add gedcoms to clean up the config.
I don't believe this is "user error"
Regards,
Jason
Jason this does work as advertised and how the documentation describes it. However I agree with you that this need to be fixed.
I wasn't worried about the security at first, yet I moved the folder after the site was up for a while for security reasons.
If one was to change or update the index path, then shit should auto update gedcoms.php in the new index folder.
John
I've changed the gedcoms.php file to store a relative location to the index directory instead of a static one. So this issue should be resolved by v 3.0 final.
--John
All,
I was trying to catch up on the posts today and noticed I accidently used some profanity (my last message, last sentence). This was not intentional. I'd like to appologize if anyone was offended, if you wern't offended, sorry anyhow.
John