Results 1 to 6 of 6

Thread: php - enable calendar extension module

  1. #1

    Default php - enable calendar extension module

    Hi All..

    I've recently migrated to SuSE, I've been using another distro for a while, but still ultimately new to linux.

    I'm working on a website project, and have installed and configured apache, mysql, and php without too many dramas, but there's one nagging problem that I cant find the solution to... I cant get the php calendar extension module to work? For example, the function cal_get_days_in_month() throws a "function not found" error.

    Searching the web, it appears that this module is not enabled in SuSE by default.. thats fair enough. One blog post said that if you just install the package with a package manager it will work.. but it didnt for me. Other posts (not specifically regarding SuSE) have said that you need to recompile php with the --enable-calendar (or something?) option. I did give it a shot, because I dont really know what I'm doing, I was reluctant to proceed. The following is really just my thoughts on the matter, but keep in mind I dont know what I'm doing...

    to compile from source, I need to download the source from php.net. But the source (along with configuration files & make files) isnt distro specific, so if I just proceed with the defaults, will that place the compiled binaries in the wrong folders? (I've noticed that some folders in SuSE are in different locations to ubuntu, for example) so before proceeding, would I need to determine which is the right location for the binaries?

    Also, I get some "gcc or cc not in path error", if I run the "./configure help" in the php source package, but I'm pretty sure the gcc packages are installed.

    I've investigated whether the module can just be loaded in php.ini or some such, but I couldn't really see how to do that, whilst searching for solutions to this problem, no one said that loading the module in php.ini is the solution..

    So can someone point me in the right direction? Do I recompile php? Enable the module somehow in YaST or with zypper? or change something in php.ini? Or something else entirely?

    Thanks in advance...

    So...

  2. #2
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: php - enable calendar extension module

    Hello, and welcome to this forum.

    Can you confirm that you have installed the package "php5-calendar" with yast from the official openSUSE repository?
    Technology is 'stuff that doesn't work yet.' -- Bran Ferren

  3. #3

    Default Re: php - enable calendar extension module

    Hi vodoo,

    yes i've definitely installed the php-calendar module with yast, then uninstalled it, reinstalled it, forced reinstall of all php packages, uninstalled, installed with zypper, etcetera.

    Re: the repository.. The only non-official repositories I have enabled are the vlc repo & contrib.

    Thanks for your help..

  4. #4

    Default Re: php - enable calendar extension module

    Code:
    Mr5o1@linux:~> sudo zypper in php5-calendar
    Loading repository data...
    Reading installed packages...
    'php5-calendar' is already installed.
    No update candidate for 'php5-calendar-5.3.3-0.1.2.i586'. The highest available version is already installed.
    Resolving package dependencies...
    
    Nothing to do.
    and...

    Code:
    Mr5o1@linux:~> php -f test.php
    PHP Fatal error:  Call to undefined function cal_get_days_in_month() in /home/Mr5o1/test.php on line 2

  5. #5

    Default Re: php - enable calendar extension module

    Hi Mr501,

    You might want to try cal_days_in_month instead of cal_get_days_in_month.

    See more here: PHP: cal_days_in_month - Manual

  6. #6
    Join Date
    Mar 2009
    Location
    sri mayapur, west bengal, india
    Posts
    958

    Default Re: php - enable calendar extension module

    On Tue, 02 Nov 2010 14:36:02 +0530, Mr5o1
    <Mr5o1@no-mx.forums.opensuse.org> wrote:

    >
    > Code:
    > --------------------
    > Mr5o1@linux:~> sudo zypper in php5-calendar
    > Loading repository data...
    > Reading installed packages...
    > 'php5-calendar' is already installed.
    > No update candidate for 'php5-calendar-5.3.3-0.1.2.i586'. The highest
    > available version is already installed.
    > Resolving package dependencies...
    > Nothing to do.
    > --------------------
    >
    >
    > and...
    >
    >
    > Code:
    > --------------------
    > Mr5o1@linux:~> php -f test.php
    > PHP Fatal error: Call to undefined function cal_get_days_in_month()
    > in /home/Mr5o1/test.php on line 2
    > --------------------
    >
    >


    you have to enable the module in /etc/sysconfig/apache2

    there's instructions within the file. it's just adding the calendar module
    to the line that lists all your enabled php modules.

    --
    phani.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •