Author Topic: CSVwrite  (Read 5675 times)

0 Members and 1 Guest are viewing this topic.

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
CSVwrite
« on: October 02, 2006, 04:36:19 PM »
Does anybody have any idea why I keep getting this error for the free csvwriteCan't open file /www.awagawag.co.uk/public_html/csv/database.txt!

I have set my form up to post the information, the perl script is  in the cgi-bin and the perl script is configured to write to csv/database.txt
The post is as

Code: [Select]
<form name="questionary" action="/cgi-bin/csvwrite.pl" method="post">

The perl script is configured as:
my $base_file                = '/www.awagawag.co.uk/public_html/csv/database.txt';
my $HTML_thankyou            = '/www.awagawag.co.uk/onsubmit.html';
my $line_break               = '<br>';
my $ID_autoincrement         = 1;
my $ID_autoincrement_name    = "ID";
Can anyone please help I am unsure if I have been staring at the screen to long but I can`t see anything up with it.I have tried with the http:// and without with and without thw wwww and domain name????????


Thanks in advance to anyone who can help

Steve
Awagawag.co.uk

My e mail is
*EDIT by EZ: never post your mail address here.  Spam bots are constantly scanning forums to harvest mail addresses.  I hope I did not react too late*
« Last Edit: October 02, 2006, 05:02:54 PM by EZ »

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #1 on: October 02, 2006, 05:08:01 PM »
Does anybody have any idea why I keep getting this error for the free csvwrite : Can't open file /www.awagawag.co.uk/public_html/csv/database.txt!

I have set my form up to post the information, the perl script is  in the cgi-bin and the perl script is configured to write to csv/database.txt
The post is as

<form name="questionary" action="/cgi-bin/csvwrite.pl" method="post">

The perl script is configured as:
my $base_file                = '/www.awagawag.co.uk/public_html/csv/database.txt';


Two things are possible:
1. the permissions on your database file are wrong (but that is a bit less likely for the moment)
2. the path to your database is wrong (and that is very likely).  The path you see in your ftp program is often not the real path.

So what to do about number 2?

1. Contact your host support and ask them what the path is to your script, your database and your thank you page.  Unless they are not competent for their job, they should be perfectly able to tell you what the path on their server is.
2. Use relative paths towards the folder your script is in.

But I should try the first option first.  Tell them which host you have and that you have a script that needs to know the paths to file database.txt and thankyou.html and whether they could give it to you.

If they do not want to help you on that, we can try with relative paths, but then I would need more info from you and it might get a bit confusing.

Good Luck!
« Last Edit: October 02, 2006, 05:09:38 PM by EZ »

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #2 on: October 02, 2006, 05:34:17 PM »
Thanks very much I will try that although I have tried so many options with it but I will drop them a scream mail to see if they can help.


Steve
Awagawag.co.uk

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #3 on: October 02, 2006, 05:42:12 PM »
Thanks very much I will try that although I have tried so many options with it but I will drop them a scream mail to see if they can help.


Steve
Awagawag.co.uk

I noticed that you still have a problem knowing the difference between a path and a URL.  Do check our basic guide:
http://ezscripting.com/pathtoperl/

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #4 on: October 02, 2006, 06:21:20 PM »
Thanks you were right but now the next thing I corrected the path now I get Can`t find ID in Database so I remove the datbase as it is supposed to create one but no  I get a 404 error?

Thanks anyway


Steve
Awagawag.co.uk

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #5 on: October 02, 2006, 06:24:46 PM »
Sorry the actual error message was "Can't find ID-field in your db!" so I removed the database as csvwrite is supposed to create one but it says 404 error? Thanks for your help


Steve
Awagawag.co.uk

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #6 on: October 03, 2006, 03:13:29 AM »
Does it create the entry in the database?  It might be that the path to your thankyou page is still wrong and that the 404 error just means that it cannot find your thankyou page.

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #7 on: October 03, 2006, 04:56:21 AM »
No it writes nothing to the database .txt file
I don`t know if changing the color of the text boxws will affect it.I`ve used one  style sheet for my whole site,It just I read in one of the other forums of somebody having some problem with a graphics button. the url of the page is http://www.awagawag.co.uk/catalog1.0.html if you want to take a look I `ve spent two days trying to sort this out.I really appreciate your help as I need to get this up and running so people can registrer striaght to the database instaed of just by email the thank you url is ''http://www.awagawag.co.uk/thankyou.htm" and I have set all chmod permissions to 755 nd am getting a 500 internal server error.


Thanx Steve

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #8 on: October 03, 2006, 05:10:14 AM »
Sorry I don`t get a 500 error it was a syntax error just the id field datbase error



Thankx
Steve

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #9 on: October 03, 2006, 07:19:37 AM »
Hello,

When I try the form on http://www.awagawag.co.uk/catalog1.0.html, then nothing at all happens.  no ID field error or nothing...

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #10 on: October 03, 2006, 07:20:21 AM »
Sorry I don`t get a 500 error it was a syntax error just the id field datbase error



Thankx
Steve

Is it a syntax error, a 404 error or the ID field error?

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #11 on: October 03, 2006, 07:51:26 AM »
No it isn1t a su=yntax error or anything like that I have been trying different structures of the form posting today and the errors went but it does even read the perl script when I change things so I have used  this
form name="questionary" action=""http://82.110.105.5:8080/cgi-bin/csvwrite.pl" method="post" which is an original almost  apart from the cgi bit, from a webpage builder software  supplied by my host for a contact us page.To be honest I don`t what is going on now I have put the above code back in but when I now submit the form it just goes back to the page with the form on.

Thanx

Steve
I am just going to check a few things

Offline awagawag

  • Jr. Member
  • **
  • Posts: 22
Re: CSVwrite
« Reply #12 on: October 03, 2006, 08:05:55 AM »
I`ve put it back as it was if you goto http://www.awagawag.co.uk/catalog1.0.html you just enter a couple of the fields and submit it you will see what I mean.


Many thanks

steve

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #13 on: October 03, 2006, 09:31:08 AM »
And can I also see a snippet from your database?

Offline EZ

  • Hero Member
  • *****
  • Posts: 1081
    • Babelnotes.be
Re: CSVwrite
« Reply #14 on: October 03, 2006, 09:41:05 AM »
Or let me put it otherwise... if there is a database, then delete it to make sure csvwrite will create one.