Jump to content

problem z php


Hindus

Recommended Posts

hi - robie sobie stronke i w ramach testu zainstalowałem sobie Apache co by nie wrzucac stronki po 10 razy - sprawdzam na lanie i działa dobrze tylko nie obsługuje php - tzn pokazuje mi wnętrze katalogu zamiast stronki :/ co robic ?

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

 

Masz w pliku httpd.conf takie wiersze? Jeśli nie masz to je dopisz np. na końcu.

 

Oczywiście c:/php/ zamieniasz na ścieżkę która wskazuje na katalog, w którym jest php.

Link to comment
Share on other sites

dobra zainstalowałem to php całe chyba - na C:/php, zmieniłem kod i też nic cały czas wyswietla katalog. Sciagam stąd :

 

PHP 5.0.5 installer [2,336Kb] - 9 Sep 2005

(CGI only, packaged as Windows installer to install and configure PHP, and automatically configure IIS, PWS and Xitami, with manual configuration for other servers. N.B. no external extensions included)

 

jak daje bezposrednoi do pliku sciezke to tez lipa

http://192.168.1.76/upload/index.php

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

Apache/1.3.33 Server at hindus Port 80

 

A tu koncówka pliku httpd.conf

 

# Please see the documentation at

# for further details before you try to setup virtual hosts.

#

# You may use the command line option '-S' to verify your virtual host

# configuration.

 

#

# Use name-based virtual hosting.

#

#NameVirtualHost *:80

 

#

# VirtualHost example:

# Almost any Apache directive may go into a VirtualHost container.

# The first VirtualHost section is used for requests without a known

# server name.

#

#

# ServerAdmin [email protected]

# DocumentRoot /www/docs/dummy-host.example.com

# ServerName dummy-host.example.com

# ErrorLog logs/dummy-host.example.com-error_log

# CustomLog logs/dummy-host.example.com-access_log common

#

 

 

ScriptAlias /php/ "c:/php/"

AddType application/x-httpd-php .php

Action application/x-httpd-php "/php.exe"

Link to comment
Share on other sites

aha, no to spoko :p

 

taka mała porada: jeśli wpisujesz adres na swoim kompie, to zamiast 192.168.1.76 lepiej jest używać localhost lub adresu 127.0.0.1

 

Podczas normalnej pracy nie ma to znaczenia, ale jeśli kiedyś wywalisz kartę sieciową albo zmienisz IP to będziesz musiał się od nowa przyzwyczajać do nowego adresu :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...

Important Information

We are using cookies. Read about our Privacy Policy