Jump to content

Recommended Posts

hello,

i've been searching for a tutorial to install the latest versions of apache,php, and mysql and no luck. It seems like the instructions to install these guys on a home server has changed........i would appreciate any help.......

 

oh and i did google it

 

thanks

Hrmmm I doubt there is a tutorial then....  It's pretty easy to install Apache/PHP/MySQL on Windows.  I would just install Apache using the .exe (or maybe .msi) installer available for download from http://httpd.apache.org/, then I would download and install MySQL (using the .exe installer).  Then, I would download the .zip PHP package, and I would add it to Apache as a module.  You might want to change DirectoryIndex in httpd.conf to have index.php too.

 

 

 

As for what would be needed in httpd.conf for PHP to be loaded, you could use something like:

 

PHPIniDir "/path/to/php/folder/"
LoadModule php5_module "/path/to/php/folder/php5apache2_2.dll"
AddType application/x-httpd-php .php

Hrmmm I doubt there is a tutorial then....  It's pretty easy to install Apache/PHP/MySQL on Windows.  I would just install Apache using the .exe (or maybe .msi) installer available for download from http://httpd.apache.org/, then I would download and install MySQL (using the .exe installer).  Then, I would download the .zip PHP package, and I would add it to Apache as a module.  You might want to change DirectoryIndex in httpd.conf to have index.php too.

 

 

 

As for what would be needed in httpd.conf for PHP to be loaded, you could use something like:

 

PHPIniDir "/path/to/php/folder/"
LoadModule php5_module "/path/to/php/folder/php5apache2_2.dll"
AddType application/x-httpd-php .php

 

 

yup the tutorial i found says to do just that.......problem is i cant find anything to do with php5apache.dll or any .dll files in the php zip

 

this is the tutorial

http://www.php-mysql-tutorial.com/wikis/php-tutorial/installing-php-and-mysql.aspx

and the guy is on old php and apache

 

if you go down to the installing php part you'll find the php4ts.dll and how to add Loads to httpd.conf of apache

 

yup the tutorial i found says to do just that.......problem is i cant find anything to do with php5apache.dll or any .dll files in the php zip

If you cannot find the php5apache.dll or php5apache2.dll or php5apache2_2.dll then ensure you have downloaded the correct php package from php.net. Should be the one titled as PHP 5.2.9 zip package [10,266Kb] - 26 February 2009.

 

Just extract the contents of the zip to C:/php and configure Apache as corbin described in his post above. Note

 

When it comes to adding this line:

LoadModule php5_module "/path/to/php/folder/php5apache2_2.dll"

Ensure you use the correct .dll. PHP comes with three .dlls for apache here is what they are used for

php5apache.dll is for Apache 1.3.x only

php5apache2.dll is for Apache2.0.x only

php5apache2_2.dll is for Apache2.2.x only

 

You should also rename php.ini-recommended to php.ini within your php installation folder. It is also a good idea add PHP to the Path Environment Variable.

Oh man you guys are AWESOME!!! works GREAT!!

 

now one last issue while we are still on the subject........i am able to change httpd.conf to where i want DocumnentRoot to point to and i want it to point to the servers root which is

 

C:\Inetpub\wwwroot\

 

when i do that i keep recieving a Forbidden message........i changed the permissions IIS manager but i still cant get access...is there some where else i need to be looking at?

 

 

by the way guys i just want to create a server to run a small site from home

 

 

you guys have been a great help!!

Thanks!

The forbidden error is not IIS its from Apache.

 

When you set the DocumentRoot to C:\Inetpub\wwwroot\ did update the <Directory C:/your/old/path></Directory> section as well (located a few lines down from where you set DocumentRoot)? Post your httpd.conf file here if you're not sure

OMG! its workS!!

 

you were right as soon as i changed the <Directory> thing it worked..........this is all new to me...so to have it working hahahah ITS AWESOME!!

 

but i thought that once i have it pointed to the wwwroot folder i can just go to my ip(http://ip) and it would run the server........is that right??

 

like how can i make all this live??

 

Thanks Again Guys!!

Yes you should be able to go to http://localhost/ or http://your-ipaddres/

 

However you may need to configure your router to forward port 80 to your computers LAN address and setup your firewall to allow external connections to port 80.

you were right........i did just that....i was able to open up a port specifically to the server and it works great.....but wouldnt this be extremely risky??? isnt it a security risk to have it open?

 

how can i protect myself from hackers??

 

 

thanks again......if you werent for you guys i would be running around the net tryna find a tut on this!

You only need to enable forward port 80 if you are wanting to serve your website from your computer. However if all you're using it as a local test/developement machine then you dont need to forward port 80. Just use http://localhost/ instead.

yea i want to serve the website......make it live so i can then get a domain for it and it would be reached by other ppl.

 

not sure if this makes sense.....but what if i installed an internet security software like kaspersky?

 

would that help protect it?

  • 2 weeks later...

Hello there,

 

I have been having problem installing PHP with Apache on Windows. When I try to open a .php file in my browser in the "htdocs" folder by typing http://localhost/filename.php, insted of let me view the .php file content it shut the browser window down and start a download of the file.

 

I'm running a Vista 32-bit

 

What I've done:

 

- Downloaded apache 2.2.11 and sucessfully installed. I can open the index.html in "htdocs" folder by typing http://localhost in my browser.

 

- Downloaded the PHP 5.9.2-1 zip-file and extracted to C:\php, set the enviroment path and got it all set up sucessfully. Also renamed the "php.ini-recommended" to "php.ini".

 

- Added these lines into the "httpd.conf" file:

LoadModule php5_module "C:/php/php5apache2_2.dll"
PHPIniDir "C:/php"
AddType application/x-httpd-php .php .phtml .html

And I'm sure that the "C:/php/php5apache2_2.dll" and the "C:/php" exist.

 

- Restarted apache server & computer.

 

Any thoughts of what have I missed?

 

Thanks in advance!

 

//Cander

Ok. Open your php.ini and find the following section

 

display_errors = Off

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed.  It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off

 

Change Off to On for display_errors and display_startup_errors.

 

Save the php.ini. Now restart Apache. If PHP is having trouble starting up with Apache then errors should display on screen.

 

EDIT: This may not need to be done, but you it may apply

When running Apache on Vista ensure you're running ApacheMonitor.exe with Administrator Privileges. To do this right the click Apache Monitor icon in the task bar and choose exit. Now go to Start > All Programs > Startup

 

Right click on the Apache Monitor shortcut. Select the Compatibility tab and tick the Run as Administrator checkbox. Click OK to close all open windows. Now run Apache Monitor again. Confirm the UAC prompts and you should be able to restart Apache via Apache Monitor.

No response at all changing the PHP.ini file. In fact while watching the error log file to Apache there isn't anything written about PHP at all!

 

Administrator did take away some UAC while stopping the server, but nothing more.

 

What I think is that Apache don't find PHP at all, obviously.

 

Changed .ini file, set path to C:\php, correct changes in httpd.conf... Odd

  • 1 month later...

u can follow the steps in my attachment to install the 3 packages.

note that i install Apache2.0.59 and php5 the only problem i'm having is with the connection with MySQL database, but the crazy thing is that no error is being reported. but all other things work

 

 

[attachment deleted by admin]

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.