hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Programming Discussion : Apache server problem
Reply

Programming Discussion Discussions related to web programming languages and other related issues. Topics may include configuration, optimization, practical usage and database connectivity.
Forum Jump

Apache server problem

Reply Post New Thread In Programming Discussion Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-29-2002, 04:14 AM
Abu Solu'man Abu Solu'man is offline
New Member
 
Join Date: Aug 2002
Posts: 4

Apache server problem


HI

I am a newbie in learning PHP & using Apache. The problem is that after i was able to log to http://localhost

Then i was asked to add a folder containing text & try to write http://localhost/myprog/prog1.php
i did that but there was no success. when i connect to the internet, it acts if i want to download & it even can't download. can any one please help me



Thanks in advanced

Reply With Quote


Sponsored Links
  #2  
Old 08-29-2002, 04:20 AM
Mark-TFL Mark-TFL is offline
Newbie
 
Join Date: Aug 2002
Location: UK
Posts: 13
Try adding this to your httpd.conf file, which can be found (in a default installation) at C:\Program Files\Apache Group\Apache2\conf\httpd.conf

PHP Code:
ScriptAlias /php"c:/php/" <- The folder in which PHP is installed
AddType application
/x-httpd-php .php
Action application
/x-httpd-php "/php/php.exe 
If you don't have PHP installed, and were looking to run PHP as a CGI, I would recommend downloading the PHP binary from Http://www.php.net/ and installing it.

__________________
Mark Carruth

Reply With Quote
  #3  
Old 08-29-2002, 05:11 AM
Abu Solu'man Abu Solu'man is offline
New Member
 
Join Date: Aug 2002
Posts: 4
Thanks for your help

but I'm afraid i wasn't able to find the httpd.conf


but i might think i know the problem. couldn't it be because of the file is actually in text. i couldn't change it to .php

so i think i may need a php editior. can you please recommend a good one?

thanks

Reply With Quote
Sponsored Links
  #4  
Old 08-29-2002, 06:00 AM
Rich2k Rich2k is offline
Web Hosting Master
 
Join Date: May 2002
Location: UK
Posts: 2,994
Of course you're assuming they are using Windows for Apache (most are running on linux or Unix).

If you are using Unix/Linux type 'locate httpd.conf' to find it.

Reply With Quote
  #5  
Old 08-29-2002, 08:58 AM
Abu Solu'man Abu Solu'man is offline
New Member
 
Join Date: Aug 2002
Posts: 4
I am apologizing for not clarifying the OS i use. but yes it is Windows 98

Reply With Quote
  #6  
Old 08-29-2002, 11:34 PM
jtrovato jtrovato is offline
Aspiring Evangelist
 
Join Date: Aug 2002
Location: Long Island
Posts: 427
Windows 98 is not a server OS. If you are going to run it on a windows platform you should use Windows 2000 pro or Windows 2000 Server using apache instead of IIS 5.0.

You will get better performance

The config file is located by default:

C:\program files\Apache Group\Apache\conf\httpd.conf ** Apache **
C:\php ** PHP **
C:\mysql **MySQL **

PHP config file php.ini should be located in the windows root directory.

You must add the following lines as Mark stated in the httpd.conf file

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe

After that make sure the service is running. Windows 98 does not have this feature only Windows NT platforms.

Good Luck

Reply With Quote
  #7  
Old 08-30-2002, 12:38 AM
Abu Solu'man Abu Solu'man is offline
New Member
 
Join Date: Aug 2002
Posts: 4
Dear jtrovato,

I am really grateful for helping me.


Thank you very much

Reply With Quote
  #8  
Old 08-30-2002, 11:42 AM
Ahmad Ahmad is offline
Web Hosting Master
 
Join Date: Jan 2002
Location: Kuwait
Posts: 679
If it is just for testing purpose, Windows 98 will do fine. I used it myself a lot.

You need to find the httpd.conf file first. Try the search facility in windows (open my computer and type F3).

When you find the file, make the changes noted by Mark-TFL. This will install PHP as a CGI interpreter.

__________________
Ahmad Alhashemi
PHP, Apache, C, Python, Perl, SQL
18 related BrainBench certificates

Reply With Quote
  #9  
Old 08-30-2002, 02:27 PM
cactus cactus is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 1,005
No problems for me also installing and running Apache/PHP/MySql/ with Win98

__________________
WHO AM I? CLICK HERE!

Reply With Quote
  #10  
Old 08-30-2002, 03:17 PM
cactus cactus is offline
Web Hosting Master
 
Join Date: May 2001
Posts: 1,005
As mentioned by jtrovato:
>> Action application/x-httpd-php "/php/php.exe

I configure it as below in httpd.conf
>>Action application/x-httpd-php "/php4/php.exe

IT also depends on how you did the installation for Apache/PHP for windows.

Standard method:

Apache installed at C:/Program Files/Apache Group/Apache/

and php4 installed in a seperate folder c:/php4/php.exe

Then your c:/Apache/ will have the folowing sub-folders ...bin, cgi-bin,icons,logs,modules,conf, proxy, then addig the above in httpd.conf is correct.

You also need to add in httpd.conf the following:

ScriptAlias /cgi-bin/ "Crogram Files/Apache Groug/Apache/cgi-bin/"

ScriptAlias /php4/ "C:/php4/"

AddType application/x-httpd-php .phtml .php
AddType application/x-httpd-php-source .phps


Restart Apache and check the installation is correct by creating a phpinfo.php file ....... <? phpinfo(); ?> and place this file in the document root of your web server. If it works fine, you will see a long page full of system and envioroment information.

Another method is to install Apache as c:/Apache and without the php in seperate folder but as a sub-folder for example:

c:/Apache with the c:/Apache/php4/ but this requires the httpd.conf to be configured differently.

Regards

__________________
WHO AM I? CLICK HERE!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
nginx Sees Largest Market Share Growth in Netcraft March Server Survey Web Hosting News 2012-03-05 14:05:29
Apache Web Server Adds Cloud Capabilities with First Major Update in 5 Years Web Hosting News 2012-02-21 16:05:02
Oracle is the Latest Vendor to Apply Patch for Apache Killer Flaw Web Hosting News 2011-09-19 14:43:58
Patch Released for Apache Software DDoS Vulnerability Web Hosting News 2011-08-26 15:03:10


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?