Author
|
Topic: emAlbum cannot locate your configuration file ($config_file) (Read 4932 times)
|
John Hanna
Newbie

Posts: 3

|
 |
emAlbum cannot locate your configuration file ($config_file)
« on: November 08, 2003, 03:36:42 AM »
|
Reply with quote
|
Eric,
I am having a problem configuring emalbum to work on my website. If you recall, my webhost requires that the cgi scripts end with the extension of .pl instead of .cgi. With that being said, here goes.....
The error that I receive when running emAlbum_Setup.pl is listed below. d:\users\johnhanna\emalbum\cgi-bin\emAlbum_Setup.plemAlbum\settings.cfg FAILED emAlbum cannot locate your configuration file ($config_file) Please correct the problem and then re-run this script. If you need assistance, visit our support forum or submit a support email.
My env.pl file is located here. http://www.johnhanna.com/emalbum/cgi-bin/env.pl if that helps any.
What changes do I need to make to my .pl files (if any). I have already replaced all instances of .cgi with .pl in the emAlbum_Setup.pl and emAlbum.pl files.
Also, my webhost is a windows server. I used IE to FTP the files to my webhost.
Eric, I dont know if you still have my login information for my webhost, if not, I have included it in an email to you seperate from this.
|
|
|
|
Eric
Administrator
    
Posts: 2761

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #1 on: November 08, 2003, 12:15:30 PM »
|
Reply with quote
|
You need to open emAlbum.cgi and emAlbum_setup.cgi and find/replace all instances of .cgi to .pl
Thanks, Eric
|
|
|
|
John Hanna
Newbie

Posts: 3

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #2 on: November 08, 2003, 12:51:57 PM »
|
Reply with quote
|
I have already replaced all instances of .cgi with .pl in the emAlbum_Setup.pl and emAlbum.pl files.
|
|
As I stated in my original posting, I have already replaced .cgi with .pl
My Setup file is located at http://www.johnhanna.com/emalbum/cgi-bin/emAlbum_setup.pl
What now?
|
|
|
|
|
|
John Hanna
Newbie

Posts: 3

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #4 on: November 09, 2003, 03:06:04 PM »
|
Reply with quote
|
Eric,
You are a god! Thank you for helping me with this, I swear I had changed the .cgi to .pl, I guess I missed something somewhere.
Thank you again! I am looking forward to the next release of emAlbum soon! Keep up the excellent work and the superb service! 
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #5 on: November 12, 2003, 11:46:23 AM »
|
Reply with quote
|
Looks like a wonderful program but I've tried for two days to get installed with no success. Win98 machine running Apache server, my server, I run all sorts of cgi's and ssi's on it including one I have written.
Several problems. First when the setup tries to find the config file using $cgi_path, the $cgi_path statement includes 'emAlbum_setup.cgi' in the path so you end up with it looking for the settings.cfg at:
d:/web/users/cgi-bin/emAlbum_setup.cgiemAlbum/settings.cfg
rather than the correct:
d:/web/users/cgi-bin/emAlbum/settings.cfg
Next, it is not, apparently detecting the $os correctly in the setup file because $slash and $os have no values after the os detection part of emAlbum_setup.
So, I did a deliberate $os="win" and $slash="//" and got it to find the configuration files, but then it said that emAlbum.cgi was not executable. This is installed on a Win32 machine so there is no chmod requirements as with a *nix machine.
I've read pretty much every single message on this board and tried every single suggestion including the unshift suggestion, removing the first $env script variable, in emAlbum_setup and emAlbum.
This looks like a wonderful program and I would love to try it out, but after 10 hours of trying to get it installed I give up.
|
|
|
|
Eric
Administrator
    
Posts: 2761

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #6 on: November 12, 2003, 01:42:36 PM »
|
Reply with quote
|
Wes,
Can you please create a script and paste the following in it:
#!/usr/bin/perl
$path = $ENV{'PATH_TRANSLATED'}; $filename = $ENV{'SCRIPT_FILENAME'}; $operating_system = $^O; $pv = $^V ? join('.', unpack 'C*', $^V) : $]; $perl_ver = substr($pv, 0, 1);
print "Content-type: text/html\n\n"; print "Path: $path<br>Filename: $filename<br>OS: $operating_system<br>Perl Version: $perl_ver"; |
|
Run that on your server, then post the results here. I am interested in finding out why you are having such problems.
Thanks, Eric
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #7 on: November 12, 2003, 02:15:46 PM »
|
Reply with quote
|
Hi Eric, Thanks for help, I had kinda given up although I am curious now why it wouldn't work. I pasted it to test.cgi and ran it, results are:
Path: Filename: d:/web/users/owners/cgi-bin/test.cgi OS: Perl Version: 5
That is the problem, neither the path nor the OS are returning a value, the path and perl version returned correctly.
I am running this in a Win32/Apache machine. Here is the results of env.cgi
SERVER_SOFTWARE = Apache/1.3.27 (Win32) GATEWAY_INTERFACE = CGI/1.1 DOCUMENT_ROOT = d:/web/users REMOTE_ADDR = 24.117.114.78 SERVER_PROTOCOL = HTTP/1.1 SERVER_SIGNATURE = Apache/1.3.27 Server at 24.116.28.74 Port 80
REQUEST_METHOD = GET COMSPEC = C:\WINDOWS\COMMAND.COM QUERY_STRING = HTTP_USER_AGENT = Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) WINDIR = C:\WINDOWS PATH = D:\PCANYW~1\;C:\WINDOWS;C:\WINDOWS\COMMAND HTTP_ACCEPT = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */* HTTP_CONNECTION = Keep-Alive REMOTE_PORT = 2884 SERVER_ADDR = 24.116.28.74 HTTP_ACCEPT_LANGUAGE = en-us SCRIPT_NAME = /~owners/cgi-bin/env.cgi HTTP_ACCEPT_ENCODING = gzip, deflate SCRIPT_FILENAME = d:/web/users/owners/cgi-bin/env.cgi SERVER_NAME = 24.116.28.74 REQUEST_URI = /~owners/cgi-bin/env.cgi SERVER_PORT = 80 HTTP_HOST = 24.116.28.74 SERVER_ADMIN = waedens@cableone.net $>,$<, $), $( = 0, 0, 0, 0
|
|
|
|
Eric
Administrator
    
Posts: 2761

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #8 on: November 12, 2003, 04:01:41 PM »
|
Reply with quote
|
Try this:
In emAlbum_setup.cgi, change the following:
$cgi_path = $ENV{'PATH_TRANSLATED'} || $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum_setup.cgi//;
print "Content-type: text/html\n\n";
$pv = $^V ? join('.', unpack 'C*', $^V) : $]; $perl_ver = substr($pv, 0, 1); $which = $^X; $operating_system = $^O; if ($^O =~ /win/i) { $slash = "\\"; $os = "win";} else { $slash = "/"; } |
|
to:
$cgi_path = $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum_setup.cgi//;
print "Content-type: text/html\n\n";
$pv = $^V ? join('.', unpack 'C*', $^V) : $]; $perl_ver = substr($pv, 0, 1); $which = $^X; $slash = "\\"; |
|
Then in emAlbum.cgi, change the following:
if ($^O =~ /win/i) { $slash = "\\"; } else { $slash = "/"; }
$cgi_path = $ENV{'PATH_TRANSLATED'} || $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum.cgi//; |
|
to:
$slash = "\\";
$cgi_path = $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum.cgi//; |
|
Let me know how that works.
Thanks, Eric
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #9 on: November 12, 2003, 05:48:32 PM »
|
Reply with quote
|
I changed the code as per, still get a no-go. emAlbum_setup.cgi returns:
d:/web/users/photos/cgi-bin/emalbum_setup.cgiemAlbum\settings.cfg FAILED emAlbum cannot locate your configuration file ($config_file)
so I added a print $ for the variables up to that point and they are:
$cgi_path: d:/web/users/photos/cgi-bin/emalbum_setup.cgi $which: /usr/bin/perl <- that is correct $slash: /
It looks like the hangup is it still thinks 'emAlbum_setup.cgi' should be part of the $cgi_path variable so it is looking for settings.cfg in
d:/web/users/photos/cgi-bin/emAlbum_setup.cgiemAlbum/settings.cfg
that path is correct except for the 'emAlbum_setup.cgi' aspect.
Thanks.
|
|
|
|
Eric
Administrator
    
Posts: 2761

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #10 on: November 12, 2003, 06:42:26 PM »
|
Reply with quote
|
Make sure when you run either of the cgi programs that you use the correct case.
emAlbum_setup.cgi emAlbum.cgi
If that still doesn't work in both files, change:
$cgi_path = $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum.cgi//; |
|
to: Let me know how that goes 
-Eric
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #11 on: November 12, 2003, 10:14:29 PM »
|
Reply with quote
|
Well it certainly changed it, now nothing happens, emAlbum_setup.cgi sits there and then finally times out after a few minutes.
Don't worry about it, I'll just chock it up and find something else.
Thanks, Wes
|
|
|
|
Eric
Administrator
    
Posts: 2761

|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #12 on: November 12, 2003, 11:38:14 PM »
|
Reply with quote
|
Alright...there is no reason we can't get emAlbum running on your server, but if you want to find something else, it's up to you .
Thanks, Eric
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #13 on: November 12, 2003, 11:43:43 PM »
|
Reply with quote
|
Oh I would love to, it looks like a wonderful program, I just didn't want to keep bothering you, if your up to it I will certainly keep trying. I've written some stuff in perl, certainly not at your level though.
After the last change nothing happens now, I can change it back to before the previous change, copy a new set of files or whatever is easier. If I didn't mention before, it seems that the problem is that the 'emAlbum_setup.cgi' is staying in the $cgi_path variable and that is causing it to not see the settings file.
Again, would love to get it working but feel sort of bad about bothering you, I'm sure it is an anomoly of my server and not your program.
If this is any help, right under the print "Content-type: text/html\n\n"; I added print "cgi_path"; and it shows d:/web/users/photos/cgi-bin/emalbum_setup.cgi do you think it has something to do with the path being /emalbum_setup.cgi as opposed to emAlbum_setup.cgi ?
|
|
|
|
Wes
emAlbum Pro Newbie

Posts: 7
|
 |
Re:emAlbum cannot locate your configuration file ($config_file)
« Reply #14 on: November 13, 2003, 12:05:32 AM »
|
Reply with quote
|
I got it!!!! Wahoo! Here is what I did:
In emAlbum_setup.cgi changed $cgi_path = $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum.cgi//;
to this: #$cgi_path = $ENV{'SCRIPT_FILENAME'}; #$cgi_path =~ s/emAlbum.cgi//;
$cgi_path='d:/web/users/photos/cgi-bin/';
which caused everything to pass except for amAlbum failing as not executable (Win box) so I went to where that error test was being called and right above the
#Check to see if emAlbum.cgi is executable
I added $os="win"; so that eliminated that failed message.
Then in emAlbum I replaced:
$cgi_path = $ENV{'SCRIPT_FILENAME'}; $cgi_path =~ s/emAlbum.cgi//;
with
#$cgi_path = $ENV{'SCRIPT_FILENAME'}; #$cgi_path =~ s/emAlbum.cgi//;
$cgi_path='d:/web/users/photos/cgi-bin/';
and all seems to work fine now. I will let you know tomorrow if everything works like it is supposed to but I think it will, I got the test album working fine.
Thanks for all your help, I will definetly be back in touch.
|
|
|
|
|
|
|