Lançado Adianti Framework 7.6!
Clique aqui para saber mais
BANCO FIREBIRD Estava vendo um post aqui onde falava sobre banco de dados e ai, peguei o endereço do arqui lib/adianti/database/TConnection.class.php. Vi que tem lá uma implementação do Firebird, ele esta funcionando? Se sim como eu configuro o arquivo .ini? E ainda tenho outra dúvida; Estava fazendo o exemplo da página 40 do livro Adianti Framework para PHP, e para web esta funcionando uma beleza,...
ER
BANCO FIREBIRD  
Fechado
Estava vendo um post aqui onde falava sobre banco de dados e ai, peguei o endereço do arqui lib/adianti/database/TConnection.class.php.

Vi que tem lá uma implementação do Firebird, ele esta funcionando?
Se sim como eu configuro o arquivo .ini?

E ainda tenho outra dúvida;
Estava fazendo o exemplo da página 40 do livro Adianti Framework para PHP, e para web esta funcionando uma beleza, mas agora para desktop não esta funcionando quando tento fazer conexão com o php.
Eu utilizei o IP local da maquina(127.0.0.1) e por localhost, mas não resolvel.

Pacotão Dominando o Adianti Framework 7
O material mais completo de treinamento do Framework.
Curso em vídeo aulas + Livro completo + Códigos fontes do projeto ERPHouse.
Conteúdo Atualizado! Versão 7.4


Dominando o Adianti 7 Quero me inscrever agora!

Comentários (10)


PD

Oi Eduardo,

A conexão firebird não está bem testada ainda, mas é bem possível que funcione. Conforme a documentação, na atual versão (1.0.2), as bases homologadas são SQlite, PostgreSQL, MySQL, Oracle e SqlServer.
www.adianti.com.br/doc-framework-Persistence-Setup-SetupConnection

Caso não tenha funcionado em PHP-GTK, você precisa indicar a carga da DLL correspondente do Firebird no PHP.INI, que fica em
c:/php-gtk2/php-cli.ini

abraços,
Pablo
ER

Tudo bem amigo...
Aquele erro é utilizando o mysql e as dll parecem estar carregadas.
Sobre o Firebird, eu gostaria muito, mas muito mesmo(rsrsrs) de utilizar, posso ir testando, mas qual dll devo declarar, você pode me dar uma ajuda.

Sobre as dll's sendo carregadas, veja todo o meu php_cli.ini.:
[PHP] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; About the php.ini in PHP-GTK ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; This file introduces the php.ini settings that you will need in order to ; run PHP-GTK on your system. You may also need other settings from PHP's ; standard php.ini file, e.g. to load further extensions or otherwise control ; PHP's behaviour in matters such as error reporting. Please add those in ; the upper part of this file, in the PHP section. ; You should use PHP's CLI executable to run PHP-GTK. This php.ini file ; should be in the same directory as the PHP executable, to avoid conflict ; with any other copies of PHP that may be installed on your machine. ; The first thing you will need to do is tell PHP where you want it to look ; for the PHP extension libraries (php_*.dll or php_*.so files) on your system. extension_dir = "c:\php-gtk2\ext" ; Make sure that php-gtk2.dll under Windows, or php-gtk2.so under Unix, is in ; the directory named in extension_dir alongside any other shared PHP extensions ; you intend to use, and tell PHP to load it. extension = php_gd2.dll extension = php_gtk2.dll extension = php_soap.dll extension = php_pdo.dll extension = php_mysql.dll extension = php_mysqli.dll extension = php_pgsql.dll extension = php_sqlite.dll extension = php_pdo_mysql.dll extension = php_pdo_pgsql.dll extension = php_pdo_sqlite.dll extension = php_mcrypt.dll extension = php_sqlsrv_52_nts_vc6.dll ;extension = php_pdo_sqlsrv_52_nts_vc6.dll extension = php_oci8.dll ;extension = php_pdo_oci.dll [Date] ; Defines the default timezone used by the date functions ;date.timezone = [PHP-GTK] ;;;;;;;;;;;;;;;;;;;;;; ; PHP-GTK extensions ; ;;;;;;;;;;;;;;;;;;;;;; ; Extensions written for PHP-GTK are in the format php_gtk_*.dll (Windows) or ; php_gtk_*.so (Unix), written here as a comma-separated list. The library ; files need to be in the same directory as the PHP-GTK library, along with ; any other PHP extensions you are using. php-gtk.extensions = php_gtk_libglade2.dll,php_gtk_sourceview2.dll,php_gtk_extra2.dll ;;;;;;;;;;;;; ; Code Page ; ;;;;;;;;;;;;; ; The string variables used for titles and other text values in GTK+ are ; encoded in UTF-8 internally. A code page is needed so that PHP-GTK 'knows' ; which character set is being used, and can convert it to UTF-8 as necessary. ; If your environment uses UTF-8 already, you can set the codepage directive ; to UTF-8 to skip the conversions. ; The default codepage setting in PHP-GTK 2 is ISO-8859-1, but you can also ; use either OEM (e.g. 850) or Windows Code Pages (e.g. CP1250) here, so ; long as the encoding format you choose is capable of iconv conversion. See ; http://www.microsoft.com/globaldev/reference/cphome.mspx for a list of ; the code pages and character sets that are supported on Windows systems. ;php-gtk.codepage = CP1250 php-gtk.codepage = ISO-8859-1 memory_limit = 1024M ; Maximum amount of memory a script may consume (128MB)
PD

Oi Eduardo,

Dê uma olhada na documentação:
www.adianti.com.br/doc-framework-Persistence-Setup-SetupConnection

Às vezes, é necessário informar o caminho do socket logo após o IP:
host = "localhost:/var/run/mysqld/mysqld.sock"

Mas é necessário informar o caminho correto ;-)

att,
Pablo
ER

Não vou mentir para tu não, mas e quanto é o windows, tentei assim.:
localhost:D:\wamp\bin\mysql\mysql5.5.8\bin\mysql.exe

estou utilizando o wampserver, e estou perdido para o adianti framework para o desktop.
ER

neste ai acima tem umas barras, vi agora q tava faltando.
PD

Oi Eduardo,

O que vai após o localhost:, não é o caminho do executável, mas o caminho do socket do mysql (mysql.sock). Veja se ele não está em C:/Temp/mysql.sock ou algum outro diretório temporário. Aqui tem umas dicas:
www.ntu.edu.sg/home/ehchua/programming/howto/WampServer_HowTo.html#z

abs,
Pablo
ER

Vixi isso num é mãe mais bate até kkkk, agora esta dando erro até no web.
HELP ME!
Olha só como eu coloquei no config do app.:
host = 'localhost:/tmp/mysql.sock' port = '3306' name = 'test' user = 'root' pass = '' type = 'mysql' char = 'UTF-8'


e agora no my.ini.:
[client] #password = '' port = 3306 socket = /tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [wampmysqld] port = 3306 socket = /tmp/mysql.sock key_buffer = 16M max_allowed_packet = 1M table_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M basedir=D:/wamp/bin/mysql/mysql5.5.8 log-error=D:/wamp/logs/mysql.log datadir=D:/wamp/bin/mysql/mysql5.5.8/data


ER

tentei tb mandando o mysql.sock para algum lugar tipo.:
d:/wamp/temp/mysql.sock


reiniciei o wamp e nada, vou tentar mais tarde somente com o mysql ou o postgresql, separado do wamp, em outra maquina isso tá dificil.kkkk
ER

não deu certo, que trem que emperrou. kkk
Tentei usando assim também.:
/temp/mysql.sock

e num deu não
PD

Oi Edurado,

Como trata-se de Windows, você pode tirar o caminho do socket do arquivo .INI da aplicação e colocar no php.ini também, veja:
[Pdo_mysql] pdo_mysql.default_socket=


PS: Lembrar de informar o caminho ao final da linha :-)

att,
Pablo