PHP, MySQL, Apache, WAMP, and XAMPP...

User 147665 Photo


Ambassador
712 posts

I use wamp on windows because it's easy, quick and I am not a server geek, but xamp is more customizable in terms of virtual hosts.
My wamp folder has 30 sites and 25 databases in it right now.. Needless to say, I use it a lot.

User 364143 Photo


Guest
5,410 posts

dave beall wrote:
I use wamp on windows because it's easy, quick and I am not a server geek

Yet! Give it time. :)
CoffeeCup... Yeah, they are the best!
User 2582728 Photo


Registered User
48 posts

Hi all -

Hoping to revive this thread, and hoping that folks like Dave, Dan and Tom might be able to help me out. Short story:

I'm building a site that needed a high quality form embedded. I homed in on Web Form Builder which turned out to be perfect in terms of form design and functionality (hidden fields with conditional reveal, etc). My client prefers to run all the code on their own server - so an S-Drive solution won't work for them, and we'll opt for the Manual Server config instead. I did a quick proof of concept (4 rough pages, including one with an embedded form) that works perfectly when I push the code up to a sub dir on my GoDaddy hosted site. Problem is that I cannot get web form builder to work properly in a local wamp-style configuration. I'm not even up to the part where I use my own form action and php processing -- I can't even get the form to show up on the web page where it's embedded when I run the code locally.

My local setup is a Win 7 workstation, and I've tried various wamp stacks: easyPHP, wampserver, XAMPP and AMPPS. Installed, configured, uninstalled each a few times. Searched and must have read hundreds of posts. I was a hard core developer - but that was many years ago. My work has remained in the field, but I never had the joy of working with Apache, PHP and wamp stacks before, and I'm learning just what an arcane topic this can be for a newbie. I would be thrilled if anyone can help me out, share some wisdom and/or experience, etc.! I would be more than happy to document the whole setup here after the fact and contribute it as an example for others who may be contemplating the same approach.

Situation:

I've built a simple proof of concept site (nowhere near finished, polished, etc) using Xara Designer Pro X9 (I've been using these tools since version 1 - no surprises here), and built a form in the current release of CC Web Form Builder. Xara has a feature that lets me draw any rectangle on a page and designate it as a placeholder. I can provide HTML, javascript, etc for the placeholder and on publish, the Xara tool will create a DIV in the page, located where the placeholder was, but with the placeholder object replaced by the specified code.

I've used WFB to create the form, saved it, chose to export it, and chose "manual" server setup. Copied and pasted the embed code from WFB in the placeholder, copied the export code to the same folder where the Xara formatted page lives. When I upload this group of directories and files to a folder under my website on GoDaddy, it works. Still needs cleanup, a few more pages, form action, etc. But the form appears (although with a weird jerky repositioning) exactly where it should.

However - when I create a subdirectory under my localhost folder and copied the exact same files and dirs there (the same ones that worked fine on GoDaddy), the site pages show, pages with embedded php pages (and the php extension) work (at least simple ones do), but the form does NOT show up on the page that hosts it.

In the last couple of days, I've been trying to get myself up to speed on:
- creating local domain entries in my hosts file
- creating aliases and virtual hosts in Apache
- setting document root
etc...

Still no joy. I opened the small php script that Web Form Builder creates -- the one that is referenced by the code sniplet that I'm supposed to paste into my web page, and I inserted a few php "echo" commands to see if I could get a clue about what files it's looking for, what it thinks paths and document roots are, etc. I think this may actually turn out to be a small tweak in settings in AMPPS / Apache / PHP, but I'm currently at a loss.

I was hoping that perhaps one of you, or another kind soul with WAMP experience might be able to help me out.

thanks in advance...
Jon

EDIT: BTW -- I've already shared this question with the Support folks, and Scott has looked into the question for me. No solution yet, and it's not the kind of topic I can expect the CC team to focus on to the exclusion of their real work... I appreciate whatever support they can offer, but I'll have to find the answer to this issue either here in the forum, on my own, or elsewhere.



User 187934 Photo


Senior Advisor
20,247 posts

So you can see the page the form script is on but you can't see the form? Try a straight iframe approach instead of the script.
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
User 2582728 Photo


Registered User
48 posts

Getting rid of the full script and just using the iframe code seems to have done the trick. I can see the pages locally now, using AMPPS (a WAMP distro), and they look the same as what I can see when the pages are up on GoDaddy. Big improvement - thanks for the suggestion.

I now have to tweak items like positioning of the form, so it lines up with text blocks that are on other pages -- so when a user navigates from page to page, it all looks consistent. Have to change other little details such a frame type: text blocks on my other pages have square corners, the web form's CSS (I'm guessing) is drawing rounded corners. Looks nice, but I need consistency. Might be easiest for me to set NO borders for the form, and a transparent background, and simply place it over the same kind of background block I have on other pages.

The challenge with form placement seems to be that, even if I set custom margins in WFB form options and set all four margins to "0", a border of some sort is generated (I think). Might also be the iframe -- I have to check defaults -- maybe there's a default padding value that I have to override.

Another oddity is that the page with the embedded form *should* be identical width to the other pages, but when I load it up in a browser, something is forcing the page to jog left a bit -- this looks jarring and unprofessional to me, so I have to track that down.

Last note for the moment -- and I haven't figured this one out yet:

So far, my form has no form action -- so there's really nothing for it to do when the page is submitted -- I'll add the proper action in after I've taken car of the formatting issues. But here's a weird one that I don't get: when you navigate to the page in the site that holds the form (page name is: Analysis), my nav menu acts a bit funky, and the form apparently not only steals focus -- but holds onto the focus. Once the form is displayed, I can no longer click on the nav menu to go to another site page. I have to hit the browser's back button. Maybe this is a normal iframe issue -- but if anyone has a clue about this, I'd appreciate it!

If any of you can additional info about how I can control form borders and padding (or if my issue is due to iframes), that would be fantastic to know as well. Thanks!!!

Last -- I just remembered I should provide a URL so you can see what I'm describing above. For now, take a look at the proof of concept pages at:

http://stronggroup.com/testhlv

- Jon
User 187934 Photo


Senior Advisor
20,247 posts

Looks like your using java script for those nav links. Try some straight CSS and html. I bet the form js files aren't playing fair with them.:)
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
User 2582728 Photo


Registered User
48 posts

Might be a CSS conflict.. but I tried a different approach that seems pretty promising:

Turned off the form border and set the background transparent; set the form on top of page elements in the site that match the other pages. As you suggested, I removed the javascript from the embedded code and went with a simple iframe. I also tweaked the iframe a bit. This is what the embed code looks like now:

<iframe width="685" height="1302" style="border:none; background:transparent; allowTransparency="true" overflow:hidden;" id="fb_iframe" scrolling="no" src="hlv_calc_form/hlv_calc_form.html">


Adding the extra parameters seemed to address some of the transparency issues I was having earlier as well as an annoying scroll bar that appeared at one point. The form, within the iframe, still grabs focus and page control when you navigate to the page -- but I'll attack that one tomorrow. Still have to fine tune, but it's getting closer (thanks in large part to your suggestions). I'm also still not clear yet why the page shifts left on navigating from page 3 to 4 The latest is at the same URL:

http://stronggroup.com/testhlv/

More to come, including setting the form action sending the data to a remote calc server, getting the results back and formatting a pretty results page with narrative and a couple of graphs and charts.

Thanks again -- I'm becoming encouraged!

Jon

EDIT (10 mins later): BTW, my client took at peek to see where this is going. First question -- "can we do something about those field widths?" I know there were some discussions here about specifying exact field widths, and if I remember correctly, Scott pointed out that the use of pct-based field widths supported the mechanisms in WFB to support responsive form design. I don't know if anyone here has experimented with this -- I don't need responsive forms, so I'm wondering how much things would get mucked up if I modfied the CSS (I'd actually create a new one, or add in my own styles with field widths defined in pixels)? Anyone here ever trying experimenting in the guts of the CSS?
User 187934 Photo


Senior Advisor
20,247 posts

I forgot to mention to leave the transparent and over flow hidden in there.
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
User 474778 Photo


Registered User
215 posts

Back to Dan Medley's original topic for this thread:
Running a local xAMP stack (Oh my!) not only allows trying out new stuff locally, without risk or exposure of half-baked ideas to the public, but also backs up the site locally as a side effect.

I happily used WAMP for years until I decided it also would be wise to see what my Web work looked like on Linux and Android. So I switched to XAMPP.

XAMPP's user interface is a bit more daunting, but XAMPP offers the key advantage of working similarly on both Windows and Linux. This strategy works so well that it allows me to dual-boot (right now, Windows XP-Pro 64-bit / Ubuntu Linux 12.04) and access the same set of Web project files, MySQL database, Thunderbird email files and Firefox bookmarks from either operating system. I install my applications under both operating systems, then "fool" the Linux-installed application instances into finding the files they need in the Windows filesystem. It's a simple trick, really, using Linux's ability to read & write NTFS and FAT32 (Windows) disk partitions paired with Linux's symbolic link capability (similar to the Windows 'link' concept). Too bad that Windows does not extend the same compatibility courtesy to Linux.

My recommendation is to go with WAMP if you're soley committed to Windows and prefer convenience, with XAMPP if you want more functionality and control of your development environment.

I'm looking at running Windows 7 within a virtual machine on Linux on or before next April, when Microsoft pulls the plug on security updates for Windows XP. I'll need a Windows platform in order to run CoffeeCup's software, and of course to observe first-hand how MS Internet Explorer mangles my sites.

Besides, there is already incentive to move away from XP: the latest version of XAMPP doesn't support it.

Who knows what the future may bring? Perhaps we'll all have switched to Facebook's just-in-time PHP compiler (See http://developers.facebook.com/blog/pos … move-fast/), MariaDB (See http://www.zdnet.com/wikipedia-moving-f … 000008912/) and some fantastic new Web server within the next five years.
halfnium -AT- alum.mit.edu
Yes, I looked just like that in 1962.
User 271657 Photo


Ambassador
3,816 posts

but XAMPP offers the key advantage of working similarly on both Windows and Linux......

Thanks for that bit of info. ;)
I think it's time my Win8 laptop got a Linux partition :D
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.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.