sEnte Posted September 16, 2016 at 08:52 AM Report #598906 Posted September 16, 2016 at 08:52 AM Bom dia pessoal. Decidi instalar, em Windows, o apache, PHP, MySQL e o phpMyAdmin, e agora estou com uma pequena dificuldade em relação ao phpMyAdmin, principalmente no que toca a configuração. Instalei tudo "à unha" e esta é a localização dos ficheiros. localização do Apache: c:\Webserver\Apache24 localização do PHP: c:\Webserver\PHP7 localização do Document_root C:/Webserver/Apache24/htdocs/html O que acontece é que para o phpMyAdmin funcionar bem tem de estar dentro da pasta html, caso contrário não funciona. Há maneira de configurar o httpd.conf de modo a ir buscar o phpMyAdmin a outro lado? "If It Ain't Broke, Break it and build something Cooler!" Unknown
M6 Posted September 16, 2016 at 10:34 AM Report #598910 Posted September 16, 2016 at 10:34 AM Sim há. Lê a documentação sobre Virtual Hosts. 1 Report 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
sEnte Posted September 17, 2016 at 02:10 PM Author Report #598950 Posted September 17, 2016 at 02:10 PM Será na parte do Using _default_ vhosts? Também experimentei isto mas sem sucesso. <VirtualHost "C:\Webserver\phpMyAdmin"> DocumentRoot "C:\Webserver\phpMyAdmin" Options FollowSymLinks DirectoryIndex index.php AddType application/x-httpd-php .php </VirtualHost> "If It Ain't Broke, Break it and build something Cooler!" Unknown
M6 Posted September 17, 2016 at 02:14 PM Report #598951 Posted September 17, 2016 at 02:14 PM Uma forma de fazeres isso é colocares a coisa a correr num porto diferente do 8080, vê a secção "Running different sites on different ports." 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
sEnte Posted September 17, 2016 at 06:05 PM Author Report #598956 Posted September 17, 2016 at 06:05 PM Não estou a conseguir com isto Listen 80 Listen 8080 <VirtualHost 127.0.0.1:8080> ServerName phpmyadmin DocumentRoot "C:\Webserver\phpMyAdmin" </VirtualHost> "If It Ain't Broke, Break it and build something Cooler!" Unknown
Rui Carlos Posted September 17, 2016 at 06:43 PM Report #598958 Posted September 17, 2016 at 06:43 PM Experimenta usar: Listen 80 Listen 8080 <VirtualHost _default_:8080> DocumentRoot "C:\Webserver\phpMyAdmin" ... </VirtualHost> Rui Carlos Gonçalves
sEnte Posted September 17, 2016 at 06:52 PM Author Report #598960 Posted September 17, 2016 at 06:52 PM Dá sempre este erro You don't have permission to access /phpmyadmin on this server. "If It Ain't Broke, Break it and build something Cooler!" Unknown
Rui Carlos Posted September 17, 2016 at 07:05 PM Report #598961 Posted September 17, 2016 at 07:05 PM Qual o URL que estás a usar para aceder ao phpMyAdmin? (Deverá ser algo como http://localhost:8080 .) Assumindo que estás a usar um URL válido, experimenta alterar para: Listen 80 Listen 8080 <VirtualHost _default_:8080> DocumentRoot "C:\Webserver\phpMyAdmin\" ... <Directory "C:\Webserver\phpMyAdmin\"> Require all granted </Directory> </VirtualHost> Adicionalmente, não sei qual o formato correcto dos caminhos de ficheiros em Windows, pelo que também podes tentar trocar o C:\Webserver\phpMyAdmin\ por C:/Webserver/phpMyAdmin/. Rui Carlos Gonçalves
sEnte Posted September 17, 2016 at 07:49 PM Author Report #598962 Posted September 17, 2016 at 07:49 PM com o código fornecido o apache não reinicia, dá erro. No entanto experimentei retirar as reticências, trocar o \ por / e mesmo assim nada. quando tento aceder é apenas localhost/phpmyadmin "If It Ain't Broke, Break it and build something Cooler!" Unknown
M6 Posted September 18, 2016 at 11:00 AM Report #598976 Posted September 18, 2016 at 11:00 AM As reticências não fazem parte da sintaxe, representam apenas outras instruções que podes ter na tua configuração. O que a configuração que está aqui em causa está a fazer é a correr o phpMyAdmin no porto 8080 da tua máquina, pelo que deves aceder como o Rui disse: http://localhost:8080/ 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
sEnte Posted September 18, 2016 at 02:51 PM Author Report #598981 Posted September 18, 2016 at 02:51 PM (edited) Lol como é a primeira vez que estou a mexer com estas coisas hehe tenhobe de experimentar se dá para entrar sem o 8080. Tenho de experimentar. Da outra vez acho que o problema foi mesmo não ter metido o 8080 EDIT1 Depois de chegar a casa e experimentar dá-me isto O apache está "Em execução", o código está no httpd.conf e depois de fazer refresh aparece-me o mesmo erro. Edited September 18, 2016 at 06:15 PM by sEnte "If It Ain't Broke, Break it and build something Cooler!" Unknown
M6 Posted September 18, 2016 at 08:39 PM Report #598989 Posted September 18, 2016 at 08:39 PM Mas o que é que dá quando acedes ao http://localhost:8080/ (sem mais nada à frente)? 10 REM Generation 48K! 20 INPUT "URL:", A$ 30 IF A$(1 TO 4) = "HTTP" THEN PRINT "400 Bad Request": GOTO 50 40 PRINT "404 Not Found" 50 PRINT "./M6 @ Portugal a Programar."
Solution sEnte Posted September 19, 2016 at 10:19 PM Author Solution Report #599015 Posted September 19, 2016 at 10:19 PM Tive de criar um ficheiro na vhost e meti lá uma configuração. Depois tive se adicionar o vhost ao httpd e funcionou. "If It Ain't Broke, Break it and build something Cooler!" Unknown
sEnte Posted October 4, 2016 at 11:48 PM Author Report #599398 Posted October 4, 2016 at 11:48 PM Consegui resolver o problema, mas como tive de instalar tudo de novo agora tenho outro problema. O que fiz da outra vez foi criar a pasta em C:/Webserver/phpMyAdmin, criei um ficheiro ,conf que dei o nome de httpd-database.conf e meti lá o seguinte código <IfModule alias_module> Alias /phpmyadmin "C:/WebServer/phpMyAdmin/" <Directory "C:/WebServer/phpMyAdmin"> AllowOverride AuthConfig Require local </Directory> </IfModule> fui novamente o httpd.conf e quase no final adicionei isto # Various phpMyAdmin settings Include conf/extra/httpd-database.conf A quando da nova instalação fiz a mesma coisa, no entanto agora não funciona. Diz que não tenho permissão.... Forbidden You don't have permission to access /phpmyadmin/ on this server. Podem ajudar? "If It Ain't Broke, Break it and build something Cooler!" Unknown
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now