LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-21-2011, 12:40 PM   #1
aocferreira
Member
 
Registered: Feb 2011
Posts: 117

Rep: Reputation: 0
PHP API (adodb)


Hello,

file b.php:

PHP Code:
<?php
include('/usr/local/groundwork/core/foundation/api/php/collageapi/collage.inc.php');

$type 'MySQL';
$server 'localhost';
$username 'root';
$password '123';
$database 'GWCollageDB';

$con __construct($type$server$username$password$database);
?>
collage.inc.php:

/* Needed Includes */
// This assumes you have adodb in your include_path, if not, then point to where it resides.
include_once('/downloads/adodb5/adodb.inc.php');

function __construct($type, $server, $username, $password, $database) {
$this->type = $type;
$this->server = $server;
$this->username = $username;
$this->pwd = $password;
$this->database = $database;
}

adodb5 exists and is in /downloads/adodb5.

> php b.php

Fatal error: Call to undefined function __construct() in /b.php on line 11
 
Old 04-21-2011, 12:48 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

You're actually using the GroundWork Collage API. Which is deprecated. Look here for more info about "__construct()":
http://proddoc.groundworkopensource....lageDB_API.htm

Frankly, I'd urge you to consider writing your data access code in straight PHP, if at all possible.
 
Old 04-21-2011, 12:55 PM   #3
aocferreira
Member
 
Registered: Feb 2011
Posts: 117

Original Poster
Rep: Reputation: 0
That means that collage api can't be used? But that function is indeed specified in that file..
So you recommend use only PHP to access the databases?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need PHP programmer >>> API remisandotbe Programming 2 03-29-2006 08:00 PM
php commenting, and api generation dakomoon Programming 2 12-12-2005 12:13 AM
PHP API/IDE advice xushi Programming 11 07-29-2005 12:44 PM
Help with ADODB for Snort hywaydave Linux - Security 1 05-26-2005 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration