Archive for September, 2007

Web server info - GETTING READY TO WORK WITH PHP Individual programs

Sunday, September 30th, 2007

GETTING READY TO WORK WITH PHP Individual programs or an all-in-one package? If you re using Mac OS X, the decision is simple: Apache is already installed, so you just need to switch it on, and both PHP and MySQL are available as Mac packages. Individual installation is the most sensible way to go. Jump ahead to the section titled Setting up on Mac OS X later in this chapter. Windows users need to do a bit more work to get everything up and running, so there s a strong temptation to opt for an all-in-one package. Two, in particular, have a good repu tation as being stable and easy to install: XAMMP (www.apachefriends.org/en) and WAMP (www.en.wampserver.com). However, before opting for the easy route, you should consider the following notice on the official PHP site at www.php.net/manual/en/install. windows.php: I have no experience of working with XAMMP or WAMP, so I will offer no further advice on either of them. The instructions in the rest of this chapter concentrate on installing the official versions of all the software. Setting up on Windows These instructions have been tested on Windows 2000, XP Home, and XP Pro. Make sure that you re logged on as an Administrator. New versions of software are being released all the time. Check this book s page at www.friendsofed.com for updates. Changes relevant to Windows Vista will also be posted there. Getting Windows to display filename extensions By default, most Windows computers hide the three- or four-letter filename extension, such as .doc or .html, so all you see in dialog boxes and Windows Explorer is thisfile instead of thisfile.doc or thisfile.html. The ability to see these filename extensions is essential for working with PHP. If you haven t already enabled the display of filename extensions, open Start . My Computer (it s a desktop icon on Windows 2000). Then from the menu at the top of the window, choose Tools . Folder Options . View. Uncheck the box marked Hide extensions for known file types. Click OK.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Fedora web server - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY I

Sunday, September 30th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY I have found the following file comparison utilities to be reliable: Windows Beyond Compare (www.scootersoftware.com): An excellent tool. Try it free for 30 days. Thereafter it requires an individual license ($30 at the time of this writing). WinMerge (http://winmerge.sourceforge.net): A good open source tool. Free. Mac OS X TextWrangler and BBEdit (both from www.barebones.com) contain good file comparison utilities. TextWrangler is a free, cut-down version of BBEdit. Deciding where to test your pages Unlike ordinary web pages, you can t just double-click PHP pages in Windows Explorer or Finder on a Mac and view them in your browser. They need to be parsed processed through a web server that supports PHP. If your hosting company supports PHP, you can just upload your files to your website and test them there. However, you need to upload the file every time you make a change. In the early days, you ll probably find you have to do this often because of some minor mistake in your code. As you become more experienced, you ll still need to upload files frequently because you ll want to experiment with different ideas. If you want to get working with PHP straight away, by all means use your remote server as a test bed. However, I m sure you ll soon discover the need to set up a local PHP test environment. The rest of this chapter is devoted to showing you how to do it, with separate instructions for Windows and Mac OS X. What you need for a local test environment To test PHP pages on your local computer, you need to install the following: A web server (Apache or IIS) PHP To work with a database, you ll also need MySQL. However, you can do a great deal with PHP even without a database, so I plan to leave the installation of MySQL until Chapter 10. All the software you need is free. The only cost to you is the time it takes to download the necessary files, plus, of course, the time to make sure everything is set up correctly. You could be up and running in little more than an hour. However, I urge you not to rush things. Although the installation process isn t difficult, you do need to get it right. If you already have a web server and PHP on your local computer, there s no need to reinstall. Just check the section at the end of the chapter titled Checking your PHP set- tings (Windows and Mac).
Go visit our java server pages services for a reliable, lowcost webhost to satisfy all your needs.

Web site designers - GETTING READY TO WORK WITH PHP EditPlus 2:

Saturday, September 29th, 2007

GETTING READY TO WORK WITH PHP EditPlus 2: Versatile text-only editor for Windows If you prefer to hew your code in a text-only environment, EditPlus 2 (www.editplus.com) is an excellent choice. It comes with a lot of built-in features, but you can extend the pro gram with custom syntax files. One set that I find particularly useful is www.editplus.com/ files/php504.zip. It specifies syntax coloring and automates many routine tasks. EditPlus 2 is available only for Windows. BBEdit and TextMate: Script editors for Mac OS X BBEdit (www.barebones.com/products/bbedit/index.shtml) is the granddaddy of Mac text editors. It s excellent for working with XHTML. Although it has line numbering, syntax coloring, and a balance braces feature, it doesn t have any special PHP features. A much cheaper alternative is TextMate (http://macromates.com), which does have extensive sup port for PHP through a user-contributed bundle. Checking your scripts with a file comparison utility You re bound to make mistakes, particularly in the early stages. Often, you ll find that the problem is just a missing comma, semicolon, or quotation mark, but spotting the culprit can be the devil s own work in a page full of code. To help you with the learning process, you can download all the code for this book from www.friendsofed.com/downloads.html. Even so, comparing my files with yours can be time-consuming, not to mention tedious. File comparison utilities to the rescue! A file comparison utility automatically compares two files line by line, highlighting any dif ferences. Figure 2-2 shows the results of comparing two versions of the same file in the Windows program Beyond Compare, using the option to show just the differences. The section at the bottom of the screenshot shows the same line from each file one on top of the other, and highlights any differences. Using a file comparison utility with the download files will save you hours of fruitless searching. Figure 2-2. A file comparison utility makes light work of finding differences between your code and the download files.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY displaying (Remote web server)

Friday, September 28th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY displaying the output of your PHP code in Design view, making it easier to envisage how your final page will look. Figure 2-1. Dreamweaver lets you see the output of your PHP code in Design view. The Coding toolbar puts several useful tools, including the balance braces feature, alongside the code you re working on. And pressing Ctrl+Space anywhere in a PHP code block displays code hints for just about every PHP function you can imagine. Dreamweaver can also generate a lot of PHP code for you automatically. This book is designed to be software-neutral, so it doesn t cover automatic code generation. For that, see my book Foundation PHP for Dreamweaver 8 (friends of ED, ISBN: 1-59059-569-6). GoLive CS2: Some useful features GoLive (www.adobe.com/products/golive/) is commonly regarded as the HTML editor for designers who tremble at the mere thought of code, but it does offer quick access to the underlying code (just click the Source tab at the top of the document window). GoLive doesn t have any special PHP features, but its syntax coloring treats PHP more than adequately, and line numbering is displayed by default in Source view. The balance braces feature is hidden, but it works quite well once you find it: double-click an opening or closing brace or parenthesis (but not square bracket) and content is highlighted up to the matching brace.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

GETTING READY TO WORK WITH PHP version of (Web host)

Thursday, September 27th, 2007

GETTING READY TO WORK WITH PHP version of PHP is running on your server. You need a minimum of 4.3.1 to use the code in this book. If you get a message that says something like Parse error, it means PHP is supported, but that you have made a mistake in typing the file. Use the download version instead. If you just see the original code, it means PHP is not supported. Hosting companies have been incredibly slow to update from PHP 4, frequently citing lack of demand. If your server is still running PHP 4, contact your host and tell them you want PHP 5 (or PHP 6 if that s the current version by the time you read this). Although you can do a lot of really cool things with PHP 4, the newer versions are faster, have more fea tures, and are more secure. If your host refuses to upgrade, it may be time to move to a new one. Equally, if you saw the raw code, you need to move to a new server. Try to find one that offers a minimum of PHP 5. Choosing a good script editor for PHP Although PHP isn t difficult to learn, if there s a mistake in your code, your page will prob ably never make it as far as the browser, and all you ll see is an error message. So, although you can write PHP in Notepad or TextEdit, you re much better off with a script editor that has at least the first three of the following features: Line numbering: Most good script editors allow you to toggle on and off the dis play of line numbers. Being able to find a specific line quickly makes troubleshoot ing a lot simpler. A balance braces feature: PHP uses parentheses (()), square brackets ([]), and curly braces ({}), which must always be in matching pairs. It s easy to forget to close a pair. All good script editors have a feature that finds the matching paren thesis, bracket, or brace. PHP syntax coloring: Some script editors highlight code in different colors. If your code is in an unexpected color, it s a sure sign that you ve made a typing mistake. PHP code hints: This is mainly of interest to more advanced users, but some editors automatically display tooltips with reminders of how a particular piece of code works. The following section describes some of the script editors you might like to consider. Dreamweaver: Visual display of PHP output My personal choice for writing PHP code, Dreamweaver (www.adobe.com/products/ dreamweaver/), has all of the features just listed. It also has the advantage of strong sup port for CSS and valid XHTML, making it an ideal editor for designers who want to add interactive elements to their web pages. As Figure 2-1 shows, Dreamweaver is capable of
We recommend high quality webhost to host and run your jsp application: christian web host services.

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE (Dedicated web hosting) EASY What

Thursday, September 27th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What this chapter covers: Determining what you need Deciding whether to create a local testing setup Using a ready-made package Doing it yourself setting up Apache and PHP on Windows and Mac OS X Getting PHP to work with IIS on Windows Making sure PHP has the right settings Now that you ve decided to use PHP to enrich your web pages, you need to make sure that you have everything you need to get on with the rest of this book. Although you can test everything on your remote server, it s usually more convenient to test PHP pages on your local computer. Everything you need to install is free. In this chapter, I ll explain the various options and give instructions for both Windows and Mac OS X. What you need to write and test PHP pages PHP is written in plain text, so you don t need any special authoring software. However, your life will be a lot easier if you choose a good script editor. I ll offer some advice on what to look for. The other thing you need is a web server capable of understanding PHP. Checking whether your website supports PHP The easiest way to find out whether your website supports PHP is to ask your hosting company. The other way to find out is to upload a PHP page to your website and see if it works. Even if you know that your site supports PHP, do the following test to confirm which version is running. Checking the PHP version on your server 1. Open Notepad or TextEdit and type the following code into a blank page: 2. Save the file as phptest.php. It s important to make sure that your operating system doesn t add a .txt filename extension after the .php. Mac users should also make sure that TextEdit doesn t save the file in Rich Text Format (RTF). If you re at all unsure, use phptest.php from the download files for this chapter. 3. Upload phptest.php to your website in the same way you would an HTML page, and then type the URL into a browser. If you see a three-part number like 5.2.0 displayed onscreen, you re in business: PHP is enabled. The number tells you which
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

2 GETTING READY TO (Web site design and hosting) WORK WITH PHP

Wednesday, September 26th, 2007

2 GETTING READY TO WORK WITH PHP
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Cedant web hosting - WHAT IS PHP AND WHY SHOULD I CARE? they

Tuesday, September 25th, 2007

WHAT IS PHP AND WHY SHOULD I CARE? they have more features, but also they are usually safer. Nevertheless, this book has been written with both backward and forward compatibility in mind. Except where noted, all the code in this book should run on PHP 4.3.1 and MySQL 3.23.32 or later. I have also deliber ately avoided using any code that is likely to break in PHP 6. So, let s get on with it . . . This chapter has provided only a brief overview of what PHP can do to add dynamic fea tures to your websites and what you can expect from the rest of this book. The first stage in working with PHP is to set up a testing environment. The next chapter covers the process in detail for both Windows and Mac OS X.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

WHAT IS PHP AND WHY SHOULD I CARE? Figure (1 on 1 web hosting)

Tuesday, September 18th, 2007

WHAT IS PHP AND WHY SHOULD I CARE? Figure 1-4. Server-side languages like PHP are intolerant of most coding errors. 1 PHP isn t like XHTML: you can t choose from a range of PHP editors that generate all the code for you automatically. Dreamweaver does have considerable support for PHP, and it automates a lot of code generation, mainly for integrating web pages with the MySQL database. Even so, most of the techniques in this book still need to be coded by hand in Dreamweaver. For more details of what Dreamweaver can do with PHP, see my book Foundation PHP for Dreamweaver 8 (friends of ED, ISBN: 1-59059-569-6). Can I just copy and paste the code? There s nothing wrong with copying the code in this book. That s what it s there for. Copying is the way we all learn as children, but most of us progress from the copycat stage by asking questions and beginning to experiment on our own. Rather than attempt to teach you PHP by going through a series of boring exercises that have no immediate value to your web pages, I ve structured this book so that you jump straight into applying your newfound knowledge to practical projects. At the same time, I explain what the code is for and why it s there. Even if you don t understand exactly how it all works, this should give you sufficient knowledge to know which parts of the code to adapt to your own needs and which parts are best left alone. If you re completely new to PHP, I suggest that you read at least the first six chapters in the order they appear. Chapter 3 covers all the basics of writing PHP. The first half of the
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Freelance web design - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY How

Monday, September 17th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY How hard is PHP to use and learn? PHP isn t rocket science, but at the same time, don t expect to become an expert in five minutes. If you re a design-oriented person, you may find it takes time to get used to the way PHP is written. What I like about it very much is that it s succinct. For instance, in classic ASP, to display each word of a sentence on a separate line, you have to type out all this: <%@ Language=VBScript %> <% Option Explicit %> <% Dim strSentence, arrWords, strWord strSentence = "ASP uses far more code to do the same as PHP" arrWords = Split(strSentence, " ", -1, 1) For Each strWord in arrWords Response.Write(strWord) Response.Write("
“) Next %> In PHP, it s simply “; } ?> That may not seem a big difference, but the extra typing gets very tiresome over a long script. PHP also makes it easy to recognize variables, because they always begin with $. Most of the functions have very intuitive names. For example, mysql_connect() connects you to a MySQL database. Even when the names look strange at first sight, you can often work out where they came from. In the preceding example, explode() blows apart text and converts it into an array of its component parts. Don t worry if you don t know what variables, functions, or arrays are: they re all explained in Chapter 3, along with the other main things you need to know about the basics of PHP. Perhaps the biggest shock to newcomers is that PHP is far less tolerant of mistakes than browsers are with XHTML. If you omit a closing tag in XHTML, most browsers will still render the page. If you omit a closing quote, semicolon, or brace in PHP, you ll get an uncompromising error message like that shown in Figure 1-4. This isn t just a feature of PHP, but of all server-side technologies, including ASP, ASP.NET, and ColdFusion. It s why you need to have a reasonable understanding of XHTML and CSS before embarking on PHP. If the underlying structure of your web pages is shaky to start with, your learning curve with PHP will be considerably steeper.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.