Archive for October, 2007

Cheap web hosting - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What

Wednesday, October 17th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY What this chapter covers: Understanding how PHP is structured Embedding PHP in a web page Storing data in variables and arrays Getting PHP to make decisions Looping through repetitive tasks Using functions for preset tasks Displaying PHP output Understanding PHP error messages If you re the sort of person who runs screaming at the sight of code, this is probably going to be the scariest chapter in the book, but it s an important one and I ve tried to make it as user-friendly as possible. The reason for putting the rules of PHP in one chapter is to make it easier for you to dip into other parts of the book and use just the bits that you want. If there s anything you don t understand, you can come back to the relevant part of this chapter to look up the details. That way, you can concentrate on what you need to know without having to wade through dozens of pages that aren t of immediate interest to you. With that in mind, I ve divided this chapter into two parts: the first section offers a quick overview of how PHP works and gives you the basic rules; the second section goes into more detail. Depending on your style of working, you can read just the first section and come back to the more detailed parts later, or you can read the chapter straight through. However, don t attempt to memorize everything at one sitting. The best way to learn anything is by doing it. Coming back to the second part of the chapter for a little information at a time is likely to be much more effective. If you re already familiar with PHP, you may just want to skim through the main headings to see what this chapter contains and brush up your knowledge on any aspects that you re a bit hazy about. PHP: The big picture When you load a PHP page into a browser, it looks no different from an ordinary web page. But before it reaches your browser, quite a lot goes on behind the scenes to generate the page s dynamic content. In most cases, this frenetic activity takes only a few microseconds, so you rarely notice any delay. At first glance, PHP code can look quite intimidating, but once you understand the basics, you ll discover that the structure is remarkably simple. If you have worked with any other computer language, such as JavaScript, ActionScript, or ASP, you ll find they have a lot in common. Every PHP page must have the following: The correct filename extension, usually .php Opening and closing PHP tags surrounding each block of PHP code
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

3 HOW TO WRITE PHP SCRIPTS (Web hosting domain names)

Tuesday, October 16th, 2007

3 HOW TO WRITE PHP SCRIPTS
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

GETTING READY TO WORK WITH PHP What s next? (Web hosting directory)

Monday, October 15th, 2007

GETTING READY TO WORK WITH PHP What s next? Now that you ve got a working test bed for PHP, you re no doubt raring to go. The last thing I want to do is dampen any enthusiasm, but before using any PHP in a live website, it s important to have a basic understanding of the basic rules of the language. So before jump ing into the really cool stuff, the next chapter explains how to write PHP. Don t skip it it s really important stuff. You may also be pleasantly surprised at how few rules there are.
We recommend high quality webhost to host and run your jsp application: christian web host services.

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE (Abyss web server) EASY The

Monday, October 15th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY The main settings are displayed in a long list titled PHP Core. In most cases, the default settings are fine. Table 2-1 lists the settings that you need to check for this book, together with the recommended values. Table 2-1. Recommended PHP configuration settings Directive Local value Remarks display_errors On Essential for debugging mistakes in your scripts. If set to Off, errors result in a completely blank screen, leaving you clueless as to the possible cause. error_reporting See remarks Displayed as a number. Since PHP 5.2.0, a setting in php.ini of E_ALL is 6143. The same setting in previous versions displays 2047. extension_dir See remarks This is mainly of importance to Windows users. It tells Windows where to find the DLL files for extensions that expand the core functionality of PHP. If you installed PHP 5 to the location recommended in this chapter, this should be C:phpext. file_uploads On Self-explanatory. Allows you to use PHP for uploading files. log_errors Off With display_errors set on, you don t need to fill your hard disk with an error log. The rest of the configuration page shows you which PHP extensions are enabled. Mac users will have many more listed than the average Windows user because extensions need to be built in at compile time on the Mac. Windows users can turn extensions on and off very quickly by editing the Dynamic Extensions section of php.ini and restarting their web server. To work with this book, you need the following extensions enabled: gd mbstring mysql mysqli pdo_mysql (optional) session Your computer reads the PHP configuration file only when the web server first starts up, so changes to php.ini require Apache or IIS to be restarted for them to take effect.
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

GETTING READY TO WORK WITH PHP (Cheap web hosting) Use the

Sunday, October 14th, 2007

GETTING READY TO WORK WITH PHP Use the name of your Mac Home folder (the one identified by a little house icon in the Finder sidebar) in place of username. 4. Press Return. You should see a screen similar to that shown in Figure 2-8. This screen not only confirms that PHP is installed and running, but also provides masses of detail about the way the installation has been configured. This is the page you will always be asked to display if you ever need to check why PHP doesn t work as expected. Figure 2-8. The precompiled PHP package created by Marc Liyanage comes with an impressive range of features. Checking your PHP settings (Windows and Mac) The screen full of information produced by phpinfo(), as shown in Figures 2-5 and 2-8, tells you just about everything you need to know about your PHP setup in a very user- friendly format. The following is a quick guide to help you check whether your installation is set up correctly to work through the rest of this book. The section at the top of the page contains two vital pieces of information: the PHP version number and the path to php.ini. You should be using a minimum of PHP 4.3.1, and preferably PHP 5 or later. The value of Configuration File (php.ini) Path tells you the location of the file your computer is reading at startup. Frequently Windows users complain that changes to php.ini have no effect. This usually means an old version has been left in the Windows system folder and is taking precedence. Remove the redundant file, and restart your web server.
In case you need quality webspace to host and run your web applications, try our personal web hosting services.

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY To (Web hosting providers)

Saturday, October 13th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY To make it easier to identify the correct place in the files you edit, choose Preferences from the BBEdit or TextWrangler menu, and then select Text Status Display. Make sure that the Show Line Numbers check box is selected, and close the Preferences dialog box. 3. At the top left of the toolbar, an icon showing a pencil with a line through it indicates that this is a read-only file. Click the pencil icon. You will see the prompt shown here. 4. Click Yes and locate the following command around line 353 (use the line number only as a guide it might be different in a later version of PHP): display_errors = Off Change it to this display_errors = On 5. About ten lines further down, locate the following command: log_errors = On Change it to log_errors = Off 6. From the File menu, choose Save, and enter your Mac administrator password when prompted. Close php.ini. 7. Restart Apache. You re now ready to test your PHP installation. If you ever need to make further adjustments to your PHP configuration, follow the same procedure to edit php.ini, and restart Apache for the changes to take effect. Testing PHP on Mac OS X 1. Open a blank file in BBEdit or TextWrangler, and type the following line of code: 2. Save the file in the Sites subfolder of your home folder as index.php. 3. Open a browser and enter the following URL in the address bar: http://localhost/~username/index.php
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Web server info - GETTING READY TO WORK WITH PHP This window

Saturday, October 13th, 2007

GETTING READY TO WORK WITH PHP This window tells you the version of Apache and the date it was built. You need the first two numbers of the server version in this case, 1.3 to ensure that you download the correct PHP package. 4. Go to www.entropy.ch/software/macosx/php/, scroll about halfway down the page, and select the Universal Binary for PHP 5 that also matches the version of Apache running on your computer. Marc Liyanage maintains PHP packages only for the current version of Mac OS X (currently 10.4). If you re using an older version, you ll have to settle for PHP 4 (assuming the link hasn t been removed by the time you read this). Read any installation instructions on the site because they contain the most up-to date information about special requirements or restrictions. 5. The Universal Binary is contained in a compressed file named entropy-php 5.x.x.tar.gz. Double-click the file to extract its contents, and then double-click the entropy-php.mpkg icon it places your desktop. Follow the instructions onscreen to install PHP. 6. Your upgraded version of PHP is ready for use, but first you need to make a minor change to the PHP configuration file php.ini. Configuring PHP to display errors on Mac OS X Marc Liyanage s package uses a version of php.ini that turns off the display of error messages. When using PHP for development, it s essential to see what s gone wrong and why. 1. Open BBEdit or TextWrangler. From the File menu, choose Open Hidden, and navi gate to Macintosh HD:usr:local:php5:lib:php.ini. Because php.ini is a pro tected file, you need to select All Files from the Enable drop-down menu at the top of the Open dialog box, shown here. Click Open. 2. When php.ini opens in your text editor, you ll see that it s a long text file and that most lines begin with a semicolon. This means they are comments; the configuration commands are on lines that don t have a semicolon at the beginning.
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY just (My web site)

Friday, October 12th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY just http://localhost/ as the address. If you test it now, you will see the same screen as shown in Figure 2-4. It makes no difference whether you use the central location or your own Sites folder. Choose whichever is more convenient for you. Installing PHP on Mac OS X Rather than attempt to activate the preinstalled version of PHP, a tedious job at the best of times, I suggest you use a precompiled Mac package created by Marc Liyanage (www.entropy.ch). You get a full-featured version of PHP that works straight out of the box. If you run into problems, there s a searchable support forum on Marc s website, on which answers tend to be fast and accurate. It should be your first port of call in case of installation problems. PHP relies heavily on the availability of external code libraries. It is essential that you have installed all the latest Apple system software updates before proceeding. Click the Apple menu and select Software Update. Install any security and OS X system updates. Using a Mac package for PHP 1. Marc Liyanage creates different packages for Apache 1.3 and Apache 2. The default installation in Mac OS X at the time of this writing is Apache 1.3, but it s important to check whether it s the same in your case. In Finder, open the Utilities folder in Applications and launch Terminal. 2. A window like the one shown here opens. All instructions to the computer are inserted as written commands at what s known as the shell prompt. This is the final line in the screenshot and it looks something like this: Vigor19:~ davidpowers$ The first part (before the colon) is the name of your Macintosh hard disk. The tilde (~) is the Unix shorthand for your home directory (or folder). It should be followed by your username and a dollar sign. As you navigate around the hard disk, your location is indicated in place of ~. All commands in Terminal are followed by Return. 3. To find out which version of Apache is running on your Mac, type the following command: httpd -v After pressing Return, you should see a window similar to the one shown here.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

GETTING READY TO WORK WITH PHP 3. Open (Web hosting ratings)

Thursday, October 11th, 2007

GETTING READY TO WORK WITH PHP 3. Open your favorite browser and type http://localhost/~username/ into the address bar, substituting your own Mac username for username. You should see a page like that shown in Figure 2-7, confirming that Apache is running. That s all there is to it. Sometimes, Macs seem to develop a personality of their own. If you have a local network, you might discover that the localhost part of the URL changes to some- thing like deathstar.localor whatever you have called your computer. For testing on the same machine, localhost is much shorter to type. After you use localhost a few times, your Mac will probably give up trying to be so clever and accept the shorter version. You can also use 127.0.0.1 as a synonym for localhost. Figure 2-7. Confirmation that Apache is running successfully on Mac OS X Where to locate your web files As the message in Figure 2-7 indicates, the place to store all your web files is in the Sites folder in your home folder. You need to keep them there because Apache needs to process PHP scripts before it can display the output in your browser. Unlike ordinary web pages, you can t just double-click them in Finder and expect them to pop up in your default browser. To view a page that uses PHP on your local computer, you must enter the correct URL in the browser address bar in the same way as you access a site on the Internet. The address for the top level of your Sites folder is http://localhost/~username/. Any subfolders are accessed by adding the folder name to the end of the URL. If you re the only person using the computer, you might prefer to locate all your files in Macintosh HD:Library:WebServer:Documents. It works exactly the same way, but instead of needing to include a tilde (~) followed by your username in the URL every time, you use
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Hosting your own web site - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY Most

Wednesday, October 10th, 2007

PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY Most of the setup is done through the familiar Mac interface, but you need to edit some configuration files. Although these are ordinary text files, they are normally hidden, so you can t use TextEdit to work with them. I suggest that you use BBEdit or TextWrangler. As mentioned earlier, TextWrangler is a cut-down version of BBEdit, which you can download free from www.barebones.com/products/textwrangler/. These instructions do not cover Mac OS X Server, which uses a different version of Apache. I have assumed that if you have the skill to run the server version of OS X, you should be able to handle the configuration without further assistance. Using Apache on Mac OS X The default version of Apache that comes preinstalled with Mac OS X is Apache 1.3. It s an excellent web server and does everything you need for developing PHP pages. Because it s preinstalled, all you need to do is switch it on. First, make sure that you re logged into Mac OS X with Administrative privileges. Starting and stopping Apache 1. Open System Preferences and select Sharing in Internet & Network. 2. In the dialog box that opens, click the lock in the bottom-left corner, if necessary, to allow you to make changes, and enter your password when prompted. Highlight Personal Web Sharing on the Services tab, as shown in Figure 2-6, and then click the Start button on the right. A message will appear, informing you that personal web sharing is starting up. After personal web sharing is running, the label on the button changes to Stop. Use this button to stop and restart Apache whenever you install a new version of PHP or make any changes to the configuration files. Click the lock again if you want to prevent accidental changes. Figure 2-6. The Apache web server on a Mac is switched on and off in the Sharing section of System Preferences.
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.