Apache Não Carrega PHP

13. Re: Apache Não Carrega PHP

Jocaelincson
jocasouza

(usa CentOS)

Enviado em 14/01/2015 - 21:17h

ru4n escreveu:


O phpmyadmiin não mostra nenhum Warning?


nenhum Warning ;\




  


14. Re: Apache Não Carrega PHP

Perfil removido
removido

(usa Nenhuma)

Enviado em 14/01/2015 - 21:28h

Não sei como funciona a instalação e configuração de pacotes no CentOS para poder lhe informar melhor.

Com certeza vai aparecer alguém que saiba configurar Apache nessa distribuição para te dar uma mão. :-)




15. Re: Apache Não Carrega PHP

Jocaelincson
jocasouza

(usa CentOS)

Enviado em 14/01/2015 - 22:40h

ru4n escreveu:

Não sei como funciona a instalação e configuração de pacotes no CentOS para poder lhe informar melhor.

Com certeza vai aparecer alguém que saiba configurar Apache nessa distribuição para te dar uma mão. :-)



OBrigado pela ajuda! vou aguardar! abraços






16. Re: Apache Não Carrega PHP

Ênio Clímaco Sales Júnior
eniocsj

(usa Arch Linux)

Enviado em 14/01/2015 - 23:24h

Você inicia seus scripts php com "<?php" .Creio que essa verdadeiramente seja a forma correta. "<?" e "<%" tem de habilitar no servidor.



17. Re: Apache Não Carrega PHP

Jocaelincson
jocasouza

(usa CentOS)

Enviado em 15/01/2015 - 02:58h

eniocsj escreveu:

Você inicia seus scripts php com "<?php" .Creio que essa verdadeiramente seja a forma correta. "<?" e "<%" tem de habilitar no servidor.


utilizo <?php ?> , o incrivel e que o <?php phpinfo(); ?>
funciona normalmente e as demais paginas não ;\



18. Re: Apache Não Carrega PHP

Ivomar Santos
ivomarsan

(usa Outra)

Enviado em 14/05/2015 - 23:48h


Joca, conseguiu resolver?
Estou enfrentando o mesmo problema


19. Re: Apache Não Carrega PHP

CASSIO FERRAZ
cassio88

(usa Ubuntu)

Enviado em 15/05/2015 - 12:36h

no meu ubuntu 14.04, apache + php + mysql (instalados via synaptic) rodam tranquilo.

no caso de vocês, chegaram a dar uma olhada no link abaixo?
http://stackoverflow.com/questions/21083506/getting-blank-php-page-over-apache



20. Achei isso para OpenSUSE e para mim funcionou

Diogo Filho de Morais
braxmann

(usa openSUSE)

Enviado em 03/12/2016 - 19:41h

Para mim funcionou seguindo o site da openSUSE abaixo:

FONTE: https://en.opensuse.org/SDB:Apache_installation

Introduction

This document provides a quick step by step guide to get Apache running on your openSUSE box.
Warning It does not cover the concepts of web servers in detail. Please do not use the steps given below for production machines as the security considerations needed to successfully run a web server have not been taken care of. The below steps are mainly for users wanting or desiring to deploy the Apache software either for further tweaking or web development purposes.


General Machine Setup

The first thing which must be taken care of is the network. The network must be properly configured before proceeding further.

The second thing is to ensure that the system is uptodate. This can be done by opening the YaST Control Center. In the Software section click the Online update icon to check for software update and install them.
Installation of Apache Packages

The Apache web server can be installed by using zypper. Open a terminal and become root. Type the below command:

# zypper in apache2

Firewall Adjustments

By default the firewall configuration blocks all traffic coming on port 80 to your machine. So if you need to allow access so that the web server can be accessed from within a LAN we need to fine tune the firewall configuration. The below step needs to be performed as root user. The supplied configurations are called apache2 and apache2-ssl. They can be enabled via YaST, by adding them to FW_CONFIGURATIONS_EXT in /etc/sysconfig/SuSEfirewall2

# sysconf_addword /etc/sysconfig/SuSEfirewall2 FW_CONFIGURATIONS_EXT apache2
# sysconf_addword /etc/sysconfig/SuSEfirewall2 FW_CONFIGURATIONS_EXT apache2-ssl
# rcSuSEfirewall2 restart

Starting Server

Start the server and configure it to automatically start at boot time.

# rcapache2 start
# chkconfig -a apache2


Apache Modules

To enable required Apache Modules we can edit APACHE_MODULES in /etc/sysconfig/apache2. Modules can also be enabled/disabled/listed with the commands below. Any such operation requires a restart of the service and of course needs root privileges.

# a2enmod php5
# a2enmod -l
# rcapache2 restart


Virtual Hosts

The directory for virtual host configurations is /etc/apache2/vhosts.d/. As you can see there are two sample configuration files - one with ssl; one without ssl. We use the template without ssl. Only files ending with ".conf" are automatically included to the apache configuration.
In the following instructions, please replace {DOMAINNAME} with an IP or an domain-name you want.

Plan your website infrastructure. It's helpful to use a directory (/srv/www/vhosts) including one subdirectory for each virtual host.

You have to decide which sort of virtual host you need, based on the following options:

Name Based
Port Based
Port based

Copy the sample configuration file vhost.template to {DOMAINNAME}.conf and create the subdirectory for this virtual host.

# cd /etc/apache2/vhosts.d
# cp vhost.template {DOMAINNAME}.conf
# mkdir -p /srv/www/vhosts/{DOMAINNAME}/


Now edit the copied configuration file and adjust the following as needed:

Change the document root for your virtual host: DocumentRoot /srv/www/vhosts/{DOMAINNAME}
You also need to change corresponding directory directive: <Directory "/srv/www/vhosts/{DOMAINNAME}">
<VirtualHost *:80> It is possible to replace the "*" with an IP addess and "80" with a non standard http port. See Apache Documentation.

Restart Apache

# /etc/init.d/apache2 restart

Custom Configuration


Add/edit configuration for all virtual hosts to /etc/apache2/default-server.conf. Edit APACHE_CONF_INCLUDE_FILES in /etc/sysconfig/apache2 to include configurations from external files. To understand the hierarchy and layout of all include files, read the comments at the top of httpd.conf The old, single, 40K, monolithic configuration file is available in /usr/share/doc/packages/apache2/httpd-std.conf-prefork.
Trouble Shooting

Read any error messages when you start the service. Reproduce what is not working and see how it is reflected in the logs. The log files can be monitored in a root shell with the following command:

# tail -F /var/log/apache2/*


If you suspect a bug, please report it



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts