servidor php não inicia(resolvido)

Iniciado por arlindofc, 01 de Setembro de 2013, 18:42

tópico anterior - próximo tópico

arlindofc

quando dou um:  /etc/init.d/apache2 start
* Starting web server apache2                                                  apache2: Syntax error on line 264 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache2.conf: No such file or directory
Action 'start' failed.
The Apache error log may have more information.
                                                                        [fail]

e nem o phpmyadmin.

NOOB Saibot

Citação de: arlindofc online 01 de Setembro de 2013, 18:42
* Starting web server apache2                                                  apache2: Syntax error on line 264 of /etc/apache2/apache2.conf: Could not open

Tu por acaso editou o arquivo de configuração do apache?
Reveja a linha 264 do arquivo /etc/apache2/apache2.conf, acusa erro de sintaxe (escrita não reconhecida pelo programa)

arlindofc

aqui esta ele:
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
# It is also possible to omit any default MIME type and let the
# client's browser guess an appropriate action instead. Typically the
# browser will decide based on the file's extension then. In cases
# where no good assumption can be made, letting the default MIME type
# unset is suggested  instead of forcing the browser to accept
# incorrect  metadata.
#
DefaultType None


#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

# Include list of ports to listen on and which to use for name based vhosts
Include ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see the comments above for details.

# Include generic snippets of statements
Include conf.d/

# Include the virtual host configurations:
Include sites-enabled/
Include /etc/phpmyadmin/apache2.conf

NOOB Saibot

Poderia postar o que está escrito em /etc/phpmyadmin/apache2.conf.

O report de erro fala que este arquivo não existe, pode ter sido excluido e a linha 264 ( a última  ) em
questão fala justamente deste arquivo.

dwall

O nome do arquivo está errado. O correto é "/etc/phpmyadmin/apache.conf" e não "apache2.conf".
Troque esse nome na linha 264 do arquivo do apache e veja se funciona.

zekkerj

Eu acho que na verdade o erro está aqui:
CitarInclude sites-enabled/
Posso jurar que a sintaxe correta seria "include sites-enabled/*.conf".
Pesquise antes de perguntar, sua dúvida pode já ter sido respondida.
Não respondo dúvidas por MP, coloque sua dúvida no fórum onde ela pode ser pesquisada pelos seus colegas!
Não venha ao fórum apenas para perguntar. Se você sabe a resposta de um problema, porque não ajudar seu colega? ;D

Arthur Bernardes

Não creio que o erro seja aí, pois aqui esta linha está igual.

Código (/etc/apache2/apache2.conf) Selecionar
# Include generic snippets of statements
Include conf.d/


E funciona normalmente o Apache.

Código (service apache2 restart) Selecionar
* Restarting web server apache2                                                apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                         [ OK ]

arlindofc

aqui esta o resultado

cat /etc/phpmyadmin/apache.conf
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
   Options FollowSymLinks
   DirectoryIndex index.php

   <IfModule mod_php5.c>
      AddType application/x-httpd-php .php

      php_flag magic_quotes_gpc Off
      php_flag track_vars On
      php_flag register_globals Off
      php_admin_flag allow_url_fopen Off
      php_value include_path .
      php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
      php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
   </IfModule>

</Directory>

# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
    <IfModule mod_authn_file.c>
    AuthType Basic
    AuthName "phpMyAdmin Setup"
    AuthUserFile /etc/phpmyadmin/htpasswd.setup
    </IfModule>
    Require valid-user
</Directory>

# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
    Order Deny,Allow
    Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
    Order Deny,Allow
    Deny from All
</Directory>

arlindofc

#8
Realmente o Colega Dweall estava correto, só foi corrigir isso e deu tudo certo: /etc/phpmyadmin/apache.conf.
Valeu amigos, muito obrigado pela ajuda.