Jump to content
php.lv forumi

Recommended Posts

Posted

Ieinstaleju APACHE, pectam PHP=visu parbaudiju-straada! Ieinstaleju PostgreSQL-straadaa! Kaa lai PostgreSQL piesaista pie Apache un ka lai to parbauda, ka viss ir oki?

Posted

postgres nav japiesaista pie apache, bet gan pie PHP. To var izdarit eneiblojot postgres moduli. Ka to izdarit ? Atkarigs no operatajsisteemas. Taka nepateici kada tev ir sikak pastastit nevaru.

Posted
postgres nav japiesaista pie apache, bet gan pie PHP. To var izdarit eneiblojot postgres moduli. Ka to izdarit ? Atkarigs no operatajsisteemas. Taka nepateici kada tev ir sikak pastastit nevaru.

Operetajsistema ir XP prof.

Posted

Tad ieksh php.ini atkomentee rindinju

;extension=php_pgsql.dll

 

tjip ai buutu

extension=php_pgsql.dll
Posted
Tad ieksh php.ini atkomentee rindinju

 

 

tjip ai buutu

to es jau sen biju izdarijis... vai vairaak nekas nav jaadara? kaa lai paarbauda, ka datubaaze ir piesaistiita pie php?

Posted

paskaties ieksh phpinfo(); ja paradas postgres modulis tad viss ir kedas.... un izmanto pg_connect f-ju lai pieslegtos datubaazei, ja izdodas pieslegties tad viss ir kedaas.

Posted
paskaties ieksh phpinfo(); ja paradas postgres modulis tad viss ir kedas.... un izmanto pg_connect f-ju lai pieslegtos datubaazei, ja izdodas pieslegties tad viss ir kedaas.

Man uzraadaas:

pgsql

PostgreSQL Support enabled

PostgreSQL(libpq) Version 8.2.3

Multibyte character support enabled

SSL support disabled

Active Persistent Links 0

Active Links 0

 

Directive Local Value Master Value

pgsql.allow_persistent On On

pgsql.auto_reset_persistent Off Off

pgsql.ignore_notice Off Off

pgsql.log_notice Off Off

pgsql.max_links Unlimited Unlimited

pgsql.max_persistent Unlimited Unlimited

vai komandrindaa ir jaaraksta \pg_connect f-ju

lai pieslegtos?

Uzraadija:

postgres-# \pg_connect f-ju

pg_connect f-ju

pg_connect

\p: extra argument "g_connect" ignored

\p: extra argument "f-ju" ignored

Posted

Uztaisi php skriptu:

 

 

<?php
pg_connect("host=sheep port=5432 dbname=mary user=lamb password=foo") or die(pg_last_error());
?>

Posted
Uztaisi php skriptu:

 

 

<?php
pg_connect("host=sheep port=5432 dbname=mary user=lamb password=foo") or die(pg_last_error());
?>

 

Baaac...

Uzraadaas:

Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not translate host name "sheep" to address: Unknown host in C:\Apache2\htdocs\index.php on line 2

 

Warning: pg_last_error() [function.pg-last-error]: No PostgreSQL link opened yet in C:\Apache2\htdocs\index.php on line 2

Posted

Nu baac! Tak ieraksti datubaazes hostu, lietotajvardu, paroli un portu taads kads attiecigi tev ir nevis kaut kadus izdomatus, kurus es tev iedevu.

Posted
Nu baac! Tak ieraksti datubaazes hostu, lietotajvardu, paroli un portu taads kads attiecigi tev ir nevis kaut kadus izdomatus, kurus es tev iedevu.

To es jau biju izdarijis.. ierakstiju defaulto port=5432 dbname=postgres user=postgres

Posted
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not translate host name "sheep" to address: Unknown host in C:\Apache2\htdocs\index.php on line 2

 

shis errors par to neliecina :)

Posted
shis errors par to neliecina :)

Nju es nolahojos uz host= :)

man vinsh tagat nekaadas kludas neizmeta.. tas noziimee ka savienojums ir?

Posted

ye :)

 

Vari arii paniekoties ar parejaam f-jaam, uztaisiit tabulas, ievietot datus tabulaas, izvilkt datus no tabulaam utml. Bet nu principaa viss strada :)

Posted
ye :)

 

Vari arii paniekoties ar parejaam f-jaam, uztaisiit tabulas, ievietot datus tabulaas, izvilkt datus no tabulaam utml. Bet nu principaa viss strada :)

LIELS paldies!!!

Tagat meegjinaashu pieinstaleet phpmyadmin - ja vien tas bus iespeejams ar postgessql :)

×
×
  • Create New...