antiblock
Rodnia | Alpha & Omega
  • Chatbox

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

Parse Error: Syntax Error, Unexpected '.145' (T_Dnumber) [Site]

Question

Boas Comunidade,

 

                                 Estou com um pequeno problema a ligar a minha DataBank (MySQL) ao meu site CMS de metin2... O site, sem ser introduzida a MySQL, consegue mostrar as cenas normais, não conseguindo apenas aceder às funcionalidades que a minha MySQL permite (criar conta, aceder, etc...) Quando coloco o IP (Hamachi, pois servidor está ligado ao mesmo, atualmente), aparece o seguinte:   ( ! ) Parse error: syntax error, unexpected '.145' (T_DNUMBER) in C:\wamp\www\index.php on line 13

 

Linha 13 é a linha do index.php onde coloquei o IP...

 

Junto em anexo as imagens do Index.php + IP Hamachi, do Erro e se precisar de mais algo, deixem aí nos comentários...

 

 

Agradeço ajuda e resposta!

 

24m56k3.png

 

iqaji8.png

Share this post


Link to post
Share on other sites

19 answers to this question

  • 0

$sqlServ = mysql_connect('25.3.145.100', 'root', 'testiklp');
OU..

$SERV_HOST = "25.3.145.100";
$SERV_USER = "root";
$SERV_PASS = "testiklp";
$sqlServ = mysql_connect(SERV_HOST, SERV_USER, SERV_PASS);

Share this post


Link to post
Share on other sites
antiblock
diamwall
  • 0

Já consegui conectar à base de dados, mas não consigo nem criar, nem aceder no painel de utilizador a contas já criadas... :s continua a dar este erro! 

 

2w5lhdg.png

Share this post


Link to post
Share on other sites
  • 0

Tens o config.inc.php configurado direito?

Share this post


Link to post
Share on other sites
  • 0

Alguns pontos:

 

Em vez de localhost mete 25.3.145.100

 

O nome da tua base de dados é datenbank?, se não for o problema esta ai..

Share this post


Link to post
Share on other sites
  • 0

O SQL_HP_HOST tem que ter o mesmo IP que está no SQL_HOST.
E o SQL_HP_DB tem que ter o nome da base de dados que tem as tabelas do site.
 
 
@Auros ( ͡ʘ ͜ʖ ͡ʘ), o tópico não atualizou ou postamos a resposta ao mesmo tempo, peço desculpa.

Edited by OWSAP (see edit history)

Share this post


Link to post
Share on other sites
  • 0

Tens uma base de dados chamada "site", se essa base de dados tiver as tabelas do site então no SQL_HP_DB tens que meter o nome site.

Share this post


Link to post
Share on other sites
  • 0

Antes de mais, antes de abrires o teu website a publico aconselho te a aprender algumas coisas:

 

Html e PHP, pois noto que não percebes estes dois temas, ou se percebes as minhas desculpas.

 

Mysql/Mysqli.

 

BTW: é capaz de dar outro erro devido ao user e a password da database

Share this post


Link to post
Share on other sites
  • 0

Yup... Continua na mesma... Não consigo registar... :S  

 

( ! ) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\index.php on line 12 Call Stack # Time Memory Function Location 1 0.0005 150816 {main}( ) ..\index.php:0 2 0.0050 230976 mysql_connect ( ) ..\index.php:12

 

( ! ) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\index.php on line 13 Call Stack # Time Memory Function Location 1 0.0005 150816 {main}( ) ..\index.php:0 2 0.1230 237648 mysql_connect ( ) ..\index.php:13

Share this post


Link to post
Share on other sites
  • 0

 

Yup... Continua na mesma... Não consigo registar... :S  

 

( ! ) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\index.php on line 12 Call Stack # Time Memory Function Location 1 0.0005 150816 {main}( ) ..\index.php:0 2 0.0050 230976 mysql_connect ( ) ..\index.php:12

 

( ! ) Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in C:\wamp\www\index.php on line 13 Call Stack # Time Memory Function Location 1 0.0005 150816 {main}( ) ..\index.php:0 2 0.1230 237648 mysql_connect ( ) ..\index.php:13

 

 

Tens o servidor ligado? Tens o mysql iniciado?

 

Ás vezes o localhost não atualiza o site. Tenta entrar no 127.0.0.1 através da barra de endereço.

Share this post


Link to post
Share on other sites
  • 0

Tenho tudo ligado, até tenho servidor online... :p

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