Posts Tagged server

PHP 5.3.0 and Zend Guard / Zend Optimizer

Posted by Marco Steinhäuser on Tuesday, 19 January, 2010

If you are using Zend Guard to encrypt your PHP applications you probably don’t want to update your server environment to PHP 5.3.0: Zend Guard (for encoding your PHP files) and Zend Optimizer (for decoding your PHP files) are not available yet for this PHP version and so upgrading should break your application. A discussion about this subject is going on in this forum thread:
http://forums.zend.com/viewtopic.php?f=57&t=1365

Zend announced that new versions of Zend Guard and Zend Guard Loader (which will replace Zend Optimizer) will be released in the first quarter of 2010. Until then, please avoid upgrading PHP to 5.3 on machines where Zend Guard encoded applications are running.

The OXID eShop’s Enterprise Edition and Professional Edition are effected. We believe that the upcoming version 4.3.0 of OXID eShop Community Edition is not effected.

DNS fail: Kabeldeutschland

Posted by Marco Steinhäuser on Thursday, 5 November, 2009

One week ago, my hosting provider moved to another server and changed the IP address from 78.46.237.174 to 78.47.120.47. Obviously, everything was prepared fine, even the TTL handling.

Okay, I understand that updating the ISP provider’s DNSses worldwide could take up to 24 hours and at the end of the day this cannot be done real time. Yesterday, I tried to call up my domain marco-steinhaeuser.de in several browsers and operating systems and failed with a timeout. Only a few times the page was loading properly. Checking the host of the domain with $ host marco-steinhaeuser.de, sometimes the old IP-address appeared, sometimes the new one. What the hell is going on here?

Linux doesn’t cache the DNS by default, on Windows you had to enter $ ipconfig /flushdns on your command line to clean your DNS cache. After clearing the router’s DNS cache as well (a simple reboot did it), the same behavior appeared, this way I excluded the problem on my site. Alright, next step:

$ whois marco-steinhaeuser
gives you a clear idea which Domain Name Servers (DNS) are used by the hosting provider and if the IP change was ended up finally at your country’s NIC. The result is:

Domain: marco-steinhaeuser.de
Domain-Ace: marco-steinhaeuser.de
Nserver: ns1.scunc.it
Nserver: ns2.scunc.it

Which looks nice from my hosting provider’s site. Just let’s go ahead with looking up which entry was made for marco-steinhaeuser.de on the name servers ns1.scunc.it and ns2.scunc.it. First of all, call nslookup on your command line:


$ nslookup

Now, “nslookup” the server you want to inspect:


> server ns1.scunc.it
Default server: ns1.scunc.it
Address: 81.169.185.80#53
> set type=a
> marco-steinhaeuser.de
Server: ns1.scunc.it
Address: 81.169.185.80#53

Name: marco-steinhaeuser.de
Address: 78.47.120.47

and

> server ns2.scunc.it
Default server: ns2.scunc.it
Address: 85.10.239.34#53
> set type=a
> marco-steinhaeuser.de
Server: ns2.scunc.it
Address: 85.10.239.34#53

Name: marco-steinhaeuser.de
Address: 78.47.120.47

Alright buddy, that looks okay as well: The entries for the new IP address on both DNSses on your hosting provider’s site seem to be correct. The next step shall be to check your ISP’s name server. You shall find that information at your router as it is entered automatically by default.

In my case (Kabeldeutschland) I had to nslookup 83.169.186.33 as well as it’s alternative 83.169.186.97. Are you still in nslookup mode on your console? Here we go:


> server 83.169.186.33
Default server: 83.169.186.33
Address: 83.169.186.33#53
> set type=a
> marco-steinhaeuser.de
Server: 83.169.186.33
Address: 83.169.186.33#53

Non-authoritative answer:
Name: marco-steinhaeuser.de
Address: 78.47.120.47

Wow! The new IP address is updated at least at the primary name server! But look at this one:


> server 83.169.186.97
Default server: 83.169.186.97
Address: 83.169.186.97#53
> set type=a
> marco-steinhaeuser.de
Server: 83.169.186.97
Address: 83.169.186.97#53

Non-authoritative answer:
Name: marco-steinhaeuser.de
Address: 78.46.237.174

Whatever the “Non-authoritative answer” should mean: Obviously both official Kabeldeutschland DNS servers are not synchronized. That’s a clear server misconfiguration and misbehavior in my opinion. To be honest: How the hell that can happen to a certain ISP?

However, to fix your problem, just turn off the alternative name server in your router.

No probs at all, shit can happen. So I called the 0-800 hotline to tell them what they did wrong. In the moment it was over the head of that 1st line guy and he could not help me seing my cable modem online or whatever, he tried to delegate me to another telephone number with massive costs (95 ct per minute). Unfortunately, he was not able to assign a ticket to a 2nd line. Service looks different, doesn’t it?

Of course, I would never call this hilarious number to tell them _their_ problems. Also, it doesn’t make sense to bother the server owner you would find on ripe.net as he has probably different stuff to do. Instead, I wrote all the details and logs he would need to who is the Zone-C of kabeldeutschland.de. Of course, I didn’t get any reply yet, let’s see whether something happens at all…

Many thanks to my mate Thorsten who helped me sorting this out!

Moving WordPress from one server to another

Posted by Marco Steinhäuser on Saturday, 10 October, 2009

Moving WordPress from one server to another is pretty simple. It actually shall not take longer as five minutes following this steps:

1st step – server environment

Check if the basic server environment is the same as you had on the server before, especially for

  • PHP-Version (some modules require PHP5 and higher)
  • Database-Version (maybe important for your data import)
  • special PHP modules (e.g. if you use permalinks, make sure mod_rewrite is activated and running)

If you feel like there is everything alright on the new server, you may want to go ahead.

2nd step – the database

  • Export the WordPress database of your former server to a sql-file or to a compressed sql-file. You may either use a GUI tool like phpMyAdmin or the terminal.
  • Import this (compressed) sql-file into the database on your server. Use the import function of your GUI tool to do so or the terminal if you are able to login with putty.
  • Change the path settings: In the new database of your webserver, you shall find a table called wp-options. In option_id="2", option_name="siteurl" you will find the path settings you entered during the initial installation process

romana1

3rd step – the files

  • Connect to your previous server via FTP and download the files of your WordPress document root.
  • Upload this files to you new server.
  • Using your FTP client, go to the new server’s WordPress document root and open the file wp-config.php. Adapt the new server’s database name, the database server (if needed, localhost is used mostly), the database user name and the database password.
  • Check the permissions needed for proper work of your new system:
    - wp-config.php has to be set to 0644
    - for pucture uploads etc, /wp-content/uploads/ shall be writable (0755 or 0777)
    - for updates or automatic plugin installation, /wp-content/plugins/ and /wp-content/upgrades/ shall be writable (0755 or 0777)
  • Take care: In Unix-World, e.g. if you are using any Linux or Mac (AFAIK with a FreeBSD under the hood), dotted files are not shown and not copied by default using your FTP client. So the .htaccess file which is important if you activated the so called “Permalinks” may be not transferred. Make sure it is on his place.
  • Go to Admin -> Settings -> Permalinks. In case you activated this options, at the bottom of this page the current content of your .htaccess appears like it should be. Probably the value for your RewriteBase changed. Copy this content and overwrite the .htaccess on your server.

You are done! Congratulations hero!