← PHP

Ajuda com bug em php

Lida 10086 vezes

Offline

ragnarock 
Membro
Mensagens 208 Gostos 1
Feedback +1

Troféus totais: 27
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2

Tenho um site feito em wordpress e com alguns custom codes feitos especificamente para ele,

entretanto resolvi mudar o alojamento e começou a aparecer-me isto:

Citar
Warning: include(/var/chroot/home/content/24/9279024/html/includes/prices.php) [function.include]: failed to open stream: No such file or directory in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3

Warning: include() [function.include]: Failed opening '/var/chroot/home/content/24/9279024/html/includes/prices.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3

na linha 3 do ficheiro wp-content/themes/jogosBaratos/functions.php tenho isto:
Código: [Seleccione]
include($_SERVER['DOCUMENT_ROOT'] . '/includes/prices.php');


pensei ser algo de errado com a variavel $_SERVER['DOCUMENT_ROOT'] e decidi dar uma martelada e meter directamente o url certo
Código: [Seleccione]
include('http://www.jogosbaratos.net/includes/prices.php');
passou a dizer isto:

Citar
Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3

Warning: include(http://www.jogosbaratos.net/includes/prices.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3

Warning: include() [function.include]: Failed opening 'http://www.jogosbaratos.net/includes/prices.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3

alguém com mais experiencia percebe o que se está a passar?

cumps
Offline

jof 
Membro
Mensagens 1117 Gostos 35
Feedback +45

Troféus totais: 34
Trófeus: (Ver todos)
Avatar Signature Tenth year Anniversary Level 6 Quick Poster Linux User Mobile User Windows User Super Combination Combination

Citar
Warning: include(/var/chroot/home/content/24/9279024/html/includes/prices.php) [function.include]: failed to open stream: No such file or directory in /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/functions.php on line 3
A função include está gerar erro, porque não foi possível encontrar o ficheiro functions.php que tens em /home/content/24/9279024/html/jogosbaratos/wp-content/themes/jogosBaratos/

A tentativa do include de um .php por URL esquece.

Verifica o ficheiro prices.php deve estar a chamar lá o functions.php e certamente o ficheiro não está lá ou tens a path errada.
Offline

ragnarock 
Membro
Mensagens 208 Gostos 1
Feedback +1

Troféus totais: 27
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2

acho que é o contrario... o functions.php é que está a fazer include do prices.php

tá é a aparecer aquela directoria toda marada..
Offline

Bruno Gaspar 
Membro
Mensagens 242 Gostos 1
Feedback +3

Troféus totais: 18
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 3 Level 2 Level 1 100 Posts 50 Posts 10 Posts

Não sei se vai funcionar

Código: [Seleccione]
include('../../includes/prices.php');
ou

Código: [Seleccione]
include('../../../includes/prices.php');
Offline

ameal 
Membro
Mensagens 41 Gostos 0
Feedback +1

Troféus totais: 20
Trófeus: (Ver todos)
Windows User Linux User Mobile User Super Combination Combination Topic Starter Poll Voter Level 3 Level 2 Level 1

boas.

usa o primeiro que escreveste:
include($_SERVER['DOCUMENT_ROOT'] . '/includes/prices.php');

verifica que os ficheiro prices.php existe mesmo.
por vezes ao enviar muitos ficheiros por FTP a ligação cai antes de os enviar todos.

Verifica as permissoes das pastas do teu novo alojamento.

Espero ter ajudado,
Hugo
Offline

ragnarock 
Membro
Mensagens 208 Gostos 1
Feedback +1

Troféus totais: 27
Trófeus: (Ver todos)
Tenth year Anniversary Nineth year Anniversary Super Combination Combination Topic Starter Poll Voter Level 5 Level 4 Level 3 Level 2

desisti, mudei de alojamento e pronto...
n funcionava no alojamento da godaddy, mudei para um da bluehost e já ta bom
Offline

xiaomibrasil 
Membro
Mensagens 3 Gostos 0
Troféus totais: 8
Trófeus: (Ver todos)
First Post Combination Level 2 Signature Webmaster Avatar Level 1 Windows User

desisti, mudei de alojamento e pronto...
n funcionava no alojamento da godaddy, mudei para um da bluehost e já ta bom

você tinha esquecido derre pente de manipular o arquivo .htacess onde estaria a base