Hi all:
This is one of my first attempts to get a CMS system installed on Mac OS X Server, (I'm fairly new to this level of administration too).
I believe I had installed the latest release of Drupal correctly, but when I go to the main page I get the error:
$db_url = "mysql://root@id37.idevelop.net/drupal"; $base_url = "http://id37.idevelop.net"; #$db_url = "mysql://drupal:drupal@66.6.105.37/drupal";
Fatal error: Call to undefined function: pg_connect() in /Library/WebServer/Documents/includes/database.pgsql.inc on line 28
There is no password on the db, (I'm just experimenting right now).
I'm using Mac OS X Server 10.3.5, PHP 4.3.2, mySQL
Running id37.idevelop.net/info.php will dump all php params.
Any ideas ?
Much Appreciated,
Donald
Comments
Put a password on the databas
Put a password on the database and fix the conf.php file.
From this line:
"mysql://drupal:drupal@66.6.105.37/drupal";
It appears you are using a ;
user account: drupal
password: drupal
database: drupal
I found that conf.php doesnt' like it, so put one on or change the conf.php file to not have one (which is a BAD habit even for development and testing and I'm not sure it will pass a blank password field).
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
postgres - mysql?
Also looks like there may be some confusion regarding the type of database you are using. You say mySQL but it looks like the config file may be trying to use postgres:
pg_connect()
I've had this happen and the errors look horrible but it is easy to fix by modifying the php.config file just before the line where you give it your database name and password.
I'd like to hear how the 'experiment' goes, hope you report back here if it works or not.
GZ
mySql
I was curious about that too. What I have done now, is to assign a password to the database 'drupal' and set that in conf.php. My file id37.idevelop.net.php is now empty.
To 'force' the db to be mySQL, I edited 'database.inc', (I'm getting brave or foolhard :) ).
It now reads:
//$db_type = substr($connect_url, 0, strpos($connect_url, '://'));
$db_type = 'mysql';
// TODO: Allow more than one database API to be present.
// if ($db_type == 'mysql') {
include_once 'includes/database.mysql.inc';
// }
// else {
// include_once 'includes/database.pgsql.inc';
// }
$db_conns[$name] = db_connect($connect_url);
In conf.php, I have
$db_url = "mysql://root:****@id37.idevelop.net/drupal";
$db_prefix = "";
Now when I load the page, I get the message "unable to select database".
Going into mySQL, show databases; gives me:
+----------+
| Database |
+----------+
| drupal |
| mysql |
| test |
+----------+
3 rows in set (0.00 sec)
So, The drupal db seems to exist, but something is still out of sync.
I appreciate your patience in helping me with this.
Donald
Now up and running on Mac OS X Server
Well, I changed a couple of things this morning.
I added a new user to mySQL, (I was just using root before).
Updated conf.php to use that new user
Deleted my id37.idevelop.net.php file (it was empty)
Now the drupal config page appeared for the first time.
Cool, onto the next step.
Thanks,
Donald
mysql, drupal on tiger
Your post is many months old. Did you get drupal working the way you wanted?
I'm asking because I have working install of drupal on my G5 running 10.4.1. However users who connect from the web can only see an html formatted page and they cannot connect to other pages. I think the problems lies in permissions but i don't know what permissions to apply.
Have you activated the PHP
Have you activated the PHP module in Server Admin -> Web -> Settings -> Modules? It sounds like that might be it. Just look for the module list and check the box for mod_php (or whatever it's called, I forget).
Also, if you're using the MySQL 4.1 that comes with Tiger server, there will be a couple of issues that you'll need to fix. First of all, MySQL 4.1 uses a 41-byte hash for passwords that is not understood by the PHP that Tiger ships with. Secondly, Apple's install of MySQL 4.1 puts mysql.sock in /var/mysql, instead of /tmp where the rest of the world expects it to be.
You can fix both by installing an /etc/my.cnf file:
sudo cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
then adding a line under the [mysqld] header:
old_passwords
and changing the entries for /var/mysql/mysql.sock to /tmp/mysql.sock.
Alternately, you could install a newer version of PHP that can handle the 41-byte hash, but I didn't because I'm lazy and I need instant gratification.