Form Processor Problems

Form Processor Problems

Posted by: mebecom
Posted on: 2006-07-24 23:17:00

Hello my friends. I am currently trying to migrate a script I bought a long time ago. It worked marvelously with my previous hosting provider but seem to be having problems with it here at DH.

http://www.emujeres.net/_form/contacto/

Thats my link. Just fill out a few required fields and you will see what I mean. If anyone needs the entire script, please let me know and I will send you a ZIP file.

The form is called FormProcessor Pro from Mitridat.

Re: Form Processor Problems

Posted by: rlparker
Posted on: 2006-07-24 23:36:00

It almost acts as though a path and or variable(s) might be "borked". What are the contents of lines 282, 326, and 456 in /home/.dottie/mebecom/emujeres.net/_form/php/formprocessorpro.php?

--rlparker




Re: Form Processor Problems

Posted by: scjessey
Posted on: 2006-07-25 05:14:00

In reply to:

It worked marvelously with my previous hosting provider but seem to be having problems with it here at DH


Post the first 15-20 lines of your script here. Most form processing scripts have problems right at the beginning.

Re: Form Processor Problems

Posted by: mebecom
Posted on: 2006-07-25 07:38:00

There are two files which the script is based on.

The config one is:

# sendmail cmd
mail_cmd = /usr/sbin/sendmail -t

# smtp server. comment this line to use sendmail
#mailserver = emujeres.net

# list of referers
Referers = www.emujeres.net
Referers = emujeres.net
Referers = localhost

# base path for templates.
base_path = ../contacto/

# path for attachments (relative to base_path).
# chmod 766 (write permission) this dir.
attachments_path = attachments/
# attachments time to live on server (in seconds).
attachments_ttl = 3600
# attachments max file size (in KB, 1024 for 1M)
max_file_size = 512


#default mail format (this option is overrided for AOL as plain)
mail_format = plain

date_format = dd month yyyy #27 April 2003
#date_format = wee dd/mm/yy #Sun 27/04/03
#date_format = weekday mmm dd, yyyy #Sunday Apr 27, 2003


Then the one that is sending the error is:

<?php
error_reporting(E_ALL ^E_NOTICE);
$Months= array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); array_unshift($Months, "");
$Weekdays= array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
$base_path = "./";
$error_loop = 0;
$browser_out = 0;
$cfg_file = "formprocessorpro.cfg";
$mail_format = "plain";
//FIX 24/07/2003
if (!file_exists($cfg_file)) {
if ($HTTP_ENV_VARS["windir"]) {//windows
$cfg_file = str_replace('\','/',dirname($HTTP_SERVER_VARS['PATH_TRANSLATED'])).'/formprocessorpro.cfg';
}
$cfg_file = str_replace('//','/',$cfg_file);
}
//FIX 24/07/2003
$cfg_form = "form.cfg";
$content_type = "Content-Type: text/html";
$multi_separator = ", ";

//##############################################################################
$HTTP_ENV_VARS['UPDATED'] = ' ';

Re: Form Processor Problems

Posted by: mebecom
Posted on: 2006-07-25 07:42:00

282-----> foreach ($HTTP_POST_VARS as $name => $value)
326-----> foreach ($HTTP_POST_FILES as $key => $file){
456-----> foreach ($HTTP_SERVER_VARS as $key => $value){

Thanks in advance rlparker

Re: Form Processor Problems

Posted by: scjessey
Posted on: 2006-07-25 09:03:00

I am almost certain that you problem relates to using PHP5. You are trying to use array variables that do not exist by default. Please see the wiki entry on register_long_arrays, and the problem will instantly become obvious.

Re: Form Processor Problems

Posted by: rlparker
Posted on: 2006-07-25 12:01:00

I think Simon has probably nailed down the problem. Have you tried running the script under PHP4?
--rlparker


Re: Form Processor Problems

Posted by: mebecom
Posted on: 2006-07-25 21:24:00

My dear rlparker, you nailed it my friend. Yes, I changed it the earlier version of PHP and it works great. Thanks to you both

your friend in Mexico

Tags: hosting providerzip filemigratefriendshttp