antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
Wolvarinhas

[Duvida Urgente!]Web Server So Lê Html Nao Php

Question

Boas acabei de criar um webserver num dedicado e to com um problema e que, se eu colocar alguma coisa em html um site em html ele funciona na boa. Mas se eu colocar algo em php aquilho aparece os ficheiros nao consegue ler alguem me consegue ajudar?

Share this post


Link to post
Share on other sites

9 answers to this question

antiblock
Rodnia | Alpha & Omega
  • 0

Eu sei mas quando vo a config do cd /usr/ports/lang/php5 nao aparece a opçao apache penso que e esse o problema nao sei e como resolver

Share this post


Link to post
Share on other sites
  • 0

O que o paulo disse + alterar o teu httpd.conf.

Ja fiz isso e coloquei nessa parte onde dizia <IfModule dir_module>

Substitui por  

<IfModule dir_module>

<IfModule php5_module>

DirectoryIndex index.php index.html

</IfModule>

<IfModule !php5_module>

<IfModule php4_module>

DirectoryIndex index.php index.html

</IfModule>

<IfModule !php4_module>

DirectoryIndex index.html

</IfModule>

</IfModule>

</IfModule>

 

Por isso nao to a ver o problema

Share this post


Link to post
Share on other sites
  • 0

Está a carregar o módulo?

 

Exemplo para o apache 24:

 

 

LoadModule php5_module        libexec/apache24/libphp5.so

 

 

 

 
 
 
 
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>

Share this post


Link to post
Share on other sites
  • 0

isso nao fiz como fasso isso para o apache 22?

Share this post


Link to post
Share on other sites
  • 0

No teu ficheiro httpd.conf terás várias linhas como por exemplo:

 

LoadModule dir_module libexec/apache24/mod_dir.so
#LoadModule imagemap_module libexec/apache24/mod_imagemap.so
#LoadModule actions_module libexec/apache24/mod_actions.so
#LoadModule speling_module libexec/apache24/mod_speling.so
#LoadModule userdir_module libexec/apache24/mod_userdir.so
LoadModule alias_module libexec/apache24/mod_alias.so
#LoadModule rewrite_module libexec/apache24/mod_rewrite.so

 

 

Por baixo dessas linhas, adicionas esta:

LoadModule php5_module        libexec/apache22/libphp5.so

 

 

 

 

Caso não funcione, remove o 22 ficando só apache, assim:

 

LoadModule php5_module libexec/apache/libphp5.so

 

 

 

Não sei qual das duas versões é pois uso o 2.4

Share this post


Link to post
Share on other sites
  • 0

Testei os dois e continua o mesmo problema nao da para ver o site

aff

Nao entendo o que se passa alguem me ajuda??

Share this post


Link to post
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
Sign in to follow this