Win32 ole0.1709 error 0x8007007e

win32 ole0.1709 error 0x8007007e

I have a Perl script for OLE DB Connection. Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found". Connection))' Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found" at -e line 1 eval { } called at -e line 1 $ gdb perl5.13.8d-nt . Works for Windows 7/8/10/Vista/ XP. Follow These Simple Instructions. win32 ole0.1709 error 0x8007007e

Win32 ole0.1709 error 0x8007007e - thanks Thanks

Win32 OLE problem

Ryan Kadomoto's profile photo

Ryan Kadomoto

unread,
Sep 17, 2013, 9:44:33 PM9/17/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

I am getting this error:

Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found"

when I create a new ADOD connection

my $conn = Win32::OLE->new('ADODB.Connection')

When I run my code from the command line, it works fine.

Any ideas on what could be the problem? 

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, 2013, 2:18:30 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

I suspect the environment.

Note that web server starts CGI with prepared environment, which is not inherited from the parent process (web server). For example, years ago I found out that under Windows, CGI scripts were failing all socket calls if COMSPEC environment variable wasn't specified and pointing to the directory where winsock DLL lived. I suspect similar thing is happening here.

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, 2013, 2:20:13 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

Suggestion: print out Dumper(\%ENV) for both command line and CGI cases, compare, and then start moving environment vars to the CGI through -cgi_environment option.

Ryan Kadomoto's profile photo

Ryan Kadomoto

unread,
Sep 18, 2013, 5:17:46 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

That worked!!
I had to add COMMONPROGRAMFiLES(X86) to the cgi_environment.

And FYI, if you add more than one pair, do not put a space before or after the comma separator.

Thank You for your help!

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, 2013, 10:02:03 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

You're welcome Ryan.




Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Reply to topic   Topic: Apache with ADODB.Connection
Author
alex84



Joined: 10 May 2011
Posts: 1

PostPosted: Tue 10 May '11 18:38    Post subject: Apache with ADODB.ConnectionReply with quote

HI, I'm Alex from Rome.
I'm writing to you for a problem.

I have a Perl script for OLE DB Connection. This script connects to PIOLEDB server for access to database. Only for receiving data. The connection code is the following:


# Create a connection object
our $conn = Win32::OLE->new('ADODB.Connection');
die error() if error();

# set the provider for the connection
$conn->{Provider} = "PIOLEDB";

# open the connection. This is where all but the provider should go.
# sometimes, the provider can go in this string instead of above.
# this is the area where the connection string goes.

$conn->Open("Data Source=x.x.x.x;PWD=;UID=admin");
die error() if error();

It work well, running on command line.

I need to insert this script on apache http server, for accessing with URL
(f.i. http://localhost/TestAdoDB.cgi).

The same script run on web doesn't work...
The error log file say this:

Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found"

refer at our $conn = Win32::OLE->new('ADODB.Connection');.

How can I run script for OLE DB connection on apache??
Do I must add particular .dll, files, set registry permissions ??
I tried to use :

$conn = Win32::OLE->new(['localhost',ADODB.Connection']);but I have "class not register" error.

The environment is the following:

Virtual Machine with Windows Server 2008 64bit
Apache http Server x86
ActivePerl x86
PIOLEDB x86 and 64bit.

Thanks in advance Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7132
Location: Germany, Next to Hamburg
PostPosted: Thu 14 Jul '11 21:03    Post subject: Reply with quote

is that perl or PHP code?
Back to top
vm505



Joined: 20 May 2014
Posts: 2
Location: Aachen, De
PostPosted: Tue 20 May '14 14:06    Post subject: Reply with quote

If you have a combination of windows x64, apache and a win32 cgi (exe) using ADODB you have the problem that the enviroment variable CommonProgramFiles(x86)is translated into CommonProgramFiles_x86_

Adodb needs that env-variable to find the software, so it ends there.


The problem lies in util_script.c (2.4.9)

AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
{
...
while (*whack != '=') {
if (!apr_isalnum(*whack)) {
*whack = '_';
}
++whack;
}
...
}


I propose a Change into :

while (*whack != '=') {
if (!apr_isalnum(*whack) && *whack != '(' && *whack != ')') {
*whack = '_';
}
++whack;
}


You also need the following in Httpd.conf:

SetEnv ProgramFiles "C:\Program Files"
SetEnv "ProgramFiles(x86)" "C:\Program Files (x86)"
SetEnv ProgramFilesW6432 "C:\Program Files"
SetEnv CommonProgramFiles "C:\Program Files\Common Files"
SetEnv "CommonProgramFiles(x86)" "C:\Program Files (x86)\Common Files"
SetEnv CommonProgramFilesW6432 "C:\Program Files\Common Files"

I tested the proposal with httpd 2.2 and httpd 2.4.9. Works fine.

Send me a message if you need the mod_cgi.so file

cheers

John
Back to top
frhack



Joined: 08 Aug 2015
Posts: 1
Location: Italy
PostPosted: Sat 08 Aug '15 14:39    Post subject: Reply with quote

vm505 wrote:

Send me a message if you need the mod_cgi.so file

cheers

John


Hi i need mod_cgi.so can you send me?

thanks!!!
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA
PostPosted: Sat 08 Aug '15 21:14    Post subject: Reply with quote

Since it has been more than a year, no answer from the OP doesn't surprise me.

Per your email to [email protected] you stated this which might be helpful to know here as well;

Server version: Apache/2.2.22 (Win32)
Server built: Jan 28 2012 11:16:39

The timestamp tells me this is from apache.org so it is built with VC6 (yes, this matters). Now anyone who might wish to do this knows all the needed info.
Back to top


Show quoted text

>> This is on 64bit Windows 7. >> >> On Cygwin: >> >> $ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-

>> >new("ADODB.Connection"))'

>> $VAR1 = undef;
> > Can you please run with warnings enabled?  Win32::OLE will print > additional diagnostics on OLE calls when warnings are on.
$ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")' Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found" at -e line 1 eval {...} called at -e line 1 Use of uninitialized value in print at -e line 1. With a debugging OLE lib and perl: $ perl5.13.8d-nt -Mblib -we'use Win32::OLE; Win32::OLE->new(q(ADODB.Connection))' Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found" at -e line 1 eval {...} called at -e line 1 $ gdb perl5.13.8d-nt (gdb) run -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))' Starting program: /usr/local/bin/perl5.13.8d-nt -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))' [New thread 8308.0xa88] [New thread 8308.0xb10] [New thread 8308.0x2380] [New thread 8308.0x1ccc] [New thread 8308.0xd8c] [New thread 8308.0x22d8] [New thread 8308.0x125c] Win32::OLE=HASH(0xb56348) This needs now printf debugging, oh my.

Show quoted text

>> On ActiveState Perl 32 bit:

> > Is this just 32-bit ActivePerl on the same machine, or on a different > one?
I crosschecked with strawberry on the same machine, where ADODB.Connection is registered. c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print Dumper(Win32::OLE->new(q(ADODB.Connection)))" $VAR1 = bless( { 'Properties' => bless( { 'Count' => 14, 'Item' => undef }, 'Win32::OLE' ), 'ConnectionString' => 'Provider=MSDASQL.1', 'CommandTimeout' => 30, 'ConnectionTimeout' => 15, 'Version' => '6.1', 'Errors' => bless( { 'Count' => 0, 'Item' => undef }, 'Win32::OLE' ), 'DefaultDatabase' => undef, 'IsolationLevel' => 4096, 'Attributes' => 0, 'CursorLocation' => 2, 'Mode' => 0, 'Provider' => 'MSDASQL.1', 'State' => 0 }, 'Win32::OLE' );

Show quoted text

> Also, which Cygwin version are you using?  Your example works fine > with my (obsolete) Cygwin 1.5 install.

Latest 1.7.8 with my official perl -- Reini Urban http://phpwiki.org/http://murbreak.at/

Join told: Win32 ole0.1709 error 0x8007007e

Win32 ole0.1709 error 0x8007007e
13204 ERROR CODE
CAM STATUS SCSI STATUS ERROR JUNIPER
PANASONIC CS-G90KE ERROR MESSAGE
ERROR IN PRELIMINARY MFT READING

You can watch a thematic video

Fix Windows Update Error 0x8007000E in Windows 10 [3 Solutions] 2021

Win32 OLE problem

Ryan Kadomoto's profile photo

Ryan Kadomoto

unread,
Sep 17, 2013, 9:44:33 PM9/17/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

I am getting this error:

Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found"

when I create a new ADOD connection

my $conn = Win32::OLE->new('ADODB.Connection')

When I run my code from the command line, it works fine.

Any ideas on what could be the problem? 

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, 2013, 2:18:30 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

I suspect the environment.

Note that web server starts CGI with prepared environment, which is not inherited from the parent process (web server), win32 ole0.1709 error 0x8007007e. For example, years ago I found out that under Windows, CGI motorola v3r critical error 80 40 were failing all socket calls if COMSPEC environment variable wasn't specified and pointing to the directory where winsock DLL lived. I suspect similar thing is happening here.

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, 2013, 2:20:13 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have win32 ole0.1709 error 0x8007007e to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

Suggestion: print out Dumper(\%ENV) for both command line and CGI cases, compare, win32 ole0.1709 error 0x8007007e, and then start moving environment vars to the CGI through -cgi_environment option.

Ryan Kadomoto's profile photo

Ryan Kadomoto

unread,
Sep 18, 2013, 5:17:46 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to [email protected]

That worked!!
I had to add COMMONPROGRAMFiLES(X86) to the cgi_environment.

And FYI, if you add more than one pair, do not put a space before or after the comma separator.

Thank You for your help!

Sergey Lyubka's profile photo

Sergey Lyubka

unread,
Sep 18, win32 ole0.1709 error 0x8007007e, 2013, 10:02:03 AM9/18/13

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

You do not have permission to delete messages in this group

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to mongoose-users

You're welcome Ryan.




Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.


Reply to topic   Topic: Apache with ADODB.Connection
Author
alex84



Joined: 10 May 2011
Posts: 1

PostPosted: Tue 10 May '11 18:38    Post subject: Apache with Win32 ole0.1709 error 0x8007007e src="https://www.apachelounge.com/templates/subSilver/images/lang_english/icon_quote.gif" alt="Reply with quote">

HI, I'm Alex from Rome.
I'm writing to you for a problem.

I have a Perl script for OLE DB Connection, win32 ole0.1709 error 0x8007007e. This script connects to PIOLEDB server for access to database. Only for receiving data. The connection code is the following:


# Create a connection object
our $conn = Win32::OLE->new('ADODB.Connection');
die error() if error();

# set the provider for the connection
$conn->{Provider} = "PIOLEDB";

# open the connection. This is where all but the provider should go.
# sometimes, the provider can go in this string instead of above.
# this is the area where the connection string goes.

$conn->Open("Data Source=x.x.x.x;PWD=;UID=admin");
die error() if error();

It work well, running on command line.

I need to insert this script on apache http server, win32 ole0.1709 error 0x8007007e, for accessing with URL
(f.i. http://localhost/TestAdoDB.cgi).

The same script run on web doesn't work.
The error log file say this:

Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found"

refer at our $conn = Win32::OLE->new('ADODB.Connection').

How can I run script for OLE DB connection on apache??
Do I must add particular .dll, files, set win32 ole0.1709 error 0x8007007e permissions ??
I tried to use :

$conn = Win32::OLE->new(['localhost',ADODB.Connection']);but I have "class not register" error.

The environment is the following:

Virtual Machine with Windows Server 2008 64bit
Apache http Server x86
ActivePerl x86
PIOLEDB x86 and 64bit.

Thanks in advance Smile
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7132
Location: Germany, Next to Hamburg
PostPosted: Thu 14 Jul '11 21:03    Post subject: Reply with quote

is that perl or PHP code?
Back to top
vm505



Joined: 20 May 2014
Posts: 2
Location: Aachen, De
PostPosted: Tue 20 May '14 14:06    Post subject: Reply with quote

If you have a combination of windows x64, apache and a win32 cgi (exe) using ADODB you have the problem that the enviroment variable CommonProgramFiles(x86)is translated into CommonProgramFiles_x86_

Adodb needs that env-variable to find the software, win32 ole0.1709 error 0x8007007e, so it ends there.


The problem lies in util_script.c (2.4.9)

AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
{
.
while win32 ole0.1709 error 0x8007007e != '=') {
if (!apr_isalnum(*whack)) {
*whack = '_';
}
win32 ole0.1709 error 0x8007007e ++whack;
}
.
}


I propose a Change into :

while (*whack != '=') vmerror vmtabledata store failed table
if (!apr_isalnum(*whack) && *whack != '(' && *whack != ')') {
*whack = '_';
}
++whack;
}


You also need the following in Httpd.conf:

SetEnv ProgramFiles "C:\Program Files"
SetEnv "ProgramFiles(x86)" "C:\Program Files (x86)"
SetEnv ProgramFilesW6432 "C:\Program Files"
SetEnv CommonProgramFiles "C:\Program Files\Common Files"
SetEnv "CommonProgramFiles(x86)" "C:\Program Files (x86)\Common Files"
SetEnv CommonProgramFilesW6432 "C:\Program Files\Common Files"

I tested the proposal with httpd 2.2 and httpd 2.4.9. Works fine.

Send me a message if you need the mod_cgi.so file win32 ole0.1709 error 0x8007007e cheers

John
Back to top
frhack



Joined: 08 Aug 2015
Posts: 1
Location: Italy
PostPosted: Sat 08 Aug '15 14:39    Post subject: Reply with quote

vm505 wrote:

Send me a message if you need the mod_cgi.so file

cheers

John


Hi i need mod_cgi.so can you send me?

thanks!!!
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA
PostPosted: Sat 08 Aug '15 21:14    Post subject: Reply with quote

Since it has been more than a year, no answer from the OP doesn't surprise me.

Per your email to [email protected] you stated this which might be helpful to know here as well;

Server version: Apache/2.2.22 (Win32)
Server built: Jan 28 2012 11:16:39

The timestamp tells me this is from apache.org so it is built with VC6 (yes, this matters). Now anyone who might wish to do this knows all the needed info.
Back to top


Show quoted text

>> This is on 64bit Windows 7. >> >> On Cygwin: >> >> $ perl -Mblib -MData::Dumper -MWin32::OLE -le 'print Dumper(Win32::OLE-

>> >new("ADODB.Connection"))'

>> $VAR1 = undef;
> > Can you please run with warnings enabled?  Win32::OLE will print > additional diagnostics on OLE calls when warnings are on.
$ perl -MWin32::OLE -wle 'print Win32::OLE->new("ADODB.Connection")' Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found" at -e line 1 eval {.} called at -e line 1 Use of uninitialized value in print at -e line 1. With a debugging OLE lib and perl: $ perl5.13.8d-nt -Mblib -we'use Win32::OLE; Win32::OLE->new(q(ADODB.Connection))' Win32::OLE(0.1709) error 0x8007007e: "The specified module could not be found" at -e line 1 eval {.} called at -e line 1 $ gdb perl5.13.8d-nt (gdb) run -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))' Starting program: /usr/local/bin/perl5.13.8d-nt -Mblib -we'use Win32::OLE; print Win32::OLE->new(q(ADODB.Connection))' [New thread 8308.0xa88] [New thread 8308.0xb10] [New thread 8308.0x2380] [New thread 8308.0x1ccc] [New thread 8308.0xd8c] [New thread 8308.0x22d8] [New thread 8308.0x125c] Win32::OLE=HASH(0xb56348) This needs error forbidden access denied printf debugging, oh my.

Show quoted text

>> On ActiveState Perl 32 bit:

> > Is this just 32-bit ActivePerl on the same machine, or on a different > one?
I crosschecked with strawberry on the same machine, where ADODB.Connection is registered. c:\strawberry> perl -MData::Dumper -MWin32::OLE -le "print Dumper(Win32::OLE->new(q(ADODB.Connection)))" $VAR1 = bless( { 'Properties' => bless( { 'Count' => 14, 'Item' => undef }, 'Win32::OLE' ), 'ConnectionString' => 'Provider=MSDASQL.1', 'CommandTimeout' => 30, 'ConnectionTimeout' => 15, 'Version' => '6.1', 'Errors' => bless( { 'Count' => 0, 'Item' => undef }, 'Win32::OLE' ), 'DefaultDatabase' => undef, 'IsolationLevel' => 4096, 'Attributes' => 0, 'CursorLocation' => 2, 'Mode' => 0, 'Provider' => 'MSDASQL.1', 'State' => 0 }, 'Win32::OLE' );

Show quoted text

> Also, which Cygwin version are you using?  Your example works fine > with my (obsolete) Cygwin 1.5 install.

Latest 1.7.8 with my official perl -- Reini Urban http://phpwiki.org/http://murbreak.at/

1 Comments

Leave a Comment