Domanda

I am using Putty to access a server here at work. I am in charge of maintaining a website, that has, up til now, been using mssql and php. We are making a transition to Postgres, and I am needing to change from mssql to pgsql.

When trying to use some of the pgsql functions, I am getting the undefined function error, which leads me to think that I don't have the pgsql (package?) installed. I've searched many other questions for something similar, and the response that typically is given, and works for the asker is to do the command:

sudo yum install php-pgsql

The output I get is:

Loaded plugins: rhnplugin, security There was an error communicating with RHN. RHN Satellite or RHN Classic support will be disabled. Error communicating with server. The message was:

Error Message: Please run rhn_register as root on this client Error Class Code: 9 Error Class Info: Invalid System Credentials. Explanation: An error has occurred while processing your request. If this problem persists please enter a bug report at bugzilla.redhat.com. If you choose to submit the bug report, please be sure to include details of what you were trying to do when this error occurred and details on how to reproduce this problem.

Setting up Install Process No package php-pgsql available. Nothing to do

I've read up a little on the Error Class Code: 9, and it looks like it has something to do with redoing credentials, which I am not at liberty to do.

Being new to this, I asked one of my co-workers if they knew what to do. They mentioned something about an RPM, which me being new to this, had to look up and see what it was. I'm still a little fuzzy.

In my mind (which contains a little programming knowledge), I would install a library or package into a folder or directory, and then have a require_once statement make reference to that library.

I know this question is very confusing, and not very clear, but basically, I would like to use pgsql, which at the moment doesn't seem to be working (or maybe installed).

Additional Information:

Linux Distro: Red Hat Enterprise Linux Server release 5.7 (Tikanga)

PHP Version: 5.3.6

Putty Release: 0.62

Thank you for taking the time and effort to help me, I greatly appreciate it!

È stato utile?

Soluzione

Programs and libraries, or parts of programs are libraries, get built into "rpm" files, which I'll refer to as packages. The "yum" program contacts a remote server and downloads rpm files and installs them for you. Most packages require other packages, for example php-pgsql requires both php packages and pgsql packages in order to work. Yum figures out the dependancies for you.

But there's something wrong. You're using Red Hat Enterprise, and it seems that you can't talk to their server. You should probably use your support contract with Red Hat to solve the problem.

But one alternative option is to download the rpm's that you need and install them with 'rpm -i' instead of letting yum do that for you.

But if you do that, you have to find rpm's build for your specific version of RHE, or you'll run into compatibility problems.

Altri suggerimenti

For more information to resolve to Code 9 error:

https://access.redhat.com/solutions/5107

Which states:

This error occurs when the SystemID on the system in question (/etc/sysconfig/rhn/systemid) and the SystemID on RHN Classic or Satellite mis-match. In this case, a system will not receive any updates as RHN Hosted or Satellite is unaware of the system. RHN and Satellite maintains profiles for the systems that are registered to it. Every system is identified based on the ServerID. This SystemID on RHN or Satellite should match SystemID listed in "/etc/sysconfig/rhn/systemid" file.

You can register as follow:

1) Log in to the Satellite server.

2) Click on the "Systems" tab in the top navigation bar and then the name of the old or duplicated system in the System List.

3) Click the "delete system" link in the top-right corner of the page.

4) Confirm system profile deletion by clicking the "Delete System" button.

5) Lastly, go to the command prompt of the client system and login as root and delete the file /etc/sysconfig/rhn/systemid

and run the command at the command prompt:

rhn_register
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top