class 'COM' not found in /opt/lampp/htdocs/

Problems with the Linux version of XAMPP, questions, comments, and anything related.

class 'COM' not found in /opt/lampp/htdocs/

Postby gyver76370 » 16. March 2016 19:00

Hi

My script extract data from a HFSQL database (WINDEV)

Code: Select all
<?php
// Déclaration de la chaîne de connexion
$ProviderOLEDBHyperFileSQL ='Provider=PCSOFT.HFSQL; Data Source=xxx.xxx.xxx.xx:yyyy; Initial Catalog=point8d; User ID=dddd; Password=sssss;';
 
// Instanciation de l'objet
$ConnectionOLEDBHyperFileSQL = new COM("ADODB.Connection") or die("Impossible d'instancier un objet ADO");
 
// Connexion
$ConnectionOLEDBHyperFileSQL ->ConnectionString = $ProviderOLEDBHyperFileSQL;
$ConnectionOLEDBHyperFileSQL ->Open();
 
// Création et exécution de la requête
$rs = new COM("ADODB.Recordset");
$sql = "SELECT id_point,quand,quoi FROM point where flag = 'OUVERT'";
$rs->Open($sql, $ProviderOLEDBHyperFileSQL);
 
// Parcours du résultat de la requête
$index = 0;
while (!$rs->EOF) {
 
for( $x = 0; $x < $rs->Fields->Count; $x++ )
{
 
$assoc_array[ $index ][ $rs->Fields[$x]->Name ] = $rs->Fields[$x]->Value;
echo $rs->Fields[$x]->Name ." -> ". $rs->Fields[$x]->Value . "<br>";
}
 
echo "--------------------------------------------<br>";
$rs->MoveNext();
$index++;
}
 
$rs->Close();
 
?>


with WAMP (windows 7) it is work well.

but with XAMPP PHP 5 (Debian 7) i have the following mistake

Code: Select all
Fatal error: Class 'COM' not found in /opt/lampp/htdocs/ouvert/all_point_ipp.php on line 6


Can you help me please ?

Thank for your help

BR
gyver76370
 
Posts: 2
Joined: 16. March 2016 18:55
Operating System: linux

Re: class 'COM' not found in /opt/lampp/htdocs/

Postby Altrea » 16. March 2016 19:49

Hi,

Class COM is provided by a Microsoft .NET class. This is Windows only.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: class 'COM' not found in /opt/lampp/htdocs/

Postby gyver76370 » 17. March 2016 08:54

hi

ok thank it was that i see on internet , i wanted to be sure

now i have to search how to extract database HFSQL with PHP page

thank again bye
gyver76370
 
Posts: 2
Joined: 16. March 2016 18:55
Operating System: linux


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 10 guests