• Resolved luismoyano

    (@luismoyano)


    Hi there,
    I can not activate the plugin due to a php error in line 141 inside file: class-zp-birth-report.
    Could you let me know how to solve it?

    Thanks,

    Luis

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter luismoyano

    (@luismoyano)

    Hi Again,
    I found more php errors in several scripts.
    I could install the plugin fixing errors (I’m not sure that I didi right) or commenting problematic lines.

    You can take a look at files: class-zp-birth-report.php (lines 141, 219, 240), class-zp-chart.php (lines 231 and 224) and validation.php (line 146).

    Please, let me know how to solve it when you have a while, as I would like to use your this fantastic plugin.

    Thanks in advance!

    Luis

    Thread Starter luismoyano

    (@luismoyano)

    Hi Again,
    still dealing with the plugin.

    I tried to generate a report but I’ve receive the following message: “The Swiss Ephemeris is not working”. Could you let me know how to solve it?

    Thanks

    Thread Starter luismoyano

    (@luismoyano)

    Sorry again to bother you,
    maybe I have a betatester soul,hahaha…

    I tried to instal the House System Addenun plugin but I could not active either.
    Again a php error around line 156 this time.
    The code is:
    —-
    $args[‘options’] = ‘-sid’ . zp_get_sidereal_methods() . $chart->sidereal[‘id’];
    ——-
    An I replaced with:
    —–
    $args[‘options’] = ‘-sid’ . zp_get_sidereal_methods()[ $chart->sidereal ][‘id’];
    ——
    Maybe, what I did it’s not good, but I’m not an expert in PHP, nor any website language.

    Actually, all the errors in the scripts are related to this function? zp_get_sidereal_methods
    It seems there is something wrong with it, perhaps!

    After fixing line 156, I could activate the House System plugin, but I still can not use the plugin until The Swiss Ephemeris error was solved.

    Regards,

    Luis

    Thread Starter luismoyano

    (@luismoyano)

    Hi There,
    I could make the plugin works.
    I’ve replaced the swetest folder that comes with the plugin with another one that I downloaded from internet. Now everything seems to work.

    So, if you can help me to solve the errors in the files at my first comment, your plugin fulfill all my needs.

    Thanks,

    Luis

    Thread Starter luismoyano

    (@luismoyano)

    Hi there again!

    Reading the other issues posted in this support system, I found out that my errors were related with my outdated version of php. I’m in php 5.3.29, so there is no error in the functions zp_get_sidereal_methods() or zp_get_get_planets() or zp_get_house_systems(), the issue where related with the ability as of PHP 5.4 to array dereference the result of a function or method and call it directly.

    I’m not an expert in PHP, but as I can not update the php version of my server, I looked for a solution to make it work. Maybe it can be used by other people like me that can not change the version of its servers. Here it is:

    The solution obviously is to convert the function in an array, so the code:

    $arrMethods = array();
    $methods = zp_get_sidereal_methods();
      foreach ($methods as $key => $value) {
        $arrMethods[$key] = $value;
      }
    

    Then the line:

    $zodiac_type .= ' ' .
    						sprintf( __( 'ayanamsa = %1$s <span class="zp-mobile-wrap">(%2$s)</span>', 'zodiacpress' ),
    						$ayanamsa,
    						zp_get_sidereal_methods()[ $this->chart->sidereal ]['label'] );

    It can be changed by:

    $zodiac_type .= ' ' .
    						sprintf( __( 'ayanamsa = %1$s <span class="zp-mobile-wrap">(%2$s)</span>', 'zodiacpress' ),
    						$ayanamsa,
    						$arrMethods[ $this->chart->sidereal ]['label'] );

    All the issues with files due to php 5.3 or below can be solved following the same method. Creating a new array and then call values with that new array instead of original function.

    Note: Isabel, if you want to delete all my post, in order to make more clear this info, be free to do it, and put in order them , ok?

    Thanks for your awesome pluging!

    Luis

    Plugin Author isabel104

    (@isabel104)

    Very sorry for the delay. I’m sorry that you experienced this, but this error means that your website hosting company is using an unsupported (outdated) version of PHP. This error will only happen with PHP version 5.3 or older. That has reached official “end of life” over 2 years ago. Running your website with that old version of PHP “may expose your site to security vulnerabilities” (see WordPress Requirements).

    WordPress recommends using at least PHP version 7. Although, ZodiacPress supports as old as PHP version 5.4.

    Most web hosting companies should have an option available for you to update the PHP version on your own. Log in to your web hosting account and have a look around. Look for your PHP version and you may find an easy way to update it. If you want me to look into it, please tell me what web hosting company you use.

    Thread Starter luismoyano

    (@luismoyano)

    Hi Isabel,
    thanks for your answer!

    Unfortunately, I’m not able to update the PHP version in my hosting, because there more websites, I’m not alone. But, I’m using the changes in the code I posted here, and everything is working now.

    BTW, Are you thinking of including the wheel chart draw in the upcoming version of the plugin?
    It would be awesome and really appreciated!

    Thanks for your awesome pluging!

    Luis

    Plugin Author isabel104

    (@isabel104)

    Thank you. Yes, the chart wheel drawing is going to be added to the plugin, soon. I’m currently working on that.

    Plugin Author isabel104

    (@isabel104)

    Update: version 1.5 lets you show a chart wheel.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘I cannot activate current 1.4.1 version’ is closed to new replies.