cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot install PhpGedView

jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Cannot install PhpGedView

Having  been running successfully on  a  local  machine  for  the  last 3 months  PHPGedView (genealogy software) version 4.2.3, (PHP5 compliant) I thought  it about time  to  go “live” following the  introduction  of the  new  CGI platform  by  PN
After  unploading the  zip  file  and  unzipping  to the  server,  no  probs.  I  have set the the file and directory permissions as  per the advice  on the  forum  and  with the  help  of  the  script  from  Gabe  (TY for that) but whatever I do the installer is not writing the configuration to config.php,  and  although about  5 tables are  created  on humbug,  the  install stops adding  anymore tables  to  the  database. Oddly  the installer does a check on config.php and states that it is writeable???
The  error message
SQLSTATE 42000: Syntax error or access violation: 1142 INDEX command denied to user 'myusername'@'***.***.*.208' for table 'pgv_messages'Is  returned.
It  suggests  from  error  code 1142 that I  don’t  have enough privlieges to perfom such an SQL command. In fact  phpMyadmin  states "no  privileges"  under  create  new database,  but  I think  that is standard on  my type  of account. Has  anyone else  had  this  problem? Or  is  just a case that  PN can  alter the  privileges to  mySQL?
Thanks
14 REPLIES 14
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: Cannot install PhpGedView

You should be able to create indexes but we don't allow you to have more than one database per account, so you can't create new ones.
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: Cannot install PhpGedView

Hi dazed,
I'm glad I'm not the only one having problems - see my post at http://community.plus.net/forum/index.php/topic,84399.0.html.  Like you, I'm seeing config.php flagged as readable when it appears not - but all my initial tables DO get created so I don't see the error message that you quote.  I just get ... nothing!  I don't understand Ben's response as PGV just creates its required tables in the default database.
Hope we can get this sorted. I suspect a ticket to PN may be needed.  My PAYH site is fine, so at least I can redirect PGV to that for the moment. 

Stuart
jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Re: Cannot install PhpGedView


Thanks  to  Stuart and  Ben  for the  replies.
Ben,  I think  you  misunderstood  me. I  do  know  that  my  account  only allows  1 database.  As  Stuart has  correctly said,  “PGV just creates its required tables in the default database”.
The  install  does  start to  create the  tables, 
• pgv_blocks
• pgv_favorites
• pgv_messages
• pgv_site_setting
• pgv_users
Then  stops  with the error  message “1142 INDEX command denied to user”.
The  config.php is not being written to, so the installer then stops with the  above error message  and  prevents the  creation  of an  admin  account as  it  is  attempting  to  read      the  database  parameters and  settings from  config.php which  only contains  the original  install default  settings. From then on nothing  else  functions and each attempt to  open the  program  from the  browser  just returns you to  install.php and around  we go again.  Consequently  the gedcom  files cannot  be  loaded and  everything  is  frozen.  It cares  not if the  initial tables that are created  in the  install are  still  present  in  humbug,  or  if they are dropped. 
Editing  config.php with the correct  database  values,  passwords and  variables, just  results  in ERROR 256: PGV_DB::createInstance() must be called before PGV_DB::getInstance(). Which  is  obvious because  the tables  have  not  been initially  created in the database!
What  I don’t  understand this  version  of  PGV (4.2.3),  has  been  very  happy  on  my  localhost  which  is  running PHP5.3.1 and  mySQL server version: 5.1.41.
I have  also  tried an earlier an earlier  version  of  PGV(4.2.1)  a  non-PDO release  with  the  same  result on  PN CGI server.  This earlier  version  is has  also  been very  happy  running on  my localhost.
I have  tried changing  the  privileges of the  PGV files config / install / index.php etc  to  710 and 750  but  nothing  changes. Everything  I  can  find or  understand suggests  a  write  permissions  problem.  Is  it  possible that SuExec is  causing  the  issue  by  not allowing  full  permissions  on  the PGV files?
PGV requires that Read permissions be set for all files in its directory tree,  full Write permissions on the index directory (chmod 777)and  also  set temporarily for the config.php file during  installation.
The problem appears  to  be  very  similar to  Stuarts http://community.plus.net/forum/index.php/topic,84399.0.html
Should I raise a  ticket?
Thanks again.
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: Cannot install PhpGedView

Have you given the 'full write' permissions you mentioned to the index directory? If you have I would expect suEXEC not to change to the user, and things wouldn't work.
I believe permissions 0750 should be sufficient, with config.php set to 0700, or 0750 at the most.
David
David
jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Re: Cannot install PhpGedView

Hi  David.
Thanks  for the  reply,  but  yep  been  there  quite  a  few  times changing to chmod 700  / 750 makes  no difference to the  problem.  The  documentation suggests  config.php / index directories  all set at chmod 777,  which  we  know  is  no longer  allowed  on this  new  platform.  My  initial  thought  when this  error  occured  were  permissions  set  on the  mySQL side  of things,  hence the  SQLSTATE 42000: Syntax error or access violation,  that  preceded the  1142 INDEX command ...... error.
I think  I  shall  have  to  revert back to  running  it  on  my  localhost  here  with  limited  http  access  to  known and  trusted  souls!
Thanks again,  james
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: Cannot install PhpGedView

Dazed,
I have a partial work-around. The problem appears to be with the Apache mod_security. If I include a .htaccess in the PGV root my installer runs successfully.
Could you try this just to confirm or otherwise.
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

This will now run as www.site_name/~site_name~/PGVhome_dir/login.php ; so its not quite there but at least it works after a fashion.
Question 1:  How can I use htaccess to redirect to the "non-~" hostname?
Question 2 for PN : Why do I have to disable mod_security?    I have never seen this on any other site?
Stuart
(I will add this to my own forum post too)
jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Re: Cannot install PhpGedView

Hi  Stuart.
Thanks  for the  info.  apologies for the  delay  in getting  back to  you,  its  been a  hectic  weekend  and  only  just  got  around  to  trying out the  .htaccess method.
The  bad news it  didnt  work for me,  even after  a  clean  install  of  PGV basic  4.2.3  and  dropping  the few tables  it  had  tried to  create.  The  same error was returned  and  config.php was  not  updated. 
However I think  (hope) I am  there  now. 
Another  clean install of  PGV 4.2.3  basic unzipping  it  on the CGI server,  and then  upload the  empty  table  structure to rumpus,  the  tables exported from  mySQL running  on  my  local  machine. Set permissions  to 750, and  I was then  able  to  run the  installer,  which  said the tables were  OK and  allowed  me to  proceed.
I could  then create  an  admin  id,  BUT still the config.php was not  updated with  the  server  infos etc.  So  a  quick  manual edit  of config.php changing  the appropriate  variables,  not  forgetting  to  change  $CONFIGURED to true. Set  permissions  of  config.php back to read only  then  login  to  PGV  as admin  and  upload the  gedcom.
There  is for  me a  write  / execute  permission  issue  that causes the  installer  to  stop. I do  not  think that  it  is  PGV,  it  has to  be PN and  the  new  platform. I am  gonna  test  it  for  a  bit  before  letting it  loose,  just  in case....Now the  next  part,  getting  it  back  into  Joomla. Cheesy
As far as your  question  on a  htaccess a redirect  is  concerned,  I  have  used  this 301  in the the  past
RewriteEngine On
RewriteCond %{HTTP_HOST}  ^www.your _first_domain.com$
RewriteRule (.*) http://www.your_redirect_domain.com/$1 [R=301,L]
Thanks  for your  hel,p  good  luck,  jim
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: Cannot install PhpGedView

Hi Jim,
Sorry my fix didn't work for you but I was going to suggest you did a table export from you local copy - which you have done. 
Thanks for the .htaccess suggestion . I'll give it a try. I'm going to do one more test install using the full PGV install rather than the basic edition and see if that works OK. If it does I'll go with it. 
I think I'll raise a ticket with PN regarding the mod_security issue as I have had no feedback on that via this forum yet. There's an old posting on the Sourceforge PGV forum regarding mod_security so thought it worth a try.
I run Joomla 1.5  and that works provided I don't use sh404SEF and the existing .htaccess, so I have turned them off for the time being. I will have to tackle the .htaccess for that at some stage and get it running properly again.


Good luck  Smiley
Stuart
Gabe
Grafter
Posts: 767
Registered: ‎29-10-2008

Re: Cannot install PhpGedView

Quote from: stuartp
I think I'll raise a ticket with PN regarding the mod_security issue as I have had no feedback on that via this forum yet.

The module isn't installed so the problem must lie elsewhere. I'm afraid I don't know PGV.
Gabe
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: Cannot install PhpGedView

@dazed: Can you PM me your plusnet (or force9 etc) username? I need to check if your MySQL permissions are correct, I suspect that they are not.
Re: mod_security, as Gabe's mentioned we're not using it on CGI, so it's odd that the .htaccess seems to fix your issue.
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: Cannot install PhpGedView

Gabe,
You are correct about mod_security  Cheesy
This is very strange - I have just taken the mod_security directive out of .htaccess and my site works without it now. I wonder if PN tweaked something whilst I was having issues. The real test will be to do a full reinstall of PGV which I will not be able to do until tomorrow at the earliest. There is one further bug I have found in that the internal contact-me model in PGV does not send any messages to the admin. Its a version of phpmail with a PGV wrapper around it as far as I can make out.
I have just tried your phpwrapper and .htacces but that did not fix it. I can probably do a cludge to point to the ContacMe form I use in joomla as a work-around but its not ideal.
Thanks for all you help to everyone on the forum BTW.

Stuart
hobjohns
Dabbler
Posts: 22
Registered: ‎30-07-2007

Re: Cannot install PhpGedView

Ben, did you identify a solution to dazed's problem on checking his mySQL settings? I have exactly the same problem as dazed, with "1142 INDEX command denied to user" when trying to install phpgedview.
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: Cannot install PhpGedView

Quote
There is one further bug I have found in that the internal contact-me model in PGV does not send any messages to the admin. Its a version of phpmail with a PGV wrapper around it as far as I can make out.
I have just tried your phpwrapper and .htacces but that did not fix it. I can probably do a cludge to point to the ContacMe form I use in joomla as a work-around but its not ideal.

Phpwrapper/.htaccess now working fine.  Fixed the PGV Contact mailform by pointing at Gmail's SMTP server rather than using the inbuilt phpmail functions. Cheesy
Stuart
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: Cannot install PhpGedView

Quote from: hobjohns
Ben, did you identify a solution to dazed's problem on checking his mySQL settings?

Yes, and have applied this to your account, you should be able to install the software now. I've not yet been able to determine how the permissions were set incorrectly, it could be at the time the account was enabled the script was incorrect.