Jump to content

grouchotron

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Posts posted by grouchotron

  1. Type php was getting me a message telling me to install php5-cli, so I did. However my php was working before this, and I was  (still am) able to view a file with <?php php.info() ?>. 

     

    The info page does not say that postgres is enabled for php.

     

    Now when typing php -m | less it works, and I do see pgsql on the list of modules.

     

    When typing php -i | less I see that postgresql has been enabled.

     

    However after restarting my server I see that the php info() file still doesnt display anything about postgres. What is different about the php5 I originally apt-get installed and the php5-cli? Is it a different version or something now installed on my server? Is apache2 using the wrong one?

  2. Hey, much thanks for the detailed response!

     

    So, yes I am using putty, and thanks for telling me how to copy! That'll definately be useful, haha. Below is the relevent section of the php.ini file in /etc/php5/apache2

     

    [PostgresSQL]
    ; Allow or prevent persistent links.
    pgsql.allow_persistent = On
    
    ; Detect broken persistent links always with pg_pconnect().
    ; Auto reset feature requires a little overheads.
    pgsql.auto_reset_persistent = Off
    
    ; Maximum number of persistent links.  -1 means no limit.
    pgsql.max_persistent = -1
    
    ; Maximum number of links (persistent+non persistent).  -1 means no limit.
    pgsql.max_links = -1
    
    ; Ignore PostgreSQL backends Notice message or not.
    ; Notice message logging require a little overheads.
    pgsql.ignore_notice = 0
    
    ; Log PostgreSQL backends Notice message or not.
    ; Unless pgsql.ignore_notice=0, module cannot log notice message.
    pgsql.log_notice = 0
    

     

     

    To answer your questions, I used apt-get for both php5 and php5-pgsql.

     

    I didn't find either of the folders you suggested, but I did find a pgsql.ini file in both /etc/php5/apache2 and /etc/php5/conf.d both contained these lines:

     

    # configuration for php PostgreSQL module
    extension=pgsql.so

     

    Both of the other commands you suggested resulted in a message saying I don't have program php installed, which is strange because I know I do, I see php files parsed and functioning correctly from my browser.

     

    I've read something about having to put postgresql in a path, or having to start it? Do you know how I can tell if either of these things need to be done?

     

    Any other tips?

     

    Thanks again

     

     

     

     

  3. Well, I have a computer running Ubuntu server edition, and I'm trying to access a Postgres database with a php file.

     

    Everything I've seen tells me I have to enable postgres support in a php.ini file, by uncommenting a line about extensions.

     

    Can someone give me some guidance as to what exactly I am supposed to be changing in the .ini file? There is a section for postgresql settings in it, but none of them would lead me to believe they effect whether or not its enabled. I'd copy and paste it into here... but I have no idea how to do that with vim, which is what I have on the server.

×
×
  • 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.