I have installed phpFormGenerator 2.09 on my Linux webserver. I have created the database for the data, created the form, uploaded everything to the correct folders and made everything read/write/executable (UNIX code 777) but still am having problems. Right now when I submit the form, it basically reloads itself with everything I keyed in in the URL bar. Over the weekend I had the following error messages:
Warning: main(global.inc.php): failed to open stream: No such file or directory in /home/content/t/v/m/tvmangum/html/process.php on line 2
Warning: main(): Failed opening 'global.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/t/v/m/tvmangum/html/process.php on line 2
Fatal error: Call to undefined function: pt_register() in /home/content/t/v/m/tvmangum/html/process.php on line 5
I have tried everything I can think of and even used version 3 online and still have problems.
Any suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Both versions work quite well when all issues have been identified. I suggest you choose one or the other and stick with it.
The types of errors you suggest can be caused by many things but I would first suggest some more appropriate file permissions.
Set php files to 755.
Set html and graphics to 644.
This should work, you should also contact your host and get some suggestions based on how their PHP support is configured. I can help but you need to stick with one version and accurately describe the errors you have and work them one at a time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I like version 3 because of the Captcha feature. Do I need to upload all of the contents in the file created into a file on my webserver or straight to the webserver at the root level where I store my html pages, etc.?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Depends on how and where you point to the form.html file. The file/folder structure to maintain starts at the Form#### folder. Copy all files and folders intact to any location you want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I now get the following error messages when I serve the form.html file up as its own page:
Warning: main(config.inc.php): failed to open stream: No such file or directory in /home/content/t/v/m/tvmangum/html/processor.php on line 10
Warning: main(): Failed opening 'config.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/t/v/m/tvmangum/html/processor.php on line 10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
These files came with your form zip file. They belong in the same location as the form. In your case the path is given as "/home/content/t/v/m/tvmangum/html/".
I think this path "include_path='.:/usr/local/lib/php'" is checked if it does not find it first in the same folder as the processor.php file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Line 11 of my processor.php code is as follows (based upon opening the file in Nvu on the source tab and assuming that the php processor counts blank lines in the code):
11. include("config.inc.php");
I don't see any problem with the line other than I don't have a config.inc.php anywhere on my server.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The config.inc.php is mainly used when you have specified an sql database to store your form data. If you do not use sql go ahead and delete this line. Your form should still work.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If this is true then the config.inc.php should have been included in your form generated files.
The config.inc.php should have looked something like this:
<?php
$db_host = "localhost";$db_user = "tnt";$db_pass = "mypassword";$db_name = "test";$db_table = "testdata8";
?>
If you are using SQL and all is working then this information must be included in your processor.php file and still, removing the line should be OK. Otherwise SQL should not be working because these variables are blank and SQL access should be failing and you will have to create this file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have installed phpFormGenerator 2.09 on my Linux webserver. I have created the database for the data, created the form, uploaded everything to the correct folders and made everything read/write/executable (UNIX code 777) but still am having problems. Right now when I submit the form, it basically reloads itself with everything I keyed in in the URL bar. Over the weekend I had the following error messages:
Warning: main(global.inc.php): failed to open stream: No such file or directory in /home/content/t/v/m/tvmangum/html/process.php on line 2
Warning: main(): Failed opening 'global.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/t/v/m/tvmangum/html/process.php on line 2
Fatal error: Call to undefined function: pt_register() in /home/content/t/v/m/tvmangum/html/process.php on line 5
I have tried everything I can think of and even used version 3 online and still have problems.
Any suggestions?
Both versions work quite well when all issues have been identified. I suggest you choose one or the other and stick with it.
The types of errors you suggest can be caused by many things but I would first suggest some more appropriate file permissions.
Set php files to 755.
Set html and graphics to 644.
This should work, you should also contact your host and get some suggestions based on how their PHP support is configured. I can help but you need to stick with one version and accurately describe the errors you have and work them one at a time.
I like version 3 because of the Captcha feature. Do I need to upload all of the contents in the file created into a file on my webserver or straight to the webserver at the root level where I store my html pages, etc.?
Depends on how and where you point to the form.html file. The file/folder structure to maintain starts at the Form#### folder. Copy all files and folders intact to any location you want.
I now get the following error messages when I serve the form.html file up as its own page:
Warning: main(config.inc.php): failed to open stream: No such file or directory in /home/content/t/v/m/tvmangum/html/processor.php on line 10
Warning: main(): Failed opening 'config.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/t/v/m/tvmangum/html/processor.php on line 10
These files came with your form zip file. They belong in the same location as the form. In your case the path is given as "/home/content/t/v/m/tvmangum/html/".
I think this path "include_path='.:/usr/local/lib/php'" is checked if it does not find it first in the same folder as the processor.php file.
Finally down to just one error message:
Parse error: parse error, unexpected T_STRING in /home/content/t/v/m/tvmangum/html/processor.php on line 11
This is usually due to a variable name that starts with a number.
$123 is invalid
$one23 is valid
Line 11 of my processor.php code is as follows (based upon opening the file in Nvu on the source tab and assuming that the php processor counts blank lines in the code):
11. include("config.inc.php");
I don't see any problem with the line other than I don't have a config.inc.php anywhere on my server.
The config.inc.php is mainly used when you have specified an sql database to store your form data. If you do not use sql go ahead and delete this line. Your form should still work.
I am storing data in a MySQL database provided through our hosting provider.
If this is true then the config.inc.php should have been included in your form generated files.
The config.inc.php should have looked something like this:
<?php
$db_host = "localhost";$db_user = "tnt";$db_pass = "mypassword";$db_name = "test";$db_table = "testdata8";
?>
If you are using SQL and all is working then this information must be included in your processor.php file and still, removing the line should be OK. Otherwise SQL should not be working because these variables are blank and SQL access should be failing and you will have to create this file.