Error in PHP installation

  • 576
    Posts
    20
    Years
    • Seen Mar 14, 2008
    I just started learning PHP and found it extremely interesting. I wanted to try out PHP in my computer. So I downloaded the latest versions - PHP 5.04 and Apache 2 and installed them in my Windows 98 computer according to the instructions given in the php-.... site. First I installed Apache in the C:\Program Files\Apache Group\Apache2 and installed PHP in the same directory in a sub-folder called php.

    First, in Apache I gave everything (server name, domain) as localhost. After installing Apache, I tried https://localhost in both IE and FF but that failed to turn up any page and I got the "couldn't find file" error. Then I unzipped PHP5 in a folder called in "php" in Apache2 folder. Then I copied "php.ini-dist" to windows and renamed it "php.ini".

    For the installation to be complete, I opened the httpd.conf file and entered this code at the end
    Code:
    LoadModule php5_module php/php5apache2.dll
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    I entered https://localhost/test.php (a file containg a simple code) but it failed. I also tried manually opening the file but the file opened with nothing in it. I don't know what mistake I made. Can someone please help me?

    ~ CC
     
    What is the file path (like c:\documents and settings) to your web documents folder?
     
    Apache is pretty hard to set up...

    But the guys from apachefriends.org have come up with a great thingy!

    It's called XAMPP and sets up apache, php, filezilla, mercury and other neat modules in an easy installer.

    Get it here.
     
    It is "htdocs" folder. I haven't changed much options. Most of them are their default values.

    ~ CC
     
    Scizz said:
    Apache is pretty hard to set up...

    But the guys from apachefriends.org have come up with a great thingy!

    It's called XAMPP and sets up apache, php, filezilla, mercury and other neat modules in an easy installer.

    Get it here.

    Thanks for Xampp scizz but I already know about but am not in a position to download 26 MB.

    ~ CC
     
    It's probably going to take you less time altogether to download the 26MB file, it's only a couple of hours on dialup.
     
    I was also going to suggest a pre-made application or 2.. it REALLY helps ease the apache / php / mysql / perl install on a windows machine.. click to install and a few simple edits on your config files and it's up and running..

    AppServ: https://sourceforge.net/projects/appserv/
    WAMP: https://www.e-novative.info/software/wamp/wamp_download.php
    Apache Friends XAMPP: https://www.apachefriends.org/en/xampp.html
    More: https://www.hotscripts.com/PHP/Software_and_Servers/Installation_Kits/index.html
     
    Okay, If I find no other alternative, I will have to download a pre-made application. But I would like to know what is wrong with my installation. I un-installed both Apache and PHP and decided to start from fresh. My apache version is 2.0.52.
    1)I Opened the Setup file
    2) Clicked next until the server information window came
    3) In th SIW, I typed localhost for both Domain name and server name.
    4) The installation is complete.
    5) I restarted windows and according to the guide, when I type https://localhost, the apache page should appear but it doesn't. So my instinct tells me something is wrong with the Apache.
    I didn't change any controls BTW.

    ~ CC
     
    Chrono Cr@cker said:
    5) I restarted windows and according to the guide, when I type https://localhost, the apache page should appear but it doesn't. So my instinct tells me something is wrong with the Apache.

    ~ CC

    Stupid question but..did you run the apache? o_O
    You have to keep the dos window open if you're not running it as a service.
     
    Scizz said:
    Stupid question but..did you run the apache? o_O
    You have to keep the dos window open if you're not running it as a service.
    You know what...This is a stupid question. But sometimes the most stupid questions have the correct answers and this is one of those times. Thanks Scizz. I never realised I had to keep the Apache Console open since Apache Monitor was there in the task bar. Now Apache works perfectly in my computer.

    Next I extracted PHP5.04 in a folder called "php" in Apache2. I copied the ini file there and pasted it in windows. I left the dll file as it was and added this code to my HTTPD file.
    Code:
    LoadModule php5_module "C:/Program Files/Apache Groups/Apache2/php/php5apache2.dll"
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps
    But when I re-start Apache and open the Apache Console, the DOS file opens shows some error and closes. This happens so fast that I am not able to read what the error is. Is there any problem in the code.

    ~ CC
     
    I guess the problem's fixed now as I helped ya via MSN! ;)
     
    Yes it is. Thanks a lot Scizz. And I had to add this to httpd.conf
    Code:
    LoadFile "C:\Program Files\Apache Group\Apache2\php\php5ts.dll"
    . I don't know why the guide didn't mention this.

    ~ CC
     
    Don't you usually use Linux to run apache? :P


    Glad you solved your problem ^^ How long did installation take? *thinking about starting*
     
    pokejungle said:
    Don't you usually use Linux to run apache? :P

    Glad you solved your problem ^^ How long did installation take? *thinking about starting*
    Yes, but there are windows packages for them both. Installation is really easy Paul;takes around 30 minutes or so. (Not even that much if your computer is fast) You just need to do some light tweaking!

    ~ CC
     
    Computer = Really fast

    Connection = really slow


    -.- I think once I paration my HD to get Linux onboard I'll run apache. Linux servers are so much more useful =P
     
    Ehh, it's all pretty much the same if you're just using it for testing purposes. That said, I'm going to run Apache on the Linux partition when I get the new family computer. SuSE = <3.
     
    Back
    Top