cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal Error

Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Fatal Error

Hi
Can anyone help with the following error that I receive when trying to log into my ccgi space:-
Fatal error: Cannot instantiate non-existent class: com in /share/storage/02/bg/Name/Dir-Name/login3.php on line 37
Plus Net Technical Support have answered with the following:- "......it looks as this one is designed for windows not a *nix architecture but on this we are unable to support further".

I have activated my cgi space and MySQL and have uploaded php files and the database into the relevant directories. I have also CHMOD'd the directory.
Is there anything else I need to do other than upload the files.
Any help appreciated
8 REPLIES 8
Highlighted
Community Veteran
Posts: 3,789
Thanks: 1
Registered: ‎08-06-2007

Re: Fatal Error

There is not enough information there to diagnose the problem.
What application are you trying to install?
What version of PHP does it require?
Are there any other dependencies that it requires?
At a cursory glance, it is trying to instantiate an object called "com".  Reading between the lines, my first guess would be that the application has been written with PHP5 in mind, whereas the ccgi servers only have PHP 4.3.10 (if memory serves)
Barry
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: Fatal Error

COM is a Windows Object library so is related to Windows. I suspect the PHP scripts you have uploaded were designed to run in a Windows environment and uses the COM object library, which does not exist in a Linux enviroment the ccgi uses.
Copying and posting 10 lines of code either side of the error line here would prove this.
Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: Fatal Error

Hi
Thanks for that quick reply.
I have an application that has been produced using easyGen, this writes all the PHP. I have also tested my application and it all runs correctly locally.
I have just checked sysinfo.php, I have PHP V5.2.3, apart from having all the directories where they should be I cannot think of any other dependencies that it requires.
By the sound of what you are saying I need to install PHP 4.3.10. As you may have gathered I am a newbee to PHP, HTM no problem. Reading all the setting up guides at PlusNet there seems to be reams and reams of setting up required before you actually start, is this all necessary?
Thanks for your help
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: Fatal Error

Hi Peter
Thanks for your input, shown below is the 10 lines of code either side of the error - hope this helps.
// Declare loginError so a value is always available
$loginError = "";
// Enable sessions
session_start();
// Turn on magic quotes to prevent SQL injection attacks
if(!get_magic_quotes_gpc())
set_magic_quotes_runtime(1);
// Connect to database
$eg_objConn1 = new COM("ADODB.Connection");
$eg_objConn1->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ds/DbName.mdb;Persist Security Info=False");
// Validate users input
if(!empty($_POST))
{
// Check username has a value
if(empty($_POST['username'])) $eg_error['username'] = "Please enter a user name!";
// Check password has a value
if(empty($_POST['password'])) $eg_error['password'] = "Please enter a password!";
// Check if any errors were returned and run relevant code
if(empty($eg_error))
{
// Get Record Set
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: Fatal Error

Yep, that will only work on Windows.
It is trying to connect to an Access or SQLSERVER database (DbName.mdb) via ODBC connectivity functions in the com object library.
Is this just a user authentication script you are trying out or is it part of a bigger package?
You need to find something similar which states that it runs on Linux and uses a MySQL database.

Highlighted
Dabbler
Posts: 12
Registered: ‎09-08-2007

Re: Fatal Error

Thanks Peter
I was afraid that might have been your answer.
As far as I know the whole site uses the Access Db.
Is there any way of converting the Db into a form that can be used on PlusNet. I have MySQL installed on my PC which also includes the Migration Toolkit, would this not convert the Db for me?
Highlighted
Community Veteran
Posts: 3,789
Thanks: 1
Registered: ‎08-06-2007

Re: Fatal Error

It would certainly be possible..  However, it seems that the package would need to be converted to use a MySQL database instead of an Access database - this may require considerable programming time and expertise. Sad
Barry
Highlighted
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: Fatal Error

Is this a commercial or public domain package?
If we know what it is or what you are trying to do we might know alternative packages to do the same thing that would run on the ccgi server.
If you don't want to make it public, PM me  and I'll see if I can help further. You can find lots of PD packages on www.hotscripts.com