Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old August 1st, 2000, 03:07 AM
Nobodys Real Nobodys Real is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: City, State, Country
Posts: 12 Nobodys Real User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nobodys Real
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

Reply With Quote
  #2  
Old August 1st, 2000, 05:29 AM
chinnavi
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #3  
Old August 1st, 2000, 02:25 PM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
>>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/Forum15/HTML/000020.html

Reply With Quote
  #4  
Old August 2nd, 2000, 06:03 PM
Nobodys Real Nobodys Real is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: City, State, Country
Posts: 12 Nobodys Real User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nobodys Real
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

Reply With Quote
  #5  
Old August 2nd, 2000, 11:46 PM
aas aas is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 33 aas User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
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.

Reply With Quote
  #6  
Old August 3rd, 2000, 01:44 AM
freebsd
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
If you are trying to download something, simply click the DOWNLOAD button. How hard is that?

Start here -> http://www.apache.org/dist/binaries/win32/apache_1_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

Reply With Quote
  #7  
Old August 4th, 2000, 05:45 AM
PAV PAV is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 1999
Location: Netherlands
Posts: 77 PAV User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
<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



Reply With Quote
  #8  
Old August 8th, 2000, 04:32 AM
Jodrell Jodrell is offline
Perl Monger
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: Maidstone, Kent, UK
Posts: 4 Jodrell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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).]

Reply With Quote
  #9  
Old August 9th, 2000, 06:31 PM
alexgreg's Avatar
alexgreg alexgreg is offline
Full Access
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jun 2000
Location: London, UK
Posts: 2,019 alexgreg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 sec
Reputation Power: 10
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)

Reply With Quote
  #10  
Old August 13th, 2000, 04:06 PM
Nobodys Real Nobodys Real is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2000
Location: City, State, Country
Posts: 12 Nobodys Real User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Nobodys Real
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

Reply With Quote
  #11  
Old October 22nd, 2000, 03:00 PM
adobepro adobepro is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 1 adobepro User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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 URL: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.

Reply With Quote
  #12  
Old October 26th, 2000, 09:05 AM
Jodrell Jodrell is offline
Perl Monger
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Location: Maidstone, Kent, UK
Posts: 4 Jodrell User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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).]

Reply With Quote
  #13  
Old November 22nd, 2000, 11:17 PM
asharma asharma is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 2 asharma User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > For those having problems installing PHP4 on Apache...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |