I upgraded PHP awhile ago on my server (or at least I think I did), and PGV hasn't worked since. I figured the problem was that it needed an update, so I went through the recommended update procedure within a new folder on my server. I've found that that one doesn't work either. Here's the error I got (it took me to install.php; I don't remember whether the update procedure had me rename the old config.php, or whether i did that on my own):
ERROR 2: PDO::__construct(): Invalid argument (trying to connect via unix://)
0 Error occurred on in function __construct
1 called from line 115 of file class_pgv_db.php in function createInstance
2 called from line 276 of file session.php in function require_once
3 called from line 75 of file config.php in function require_once
4 called from line 42 of file install.php
Warning: PDO::__construct(): Invalid argument (trying to connect via unix://) in /Library/WebServer/Documents/pgv/includes/classes/class_pgv_db.php on line 115
ERROR 2: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead
0 Error occurred on in function date
1 called from line 310 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: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /Library/WebServer/Documents/pgv/includes/authentication.php on line 294 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /Library/WebServer/Documents/pgv/includes/authentication.php on line 299 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /Library/WebServer/Documents/pgv/includes/session.php on line 310
It then proceeds with "Check Environment", which passes. I click Next, and enter my DB info (I use MySQL on localhost). I click Next and get this:
Your current database configuration is bad. Please check your database connection parameters and configure again.
SQLSTATE Invalid argument
I am using Mac OS X 10.5.8 with PHP 5.2.12. I don't know where to find which PGV version I'm using.
Any ideas?
I wish it would let me preview this before posting it… Oh well, I'll just have to hope it turns out right.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your current database configuration is bad. Please check your database connection parameters and configure again.
Do you have PDO enabled on your PHP installation? Where did you get your PHP? Are you not using Marc's ENTROPY install?
Solve the first problem with the date, then run a phpinfo and examine what you have activated and what you don't. I run PGV with 10.5..8 and 10.6.5 both on my server and my laptop (locally) and have no issues, so it is all in your system and file configurations. Come back with more postings after you solve the date.timezone problem. -Stephen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had already set the timezone in my /etc/php.ini, as you can see. Is that where i'm supposed to set it? As I recall, that file didn't exist before, but I found /etc/php.ini.default, which I copied to that name.
[Date]; Defines the default timezone used by the date functions;date.timezone =date.timezone="America/New_York";date.default_latitude = 31.7667;date.default_longitude = 35.2333;date.sunrise_zenith = 90.583333;date.sunset_zenith = 90.583333
I don't remember where I got my PHP; If I had to guess, I'd say I got it from php.net. I don't know who Marc is, and I'm not familiar with ENTROPY. How do I run phpinfo? How do I enable PDO?
No edits, either? What kind of forum is this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ben
First, read only a few previous posts and you'll see that NO ONE is happy with SF and this forum software, although its better than the last version.On the other hand, they don't seem to care that everyone is unhappy.
Second, are you sure that you are using the PHP in the /etc directory? If not, adding/changing the PHP there would not have any effect on your operations. Apple provides PHP with Snow Leopard and it works just fine with PGV, but must be activated. (It is not, by default.) There are plenty of help places for activating PHP on Snow Leopard so I won't go into it. I doubt you compiled you own PHP from php.net and they don't offer a compiled version.
Offline, I'm sending a copy of my PHP.INI -Stephen
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having a similar error (date.timezone) with a new install. I'm building a new server with XAMPP (PHP 5.3.1) where I have included the date.timezone in my php.ini file. I checked the phpinfo() and it shows the correct value in the "date" section.
This is a new test server for local use only, downloaded the newest XAMPP and current PGV but no updates from SVN.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh, and if I put in a totally bogus value (like: America/NewYork) phpinfo() has a fit and throws the same error. I'll look to see if my working PGV has any differences with the new "problem child".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The date.timezone error has nothing to do with PGV. It is a PHP error/warning. As it says, it will automatically make assumptions on your behalf and will make these calculations whenever it needs this function. Fetching it repeatedly is not efficient, but not a huge burden.
Since this is not a PGV error, but rather a PHP configuration issue, you will have to solve it with PHP.net. This function was added in 5.3 as a mandatory INI setting, but it is usually easily fixed with properly setting the value in the php.ini file (the precision of the formatting of the line is critical); restart the server.
Ben
First, read only a few previous posts and you'll see that NO ONE is happy with SF and this forum software, although its better than the last version.On the other hand, they don't seem to care that everyone is unhappy.
Ah. I see.
Second, are you sure that you are using the PHP in the /etc directory? If not, adding/changing the PHP there would not have any effect on your operations. Apple provides PHP with Snow Leopard and it works just fine with PGV, but must be activated. (It is not, by default.) There are plenty of help places for activating PHP on Snow Leopard so I won't go into it. I doubt you compiled you own PHP from php.net and they don't offer a compiled version.
I'm actually not sure it's using that one. How do I tell which PHP my webserver is using? That would give some idea where to look for php.ini. I have been able to confirm that I am using /usr/sbin/httpd. If I ever upgraded Apache, i would not have put it in there.
I sent you an email with my php.ini (from /etc) and links to my webserver. Hopefully you can figure something out with that.
Oh, it looks like that email has bounced. I guess i'll send it to your SF email instead.
….Oops, forgot to click Add Reply last night. Heh.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I upgraded PHP awhile ago on my server (or at least I think I did), and PGV hasn't worked since. I figured the problem was that it needed an update, so I went through the recommended update procedure within a new folder on my server. I've found that that one doesn't work either. Here's the error I got (it took me to install.php; I don't remember whether the update procedure had me rename the old config.php, or whether i did that on my own):
It then proceeds with "Check Environment", which passes. I click Next, and enter my DB info (I use MySQL on localhost). I click Next and get this:
I am using Mac OS X 10.5.8 with PHP 5.2.12. I don't know where to find which PGV version I'm using.
Any ideas?
I wish it would let me preview this before posting it… Oh well, I'll just have to hope it turns out right.
Ben
You have two issues. To resolve the first one, add a DATE.TIMEZONE specification in your PHP.INI.
Here are several FAQ links about how to do this:
http://kb.siteground.com/article/How_to_change_the_datetimezone_value_in_PHP.html
http://www.rasyid.net/2007/08/29/datetimezone-in-phpini-for-php5/
The second issue is more complicated.
Do you have PDO enabled on your PHP installation? Where did you get your PHP? Are you not using Marc's ENTROPY install?
Solve the first problem with the date, then run a phpinfo and examine what you have activated and what you don't. I run PGV with 10.5..8 and 10.6.5 both on my server and my laptop (locally) and have no issues, so it is all in your system and file configurations. Come back with more postings after you solve the date.timezone problem.
-Stephen
I had already set the timezone in my /etc/php.ini, as you can see. Is that where i'm supposed to set it? As I recall, that file didn't exist before, but I found /etc/php.ini.default, which I copied to that name.
I don't remember where I got my PHP; If I had to guess, I'd say I got it from php.net. I don't know who Marc is, and I'm not familiar with ENTROPY. How do I run phpinfo? How do I enable PDO?
No edits, either? What kind of forum is this?
Ben
First, read only a few previous posts and you'll see that NO ONE is happy with SF and this forum software, although its better than the last version.On the other hand, they don't seem to care that everyone is unhappy.
Second, are you sure that you are using the PHP in the /etc directory? If not, adding/changing the PHP there would not have any effect on your operations. Apple provides PHP with Snow Leopard and it works just fine with PGV, but must be activated. (It is not, by default.) There are plenty of help places for activating PHP on Snow Leopard so I won't go into it. I doubt you compiled you own PHP from php.net and they don't offer a compiled version.
Offline, I'm sending a copy of my PHP.INI
-Stephen
Ben
Your SF email bounced back to me - no such user.
Send me an email at mailto:GEDCOMS-at-MyArnold-dot-com and I'll shoot you a copy.
Stephen
I'm having a similar error (date.timezone) with a new install. I'm building a new server with XAMPP (PHP 5.3.1) where I have included the date.timezone in my php.ini file. I checked the phpinfo() and it shows the correct value in the "date" section.
This is a new test server for local use only, downloaded the newest XAMPP and current PGV but no updates from SVN.
Oh, and if I put in a totally bogus value (like: America/NewYork) phpinfo() has a fit and throws the same error. I'll look to see if my working PGV has any differences with the new "problem child".
The date.timezone error has nothing to do with PGV. It is a PHP error/warning. As it says, it will automatically make assumptions on your behalf and will make these calculations whenever it needs this function. Fetching it repeatedly is not efficient, but not a huge burden.
Since this is not a PGV error, but rather a PHP configuration issue, you will have to solve it with PHP.net. This function was added in 5.3 as a mandatory INI setting, but it is usually easily fixed with properly setting the value in the php.ini file (the precision of the formatting of the line is critical); restart the server.
here's an excellent discussion of this on the phpBB board:
http://www.phpbb.com/community/viewtopic.php?f=46&t=1634115
and here's a good Snow Leopard discussion:
http://www.roundcubeforum.net/5-release-support/14-release-discussion/5880-date-timezone-error-snow-leopard-server.html
configure php.ini
* Edit file: xampp\apache\bin\php.ini
* Update SMTP Settings (adjust for you settings, if known):
; Defines the default timezone used by the date functions
date.timezone = America/New_York
; For Win32 only.
SMTP = smtp.yourdomain.com
smtp_port = 25
; For Win32 only.
sendmail_from = mallen
* Restart Apache
-Stephen
Ah. I see.
I'm actually not sure it's using that one. How do I tell which PHP my webserver is using? That would give some idea where to look for php.ini. I have been able to confirm that I am using /usr/sbin/httpd. If I ever upgraded Apache, i would not have put it in there.
I sent you an email with my php.ini (from /etc) and links to my webserver. Hopefully you can figure something out with that.
Oh, it looks like that email has bounced. I guess i'll send it to your SF email instead.
….Oops, forgot to click Add Reply last night. Heh.