Absolute Path errors

S

skieros

Did you try? What happened?


Well, if 'www' is (one of) your document root(s) anyway, as seems
probable, then you don't want that in the path.


To put it simply and briefly: I don't know. But as a side note, if you
really want to be picky, you may use File::Spec:):Functions)'s
catfile().

well here what hey responded me on free hostia.

Hello,

I am truly sorry to disappoint you but Access and Error logs service
in not available at this time. Our administrators are working to
enable it as soon as possible.

Best Regards,
Bob

and heer what i answered them:

2007-04-16 18:19:18 by nikkou6 to Technical Support
Well that really sucks!

Any other free hosting provider provides access to both of them.
Otherwise people will not know what wrong with their scripts.

But i guess thats all a trick to get us to pay for your hosting isnt?

So ill never be abel to see the access an s error logs.

Any other goog hostinf plans gys?

ill try the document root env var now in my localhost and tell you if
it works.
 
U

usenet

Indeed but will something like this likely to work?
open FILE, "$ENV{'DOCUMENT_ROOT'}www/data/text/tips.txt" or die $!;
or
my @files = glob "$ENV{'DOCUMENT_ROOT'}/data/text/*.txt";

Here's an easy way for you to answer your own question. Cut-and-paste
this tiny little program into a file:

#!/usr/bin/perl
print "Content-type: text/plain\n\n";
printf "%-25s => %s\n", $_, $ENV{$_} for sort keys %ENV;
__END__

Save it with some name (perhaps env.cgi) in your cgi-bin, chmod it to
be executable, and now run it from a browser (http://yourdomain.com/
cgi-bin/env.cgi).

It will show you the webserver environment in which your Perl programs
are running (note that the output in a browser is COMPLETELY different
than the output you get if you run the program from a shell). Note
the value for DOCUMENT_ROOT (and note that it does not have a trailing
slash, so your first example could not work, but your second example
might work, depending on if the concatenation is valid).
 
J

Jürgen Exner

skieros said:
But i guess thats all a trick to get us to pay for your hosting isnt?
^ ^^ ^^
So ill never be abel to see the access an s error logs.
^^^ ^^^^ ^^^^
Any other goog hostinf plans gys? ^^^^^^^^^^^^^^^^^^^^^^

ill try the document root env var now in my localhost and tell you if ^^^
it works.

Your postings are exceedingly difficult to read. While I understand that
English may not be your first language or that you may suffer from any
number of reading/writing impairments unfortunately that doesn't make your
articles any easier to decipher for the rest of us.
Luckily there is a very easy way to eliminate at least a large chunk of
misspellings and typos: just run your text through a spell checker before
hitting the send button. It won't resolve 100% of issues, but probably catch
90% or so and that would be a VERY MAJOR improvement.

jue
 
S

skieros

^ ^^ ^^


^^^ ^^^^ ^^^^


Your postings are exceedingly difficult to read. While I understand that
English may not be your first language or that you may suffer from any
number of reading/writing impairments unfortunately that doesn't make your
articles any easier to decipher for the rest of us.
Luckily there is a very easy way to eliminate at least a large chunk of
misspellings and typos: just run your text through a spell checker before
hitting the send button. It won't resolve 100% of issues, but probably catch
90% or so and that would be a VERY MAJOR improvement.

jue

I never uses a spell checker before, but ill try it if you tell me
one, iam posting this through browser on grous.google.is there an
online check before i hit send maybe? that would be very convinient

Well sorry for my posts but ysterday i accidentally spit all coffe to
keyboard anbd wasnt even be able to hist space button. keyborad typed
also on its own ue to stickness.

All worked!! it ried it myself before eeing your ansers.

my @tips;
open FILE, "<$ENV{'DOCUMENT_ROOT'}/data/text/tips.txt" or die $!;
@tips = <FILE>;
close FILE;
works fine!

and also

my @files = glob "$ENV{'DOCUMENT_ROOT'}/data/text/*.txt"; #worked fine

and also this!

#===============================================================================
my $db = ( $ENV{'SERVER_NAME'} !~ /freehostia/ )
? DBI->connect('DBI:mysql:nikos_db', 'root', '********',
{RaiseError=>1})
: DBI->connect('DBI:mysql:nikkou6_db:mysql3.freehostia.com',
'nikkou6_db', '********', {RaiseError=>1});
#===============================================================================

#========================= CREATE DATABASE AND TABLES
==========================
my $dbname='nikos_db' if( $ENV{'SERVER_NAME'} !~ /freehostia/ ) or my
$dbname='nikkou6_db';

$db->do( "DROP DATABASE IF EXISTS $dbname" );
$db->do( "CREATE DATABASE $dbname" );
$db->do( "USE $dbname" );

EVERYTHING WORKED!

FUNNY THING WAS THAT I HAD TO copy/paste <space> and other chars as
well and delete everythign the keyboard wrote by it self!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,063
Latest member
StormyShuf

Latest Threads

Top