Jump to content

veenasv

Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling
  • Location
    Newyork,USA

Contact Methods

  • Yahoo
    veenaracharya@yahoo.com

veenasv's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, My web page runs on Apache web server with PHP as the scripting lnaguage and Postgresql as the database. http://protein.nsls.bnl.gov If I type in some directory name which is under my document root, I am able to list all the files inthat directory. I don\'t want anybody to have access to my files except for browsing different pages. How can I restrict this? Where do I have to set the permission? I don\'t know how to do this. Also, if I goto a specific directory in my web page, it should be default show the main page under that directory. How to do this? I hope I am clear.
  2. Hi, I have a working copy of my web page. I need to segregate my experimental copy with this working copy so that at same point of time, I should be able to run both working copy as well as test my experiment copy of the web pages. I know it\'s possible but don\'t know what to change in the httpd.conf file. I would appreciate any guidance on this
  3. Hi, I am retreiving set of information from postgresql database. I am taking 3 columns of a table in my select query. this returns multiple rows. How can display each column of a row for all the rows retrieved in php? I tried couple of things with pg_fetch_array but it doesn\'t display the data what I need. $query="select a,b,c from xyz where ..."; //this retrieves say 3 rows $result=pg_query($query); $rows=pg_numrows($result); if($rows>0) { for($i=0;$i<$rows;$i++) { $data=pg_fetch_array($result,$i); // now $data contains each row } } I am just giving piece of code. With pg_fetch_array, will I get all the 3 columns of a row? I am not able to access the second and third column with the above code. It just gives me the first column in all the 3 rows which are retrieved. Can anybody advice how to achieve this?
  4. how come I didn\'t receive even a single answer to my previous question regarding the connection to postgresql from php script???I am totally depending on this forum as I have no one to guide me here. Please if anyone of you is a PHP expert take some time for me and try to point the problem and solution to it
  5. I have installed Mandrake8.2 . And decided to use postgresql with php for web page development. and the webserver is apache. Mandrake is bundled with postgres, php. So, am using the same. I wrote a simple program to conenct to the postgres database using php. But it gives following error: Warning: Unable to connect to PostgreSQL server: FATAL 1: No pg_hba.conf entry for host 127.0.0.1, user apache, database x6a in /var/www/html/veena/test.php on line 2 Couldn\'t connect My program goes like this: <?php $connection = pg_Connect( \"host=localhost dbname=x6a\" ) or die(\"Couldn\'t connect\"); $result = pg_exec($connection, \"SELECT * FROM addresses;\") or die(\"couldn\'t execute\"); ?> I have granted all previleges to user apache in my addresses table in x6a database. I also have entry in pg_hba.conf as: local all trust localhost all 127.0.0.1 255.255.255.255 trust Any help will be appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.