setting up apache/php in win98

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
papasmurf
Forum Newbie
Posts: 4
Joined: Sun Feb 09, 2003 3:56 pm

setting up apache/php in win98

Post by papasmurf »

i installed everything, made all the changes i read about on all the tutorials and still get these 2 errors...

http://localhost

Server Application Error
The server has encountered an error while loading an application during the processing of your request. Possible error could be the application is not registered correctly. Please contact the server administrator for assistan

and if i try to access a specific file such as http://localhost/phpinfo.php
i get:

HTTP Error 403
403.1 Forbidden: Execute Access Forbidden

This error can be caused if you try to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.

Please contact the Web server's administrator if the problem persists.


i went to the properties of the www dir and changed the sharing to read, exec, and script and still get same results...

anyone know how to fix?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

which version of apache and php? Did you take the installer version of php or the zip-distribution? Is php installed as cgi or as module?
User avatar
BigE
Site Admin
Posts: 139
Joined: Fri Apr 19, 2002 9:49 am
Location: Missouri, USA
Contact:

Post by BigE »

It appears from the error messages that you tried to install PHP as a cgi... I strongly suggest against that. You should install PHP as a module. The lines you need to add to your httpd.conf are located in the install document that came with PHP.
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

I use easy.php which installed first time no hassle:

http://www.easyphp.org
crazyjimsmith
Forum Commoner
Posts: 28
Joined: Sat Jan 11, 2003 1:46 pm
Location: Sydney
Contact:

Post by crazyjimsmith »

I tried to isnatll apache onto my windows machine. I had so much hassles and then somebody said try easyphp.

It rocks! 8)
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

On windows i use nusphere (http://www.nusphere.com).. it installs apache, mysql, perl...
cctrax
Forum Commoner
Posts: 36
Joined: Thu Jul 11, 2002 9:05 pm
Location: United States
Contact:

Post by cctrax »

Maybe this will help:

Installing an Apache Web Server / PHP on Windows

This tutorial will explain in detail how to install an Apache Web Server on a Windows Operating System. Installing Apache on your personal computer will allow you to turn your computer into a one man website. When you install both Apache and PHP, you will allow yourself to test your PHP scripts on your computer before you upload them to the internet. This can save quite a bit of time you would be spending uploading a new script every time you receive an error.

I would always recommend that you install the latest version of Apache. You can find Apache at it’s home address, http://www.apache.org. Browse through their list of downloads, and see what you can come up with. You may want to read through the announcements to make sure that the file you are downloading is the most current.

Installing PHP

Before we install Apache, lets make sure we have PHP installed first. Like I did with Apache, I would recommend that you download the most current version of PHP. You can find this in the downloads section of PHP’s home, http://www.php.net.

Once you have downloaded the program, run the setup file. As with any other program you install, you will have to choose a directory to install PHP in. If I were you, I would choose the default directory. Later in this tutorial, you will have to tell Apache where to run your PHP scripts through. Just make sure you remember what directory you install PHP in!

A menu asking for the name of your SMTP email service. Nine times out of ten, you can just leave that as localhost. Then be sure to supply the email address you would like assigned to your outgoing email.

You will then be taken to one finial menu. Here you will have to choose what type of server you would like PHP to be configured with. Basically, this is going to be the server type you install on your machine. If you plan on following this tutorial, select Apache. You will receive an error message explaining that PHP could not be configured with Apache, and that you are going to have to do it yourself. No worries, we will get to that step now.

Installing Apache

Installing Apache is much easier. It uses the Windows Default Installation Program, and just takes a few clicks of the mouse. Just run the setup program, and follow the directions on the screen.

Once you have installed the server itself, it would be best to install Apache as a service. Basically, you are telling your machine that you would like to run Apache every time Windows Starts Up. Once you install Apache as a service, you will have the option of turning the server on and off through the start menu, however it would be easier to not have to worry about these types of things.

To install Apache as a service, open up the start menu, click on programs, apache web server, apache as a service, and install service. Now be sure to restart your computer. Simple enough huh?

Now that we have installed Apache to all it’s glory, we want to make sure it works. Open your web browser, and point the browser to your IP address. If you do not know what your IP address is, simply click on the start menu, run, and type in the command “winipcfg.” For example, you may have something like http://192.168.1.100 when you finish. Hopefully you see an HTML document that states in very large words at the top of the page, “Seeing this instead of the website you expected?” Congratulations, you just installed a web server on your computer, however we are not finished.

Configuring Apache to Run PHP

Before you can run your PHP scripts with Apache, you have to configure Apache. It is nothing all that hard. Just a few lines of text you have to add to the bottom of the configuration file.

Click on the start menu, programs, apache web server, management, and edit configuration. Scroll down to the bottom of the page, and type in these exact lines. (However, if you did not install PHP to the c:/php/ directory, you will have to amend this code accordingly.

ScriptAlias /php/ “c:/php/”
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php “/php/php.exe”

In the first line we created a virtual path that will allow Apache to get to the PHP Program itself. Then in the next line we told apache what file extensions we wanted to use. When Apache sees these file extensions, it knows to run the files through the PHP Program (this is what we did in the third, and finial line). And it knows how to find the program because you told in so in the first line.

One Finial Test

Earlier we tested to make sure that we had installed Apache correctly on your machine. How lets make sure we configured Apache correctly.

Create a new file using notepad, or another HTML (or PHP) editor. Then type in the following lines.

<?php
phpinfo();
?>

Save it as test.php

When you save this file, you will want to save it on your server. Click on my computer, local disk (C:), program files, apache group, apache, and htdocs. Generally this can become a pain in the pass, so it would be nice to create a shortcut to the directory, and store the shortcut in a easier place.

Now point your browser at http://127.0.0.1/test.php (or you can use your IP address in the stead of 127.0.0.1). If a nice pretty page opened up with a bunch of information about Apache and your current version of Apache / PHP, then you have done well.
User Login: Please enter your username and password below. If you have yet to join us, please Register today!
papasmurf
Forum Newbie
Posts: 4
Joined: Sun Feb 09, 2003 3:56 pm

??

Post by papasmurf »

how do you install easyphp when its in !english?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

Do you mean how do you change the language TO English?

I went through a LONG period of impenetrable, French, mysql error messages until I realised you can change language.

Open easy.php, right click the icon in the right of the Taskbar, select configuration / easyphp.

Set the mysql arguments to this:

--skip-name-resolve --language=english

Think you need to restart to see the change.

Actually that was the last thing I did after messing about with some ini files, but I think that on its own does the trick. If not, post again and I'll see if I can help.
crazyjimsmith
Forum Commoner
Posts: 28
Joined: Sat Jan 11, 2003 1:46 pm
Location: Sydney
Contact:

Post by crazyjimsmith »

Err

I am still running things in French. Its not hard to install or run. I dont know any french by the way and I figured it out.
Post Reply