Compiling PHP extensions.
Posted: Fri Oct 05, 2007 10:05 am
Hi, I am fairly new to PHP and am currently working on my resume page of my personal website. For each skill that I have listed I have also listed the number of years its been since I started using that particular software or language. So i found this script to calculate the time its been from a specific date. It looks like this
// <?php
// function dateDiff($dformat, $endDate, $beginDate) {
// $date_parts1 = explode($dformat, $beginDate);
// $date_parts2 = explode($dformat, $endDate);
// $start_date = gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);
// $end_date = gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);
// return $end_date - $start_date;
// }
Then next to the listing of each software i have this:
// <?php
// $dob="02/01/2005";
// $aot = round(dateDiff("/", date("m/d/Y", time()), $dob)/365, 0);
// if($aot < 1) {
// echo "< 1 year";
// }
// else {
// echo $aot . " years";
// }
This script runs fine on my local host (windows XP) But when I upload it to my shared server at A small orange it throws me an error:
Fatal error: Call to undefined function gregoriantojd()
I have searched all over forums and keep coming back to one thing. I have to Compile php with --enable--calender. Unfortunately i have no clue of how to do this. i have searched long and hard for the answer and have found nothing. can someone please help.
// <?php
// function dateDiff($dformat, $endDate, $beginDate) {
// $date_parts1 = explode($dformat, $beginDate);
// $date_parts2 = explode($dformat, $endDate);
// $start_date = gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);
// $end_date = gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);
// return $end_date - $start_date;
// }
Then next to the listing of each software i have this:
// <?php
// $dob="02/01/2005";
// $aot = round(dateDiff("/", date("m/d/Y", time()), $dob)/365, 0);
// if($aot < 1) {
// echo "< 1 year";
// }
// else {
// echo $aot . " years";
// }
This script runs fine on my local host (windows XP) But when I upload it to my shared server at A small orange it throws me an error:
Fatal error: Call to undefined function gregoriantojd()
I have searched all over forums and keep coming back to one thing. I have to Compile php with --enable--calender. Unfortunately i have no clue of how to do this. i have searched long and hard for the answer and have found nothing. can someone please help.