#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    City, State, Country
    Posts
    12
    Rep Power
    0
    Could you tell me the exact steps you took??
    These are the steps to a successful PHP4/Apache install.

    Step1. Download & Unzip the PHP 4 source to C:PHP4
    Step2. Copy MSVCRT.DLL (it may already exist in there)
    and PHP4TS.DLL to C:WindowsSYSTEM (or C:WindowsSYSTEM32 if your on NT)
    Step3. Re-Name & Copy 'php.ini-dist' to C:Windows.
    Step4. Edit PWD-php4.reg to reflect the directory your php4 files are in. It SHOULD(if you follow all my directions EXACTLY) be like this:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    REGEDIT4

    [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesw3svcparametersScript Map]
    ".php"="Chpphp4isapi.dll"
    [/quote]

    Step5. Goto the Apache conf Dir, should be something like...
    C:Program FilesApache GroupApacheconf
    Open httpd.conf and find section:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the realname directory are treated as applications and
    # run by the server when requested rather than as documents sent to the client.
    # The same rules about trailing "/" apply to ScriptAlias directives as to
    # Alias.
    #
    [/quote]
    Add this after that:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    ScriptAlias /php4/ "C:/PHP4/"
    [/quote]
    Don't close httpd.conf yet!
    Find this section:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    #
    # To enable the cache as well, edit and uncomment the following lines:
    # (no cacheing without CacheRoot)
    #
    #CacheRoot "C:/Program Files/Apache Group/Apache/proxy"
    #CacheSize 5
    #CacheGcInterval 4
    #CacheMaxExpire 24
    #CacheLastModifiedFactor 0.1
    #CacheDefaultExpire 1
    #NoCache a_domain.com another_domain.edu joes.garage_sale.com
    [/quote]
    Add this after:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    AddType application/x-httpd-php .phtml .php .php3
    AddType application/x-httpd-php-source .phps
    Action application/x-httpd-php /php4/php.exe
    [/quote]
    Save & Close httpd.conf.

    Step5. Now, make a file which contains EXACTLY this:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <? phpinfo() ?>
    [/code]
    Save it to the htdocs directory, or whatever your Root directory is. Name it whatever you would like, but make sure it ends in .phtml, .php, or .php3. Run Apache, and then execute this file. If you see...
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>
    <? phpinfo() ?>
    [/quote]
    It did NOT work. If you see a page with lots of stuff on it, with info about your php and MySQL and other stuff status, then it worked!

    Step6. Place Any & All php scripts in the Root directory(standard:
    C:Program FilesApache GroupApachehtdocs)
    And they will be executed. You can execute a php script from ANYWHERE in the Root directory, even sub directorys of the root dir.

    Step7. Enjoy!!!=)

    Good luck, and remember...this will only work, if you follow these instructions exactly how they are explained, and you're using Windows 9x/2k/NT.

    ^N|R

    ------------------
    NobodysReal@hotmail.com
    Aim: PRM Magic
    ICQ: 77968493
  2. #2
  3. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)
    hai,
    Can you please tell me how should i install php4 in my linux machine.
    it says apxs not found...
    Can you please tell me how to do that?

    i downloaded php4...tar.gz file in my machine.. when i compiling the code it is saying apxs not found?

    anybody solve the problem...
    vijay
  4. #3
  5. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>when i compiling the code it is saying apxs not found?
    You need to recompile apache with DSO support (--enable-module=so)

    Check here -> http://www.devshed.com/Talk/Forums/F...ML/000020.html
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    City, State, Country
    Posts
    12
    Rep Power
    0
    Livesaver! =)
    My Linux (SuSE 6.4) doesn't have a modem yet...Havn't had time to mess with PHP on it yet=)

    ^N|R

    ------------------
    NobodysReal@hotmail.com
    Aim: PRM Magic
    ICQ: 77968493
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    33
    Rep Power
    14
    I went to www.apache.org for downloading apache on windows95 machine. But could not find zip file for same. Can you please guide where i can get it. Also for PHP4 and Mysql on windows95.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    If you are trying to download something, simply click the DOWNLOAD button. How hard is that?

    Start here -> http://www.apache.org/dist/binaries/...3_12_win32.exe

    -> http://ca.php.net/distributions/php-4.0.1pl2-Win32.zip

    -> ftp://ftp.mysql.com/MySQL-3.23/mysql-3.23.22-beta-win.zip
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Location
    Netherlands
    Posts
    77
    Rep Power
    15
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>

    Step4. Edit PWD-php4.reg to reflect the directory your php4 files are in

    [/quote]

    If you are only using Apache (and not PWS), then you don't have to merge PWS-php4.reg into your registry.

    Peter


  14. #8
  15. No Profile Picture
    Perl Monger
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Maidstone, Kent, UK
    Posts
    4
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    ScriptAlias /php4/ "C:/PHP4/"
    [/code]

    Isn't that a bit of a security hole? All a remote user would need to do to run the PHP executable would be to access

    http://www.domain.com/php4/php.exe

    It wouldn't be difficult from there for a cracker to run arbitrary scripts on that server.

    Since in my experience this step isn't necessary to get mod_PHP running on Apache for Win32, I would leave that bit out =).

    J.

    [This message has been edited by Jodrell (edited August 08, 2000).]
  16. #9
  17. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    Jodrell,

    It would only be easy for a hacker to run arbitrary scripts if the root of the hard drive was the web server root: generally this isn't done. so http://www.domain.com would point to something like c:apachehtdocs

    Also, the hacker would have to know about the internal workings of the machine: unlikely.

    ---------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)
  18. #10
  19. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    City, State, Country
    Posts
    12
    Rep Power
    0
    I dunno, anyone try that? Don't seem like it would be successful...but what harm would that cause?! Running PHP...Might make a little window or something...and how would the person actually know that that hole is their? If it is a security hole, its a small one...with minor consiquences.

    ^N|R

    ------------------
    NobodysReal@hotmail.com
    Aim: PRM Magic
    ICQ: 77968493
  20. #11
  21. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    1
    Rep Power
    0
    Hi!

    Here's the deal, I'm using Apache 1.3.6 on Win2k and running PHP 4 (php-4.0.1pl1-Win32.zip).

    1.) I installed Apache on my D drive :Program FilesApache GroupApache and setup PHP in D:Program FilesApache GroupApachePHP

    You mentioned these three files: MSVCRT.DLL, PHP4TS.DLL, & php.ini-dist. I did get the PHP4TS.DLL on the install but I did not get the .ini file and I'm not sure if I got the MSVCRT.DLL file. I checked my sys32, but I'm not sure if it's the one distributed with the PHP install. I copied the .dll to both the sys/sys32 folder located on my e:/ drive that has win2k.

    I have three config files which I modified: httpd.conf and srm.conf and mime.types. I did the modifications like you mentioned to my httpd.config as well as made them to the srm.conf (what file is that for b-t-w?)

    Still, no luck, this is what I get:
    Your browser sent a request that this server could not understand.

    Invalid URI in request GET
    /loadPage2.php?pageName=ViewClipsPage.php&aCode=pete1
    HTTP/1.0

    Apache/1.3.6 Server at 127.0.0.1:80 Port 80

    I also had to enter the reg entery - but still no luck. Thanks in advance for any help you can provide!

    Alex W.
  22. #12
  23. No Profile Picture
    Perl Monger
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Maidstone, Kent, UK
    Posts
    4
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>http://www.domain.com/cgi-bin/perl.exe?script.pl[/code]

    Lincoln Stein realised that this would be a major security hole, because command line arguments could be added by requesting

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>http://www.domain.com/cgi-bin/perl.exe?-e?"system 'del c:windowswin.com''"[/code]

    That would cause perl to run the script

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>system 'del c:windowswin.com'[/code]

    with obvious detrimental effects.

    My concern is that if the PHP directory is ScriptAlised, then an opportunist could request

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>http://www.domain.com/php4.exe?[/code]

    followed by whatever PHP code they choose to run.

    J.

    [This message has been edited by Jodrell (edited October 26, 2000).]
  24. #13
  25. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    2
    Rep Power
    0
    Coul anybody please help me install php/apache. I followed the instructions by NobodysReal dated August 1, 2000.
    I have following doubts:
    STEP3 : RE-Name to what? I copied as it is.
    STEP4: should it be Chp4php4isapi.dll(insteadd of Chp...) because in step 1 we unzipped to C;;php4 ?
    I have PWS-php4.reg instead of PWD-php4.
    when I execute step 5, it is not working.
    Everything I have followed as it is.


    ------------------
    AS

IMN logo majestic logo threadwatch logo seochat tools logo