[PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server

2002-07-22 Thread Vincent
Hi, I'm a newbie. I've set up Apache 1.3.26 and Php 4.2.1. I've looked into phpinfo(); and I can see that pgsql is working. But, when I run a simple php file, HTML HEAD TITLEExample PHP Querying/TITLE BODY ?php echo Hello; $conn = pg_connect(host=localhost dbname=phpdb); if (!$conn) {

[PHP-DB] php and javascript?

2002-07-22 Thread bo
Hi, Here is what I wanted to achieve, I want to get a confirmation box pop up when user click on the delete link of the webpage(displays the contents got from mysql database). I know we can do it in javascript easily, but my question is: 1st, a common javascript confirmation will be like this:

Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQLserver :could not connect to server

2002-07-22 Thread Devrim GUNDUZ
Hi, On Mon, 22 Jul 2002, Vincent wrote: Warning: pg_connect() unable to connect to PostgreSQL server: could not connect to server: Connection refused Is the server running on host localhost and accepting TCP/IP connections on port 5432? in /usr/local/apache/htdocs/postgresql.php on line 8

RE: [PHP-DB] php and javascript?

2002-07-22 Thread Beau Lebens
Bo, you have really answered your own question (question 1) all you need to do is replace http://detination with http://localhost/index.php?id=1 (as per your examples) and it should send them to the page which triggers the deletion of the page (if they confirm the box) as far as q2 goes, you

RE: [PHP-DB] php and javascript?

2002-07-22 Thread Tommy Claasens - Q Data KZN
Hi, Have a look at script var rVal; window.returnValue = rVal; rVal= showModalDialog('test.php?op=.','',''); . . . /script This will pop up a user defined pop-up where the user can take action based on what you present them. HTH

[PHP-DB] Good table structure for search

2002-07-22 Thread JJ Harrison
To add search functionality I decieded this was the best table structure I could come up with for a keywords table. Here it is: CREATE TABLE article_keyword ( aid int(11) unsigned NOT NULL default '0', keyword char(50) NOT NULL default '', weight tinyint(2) unsigned NOT NULL default '0',

Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2

2002-07-22 Thread Devrim GUNDUZ
On Sun, 21 Jul 2002, Eric wrote: Our Apache web server runs under a unix account (of course). In the PostgreSQL world, you have to create a database user under the same name like so: ./createuser webserver Once we did this -- everything worked. What puzzles me though is that

[PHP-DB] Re: php and javascript?

2002-07-22 Thread Adam Royle
Just reiterating over what the others have said (plus expanding), and just a bit cleaner. SCRIPT language=JavaScript !-- function deleteRecord(recordName, recordID) { if (confirm(Do you really want to delete + recordName+?){ window.location = /delete.php?id=+recordID;

Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2

2002-07-22 Thread Eric
I completely understand what you are saying, thanks for the reply. Here is what happen. We, first couldn't connect so someone asked if phpinfo showed PSQL in the output and it did not. This lead us to believe we had a compilation problem with PHP, Apache or Postgres. So we stopped looking for

Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQL server :could not connect to server

2002-07-22 Thread Eric
I agree, Unix domain sockets very much faster. You have to start POSTMASTER with the -i switch to get it to listen on the designated port (5432 by default I think). Eric Devrim Gunduz [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, On Mon, 22 Jul 2002,

Re: [PHP-DB] [PHP] pg_connect() unable to connect to PostgreSQLserver :could not connect to server

2002-07-22 Thread Devrim GUNDUZ
On Mon, 22 Jul 2002, Eric wrote: I agree, Unix domain sockets very much faster. You have to start POSTMASTER with the -i switch to get it to listen on the designated port (5432 by default I think). If you'll use Unix domain sockets, then do not use -i parameter. :) Best regards. --

Re: [PHP-DB] PHP4 Not Seeing PostgreSQL 7.2

2002-07-22 Thread Jason Wong
On Monday 22 July 2002 20:49, Eric wrote: I completely understand what you are saying, thanks for the reply. Here is what happen. We, first couldn't connect so someone asked if phpinfo showed PSQL in the output and it did not. [snip] Now, I assume PHPINFO is simply verifying the PGSQL

[PHP-DB] Re: Which community is better?

2002-07-22 Thread Nuttzy
On the main page there is a notice stating that the demo is not working. Not sure why. You may just want to download and experiment with it. Especially if you have a mysql DB, the installation is automated an painless. Plus it's free ;-) -Nuttzy Dasmeet Singh [EMAIL PROTECTED] wrote in

[PHP-DB] Not sure what I am doing wrong here?

2002-07-22 Thread Jas
Ok, now I am not sure why I cannot get this output into a variable so I can place it into a database table field. Any help would be greatly appreciated. ?php /* Check client info and register */ if (getenv(HTTP_X_FORWARDED_FOR)){ $ipaddy = getenv(HTTP_X_FORWARDED_FOR); } else { $ipaddy =

[PHP-DB] Re: HTML button display problem

2002-07-22 Thread markbm
It doesn't bring back any HTML when I view the source: tr td colspan=3 center /center /td /tr I tried the addslashes and stripslashes but I'm not sure that I had the syntax right. Any ideas? Thanks. Mark Dasmeet Singh

[PHP-DB] Re: Not sure what I am doing wrong here?

2002-07-22 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Ok, now I am not sure why I cannot get this output into a variable so I can place it into a database table field. Any help would be greatly appreciated. ?php /* Check client info and register */ if (getenv(HTTP_X_FORWARDED_FOR)){

[PHP-DB] Re: HTML button display problem

2002-07-22 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... It doesn't bring back any HTML when I view the source: tr td colspan=3 center /center /td /tr I tried the addslashes and stripslashes but I'm not sure

[PHP-DB] libphp4.so, Sun Solaris 8, relocation error

2002-07-22 Thread Thomas LangÄs
OS: Sun Solaris 8 Problem: dilbert:/local/apache# bin/httpd Syntax error on line 244 of /local/apache/conf/httpd.conf: Cannot load /local/apache/libexec/libphp4.so into server: ld.so.1: bin/httpd: fatal: relocation error: file /local/apache/libexec/libphp4.so: symbol __floatdidf: referenced

[PHP-DB] another problem

2002-07-22 Thread Georgie Casey
well, i solved the last problem on my own but now i need help on my new one :-) how do you convert text to hexadecimal with PHP? -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Online Film Production Directory *** --

[PHP-DB] Re: another problem

2002-07-22 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... well, i solved the last problem on my own but now i need help on my new one :-) how do you convert text to hexadecimal with PHP? -- Regards, Georgie Casey [EMAIL PROTECTED] If you are asking what I think you are asking - use ord

[PHP-DB] Re: HTML button display problem

2002-07-22 Thread markbm
Thanks for the reply. When I added: tr td colspan=3 center ?php printf($result[PAYPAL_BUTTON]); echo mysql_errno() . : . mysql_error() . \n;? /center /td /tr /td /center

[PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread markbm
I am trying to develop a page that, in certain places, I only want it to display the TR and TDs if data is found for a given field. For example, if I only have an image for the first floorplan of a house, I do NOT have an image for the second floorplan of a house, then show the first floorplan

Re: [PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread Jason Wong
On Tuesday 23 July 2002 11:58, markbm wrote: I am trying to develop a page that, in certain places, I only want it to display the TR and TDs if data is found for a given field. For example, if I only have an image for the first floorplan of a house, I do NOT have an image for the second

Re: [PHP-DB] Problem with Not displaying HTML if data not found

2002-07-22 Thread markbm
When I added this code, and removed all the images from the database...that I wanted to check to see if their TR would display...it worked correctly (but the same thing had been happening while using the other 5 methods). When I then added back all of the images that I wanted to display.the

[PHP-DB] Re: HTML button display problem

2002-07-22 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Thanks for the reply. When I added: tr td colspan=3 center ?php printf($result[PAYPAL_BUTTON]); echo mysql_errno() . : . mysql_error() . \n;? /center /td

[PHP-DB] number of files in a dir vs. performace

2002-07-22 Thread eat pasta type fasta
I'm using mysql to hold references to image files then served on my pages via PHP. I have typically a set of two files: thumb and a large original, on occasion there is also a variant inreasing the set to 3 per image currently I am holding all of the files in 1 directory since the DB can

[PHP-DB] Re: [PHP] another problem

2002-07-22 Thread Justin French
I would have started with a search on php.net for hex which would have showed you two functions, and numerous other links that i'm not going to read. dechex() and hexdec() seem to do it for numbers, and i'm sure you'll find what you need with some more looking. Justin French on 23/07/02 6:02

[PHP-DB] Re: [PHP] number of files in a dir vs. performace

2002-07-22 Thread Miguel Cruz
On Mon, 22 Jul 2002, eat pasta type fasta wrote: currently I am holding all of the files in 1 directory since the DB can keep track of them, however their number has grown to over 400 at this point my issue is whether it would be worth it (performance wise) to split them into thumbs and