Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

PHP problems

Options
  • 26-02-2002 5:42pm
    #1
    Registered Users Posts: 2,127 ✭✭✭


    hi

    Im trying to develop PHP on my local machiene. Ive read this tutorial on how to setup PHP on my machiene. (in windows)

    I installed apache, and extracted php4. I changed all the values like it says, but when i do the test: http://localhost/ it goes to a folder on my HD (c:\development) and displays the folder contents.
    Also i put a phpinfo.php file in there to test if php was working.

    Inside the file:
    <? phpinfo() ?>

    and when opened in http://localhost/phpinfo.php
    it only shows the text of the file.

    Where could i have gone wrong? Or should i start from scratch.
    If you need any more info on what i did i can give it to you, but i am relatively new to this.


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    I installed apache, and extracted php4. I changed all the values like it says, but when i do the test: http://localhost/ it goes to a folder on my HD (c:\development) and displays the folder contents.

    I presume you mean it displays the contents of the folder like a directory listing on a website?

    Also i put a phpinfo.php file in there to test if php was working.

    Inside the file:
    <? phpinfo() ?>

    and when opened in http://localhost/phpinfo.php
    it only shows the text of the file.


    Apache hasn't been configured to send .php requests to the PHP module. Upload your httpd.conf to the web somewhere for us to look at.

    adam


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Ive uploaded it here.

    Also its extremely difficult to do the http://localhost/ and sometimes it doesnt work casue its always asking me to dialup and connect. And when i click work offline it doesn't show up :/


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Ok, let's get Apache working first. What OS are you running please?

    adam


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Im running win98 SE.

    Thanx for helping btw :)


  • Closed Accounts Posts: 382 ✭✭misterq


    On a windows box the easiest method to get PHP & Apache running is PHP Triad [1], which installs PHP, Apache & MySQL.

    Ronan

    [1] http://sourceforge.net/projects/phptriad/


  • Advertisement
  • Registered Users Posts: 2,127 ✭✭✭STaN


    But the thing is that i have the 3 on my computer and that thing is downloading at about 600 bytes per second :(


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    I have to ask the obvious question first: Is Apache running? It doesn't look like it is...

    Start > Program Files > Apache > Start Apache

    It mightn't look exactly like that, but it shouldn't be far off.

    adam


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Yes apache 1.3 is running in a little ms-dos window


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Yes apache 1.3 is running in a little ms-dos window

    Any messages in the window?

    adam


  • Registered Users Posts: 258 ✭✭peterd


    A simple set up and installation of Apache/mySQL/PHP = Foxserv [1]


    [1] http://sourceforge.net/projects/foxserv/


  • Advertisement
  • Registered Users Posts: 7,739 ✭✭✭mneylon


    You could try PHP Dev
    It gives you a combination of Apache, PHP and MySQL. Installation took me about 5 mins.


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Any messages in the window?

    It says:

    Apache/1.3.23 <Win32> running...

    Thats all it says


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    Odd. And when you try to load http://localhost/ you're not getting a file list (or page) from "C:/Apache/Apache/htdocs"? (This directory does exist, doesn't it?) How about http://127.0.0.1/? Is there a file in your windows directory called 'hosts'?

    adam


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Nope, for some reason it is going to C:\Development and showing the directory as a a browser would.

    Would going for one of those downloads above be the best option?


  • Registered Users Posts: 2,127 ✭✭✭STaN


    Also, the phpinfo.php came up just as text which isnt right afaik, is it?

    Or does PHP only work in specified directories?


  • Closed Accounts Posts: 235 ✭✭Yerac


    I don't want to cut across the discussion or anything here but about the thing where it's trying to dial up and stuff.
    Working offline you should still not have any problems, just make sure that when you're trying to go to http://localhost for example that the "work offline" option under file is not ticked. It shouldn't prompt you to dial in if you're going to localhost.

    All this is under the assumption that you are using IE.

    There are a lot of people more up on Apache installations etc than me, but just checking my install here I've got a line
    ##########################

    # for the apache module
    LoadModule php4_module d:/php/sapi/php4apache.dll
    AddType application/x-httpd-php .php

    ############################

    I would say try that instead of where these lines are :

    # make certain files to be certain types.
    #
    AddType application/x-tar .tgz
    AddType application/x-httpd-php .php .phtml


    and comment out the line with action application too.

    The script alias line is new to me too so that might worth commenting out for tests too.

    One other thing I've overlooked with an install is putting the php.ini file in the system directory.


  • Registered Users Posts: 2,127 ✭✭✭STaN


    They new additions worked in that apache now reads:

    Apache/1.3.23 <Win32> PHP/4.1.1 running...

    although it still shows php up as normail text :confused:


  • Registered Users Posts: 2,127 ✭✭✭STaN


    I figured out what the problem was:

    Personal Web Server was running in my system tray. It must have been interfering with apache. I disabled it and now everything works fine.

    Thanx for all those who helped.


Advertisement