Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Can someone recommend a customizable contact form, please?

  • This topic is empty.
Viewing 15 posts - 46 through 60 (of 225 total)
  • Author
    Posts
  • #169927
    __
    Participant

    include_once /css_test/form-test/contactMichael1961.php;

    This is probably wrong (well, actually, it is definitely wrong; but that’s not what I am referring to):

    The leading slash in “/css_test/form-test/contactMichael1961.php” means the file is in the css_test/form-test/ folder off your root directory (analogous to the c:\css_test\form-test\, if you’re used to windows paths). I am willing to bet this is not where the file actually is.

    Write a script with only this code:

    <?php
    echo $_SERVER["DOCUMENT_ROOT"];
    

    upload it to your website and visit the page. You’ll see a filesystem path: this is the path to your website’s root directory (www-data, or public_html, or similar, depending on your host).

    If you upload a file to a directory on your website, say, css-test, then the filesystem path to that directory is not /css-test: it is $_SERVER["DOCUMENT_ROOT"]."/css-test".

    The “definitely wrong” part is that the filename must be quoted (because it’s a string):

    include_once "path/to/file.php";
    

    Please verify whether or not I have everything in the proper place

    I want you to try copying the two files from the gist, exactly as-is.

    • Save the contactPage.php file in a folder named form-test.
    • Change the path for the include_once statement to: $_SERVER['DOCUMENT_ROOT'].'form-test/class/contactMichael1961.php';
    • Save the class definition in form-test/class.
    • Upload the entire form-test folder to your root directory on your website (where you can access it like http://example.com/form-test).
    • Point your browser to http://example.com/form-test/contactPage.php.
    • Once you get that to work, you can add your own HTML to contactPage.php as desired.
    #169964
    Anonymous
    Inactive

    Greetings traq,

    Ok, I got a page that says “Example Domain…..”

    What’s different, i.e. why did this work and my other attempts didn’t?

    What’s next?

    Many thanks!

    #169967
    Anonymous
    Inactive

    Well %$*@!, I just went back to check it again and nothing but a white page. I don’t know how I got the other page before, and I’ve changed nothing. This is maddening!

    #169970
    Anonymous
    Inactive

    Greetings traq,

    I went into my server and deleted the “form-test” and the contactPage.php file and the contactMichael1961.phpin the subfolder “class” and the “class” folder. I deleted the local files and folders and started afresh per your instructions above. I transfered the folder “form-test” and the files/folder within to my server and typed in my domain name followed by /form-test/contactPage.php and get a white page.

    I have no idea what I did right to get a page the first time or what I’m doing wrong (again) now. I feel so foolish, and irate at myself right now.

    #169974
    Anonymous
    Inactive

    Traq,

    I just got through talking to the idiot host company for my site and although they promised me the moon and stars all they really gave me was the finger.

    The version of php the server is running is 4.4.8 which likely doesn’t support the form.

    Best Regards.

    #169975
    __
    Participant

    Don’t feel bad. The white page means something is still going wrong, but what is actually making it difficult and frustrating is the fact that your host doesn’t let you see the error logs so you can find out, specifically, what the problem is. Unfortunately, without this, both of us can only make wild guesses on what to fix.

    • try adding die("I'm dead, Jim"); immediately before the include_once statement. This will tell us if it is a parse error, or (if you see the message) something happening at runtime.
    • Look around the folders on your web host (probably in your site root directory, or just above – if you can access that). Is there a file named php.ini? If so, we might be able to change some of your config settings.

    edit

    The version of php the server is running is 4.4.8 which likely doesn’t support the form.

    LOL, oh, $#!+ …

    Yeah, that’s the problem. That’s horrible! The oldest supported version of PHP is 5.3. Version 4 has been abandoned for almost six years!

    …are you in a position to switch hosts?

    #169988
    Anonymous
    Inactive

    try adding die("I'm dead, Jim"); immediately before the include_once statement.

    Sid it and the message “I’m dead Jim” appears.

    I couldn’t find a file or folder for php.ini, but I did look at the phpinfo and there is a config file path for php.ini. I added that path to my url address and get an error. The path files doesn’t appear on my server.

    The host was supposed to do something to allow me to run a better version of php, but not the latest version. This is an ongoing issue. I can’t switch at the moment because I have no way to back up needed emails. I downloaded Mozilla Thunderbird in an attempt to salvage some email, but it won’t interface with the server apparently.

    Well, this blows! I guess I’m going to have to lose my email and switch hosts in order to proceed. That’s going to hurt big time losing the attachments. Too many to save at present and too many to sort.

    Thoughts?

    Many Thanks!

    #170039
    __
    Participant

    I couldn’t find a file or folder for php.ini, but I did look at the phpinfo and there is a config file path for php.ini. I added that path to my url address and get an error.

    That’s because it’s a filesystem path, not a URL. How can you access your web host? FTP? cPanel? Do you have ssh access, by chance?

    I can’t switch at the moment because I have no way to back up needed emails…

    Ahh, that’s right, I remember that conversation. Sorry, man; that sucks. I am still of the (strongly-held) opinion that your host has an obligation to provide you with an archive of your emails (or at least, a way to archive them yourself). It’s absurd that they won’t. And a bit of an a$$hat-ish thing to do.

    (Yes, you can tell them I said that.
    Tell them I’d be happy to expound on it, too.)

    The host was supposed to do something to allow me to run a better version of php, but not the latest version.

    Still, it is flat-out scary that 4.4.8 is the “better version” they could provide you with. It would be in their own best interest to upgrade: unsupported versions (especially such old ones) are huge security risks.

    (Actually, if you feel like they are “trying” at all, you could try telling them that. Upgrade, for your own sake.)

    “I’m dead, Jim”

    yeah… no kidding.
    What I was going to do was show you a really tedious way to debug a script. Basically, you move the die line down, one statement at a time, until you stop seeing the message. When that happens, then you know the problem is on the line above.

    It’s a horribly trying way to troubleshoot, but there are situations (like yours) where you don’t really have a “better way.” Don’t bother now, though. There’s so much of this that will never work in php4 that there’s no point in finding out what it trips over first.

    #170040
    __
    Participant

    I suppose we could continue chipping away at this, though. It’ll be something nice that you can use later on.

    #170138
    Anonymous
    Inactive

    I have a control panel that I can access everything through. I logged in yesterday and believe I found a file that php files are in but they are related to a forum I had on the site which is now closed.

    If there is a way to save my email, it’s going to have to be by a method such as you are saying, but I don’t know where the files would be. My host said they would do it for $150/hr which is generous as they are the $#@%$ who left me to rot on an old server. I’ll call them and see if they will tell me what file contains the email and If I can save it somehow. The problem then would be finding someway to access them or whatever. Way over my head here.

    Let’s pursue this and see if we can save my email. Whether or not we can, come Monday I will be switching to a new host company. I have another host company, but their customer support blows and I’m not using them either. I hope to find a company that keeps its software and hardware current, has excellent security, and cares about its customers. Does such exist?

    Thanks so much!

    #170154
    Anonymous
    Inactive

    I suppose we could continue chipping away at this, though. It’ll be something nice that you can use later on.

    I have found a solution to save my emails that need to be saved. I am currently doing so and as soon as that is completed, I will be looking for a new host for my site(s) that will provide everything needed to support current and future coding/software/etc. I would guess it will take up to a week to get everything ready to go. It’s a frightening thing to switch and I hope new control panels, email, etc will be easy for me to understand an that downtime is minimum.
    If there is anything we can do in the meantime, I’d like to do so.

    Sorry for yet another delay. I expected my current host (VERIO) to keep its promise to make it possible to use newer php, and they did for a time, but have apparently messed things up again. I’m done with them in any event.

    Thanks traq!

    #170202
    __
    Participant

    I have found a solution to save my emails that need to be saved.

    Glad to hear it.

    I would guess it will take up to a week to get everything ready to go. It’s a frightening thing to switch and I hope new control panels, email, etc will be easy for me to understand an that downtime is minimum.

    My advice would be to leave everything “up and running” on your old host while you set things up on your new host. When it is ready, you can update your DNS records, and then remove everything from the old host once it propagates. Less downtime, and much less stress.

    If there is anything we can do in the meantime, I’d like to do so.

    Yeah, we’ll keep going. And no worry about the delays.

    I hope to find a company that keeps its software and hardware current, has excellent security, and cares about its customers. Does such exist?

    I used to recommend MediaTemple, before they sold out to GoDaddy. I’ve heard that godaddy is trying to turn things around, and that mt is still a good place, but I haven’t actually used them since then so I don’t know. When I did use them, they had excellent customer service and good support.

    I don’t really know anywhere else to recommend, unfortunately, since I’m not “in the market” for hosting solutions anymore. I’m handling my customer’s sites myself these days, and I’m moving all my stuff to digitalocean (which is an awesome thing, but aimed more at developers: you get a barebones linux “instance” and install/set up everything yourself).

    Whatever you get, aim for PHP 5.4 or better. 5.3 is okay (but not really desirable) if the service is otherwise attractive. 5.2 or less is not.

    #170437
    Anonymous
    Inactive

    Greetings traq,

    I’m signing up with Stablehost and expect to be up and running this coming week if all goes well. They will propagate my files and folders from the old server and I am saving the emails I need to save before the old account with Verio is closed.

    I’ll get back with you once everything is set to go.

    Best Regards.

    #170439
    __
    Participant

    cool, good to hear. We’ll pick this up again as soon as you’re ready.

    #170441
    Alen
    Participant

    I have to commend @traq for all his efforts. Logged in roaming from Europe (during biggest floods in Bosnia) just to say that. Halla.

Viewing 15 posts - 46 through 60 (of 225 total)
  • The forum ‘Other’ is closed to new topics and replies.