CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • PHP error 500 error
Pages: [1]

Author Topic: PHP error 500 error  (Read 4395 times)

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
PHP error 500 error
April 16, 2012, 10:45:04 pm
Ok, as promised, here is my next issue

With just a bit of testing, it seems that when I create a view for civicrm events, if I add one of the date fields, I get a pop up box with
_____
An error occurred at /sun/admin/build/views/ajax/preview/bobb.

Error Description: 500: Internal server error. Please see server or PHP logs for error information.
_____
in it.

now, one thing I have noticed, is that on the config page for some of the dates, at the bottom, I have an option to set the date format. nothing changes that.

There are some fields, it seems that will not throw the error, but will not display the data either.

any thoughts?

Thanks.
Sam

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: PHP error 500 error
April 17, 2012, 05:50:45 am
Did you look at the logs for the details of the error? Please post that information.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 17, 2012, 06:07:26 am
forgot that part,

I can not seem to find the logs on this server, am working on getting them working.

I do have sudo privileges, but can not see to get the logs running. Have done a bit of research, I was just real tired last night.

Besides the PHP.log file, is there another default log these messages might be in?

Thanks

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: PHP error 500 error
April 17, 2012, 06:16:23 am
http://www.cyberciti.biz/faq/apache-logs/
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 17, 2012, 06:49:12 am
Ok, the apache error log does not seem to have anything but info on restarting when I restarted apache2.

I can not find any PHP logs, so I added

error_log = /var/log/php_errors.log

to php.ini in the /etc/php5/apache2/php.ini file

created a empty php_errors.log file

chown www-data php_errors.log

and no errors are being logged.

Still digging.

Just as an FYI, when I turn drupal logging to file and screen, I get a ton of these kinds of messages, I have read that they are only warnings and that civicrm is not gaurenteed to be warning free, but is there a fix in the future for them?
_____
# strict warning: Non-static method PEAR_ErrorStack::singleton() should not be called statically in /etc/drupal/6/sites/all/modules/civicrm/packages/PEAR/ErrorStack.php on line 983.
# strict warning: Declaration of CRM_Core_Error::singleton() should be compatible with & PEAR_ErrorStack::singleton($package, $msgCallback = false, $contextCallback = false, $throwPEAR_Error = false, $stackClass = 'PEAR_Error...') in /etc/drupal/6/sites/all/modules/civicrm/CRM/Core/Error.php on line 56.
# strict warning: Non-static method PEAR_ErrorStack::singleton() should not be called statically in /etc/drupal/6/sites/all/modules/civicrm/CRM/Core/Error.php on line 619.
# strict warning: Non-static method PEAR::setErrorHandling() should not be called statically in /etc/drupal/6/sites/all/modules/civicrm/CRM/Core/Config.php on line 187.
# strict warning: Non-static method CRM_Utils_File::createDir() shoul
____
Sometimes, I really hate computers!!!!

Thanks again
« Last Edit: April 17, 2012, 07:28:09 am by sswari »

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: PHP error 500 error
April 17, 2012, 08:32:30 am
Can you ask your host for help with the error log?

> Sometimes, I really hate computers!!!!

Perhaps try an abacus instead? ;)
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 17, 2012, 09:58:11 am
Quote from: Hershel on April 17, 2012, 08:32:30 am
> Sometimes, I really hate computers!!!!

Perhaps try an abacus instead? ;)

I prefer just plain old sticks and stones.

will check to see if the server admin can help.

Thanks

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 17, 2012, 10:40:25 am
Ok, here is the error

An error occurred at /sun/admin/build/views/ajax/preview/NMSEA_Event_Calendar.

Error Description:
Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct(): 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 the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in /etc/drupal/6/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_datetime.inc:49
Stack trace:
#0 /etc/drupal/6/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_datetime.inc(49): DateTime->__construct('2010-09-11 00:0...')
#1 /etc/drupal/6/sites/all/modules/views/handlers/views_handler_field.inc(481): civicrm_handler_field_datetime->render(Object(stdClass))
#2 /etc/drupal/6/sites/all/modules/views/theme/theme.inc(224): views_handler_field->advanced_render(Object(stdClass))
#3 [internal function]: theme_views_view in /etc/drupal/6/sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_datetime.inc on line 49

here is the code that is in the mentioned file right around line 49

function render($values) {
        // get default time zone form Drupal
        $timezone = variable_get('date_default_timezone', 0);
        $value = $values->{$this->field_alias};

       
48      if(is_string($value) && strpos($value,"-")) {
49           $date = new DateTime($value);
50           $gmt = $date->getOffset();  //gives me the offset to GMT
51          $value = strtotime($value);
             //set the timestamp to GMT
            $value = $value + $gmt;
            //set the timestamp to site default
            $value = $value - $timezone;

            if($value) {
                $values->{$this->field_alias} = $value;
            }
        }

        return parent::render($values);
    }
}
Trying to see If I can figure it out, please help if you have any ideas.

Thanks
Sam
« Last Edit: April 17, 2012, 11:19:20 am by sswari »

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 18, 2012, 01:33:14 pm
Anybody have any new ideas?

Thanks

sswari

  • I’m new here
  • *
  • Posts: 14
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 6x
  • MySQL version: 5.1.61
  • PHP version: 5.4.0-3
Re: PHP error 500 error
April 18, 2012, 08:21:43 pm
GOT IT,

http://drupal.org/node/678764

which takes us to

http://php.net/manual/en/timezones.php

Good luck everybody and Thanks For all your help.

Sam


emmy

  • I post occasionally
  • **
  • Posts: 37
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5
Re: PHP error 500 error
September 18, 2013, 10:10:31 am
sswari,

How where you able to solve this?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • PHP error 500 error

This forum was archived on 2017-11-26.