Help using XAMPP and WAMP using WFB -...
As a new user to WFB I need some help/advice.
I am using a local WAMP and XAMPP Servers for local development.
My Directory structure is:
[Folder FE]
[Folder ContactUS] / [Folder Common etc]]
File: ContactUs.php
File: MyContactUsTest.html
The folder ContactUs is the exported folder along with ContactUs.php, the exported folder contains other folders for example, common, fbapp, etc and files
MyContactTest.html is the local html file containing the WFB exported data:
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"ContactUs.php" + window.location.search + "\" width=\"602\" height=\"700\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E<a href=\"ContactUs.php\" title=\"ContactUs\">Check out my CoffeeCup Form</a>%3C/iframe%3E"));</script>
<noscript>
<iframe width="602" height="700" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="ContactUs/ContactUs.html">
<a href="ContactUs.php" title="ContactUs">Check out my CoffeeCup
Form</a>
</iframe>
</noscript>
When I execute HTTP://localhost/fe/MyContactTest.html I get a blank screen (the form is not displayed)
I found an error recorded in fb_error.log.php saying:
Mon, 02 Feb 2015 13:51:11 +0000: Couldn't open or read: C:/xampp/htdocs/FE/ContactUs.html
… on further investigation I found during basic debugging that, $filename (at Line 62 in formpage.cls.php contained c:\xampp\htdocs\fe\ContactUs and after executing this line of code the $filename contains c:\xampp\htdocs\fe\ContactUs.html
Now from the directory structure above this is incorrect ‘ContactUs.html’ does not live at this location hence the error message, and no displayed form. (the path should have been c:\xampp\htdocs\fe\ContactUs\ContactUs.html. Out of interest I placed the ‘ ‘ContactUs.html’, in the location the code was expecting, and everything worked as expected, but lost all graphics and formatting (Style etc).
I suspect I have missed some configuration setting, path setup, etc., and would appreciate any help, particularly when using WAMP or XAMPP servers.
The output from servertest.php is:
FormBuilder version: Web Form Builder (Windows), build 2.4.5318
PHP Version: 5.6.3 (should be 5.2 or newer)
Mail configuration in php.ini file:
Sendmail Path:C:\xampp\mailtodisk\mailtodisk.exe
Sendmail From:
SMTP:localhost
SMTP Port:25
Data base access:
MySQL: Installed
SQLite: Not Installed
PDO - MySQL driver: Installed
PDO - SQLite driver: Installed
File upload configuration:
File Uploads: On
File Uploads Max Size: 2M
Post Max Size: 8M
PHP Sessions:
Cool, sessions are usable!
I am using a local WAMP and XAMPP Servers for local development.
My Directory structure is:
[Folder FE]
[Folder ContactUS] / [Folder Common etc]]
File: ContactUs.php
File: MyContactUsTest.html
The folder ContactUs is the exported folder along with ContactUs.php, the exported folder contains other folders for example, common, fbapp, etc and files
MyContactTest.html is the local html file containing the WFB exported data:
<script type="text/javascript">document.write(unescape("%3Ciframe id=\"fb_iframe\" src=\"ContactUs.php" + window.location.search + "\" width=\"602\" height=\"700\"allowtransparency=\"true\" scrolling=\"no\" frameborder=\"0\"%3E<a href=\"ContactUs.php\" title=\"ContactUs\">Check out my CoffeeCup Form</a>%3C/iframe%3E"));</script>
<noscript>
<iframe width="602" height="700" style="border:none; background:transparent; overflow:hidden;"
id="fb_iframe" src="ContactUs/ContactUs.html">
<a href="ContactUs.php" title="ContactUs">Check out my CoffeeCup
Form</a>
</iframe>
</noscript>
When I execute HTTP://localhost/fe/MyContactTest.html I get a blank screen (the form is not displayed)
I found an error recorded in fb_error.log.php saying:
Mon, 02 Feb 2015 13:51:11 +0000: Couldn't open or read: C:/xampp/htdocs/FE/ContactUs.html
… on further investigation I found during basic debugging that, $filename (at Line 62 in formpage.cls.php contained c:\xampp\htdocs\fe\ContactUs and after executing this line of code the $filename contains c:\xampp\htdocs\fe\ContactUs.html
Now from the directory structure above this is incorrect ‘ContactUs.html’ does not live at this location hence the error message, and no displayed form. (the path should have been c:\xampp\htdocs\fe\ContactUs\ContactUs.html. Out of interest I placed the ‘ ‘ContactUs.html’, in the location the code was expecting, and everything worked as expected, but lost all graphics and formatting (Style etc).
I suspect I have missed some configuration setting, path setup, etc., and would appreciate any help, particularly when using WAMP or XAMPP servers.
The output from servertest.php is:
FormBuilder version: Web Form Builder (Windows), build 2.4.5318
PHP Version: 5.6.3 (should be 5.2 or newer)
Mail configuration in php.ini file:
Sendmail Path:C:\xampp\mailtodisk\mailtodisk.exe
Sendmail From:
SMTP:localhost
SMTP Port:25
Data base access:
MySQL: Installed
SQLite: Not Installed
PDO - MySQL driver: Installed
PDO - SQLite driver: Installed
File upload configuration:
File Uploads: On
File Uploads Max Size: 2M
Post Max Size: 8M
PHP Sessions:
Cool, sessions are usable!
Try removing the script that wraps the iframe code or going straight to the ContactUs.html’
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Thanks Eric, I will try and get back
I have re-read my question and perhaps I should have made it clearer that the WAMP and XAMPP are run under Windows OS and not UNIX, and is for local development only, not production.
After some debugging I discovered that the problem is the use of DIRECTOTY_SEPARATOR.
DIRECTORY_SEPARATOR equals to "/" (Unix) or "\" (Windows), and this is where the problem lies, you cannot change this constant from ‘/’ to ‘\’ .
[yourform].php uses DIRECTORY_SEPARATOR and explode() as do several other php files, and the solution is to place this piece of code if (!defined('DS')) { define('DS', '/'); } at the start of [yourform].php and to change all occurrences of DIRECTORY_SEPARATOR in the other php files that are called (3 or four) to your new separator constant DS.
This worked for me (I have done limited testing) and the forms look good and have been run on both WAMP and XAMPP under Windows, using all common browsers. If you know of a better solution, or other problems that I may encounter using a WINDOWS environment, I would be happy to hear from you.
After some debugging I discovered that the problem is the use of DIRECTOTY_SEPARATOR.
DIRECTORY_SEPARATOR equals to "/" (Unix) or "\" (Windows), and this is where the problem lies, you cannot change this constant from ‘/’ to ‘\’ .
[yourform].php uses DIRECTORY_SEPARATOR and explode() as do several other php files, and the solution is to place this piece of code if (!defined('DS')) { define('DS', '/'); } at the start of [yourform].php and to change all occurrences of DIRECTORY_SEPARATOR in the other php files that are called (3 or four) to your new separator constant DS.
This worked for me (I have done limited testing) and the forms look good and have been run on both WAMP and XAMPP under Windows, using all common browsers. If you know of a better solution, or other problems that I may encounter using a WINDOWS environment, I would be happy to hear from you.
Very nice Harold.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.