Installing timezonedb PECL extension

652 views
Skip to first unread message

Aaron Cooper

unread,
Apr 1, 2009, 4:36:50 PM4/1/09
to nzp...@googlegroups.com
Morning,
 
This relates to PHP 5.2.0.8 on Debian
 
We've realized a problem where one of our web servers php timezone system still has the end of Daylight savings in NZ on the old date (A week early) and although the server is reporting the correct time, our PHP scripts are an hour behind.
 
I found this blog entry about installing the PECL timezonedb module: http://www.electrictoolbox.com/correct-php-timezone/.
 
I have a few problems with this.
 
First the command "pecl install timezonedb" gives me an error:
# pecl install timezonedb
downloading timezonedb-2009.4.tgz ...
Starting to download timezonedb-2009.4.tgz (191,230 bytes)
.................done: 191,230 bytes
5 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
I found that this phpize error can be fixed by installing php5-dev. However the command "apt-get install php5-dev" fails with the following:
The following packages have unmet dependencies:
  php5-dev: Depends: libssl-dev but it is not going to be installed
                 Depends: libtool but it is not going to be installed
E: Broken packages
I have tried installing those two packages seperately, however the give a similar error that some dependencies are unmet and will not be installed.
 
Any ideas of an easier method of getting this timezone extension installed with dependancies?
 
Cheers
Aaron
 
 
 

Stig Manning

unread,
Apr 1, 2009, 4:56:01 PM4/1/09
to nzp...@googlegroups.com
Hi Aaron,

As far as I know this is the only way of reparing the timezone database.
Have you tried 'apt-get -f install' to fix the broken dependencies?

I am pretty sure you are going to need phpize (from php5-dev) to get the PECL module installed.

Cheers,
Stig

Aaron Cooper wrote:

Aaron Cooper

unread,
Apr 1, 2009, 4:59:20 PM4/1/09
to nzp...@googlegroups.com
Thanks Stig,
 
Yes I tried the -f modifier, same errors. Still diggin online.
 
A

Dan Khan

unread,
Apr 1, 2009, 7:54:16 PM4/1/09
to nzp...@googlegroups.com

Hi,

 

I’ve got a site currently running on a .com domain and I’d like to move it to a .co.nz domain and redirect .com traffic -> .co.nz in preparation for using the .com as an international site.

 

Obviously the .com has been stable on the search engines for the last year, and I want to try to minimise any associated fallout of the SERPs with the domain move.

 

Has anyone done this before and have any advice, or can anyone point me to some best-practice articles?

 

Thanks in advance,

-Dan

 

Aaron Cooper

unread,
Apr 1, 2009, 8:02:23 PM4/1/09
to nzp...@googlegroups.com
Well, it appears the short answer to this is "dependency hell". I had the same issue on another server running the same Distro and everything went fine.
 
But a question for a Debian forum it seems.
----- Original Message -----
Sent: Thursday, April 02, 2009 9:56 AM
Subject: [phpug] Re: Installing timezonedb PECL extension

Michael Brandon-SearchMasters

unread,
Apr 1, 2009, 8:17:46 PM4/1/09
to nzp...@googlegroups.com

Hi Dan

 

Are you wanting to use the .com as an international website in the future?

 

Then I suggest that you put up a temporary website with a few new pages on the .com website, and conceptually start from scratch with your .co.nz website.

 

If you do the redirect as you have stated (htaccess redirect of everything to new website), then you will lose the power attached to your current domain.

 

The new domain will still in general not rank well on the search engines until its gets old enough – immediate ranking for non competitive search phrases, a number of months for competitive search phrases, despite any redirects from .com

 

You could do a hybrid of the above

-          New pages on .com

-          If there is a pattern for the old url’s, or url by url -  do an htaccess redirect from all old .com url’s (apart from home page), to the equivalent url’s in the .co.nz website

 

The link text and PR attached to the incoming links will be passed through the 301 redirect from .com to .co.nz, but the .co.nz website will still need to age before it gets best rankings.

 

Most of your incoming links would have been to the .com homepage, so you probably would not get too much value from those redirects apart from giving the best user experience of people Googling, finding the .com url’s in the serps, and then being redirected to the .co.nz – until Google deletes the old url’s from its cache and updates with the .co.nz url’s

 

Does that give the answers you are after?

 

 

Kind Regards

 

Michael

 

Michael Brandon

Search Engine Mastery

Getting you to the top of the Search Engines

 

http://www.SearchMasters.co.nz

Ph: 09 8132307,  Mob: 021 728889, Skype: SearchMasters

Dan Khan

unread,
Apr 1, 2009, 8:51:13 PM4/1/09
to nzp...@googlegroups.com

Thanks Michael,

 

When we reuse the domain, we’ll have similar pages at the same URLs; but these would apply to the international site not the NZ site.

 

So if I understand correctly, the 301 will effectively replace Google’s .com link with the .co.nz link over time?  Any idea of how long this might take?

 

And in saying don’t blanket .htaccess everything, this is so that the domain still exists in Google from an aging perspective and ensure it’s still indexed?

 

When I put new pages at the same URLs up on .com in the future, I would effectively be starting from scratch for those pages since the PR was transferred to the NZ site by replacing the URL in the SERPs?

 

If this makes sense, then I think I understand!

 

Cheers,

-Dan


style='color:windowtext'>

 

Michael Brandon-SearchMasters

unread,
Apr 1, 2009, 9:11:37 PM4/1/09
to nzp...@googlegroups.com

Comments below:

 

From: nzp...@googlegroups.com [mailto:nzp...@googlegroups.com] On Behalf Of Dan Khan
Sent: Thursday, 2 April 2009 1:51 p.m.
To: nzp...@googlegroups.com
Subject: [phpug] Re: [OT] Moving websites between domains - SERPs fallout

 

Thanks Michael,

 

When we reuse the domain, we’ll have similar pages at the same URLs; but these would apply to the international site not the NZ site.

 

So if I understand correctly, the 301 will effectively replace Google’s .com link with the .co.nz link over time?  Any idea of how long this might take?

-          If you have an xml sitemap on the .com with all the old url’s in it, and have a robots.txt that includes that sitemap:http://www.domain.com, then Google will spider the old url’s and see the redirects that much faster. If you create a webpage with links to all the old url’s on it (that then redirect to the new url’s), you will get it spidered that much faster as well. The speed of the transfer is dependent on the PR of your website/highest pr of pages of your website, and therefore the frequency of Google spidering your website. It is one thing Google seeing the redirect, it is another thing for Google removing the url’s from its index. Could be a number of weeks.

And in saying don’t blanket .htaccess everything, this is so that the domain still exists in Google from an aging perspective and ensure it’s still indexed?

-          yes

When I put new pages at the same URLs up on .com in the future, I would effectively be starting from scratch for those pages since the PR was transferred to the NZ site by replacing the URL in the SERPs?

-          You would be removing the redirect at that point. So any external links into the subpages would therefore not be redirected. You would have had to contact all the old linkspartners (you can see some inbound links into subpages via Google webmaster tools) to get them to link to the new website.

Chris Hope

unread,
Apr 1, 2009, 9:24:05 PM4/1/09
to nzp...@googlegroups.com
If you find out the answer to the problem then I'd be interested to
know, and then I can update that blog post for anyone else needing to
install it that has the same issue.

Cheers,
Chris


2009/4/2 Aaron Cooper <sup...@zanzomedia.com>:
--
Chris Hope
The Electric Toolbox Ltd

Email: ch...@electrictoolbox.com
Web: www.electrictoolbox.com
Phone: +64 9 522 9531
Mobile: +64 21 866 529

Dalibor Andzakovic

unread,
Apr 1, 2009, 9:40:54 PM4/1/09
to nzp...@googlegroups.com
apt-get install build-essential libssl-dev libxml2-dev php5-dev

HTH

dali
________________________________________
From: nzp...@googlegroups.com [nzp...@googlegroups.com] On Behalf Of Chris Hope [ph...@electrictoolbox.com]
Sent: Thursday, 2 April 2009 2:24 p.m.
To: nzp...@googlegroups.com

Aaron Cooper

unread,
Apr 1, 2009, 9:48:54 PM4/1/09
to nzp...@googlegroups.com
It appears to be alot stickier than any one problem to be honest. I found
this thread from someone having precisely the same issue. Seems he was given
some pretty questionable advice in the end, only making things worse.

As I said, I used the directions on that blog post on 2 other servers with
zero issues.

My searches have gleaned nada and I get the feeling it's the sort of issue
only a Sysadmin could fix by actually having access to the server. We will
look at consulting our support providers, but we may just live with manually
adjusting the timezone to GMT-13 until DST ends, as the problem server in
question should be redundant by the time DST.kicks in again.

Cheers
Aaron

Aaron Cooper

unread,
Apr 1, 2009, 9:51:23 PM4/1/09
to nzp...@googlegroups.com
Thanks Dali

But,

The following packages have unmet dependencies:
build-essential: Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.1.1) but it is not going to be
installed
libssl-dev: Depends: libssl0.9.8 (= 0.9.8c-4etch4) but 0.9.8g-13 is to be
installed
Depends: zlib1g-dev but it is not going to be installed
libxml2-dev: Depends: libxml2 (= 2.6.27.dfsg-6) but 2.6.32.dfsg-2 is to be
installed
php5-dev: Depends: libtool but it is not going to be installed
E: Broken packages

Like I said earlier, I think there's number of dependency problems here.

Cheers
Aaron

Aaron Cooper

unread,
Apr 1, 2009, 9:55:20 PM4/1/09
to nzp...@googlegroups.com
Sorry, this is the thread I mentioned FYI.

http://www.uluga.ubuntuforums.org/showthread.php?t=1092699

Julian Melville

unread,
Apr 1, 2009, 10:02:26 PM4/1/09
to nzp...@googlegroups.com
If it's a Debian box (as opposed to Ubuntu or whatever else) check that
your /etc/apt/sources.list doesn't mention 'stable' but names your
version e.g. all of the URL's are set to 'etch', 'lenny' or whichever
actual version you're currently running.

I had all sorts of issues with that in February when the new stable
release came out, two of my servers had a couple of refs to 'stable' in
sources.list and setting the release explicitly to 'etch' in my case
fixed everything.

Cheers,

Julian.

Aaron Cooper

unread,
Apr 1, 2009, 10:12:01 PM4/1/09
to nzp...@googlegroups.com
Thanks Julian,

All appear to mention etch

# deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1
20070407-11:29]/ etch contrib main

#deb cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 NETINST Binary-1
20070407-11:29]/ etch contrib main

deb http://ftp.nz.debian.org/debian/ etch main
deb-src http://ftp.nz.debian.org/debian/ etch main

deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib

# For our Multimedia requirements, eg mencoder, flvtool2
deb http://debian-multimedia.org etch main
#deb http://ftp.nz.debian.org/debian/ lenny main

Cheers
Aaron


----- Original Message -----
From: "Julian Melville" <jul...@tiddly-pom.com>
To: <nzp...@googlegroups.com>
Sent: Thursday, April 02, 2009 3:02 PM
Subject: [phpug] Re: Installing timezonedb PECL extension


>

Dalibor Andzakovic

unread,
Apr 1, 2009, 10:19:50 PM4/1/09
to nzp...@googlegroups.com
It would appear your apt is broke. It's possible that you had a dist-upgrade go wrong on that particular box. Manually installing the .deb should work, but you'll need the gcc toolchain too since there will be conpilation involved. Oh and installing ubuntu debs on a debian box is a sure fire way to b0rk your apt

dali

________________________________________
From: nzp...@googlegroups.com [nzp...@googlegroups.com] On Behalf Of Aaron Cooper [sup...@zanzomedia.com]
Sent: Thursday, 2 April 2009 2:55 p.m.
To: nzp...@googlegroups.com

chris burgess

unread,
Apr 1, 2009, 10:33:54 PM4/1/09
to nzp...@googlegroups.com
Aaron

Just to clarify: Stig was not saying to add the -f modifier to "apt-get install php5-dev" and produce "apt-get -f install php5-dev" - he was suggesting you run this command, without specifying additional packages to install:

  apt-get -f install

That command will (in the right circumstances) instruct APT to sort itself out. After that's done and the dependency issues are resolved, you can install new packages.

HTH

Aaron Cooper

unread,
Apr 1, 2009, 11:09:23 PM4/1/09
to nzp...@googlegroups.com
Thanks Dali.

Considering alot of that is over my head, I'll be leaving this one.

Thanks for your help guys.

Michael Brandon-SearchMasters

unread,
Apr 2, 2009, 6:50:37 PM4/2/09
to nzp...@googlegroups.com, nz-we...@googlegroups.com

Can I please have a replies back from people around New Zealand.

 

For this search, I see “local business results for marketing near Auckland”

http://www.google.co.nz/search?hl=en&q=marketing

 

Do Wellington people see Wellington? Do Christchurch people see Christchurch etc.

 

How many cities in New Zealand has Google got the ability to target based on? Or rather how specific is the ip address of the isp you are connected through?

 

SearchMasters consistent high result of 4th on Google.co.nz for “Marketing” has moved down the screen heaps with the three video results, and the Google map in the results. Search Engine Optimisation is certainly an ever moving target!

Nathan Cox

unread,
Apr 2, 2009, 6:53:51 PM4/2/09
to nzp...@googlegroups.com
I'm in Hamilton and I'm seeing results near Auckland as well.  If I click "change location" I can get results for Hamilton, though.

Jim Tittsler

unread,
Apr 2, 2009, 7:24:34 PM4/2/09
to nzp...@googlegroups.com
On 2009-04-03 11:53, Nathan Cox wrote:
> I'm in Hamilton and I'm seeing results near Auckland as well. If I
> click "change location" I can get results for Hamilton, though.

If I "change location" to Gisborne it disappears completely. Sniff.


Nathan Cox

unread,
Apr 2, 2009, 7:26:46 PM4/2/09
to nzp...@googlegroups.com
I think that's pretty encouraging...when Google takes over the world maybe you'll be safe because they can't find you :P

Aaron Cooper

unread,
Apr 2, 2009, 8:24:35 PM4/2/09
to nzp...@googlegroups.com
What's a "Gisborne"?

;-)

Paul Bennett

unread,
Apr 2, 2009, 8:28:01 PM4/2/09
to nzp...@googlegroups.com
It's like a "Gore" but warmer...

Craig Cochrane

unread,
Apr 2, 2009, 11:39:11 PM4/2/09
to nzp...@googlegroups.com
Hey Michael
 
How are you?
 
Nelson people do not see Nelson. Are you talking related searches?
 
Craig

Jevon Wright

unread,
Apr 3, 2009, 1:05:53 AM4/3/09
to nzp...@googlegroups.com
Neither any in Palmerston North.

Jevon
Reply all
Reply to author
Forward
0 new messages