Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Sunday, 30 October 2011

Installing PHP 5.3.5, PHP 5.3.6, PHP 5.3.7 or PHP 5.3.8 on Windows

Which PHP Version do I install on Windows? PHP 5.3.5, PHP 5.3.6, PHP 5.3.7 or PHP 5.3.8?

So you have decided to install PHP into a windows operating system with Apache because it is the best http web server around. The bigger the number the better it should be right?

Not so.

And luckily for you, we have created an easy how to install php for windows walk through guide for you. But before you jump ahead, first ask yourself if you are installing Apache downloaded from the apache website. If so, then make sure you use the PHP 5.3.5 guide when you arrive at the PHP install guide destination.

If you are using (or are willing to use) the apache version compiled at Apache Lounge, then use PHP 5.3.8 or PHP 5.3.6. The newer version is the most up to date version.

PHP 5.3.7 is buggy which is why PHP 5.3.8 was released so soon after it.

Although the install guide says it is for PHP 5.3.6, it actually points to the PHP 5.3.8 version (or the 5.3.6 version if you prefer) and will guide you through the install process and help you to troubleshoot any issues you may encounter.

Should I install PHP 5.4
Only install PHP 5.4 if you understand that it is still in Beta. That means that this version is still in testing mode and may change before an official production version becomes available for general public release.

If you are setting up a test computer for your online website. It is best to install the same version that you have on your website. How to find this out is also covered in the guide link above.

-fin


Tuesday, 14 June 2011

How to remove Php 5.3.x. An un-install Php loop solution.

Have you had an endless loop problem when trying to remove Php 5.3.x from your Windows system? You run the install or un-install program and you are continuously told the software is unable to complete the process (install or un-install)?

There is a solution to this problem which lies in fixing the Windows registry keys. We have updated our Php 5.3.5 and Php 5.3.6 troubleshooting guides to assist those in need of a method to break the endless chain.

Tuesday, 19 April 2011

Why does Php 5.3 need or require Apache VC9?

Pre Php5.3.6
If you are looking to install Php 5.3 with official Apache Http Server 2.2.17 software on a Windows Operating System (XP SP3 or later), you can happily install and use Php version 5.3.5 or earlier. Our install guides cover apache VC6 compatible download and install for Php versions 5.3.3 onwards. You can select the version you wish to install from top or side menu selections. Our 5.3.5 guide carries an updated troubleshooter and other more contemporary data. This includes a discourse on VC6 and VC9 which is further expanded upon in the 5.3.6 guide.

Post Php5.3.5 
The only reason your Php installation would need or require Apache VC9 is if you were determined to install Php 5.3.6 (or a newer version of Php) on a Windows Computer that is serving the web or you plan to use this exact setup to serve your web pages on the internet in the future. The Php-Windows team (for Apache software) is currently using a VC9 Apache compiled resource for their own further development of Php-Apache on Windows software. This is a specific Windows thing and is further covered in our 5.3.6 guide.

What Web Server
So the main question to resolve here is what operating system are you running on your web server? If you have a web host, this information will be detailed in the configuration notes you were given when you signed up for your hosting package. If not, send an email to tech support and ask them what server software configuration you are using to host your website.

My website is run on Unix.. Therefore my server side software is Unix-Apache-Php and suffers from none of the limitations of a Windows-Apache-Php setup.

My work system is MicroSoft. So my website testing software setup is going to remain VC6 simply because this is the only software the Apache Website lists as an approved Windows-Apache download. Would  I ever switch to a MicroSoft as a website server? Never!

What are my options
But some of you might use windows as a website server and so this question might be more dear to you than it is to me. And this raises four potential paths of action for you.

  • Do nothing, (use Php 5.3.5 or earlier).
  • Change to a Php endorsed VC9 version of Apache software
  • Wait for an Apache Software Foundation endorsed VC9 version of software
  • Switch to a Unix/Linux or other operating system using the Apache HTTP Server that does not suffer from this ongoing issue.
Of course, in many cases, we can transfer your site and setup a hosting website package for you from as little as $100/yr* on a unix server if you want to look at the last option.

Friday, 15 April 2011

Re-installing MySql 5.1 notes

Using our MySql 5.1 install guide helps to get you up and running fast. We might include a 5.5 / 5.6 update at some point but i thought this note on re-installing might be of use to those who encounter reinstalling issues.

These notes are in reference to installing an established third party software program on apache-windows.

The Most important part of MySql setup is to record your username/passwords when you first setup MySql. Nothing can test or use the database without this (i would still ignore all VC9 versions until after you get it all working, there are still things that are not VC9 compatible and this side-steps any potential issue. Php 5.3.6 for windows is only moderately open source because not all of the files required to compile the windows source code are easily accessible at this time. So, this means not all can easily compile their own VC6 version yet either).

Your error appears to be that you did not include the correct username password for MySql. And because MySql was not removed properly (not your fault), MySql was not re-installed properly, so just having the right user/pass might not have fixed the problem anyway.

Yes, use windows add-remove first and then you will also need to remove the left over files/folders for both 5.5. and/or 5.1 manually. You will find that these folders still exist. Delete them if there is nothing in your database or move them somewhere else for now if there is anything in them you think you might need later. You can also do a full search for my.ini to make sure the ini file is gone or moved. I would probably re-boot after these steps just to be sure there is no lingering configuration data in memory.

When you get rid of MySql completely, it will re-install like a first time installation. Yes, the custom setup guide displays the windows in a different in order. This gives more control to the installation process and is better to use.

You can also ignore extra developer options in fig. 04, no-one needs these for normal database use. Only useful for developers.

Thursday, 7 April 2011

Official VC9 Apache downloads

An interesting question came up today regarding where on the Apache site does one get the official VC9 build.

Most that ask this question would be new Http Server Setup users looking to install VC9 Php 5.3.6 or VC9 Php 5.3.8 with VC9 Apache 2.2.17 or Apache 2.2.19.

Now that query actually had me stumped because i am pretty sure our latest Php 5.3.6 install guide pretty much answers this question with solutions quite adequately.

But here was this question from a purely apache point of view. And our Apache 2.2.17 install guide or Apache 2.2.19 install guide is pretty darn good too. But yes, it didn't quite answer this fully. So I have made an amendment to the apache install guide which now includes a link so that you can check in case this ever changes, but for now, the only official Apache for Windows downloads are the VC6 version downloads.

You can also download official apache 2.2.17 / apache 2.2.19 through our apache install guide or access non-official Apache VC9 versions through our newer php install guides.

And by official we mean the x86 32 bit binaries as provided by willing Apache Software Foundation community members and are available for download from the official apache website.

And this means that if you want to use official Apache software, you should look to install Php Version 5.3.5 (or earlier) as Php, with malice aforethought, did not release a 5.3.6 VC6 update with this or any other new release. See our newer PHP guides to learn where to download the VC9 Versions which work with the newer PHP releases.

Get Apache HTTP Server 2.2 Docs

Apache HTTP Server 2.2 Official Documentation Volume I
Server Administration

Apache HTTP Server 2.2 Official Documentation Volume II
Security and Server Programs

Apache HTTP Server 2.2 Official Documentation Volume III
Modules A-H

Apache HTTP Server 2.2 Official Documentation Volume IV
Modules I-V

Saturday, 2 April 2011

Php tip - how to explode time and get rid of the 0s and add an ordinal sufix

When displaying time, i like to have 1, 2, 3 etc. No zeros. Not only that, i like the ordinals. So i want 1st, 2nd, 4th etc.

So i was plying with php again today and figured this to be a simple way out, there may be other ways, but this one works just fine (Here is a live working demo of this with the same code to copy and paste if you prefer to see it in action too.)

First we work out what we want to display eg. this is my favorite:
<?php echo date('l, dS F Y'); ?>

And that takes care of most of it, except for the first nine days of the month where we get 01st, 02nd, 08th etc. and that makes us feel pretty ordinary about our ordinals.

So, second, lets lop off those zeros. Explode and using ltrim on the 2nd variable in our new explode array fixes that if we tell it to expunge any 0s. Then ltrim will go into action and fix our 01st-09th days and so...

<?php
$BlitDate = explode(" ", date('l, dS F Y'));
$BlitDate[1]= ltrim($BlitDate[1], "0");
echo "$BlitDate[0] ";
echo "$BlitDate[1] ";
echo "$BlitDate[2] ";
echo "$BlitDate[3] ";
?>

You can run an if instruction if you want to only run ltrim on the first several days of the month like so..
<?php
$BlitDate = explode(" ", date('l, dS F Y'));
if ( $BlitDate[1] < 10 ) {$BlitDate[1]= ltrim($BlitDate[1], "0");
}
echo "$BlitDate[0] ";
echo "$BlitDate[1] ";
echo "$BlitDate[2] ";
echo "$BlitDate[3] ";
?>

they both smell of roses and you're all fixed up and ready to go again!

Php Code tip. Displaying your server location by exploding time

I was playing with some php code earlier today and wondering if i could write a little piece of lazy code to write the local location of my server instead of having to type the city/town and country each time. And then i remembered the timezone gave almost exactly what i want.

You know, this bit of code:
<?php echo date('e'); ?>


except it is backwards and can have up to three fields all with a pedantic / in the middle, so i thought ok, how about i strip out the slash and reverse the order. Close enough.

<?php
$zones = explode("/", date('e'));
echo "$zones[2] ";
echo "$zones[1] ";
echo "$zones[0] ";
?>

and then i thought, oh yeah, that works. But i can't be bothered with it anymore. Maybe some else is looking for it. And there it is

Thursday, 31 March 2011

step guide to installing php 5.3.6 on apache windows

If you are looking for a step by step guide to installing php5.3.6 on your computer then take a look at our newest walk-through for setting up your php5.3 on  apache. It is near complete now and pretty much ready to roll.

This version is also a nice easy install for the threadsafe module setup option. A little config editing on the other two set up types but still very simple no matter which way you plan to use it. I added some resource notes about VC9 apache for those who wanna play with that too. This Php release addresses over 60 bugs etc. when compared against the 5.3.5 version.

Wednesday, 30 March 2011

PHP5.3.6 nts: You have chosen to open ... .php which is a php script.

I was having a play with installing PHP 5.3.6 nts (which has been out for about a week now). So i'll just pretend this is a trusty step by step windows guide to installing Php5.3.6 to walk me through that. (link now updated to to the 5.3.6 guide -  1th April 11)

After install i noticed the browser error (in Firefox and Internet Explorer): "You have chosen to open ... .php" "which is a php script" and i noticed that guide doesn't really discuss this message completely in it's Php 5.3 troubleshooter for those that encounter this error upon first testing.

So this data applies to an apache 2.2 install on a home test system. But you'll get the gist of it either way. Obviously, the browser doesn't know what to do with the file and asks what to open it with or asks if you want to download it.

But the problem actually lies earlier, the browser should not care if it is a php file, that is why we are configuring the apache config file..

So, two possible scenarios come to mind which will spit back that exact error. To fix it, One, configure your apache httpd.conf file correctly and then Two, now that your .conf file is corrected, stop testing the cached copy which wasn't working and still isn't working.. So either select another .php file to test or rename the test file (reboot system / clear browser cache - what ever works for you). But fix the configuration first.

On my install, I noticed the httpd.conf edit steps were incomplete (the installer expects that you self edit this step) and so needed to use the above link for the copy paste code for change 1 & 2 and then reboot a couple of times (yes, reboot a couple of times, and no, i don't know why - i'll guess it is because my Apache is VC6 and this version of PHP is VC9 only) for everything to come up roses.

Monday, 28 March 2011

Installing PHP 5.3.6 on windows XP iii without trouble shooting problems

A while back i was wondering where you find a simple step by step guide to installing Php 5.3.6 on an Apache Windows XP computer. And then i remembered this site has one of the best and most informative installing php resources for the latest 5.3 series around.

Especially when doing a clean install, you still have to navigate the rocks in the waters. And this guide brings you home safe. Also has a really good trouble shooter in case you get lost along the way. And you can step through apache or mysql 5.1 too.

Saturday, 26 March 2011

binary-tools.zip and PHP compilation

Some folks like to compile their PHP software themselves. To do this, you require the binary-tools.zip.

Funny thing is that you actually get this file from the same place you get all your other needed files from but some of us just forget to do that at the time. So I decided to link the needed binary-tools.zip and other needed resources here so that anyone can easily throw together a VC6, VC8 or VC9 compilation.

Hope it helps

Amended note:

You can now download the binary-tools.zip from our website's free downloads page.


This note updates the note below. If you visit the first link in the article, you will be able to also download the source code for older Php versions including 5.3.5.

(The official compile-your-own download link has been down since March 19, 2011, two days after the release of 5.3.6 which has no VC6 release. We have provided a resource for download of the binary-tools.zip file at the above link)