cancel
Showing results for 
Search instead for 
Did you mean: 

phpgedview help

Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

phpgedview help

I've read a few posts from users having problems getting phpgedview (PGV) to work on the new cgi platform. I'm about to try and do this and wondered if anyone has successfully managed to setup PGV v4.2.3 - if so, please post details! I'm sure I won't be the last person who'll be trying this.
One issue seems to be PGV's request for 777 file/folder permissions versus what Gabe's posts suggest and what suExec will allow. Is there a solution?
Cheers,
Adrian
15 REPLIES
jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Re: phpgedview help

Hi  Adrian.
Yep  there  have  been a  few  issues  regarding  PGV,  However,  i  have  been succesfull  in  running 4.2.3 full  install  on PN  and  also  within a Joomla! wrapper.
FTP the  zipfile to  your  webspace  on the  CGI server set the  permission  to "execute" and  unzip it..
Set the  neccesary file permissions  to 750 or 751,  anything  more  and the server will  not  like  you! ~Dont forget to  set  your  configuration  file permissions  back to read  only after you have done.
If  yo  have  problem  with  PGV  creating the  database,  make  sure  your  MySQL is  activated and you  have  provided  PGV  with the correct  path and username  etc etc.  If  it  still  fails  and  it  returns a  SQLSTATE 42000 syntax error then  ask PN  to  check  your  permissions  for  MySQL. My  own were  initially  incorrect so  it  threw this error.  This  was quickly  resolved by  PN.
There  is  plenty  of  help available and experience here  on the forum,  so just ask  if  you  have a problem,mine was certainly sorted  out.
Regards,  James
stuartp
Grafter
Posts: 54
Registered: ‎06-08-2007

Re: phpgedview help

Hi Adrian,
Yes, after a few initial problems (possibly due to PN doing some post-release fine tuning)  I have 4.2.3 running OK.  I have .php files set at 700 and everything else as 640. I set config.php to 500 once I was happy. I used Gabe's phpwrapper script to tidy up the PGV login URLs.    I had some issues with SEF in Joomla which I have not had time to resolve yet - but everything works.

Good luck,
Stuart
Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

Re: phpgedview help

James, Stuart,
Thanks guys. I've made some progress but can't connect to the database, error message 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)]'
Does database host have to be anything more than just 'rumpus'? Port I've left blank, and username, password and database name are all as per the mySQL activation email. The only other boxes on PGV installation are:
Use persistent database connections: No
Use the database to provide UTF-8 collation: No
Database Table Prefix: pgv_
Are these OK? What am I doing wrong?
Cheers,
Adrian
jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

Re: phpgedview help

Hi again Adrian
My  database  config to  create the tables was as  such 
Database Type  MySQL
Database Host  RUMPUS (or  what  was in your activation email)
Database Port  3306
Database Username  Your  username usually the  bit  before .plus.com
Database Password  The  password  in the activation email, not the login password for P N
Database Name  usually  username_pn (or  what was  in the email)
Use the database to provide UTF-8 collation  Yes
Database Table Prefix  pgv_ or  whatever you prefer
Although PGV should use a default, try  specifying the  port address 3306.
Hope  it  helps,
Cheers,  James
Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

Re: phpgedview help

Thanks James, but still not working  Sad
Settings as you suggested, but I get the following message:
Your current database configuration is bad. Please check your database connection parameters and configure again.
DB Error: connect failed [nativecode=Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)] ** Array
I contacted plusnet support with this message, but they just said that others have managed to host phpgedview, they couldn't help, and that I should ask for help here.
Any other suggestions?
Superuser
Superuser
Posts: 9,926
Thanks: 1,265
Fixes: 71
Registered: ‎06-04-2007

Re: phpgedview help

Are you able to access your database using phpMyAdmin (https://mysql.plus.net/)?
David
Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

Re: phpgedview help

Yes, managed to access database using phpMyAdmin. It looks like phpgedview has created tables, but then I get that error message: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'
Thanks for the help so far.
Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

Re: phpgedview help

OK, another clue...
Using phpMyAdmin I deleted the tables that had been created then re-ran the phpgedview configuration file. When creating the tables it gives loads of error messages like this one:
ERROR:-26 DB Error: insufficient permissions
SQL:CREATE INDEX pgv_messages_to ON pgv_messages (m_to) [nativecode=1142 ** INDEX command denied to user 'username'@'212.159.7.205' for table 'pgv_messages']
Despite all these it still says Database Tables created successfully.
"Insufficient Permissions" - can I rectify this?
Superuser
Superuser
Posts: 9,926
Thanks: 1,265
Fixes: 71
Registered: ‎06-04-2007

Re: phpgedview help

As far as I'm aware the owner of a database should have permissions set to allow any (legal) operation on tables within it. Perhaps your database was not set up correctly (I think there has been the odd instance of this). I think that will require checking by db-admin staff on Monday.
Hopefully they'll see this thread and respond as needed.
David
David
Community Veteran
Posts: 3,789
Registered: ‎08-06-2007

Re: phpgedview help

Quote from: Adrian00
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

This makes me believe that the configuration isn't looking for a remote MySQL server.
It should be using TCP port 3306 to connect to the mysql server at rumpus.plus.net (or humbug.plus.net if that's your server).  It appears to be using a local socket connection to connect to (what it believes is) a MySQL server running on the CGI server - but there isn't one!
Double check all the config settings in your application. 
B.
Plusnet Alumni (retired) orbrey
Plusnet Alumni (retired)
Posts: 10,540
Registered: ‎18-07-2007

Re: phpgedview help

Hi Adrian,
I've passed your existing ticket back through to our networks team who will investigate these issues for you.
Adrian00
Dabbler
Posts: 11
Registered: ‎05-05-2010

Re: phpgedview help

Quote from: Barry
Quote from: Adrian00
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

This makes me believe that the configuration isn't looking for a remote MySQL server.
It should be using TCP port 3306 to connect to the mysql server at rumpus.plus.net (or humbug.plus.net if that's your server).  It appears to be using a local socket connection to connect to (what it believes is) a MySQL server running on the CGI server - but there isn't one!
Double check all the config settings in your application. 
B.

Thanks guys. I also tried specifying port 3306, but it gives the same message. Hope the networks team come up with something other than me doing something wrong...
dastrop
Newbie
Posts: 4
Registered: ‎14-05-2008

Re: phpgedview help

Hi Adrian,
Despite a few hiccups I managed to get phpgedview v4.2.3 installed and running a couple of weeks ago. However I still have an outstanding issue, more of which later. Hopefully some of the points below might be of help to you.
Points to note during the install were.
Having read a couple of other threads on the subject I set the folder/file permissions as follows
   config.php 750
   folders 710
   script files 700
   static files 640
When running the install script I initially got lots of messages of the type
   ERROR 2: session_start() [function.session-start]: open(/tmp/sess_1062acd65c7523bd1c27eb3560484f9a, O_RDWR) failed:
   File too large (27)
   0 Error occurred on in function session_start
   1 called from line 333 of file session.php in function require_once
   2 called from line 75 of file config.php in function require_once
   3 called from line 42 of file install.php
   Warning: session_start() [function.session-start]: open(/tmp/sess_1062acd65c7523bd1c27eb3560484f9a, O_RDWR) failed:
   File too large (27) in /share/storage/01/da/username/pgv/includes/session.php on line 333
These appeared before & after the phpgedview Installation Wizard window.
I tracked this down to pgv attempting to write its session data to some temporary storage to which it didn't have permission.
The solution was to create a new folder to hold the session data and point the SESSION SAVE PATH variable in the config file to it e.g.
   $PGV_SESSION_SAVE_PATH = "./sessiondata/";
When running the install script subsequently I found that I had to reenter the database connection details each time as these were not being stored in the config file. I don't know whether this was because install script had not fully completed earlier or whether there was still a problem writing to the config file which at the time had permissions set to 750. In the end I manually editted the config file to include the database details. SQLhost name, DB name, username, password, etc., were set as per the email from dbcreator, I left the DBPORT variable to default. I also set the configured variable to true.
   $DBPORT = "";
   $CONFIGURED=true;
Basic point I know, but have you checked that your database connection settings are actually being stored in your config.php file?.  
Subsequent runs of the install script gave me repeated "SQLSTATE[42000]: Syntax error or access violation: 1142 INDEX command denied..." error messages on Step 3 - Create Tables. MySQL admin showed that only three tables had been created. I DROPed these and reran the script a few times but each time only the first three tables were created. In the end I stopped DROPing the tables that had been created and kept running the install script until it completed step 3 and went on to finish at step 8. In all 20 tables were eventually created.
I reset the permissions on the config.php file to 500.
The application is running but response can be a bit lumpy at times. Not surprising since MySQLadmin shows that none of the table INDEXs were created.
There's obviously a problem with my CREATE INDEX permissions so I've raised a ticket, no 33385164. Once I get a resolution I'll try using MySQLadmin to create the indexes using DDL extracted from the includes/db_schema folder. I don't fancy doing a reinstall as I've already uploaded and configured a couple of GEDCOMS.
Hope this is of use.
Ian
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: phpgedview help

I'm not sure if this helps, but if the mysql setup is causing problems with pgv, there is an option to use sqlite instead. I've just done a test install using sqlite and it seems happy, though not knowing pgv I can't be sure there aren't wrinkles.
Gabe