Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can anyone help with a manual Apache/PHP/MySQL install question?


php_Guy

Recommended Posts

I have been using phpDev but I wanted to upgrade to the newest versions of everything and I prefer manual installs anyway. You usually have more control and hopefully learn something in the process.

 

I'm running Windows XP. I've installed Apache 2.2 and it runs fine. I can connect via http://localhost/ and it serves up html just fine.

 

I installed PHP 5.2.6 (as a service) and everything appears to have gone fine. I checked the Apache httpd.conf file and it has:

 

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/localhost/php/"
LoadModule php5_module "C:/localhost/php/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

 

appended to the bottom.

 

However, when I access a .php file, I receive the contents of the php file.

 

I haven't changed anything yet. I'm just reading up on everything atm.

 

There is an overwhelming amount of material to go through. I sure could use a pointer. Anyone able to help me out?

Link to comment
Share on other sites

LoadModule php5_module "C:/localhost/php/php5apache2_2.dll"

 

i use apache and php in this way, but my loadmodule looks different. i have php installed in \Program Files\php, so the load module uses "c:/progra~1/php" - not "localhost". if you've installed php into c:\localhost\php then i guess this is right, but if it's in \Program Files\php, then change it to c:/progra~1/php and see if that works better.

Link to comment
Share on other sites

i use apache and php in this way, but my loadmodule looks different. i have php installed in \Program Files\php, so the load module uses "c:/progra~1/php" - not "localhost". if you've installed php into c:\localhost\php then i guess this is right, but if it's in \Program Files\php, then change it to c:/progra~1/php and see if that works better.

 

Yes, I did intentionally change that. I wanted Apache, PHP, MySQL, phpMyAdmin, and anything else needed to setup a localhost to be all grouped together. The php install is changing the httpd-conf and mime-types files so I know the path I gave it is correct. I removed both, got the newest apache (2.2.9), and re-installed. I made sure I told php to setup for apache 2.2 module.

 

I just can't figure out what I'm missing. Guess I'll sleep on it and see if it makes any more sense in the morning.

Link to comment
Share on other sites

Have you changed the apache configuration to interpret php files?

 

Nice to do it manually but xampp will do all 3 packages for you in one fell swoop.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Have you changed the apache configuration to interpret php files?

 

I installed both apache and php from .msi files (windows installers). Php modfified httpd-conf and mime-types. It looks to me that the changes it made should have done that. Is there something else that I need to do? Here is what it added:

 

httpd-conf

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:/localhost/PHP/"
LoadModule php5_module "C:/localhost/PHP/php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

mimes-types

application/x-httpd-php	php
application/x-httpd-php-source	phps

I haven't made any other changes. So far, I'm just reading up trying to figure out what changes I need to make.

Nice to do it manually but xampp will do all 3 packages for you in one fell swoop.

That would be easier :)

 

But when I struggle with something I tend to learn from the experience. Also, this way I know what is installed and what isn't, what options there are, etc. And in looking for answers I may run across useful tidbits that I wouldn't have found otherwise. For instance, by default, you would have to upload website files to c:/program files/apache group/apache 2.2/htdocs. That's a lot of clicking every time you want to go there. One site recommended changing this to c:/www which made me realize I could just as easily cange it to c:/.../my documents/www instead. Minor changes and maybe obvious to those in the know but I wouldn't have thought of that. Those sort of pearls of wisdom can help save a lot of time down the road.

Link to comment
Share on other sites

i did a similar thing. i have all my files in \work instead of \program files\apache...blah..blah.. i don't like typing more than i have to. it also makes it easier when doing a backup, all i do is backup everything under \work and i'm not backing up php and apache.

 

i looked at my httpd.conf, and the following are required to get php to run:

 

with all the other LoadModule statements, you need:

LoadModule php5_module <path to php>php5apache2_2.dll
PHPInIDir <path to php>

 

a little further down, you will see the DirectoryIndex statement, add index.php:

<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>

 

inside the <IfModule mime_module> section, you need to add:

	AddType application/x-httpd-php .php

 

you may be missing this last part.

 

i don't think there was anything else i had to do to get it to work, but then it's been a long time since i set it up and my memory isn't what it used to be....

Link to comment
Share on other sites

I give up. Every time I solve one issue I discover two more. I'm sure eventually I'd figure it out but it just isn't worth the time atm.

 

Probably a good thing I gave up too. After installing Apache Friend's XAMPP, I can see that there was going to be a very long road ahead of me indeed. They have a lot more going on than I realized would be needed.

 

If anyone is interested it is a very easy install with all the latet versions of everything and a forum as well.

 

Apache HTTPD 2.2.9 + Openssl 0.9.8i

MySQL 5.0.67

PHP 5.2.6

PHP 4.4.9

phpMyAdmin 2.11.9.2

FileZilla FTP Server 0.9.27

Mercury Mail Transport System 4.52

 

You can get the download at Apache Friends

 

They have versions for Linux, Solaris, and Mac OS X for those not able to run Windows :)

Link to comment
Share on other sites

Yep, I'm in the same boat to much to learn to do everything.

 

 

But it is fun to learn along the way.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...