PHP doesn't work; I change IIS into Apache

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
johnyjj2
Forum Newbie
Posts: 6
Joined: Mon Aug 03, 2009 8:55 am

PHP doesn't work; I change IIS into Apache

Post by johnyjj2 »

Hello!

I've got installed server - Windows, IIS (I didn't want to install it but it was instruction from boss), KF Web Server (I didn't want to install it as well), MySQL, PHP. There was also other man, responsible for creating webpage with the use of PHP, and he installed Apache. So now we've got two redundant applications - IIS, KFWS. And now I need to fix this whole stuff. I'd like to reinstall everything and install MySQL+PHP+Apache but I cannot because of boss' decision to have those other applications installed. But I guess I can simply deactivate them. So I need to run webpage written in php. It looks as follows:
directories - public, system, tmp, uploads
files - index.php
In index.php:

Code: Select all

<?php
 
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit:  http://www.php.net/error_reporting
|
*/
    //error_reporting(E_ALL);
    error_reporting(E_ERROR);
(...)
*/
require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
?>
(Above there are only beginning and end of the file, without middle part).

Disc looks as follows (I show only some directories and files):

Code: Select all

Inetpub
PHP - there's only one file in this directory
    php.ini
Program Files
    Apache Software Foundation
        Apache2.2
            htdocs
                name_of_the_website_which_I_want_to_run
    KeyFocus
    MySQL
    PHP
Guy, who has been configuring this website, left me information:
Website is kept in two places:
F:\Inetpub\wwwroot\name_of_website
F:\Program Files\Apache Software Foundation\Apache2.2\htdocs\name_of_website
So I exit KFWS, installed again MySQL and Apache because e.g. in the directory of Apache there were only directories: conf, htdocs and logs, so too little of them. After reinstalling of Apache there are more of files. I copied configuration files from the previous installation to the new one (I simply replaced them into those newly-installed).

I enter Internet Explorer on server. I write localhost and there appear two windows: http://localhost/localstart.asp i http://localhost/iishelp/iis/misc/default.asp so it looks like IIS is still run. I don't know how to stop it properly because I have never been using IIS previously.

I enter in IE in http://localhost/nazwa_stronki/ and I see in IE window file index.php, but this file is not executed. It looks like opening this index.php in notepad with one difference - it is windows of IE, not notepad. So PHP doesn't work properly.

I don't really know what to do so that it would work properly. As I have already written, I cannot erase everything and install PHP+MySQL+Apache - I know it would be the best choice - because my boss wanted me to install those IIS and KF Web Server.

Thanks in advance for your help!
Greetings!
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP doesn't work; I change IIS into Apache

Post by jackpf »

You cannot have multiple web servers running at once, since they all use the same ports.

I would recommend you tell your boss this.

However, you can change ports and stuff for each web server..although I've never done this since I've only ever used apache.

This seems like a good explanation of how to do so though though.
johnyjj2
Forum Newbie
Posts: 6
Joined: Mon Aug 03, 2009 8:55 am

Re: PHP doesn't work; I change IIS into Apache

Post by johnyjj2 »

Thanks!
So it looks like I need to disable both KeyFocus Web Server and IIS. I just exit KF Web Server (and I'm gonna remove this application). How to disable IIS without erasing it from the system? Or do I have to remove it? Do I need to change anything else after getting rid of those IIS & KFWS?
Greetings!
PS I was also asked to connect that site (with index.php) in htdocs with already bought domain (http://www.name-of-my-site.de). In which configuration file should I change it?
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP doesn't work; I change IIS into Apache

Post by jackpf »

Well, if you don't want to change the ports, then yes...you'll have to uninstall it. I don't know much about IIS so I wouldn't know how.

I believe you can change your domain name by opening httpd.conf, and changing the line
#ServerName localhost:80
to
ServerName yourdomain.com:80

Although I'm not sure (I've never done this). That's what google seems to suggest though :)

Good luck,
Jack.
Post Reply