Problems using a php include file with an Add-on Domain.

Hello,
I am having an issue getting a php include file to work with a new add-on domain I am working on getting up and running.
This include file is one that supplies the rest of the php code to a contact form page.  It works as it should for my original domain, same file no difference.  I made sure that the files hosted on the remote server had all read, write, execute permissions turned on.
I have tried putting the include file in several different locations as a test, such as:
I don't remember the exact name of the include file at the moment, as I'm at work so I will designate it below as 'includefile.php'.
file path for add-on domain - ../public_html/lorentzpainting/includes/includefile.php
alternatives I tried moving the file to - ../public_html/lorentzpainting/includefile.php
When none of those options worked, I tried just pointing the path towards other places on the server that have the include file such as:
../public_html/includes/includefile.php
../public_html/includefile.php
What can I do here?  Should I just give up on using the include and put all the code back in the page?  Doesn't seem like it should be this complicated, it works perfectly fine for my other site.. and still does.
Thanks ahead of time to those who may assist me.

here is the contents of the include file:
<?php
if (isset($_SERVER['SCRIPT_NAME']) && strpos($_SERVER['SCRIPT_NAME'],
'.inc.php')) exit;
// remove escape characters from POST array
if (PHP_VERSION < 6 && get_magic_quotes_gpc()) {
  function stripslashes_deep($value) {
    $value = is_array($value) ? array_map('stripslashes_deep', $value) : stripslashes($value);
    return $value;
  $_POST = array_map('stripslashes_deep', $_POST);
  // assume that there is nothing suspect
    $suspect = false;
    // create a pattern to locate suspect phrases
    $pattern = '/Content-Type:|Bcc:|Cc:/i';
      // function to check for suspect phrases
  function isSuspect($val, $pattern, &$suspect) {
    // if the variable is an array, loop through each element
    // and pass it recursively back to the same function
    if (is_array($val)) {
      foreach ($val as $item) {
        isSuspect($item, $pattern, $suspect);
    else {
      // if one of the suspect phrases is found, set Boolean to true
      if (preg_match($pattern, $val)) {
        $suspect = true;
//check the $_POST array and any subarrays for suspect content
isSuspect($_POST, $pattern, $suspect);
    if (!empty($_POST['url'])) {
        $suspect = true;
    if ($suspect) {
        $mailSent = false;
        unset($missing);
    } else {
    //process the $_POST variables
    foreach ($_POST as $key => $value) {
        // assign to temporary variable and strip whitespace if not an array
        $temp = is_array($value) ? $value : trim($value);
        // if empty and required, add to $missing array
        if (empty($temp) && in_array($key, $required)) {
            array_push($missing, $key);
        } elseif (in_array($key, $expected)) {
            // otherwise, assign to a variable of the same name as $key
            ${$key} = $temp;
    //validate the email address
    if (!empty($email)) {
        // regex to identify illegal characters in email address
$checkEmail = '/^[^@]+@[^\s\r\n\'";,@%]+$/';
//reject the email address if it doesn't match
if (!preg_match($checkEmail, $email)) {
    $suspect = true;
    $mailSent = false;
    unset($missing);
//go ahead only if all required fields OK
    if (!$suspect && empty($missing)) {
//initialize the $message variable
        $message = '';
// loop through the $expected array
        foreach($expected as $item) {
// assign the value of the current item to $val
            if (isset(${$item}) && !empty(${$item})) {
                $val = ${$item};
            } else {
// if it has no value, assign 'Not selected'
                $val = 'Not selected';
// if an array, expand as comma-sparated string
            if (is_array($val)) {
                $val = implode(',', $val);
// add label and value to the message body
  $message .= ucfirst($item).": $val\r\n\r\n";
//limit line length to 70 characters
    $message = wordwrap($message, 70);
//create Reply-To header
    if (!empty($email)) {
        $headers .= "\r\nReply-To: $email";
// send it
    $mailSent = mail($to, $subject, $message, $headers);
    if ($mailSent) {
// $missing is no longer needed if the email is sent, so unset it
        unset($missing); echo('Thank you for contacting Common Wealth Web Solutions');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>

Similar Messages

  • PHP Include File works but doesn't line up with the Rest of Page

    Hi,
    I am having a serious problem. I have removed my header image and have decided to replace it with a php include file so if any changes needs to be made, it can all be done in the php file in case such as links.
    When I include the php file, it includes the file but for some reason the banner goes in one direction and the body goes in the other. Help me as I am not sure what I am doing wrong.
    Example Page (with the include file): http://www.specialist-events.com/events2.php
    This is how a page looks without the PHP Include File: http://www.specialist-events.com/events1.php
    Please can someone tell me what I am doing wrong.
    Thanks
    Junior

    Hi Nancy,
    Just to confirm what you are telling me I should do.
    Change the code in the web page to:
    <div id="header">
    <!--#include virtual="Includes/HeadMenu.ssi" -->
    <!--end header --> </div>
    so inside the layer 1 of the page, put the following code should be
    <div id="layer1">
    <!--#include virtual="includes/banner.php" -->
    <!--end header --> </div>
    and in the php file. Not sure how this will work as you are mapping areas of the image for links.
    But I assume inside the map area, you would have something like <<a class="intro" href="http://www.specialist-events.com/index.html">home</a>
    <div id="menu">
    <a href="#content">skip menu &gt;</a>
    <a class="intro" href="index.shtml">home</a>
    <a class="gallery" href="gallery.shtml">gallery</a>
    <a class="tools" href="tools.shtml">tools</a>
    <a class="portfolio" href="portfolio.shtml">portfolio</a>
    <a class="fees" href="Fees.shtml">fees</a>
    <a class="links" href="links.php">links</a>
    <a class="contact" href="contact.shtml">contact</a>
    </div> <!--end menu -->
    Am I correct

  • PHP include file not displaying in preview window

    Hi all,
    Hopefully I can explain this clearly. I have a website that
    uses a sidebar that's common to all pages. In order to include this
    "sidebar", I use:
    <?php require_once "sidebar.php ?>
    Now, originally on the page the whole sidebar html/php code
    was in the page, but I cut it all and replaced it to include the
    "sidebar.php" page. This way, when I change anything in the
    sidebar, it cascades to all of the pages.
    When I replace the original sidebar code that's in each page
    with the "php require_once", close the file, and open it back up
    again, the sidebar shows up as a small yellow "php" icon. It
    doesn't let me "preview" it live anymore.
    Is there any way to view what the php include file
    has?

    PREFERENCES | Invisible Elements > Server-side includes
    (enable)
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "vooboo13" <[email protected]> wrote in
    message
    news:fi1m9b$261$[email protected]..
    > Hi all,
    >
    > Hopefully I can explain this clearly. I have a website
    that uses a sidebar
    > that's common to all pages. In order to include this
    "sidebar", I use:
    >
    > <?php require_once "sidebar.php ?>
    >
    > Now, originally on the page the whole sidebar html/php
    code was in the
    > page,
    > but I cut it all and replaced it to include the
    "sidebar.php" page. This
    > way,
    > when I change anything in the sidebar, it cascades to
    all of the pages.
    >
    > When I replace the original sidebar code that's in each
    page with the "php
    > require_once", close the file, and open it back up
    again, the sidebar
    > shows up
    > as a small yellow "php" icon. It doesn't let me
    "preview" it live anymore.
    >
    > Is there any way to view what the php include file has?
    >

  • Where to put PHP included files?

    I'm trying to transfer website from my PC to MAC,
    hoping that I can finish it without changing any code.
    But many of my php files have "require()" function,
    and I can't find the php included files' folder.
    Please help~~

    I have a webpage on http://mysite.com/myproject
    All my project files are in /Library/WebServer/Documents/myproject
    (index.html, test.php, etc.)

  • What application can you use to open a file with the .acc extension?

    What application can you use to open a file with the .acc extension?

    http://www.fileinfo.com/extension/acc

  • How  to show  php 'include' file in Design View?

    Is it possible (in design view MX04) to show a php include
    file?
    It shows if it's <?php include('myPage.inc'); ?>
    but if its got the .php ext, <?php include('myPage.php');
    ?>
    its doesnt show.
    Any way of making it show?
    Cheers.
    Os.

    > Is it possible (in design view MX04) to show a php
    include file?
    Yes.
    Does the include file *also* contain PHP code?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Osgood" <[email protected]> wrote in
    message
    news:e791va$css$[email protected]..
    > Is it possible (in design view MX04) to show a php
    include file?
    >
    > It shows if it's <?php include('myPage.inc'); ?>
    >
    > but if its got the .php ext, <?php
    include('myPage.php'); ?>
    >
    > its doesnt show.
    >
    > Any way of making it show?
    >
    >
    > Cheers.
    >
    > Os.
    >

  • Change include file with click

    how could i,
    with a click on a button,
    switch an include file with another include file.?
    like, a list of categories to the right
    and the code for a gallery to the left,
    the IMG SOURCE code is the include,
    and so when i click on an item in the categories list, the img sources include changes to the new one
    please

    Changing an included file will require javascript because you need client side interaction.  Have you considered Spry Datasets?
    The following is a video that shows a basic example with the Spry Data sets:
    http://www.adobe.com/designcenter/dreamweaver/articles/lrvid4047_dw.html
    See if that is something that you are looking for.

  • Problems using Sony ECM DS70P Microphone with Vado HD 3rd gen

    Problems using Sony ECM DS70P Microphone with Vado HD 3rd genXHello.
    I have just purchased a Vado HD 3rd gen & was looking forward to using my Sony ECM DS70p Microphone,but after a couple of tests, the recording is extremely low & barley laudable.
    The Microphone works fine on My Kodak Zi8.
    Is there an internal setting I have to adjust, or is there a fault with the Vado
    The Sony ECM DS70pMicrophone can be clearly seen in use here on a official Creative video.
    http://www.youtube.com/watchv=oixLDAmc5qw
    If anybody can offer some help or advice please, I would be very grateful.
    Does anyone have a suggestion for a low profile stereo mic, to use with the Vado 3rd Gen
    Thank you.
    Thank you.

    This is happening to me too, I don't know if this is an Adobe Flash Player 11.5's bug or it's just my computer. All my browsers, chrome, IE9, Fox, doesn't even load anime videos. I tried reinstalling 11.5 many times, it have no effect but I use IE9 64-bit to run the videos that couldn't run. I waited 25 min for a JW player to load an episode of anime and I'm sick of it.

  • Problems using CFFile to move files

    Hi there - I am having some problems using CFFile to move
    files from one directory to another. It only seems to only move
    some of the files in the group that I choose to move over, and
    there is nothing specific about which files are moved - different
    files are moved each time. There are no error messages that are
    showing up, so I am totally baffled. Has anyone else experienced
    this or does anyone else have any ideas on how to fix this problem?
    Any help would be much appreciated!! My code is below.

    First, an incidental matter. I don't think there's any need
    for so many try-catch tags. I would expect all the tags <cffile
    action="move"> to throw the same class of exception, and so
    would use one try-catch for them all. Even if you expect different
    exceptions to be thrown, one cftry tag might still be sufficient,
    if implemented as follows
    <cftry>
    <!--- code block 1 --->
    <!--- code block 2 --->
    <!--- ... etc... --->
    <cfcatch type="exceptionType1"></cfcatch>
    <cfcatch type="exceptionType2"></cfcatch>
    <!--- ... etc... --->
    </cftry>
    I suspect the cause of the problems lies in the dynamic
    values that you give the attributes. Perhaps incorrect values are
    passed for the source and/or destination values in certain
    circumstances. As A3gis has said, if that were to happen you
    probably wouldn't notice, because of the try-catches. Find a way to
    ensure that all the generated values for source and destination are
    correct.

  • Layout problem in mainContent section - PHP include file

    Hi folks - I have a problem with the layout of a page.
    I've included a PHP statement in the mainContent div that shows up way down at the end of the page here:
    http://zazzlefan.com/index2.php
    How can I get that content to fit just below "Featured Sellers - Al Rio Art"?
    My CSS file is a slightly tweaked dreamweaver template
    http://zazzlefan.com/twoColFixLtHdr.css
    and there's a "zstore.css" file that controls the PHP include here:
    http://zazzlefan.com/css/zstore.css
    Can anyone help? Thanks in advance if you can.
    Terry

    .centerGrids {
    margin-left:auto;
    margin-right:auto;
    overflow:hidden;
    Does that do it for you?
    Martin

  • Question about using a PHP include for the head info...

    Hi,
    I'm currently using PHP includes for my site header and footer info.
    All my js/css files and meta declarations are in the head portion, which is in the header include.
    How would I go about giving each page its own individual TITLE if the modifiable content of my pages is inside the body only? Since we can't specify title inside the body, am I stuck with the same page title for each page on the website?

    Is it true that you header include file has the </head> and <body> tags embedded? It would seem a lot neater - and safer - to use two include files, one for the header and one for the body. That way, the <title> is not in either of them and you can do with it what you will.
    Barry

  • Using FTP to share files with 3 Windows computers - Not Working Anymore

    My office is trying to share files with a number of computers, both Mac and PC. The files are housed on a Mac OS 10 version 10.6, and I've enabled both AFP and FTP sharing. The macs in the office connect just fine, but yesterday, after three weeks of working perfectly, the Windows machines stopped connecting to the Mac. They get a "The Connection with the server was reset" error. We don't use an FTP client - I just had the PCs connect to the Mac by typing ftp://address in their explorer window.
    I've tried restarting all computers, disabling and re-enabling FTP sharing, and I've triple checked permissions, etc. Is there anything else I should be investigating? I'm trying to look into our firewall here, but since our computers are rentals and another company controls our internet access I'm not sure what I can do there. (I tried setting up workgroups, but said company won't give me administrative access over the PCs or access to the firewall, and there's no IT dept to speak of)
    As I'm sure you can tell, I'm just a regular old office monkey who inherited the "IT" job with no IT experience, so I apologize if any part of this question is stupid.

    I know just about nothing about this, but common dianostic practices include looking at the logs.
    Either use Applications -> Utilities -> Console, which has a search function that might make this easier.
    Or go looking around /var/log (which you can use Unix 'grep' to do your searching ). Then again, NOT ALL logs are in /var/log, and Console knows where more logs are located.
    2 logs that might be a good starting point would be /var/log/messages and /var/log/secure

  • Issues using multiple load-config files with ant

    Hello,
    Not sure if this is the correct place...
    I am creating an ant build script to compile our flex application. I am trying to use the default flex-config by doing <load-config filename="${flex.sdkPath}/frameworks/flex-config.xml"/> and project specific config file add the datavisualization module and any other libraries we might need in the future. I am trying to do this as I don't want to modify the flex-config.xml
    The issue I keep running into is I get a compiler error saying "unable to locate specified base class 'spark.comonents.application..". if I place the custome load-config file above the adobe default flex-config it gives errors stating it the "SeriesSlide" type
    <mxmlc file="${project.sourcePath}/FBApp.mxml"
             output="${project.output.binaryPath}/${project.output.fileName}.swf"
             locale="en_US"
             static-link-runtime-shared-libraries="false"
             static-rsls="false"
             use-network="true"
             accessible="false"
             debug="true">
             <load-config filename="${flex.sdkPath}/frameworks/flex-config.xml"/>
             <load-config filename="C:/Hudson/.hudson/jobs/FB 2.0 Flex/workspace/FBApp/FB-config.xml"/>
             <source-path path-element="${flex.sdkPath}/frameworks/libs"/>
             <source-path path-element="${project.sourcePath}"/>
             <library-path dir="${flex.path}/sdks/${flex.sdkVersion}/frameworks/locale/en_US"
                includes="*"/>
             <library-path dir="${project.libraryPath}"
                includes="*"/>
             <keep-as3-metadata name="Protected"/>
          </mxmlc>
    the following is my FB-config.xml
    <?xml version="1.0"?>
    <flex-config>
       <runtime-shared-library-path>
    <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4 Plug-in\sdks\4.1.0\frameworks\libs/datavisualization.swc</path-element>
    <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/datavisualization_4.1.0.16076.swz</rsl-url>
    <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
    <rsl-url>datavisualization_4.1.0.16076.swz</rsl-url>
    <policy-file-url>.</policy-file-url>
       </runtime-shared-library-path>
    </flex-config>
    It seems to be that the first "load-config" ant runs into is the only one that gets used. When looking around the internet I have multiple cases of where people say they have successfully used multiple load-config files.
    This one in particular.
    http://flashdevelop.org/community/viewtopic.php?f=13&t=5629&view=previous
    If I had to guess on what was wrong I believe my FB-config.xml file is incorrect but I can't find an example of anyones custom configuration file.
    Any guidance would be apprecaited.

    I am embarrassed to say that your solution answered my question.
    I was about 10 min away from rewriting my Ant script to just use the mxmlc.exe directly instead of the mxmlc ant tag. I kept running into the -flex-config+=YourConfig.xml for the command line option but never saw the xml variant.
    http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder -3/
    http://livedocs.adobe.com/flex/3/html/help.html?content=configuring_environment_3.html
    Does Flex have any documenation that shows all the different tags that are available like the Ant documenation?
    http://ant.apache.org/manual/Tasks/delete.html
    Thanks at ton.

  • Nvidia 295.40 Problems Using XBMC Assaultcube or anything with(SOLVED)

    The title pretty much sums it up , Ever since I updated to 295.40 . The previous driver 295.33 was working fine .  Problems Using XBMC , Wine , Assaultcube or anything with uses Open GL .  The two machines that are affected have the same hardware ( Nvidia 6200 pci) . Let me know if any of you are having similar issues . I will continue to work on this for a couple of hours .  Thanks .
    Last edited by sliposk (2012-05-03 18:47:26)

    Tried upgrading the nvidia package after upgrading linux to 3.3.2 but with no success, it still freezes…
    Gusar wrote:As I wrote in the other thread, the main point of 295.40 is to fix security vulnerabilities. So if you want to use older versions, at least patch them: http://www.nvnews.net/vbulletin/showthread.php?t=178006
    Tried to patch 295.33, successfully (making a 295.33-3 package to stay clean), but had the same failures and freezes. Looks like the problem we are experiencing is caused by the security fix…

  • Problem using webservice method consumer proxy with rawdata from abap

    Hello Gurus,
    I am struggling with an error using a proxy consumer service from ABAP. The proxy was generated using the WSDL from the web service provider. For a specific method we need to send a rawstring as seen bellow:
    The file to be sent on this call is a ZIP file XAdES-BES signed and on BASE64. I’ve implemented the proper code to get the original file from local PC, and convert it to BASE64 before moving the content to the webservice structure and call the service proxy. At SOAMANAGER I also configured the webservice and the proper port with the WSDL:
    The communication is working properly but my problem is with the binary content. When calling the webservice the response is that the structure of the file is wrong. I found it very strange since I used a tiny SOAPUI project with the same WSDL and it worked with no problem.
    After debugging I could see that the content moved to the rawdata string before calling the proxy does not match the content that I can see from the call payload on web services util (srt_util)!
    So the sample code for my method:
    * get the file from the specified folder
    call function 'GUI_UPLOAD'
    exporting
    filename                = ld_zipfilename
    filetype                = 'BIN'
    importing
    filelength              = zip_size
    tables
    data_tab                = t_zip_data[]
    exceptions
    file_open_error         = 1
    file_read_error         = 2
    no_batch                = 3
    gui_refuse_filetransfer = 4
    invalid_type            = 5
    no_authority            = 6
    unknown_error           = 7
    bad_data_format         = 8
    header_not_allowed      = 9
    separator_not_allowed   = 10
    header_too_long         = 11
    unknown_dp_error        = 12
    access_denied           = 13
    dp_out_of_memory        = 14
    disk_full               = 15
    dp_timeout              = 16
    others                  = 17.
    * convert to string
    clear buffer_zip.
    call function 'SCMS_BINARY_TO_STRING'
    exporting
    input_length = zip_size
    importing
    text_buffer  = buffer_string
    tables
    binary_tab   = t_zip_data[]
    exceptions
    failed       = 1
    others       = 2.
    * encode base 64
    perform encode_base64 using buffer_string
    buffer_zip. 
    form encode_base64 using in_string type string
    out_string type xstring.
    data: l_sbuff     type string.
    * convert the file to BASE64
    call method cl_http_utility=>encode_base64
    exporting
    unencoded = in_string
    receiving
    encoded   = l_sbuff.
    call function 'SCMS_STRING_TO_XSTRING'
    exporting
    text   = l_sbuff
    importing
    buffer = out_string
    exceptions
    failed = 1
    others = 2.
    endform.                    "encode_base64
    calling the webservice:
    l_input-xxxx-dokument = buffer_zip.
    try.
    call method l_proxy_test->webservice
    exporting
    input  = l_input
    importing
    output = l_output.
    catch cx_ai_soap_fault into lr_exc_soap_fault.
        endtry.
    From my understanding rawstring should be the same as ABAP xstring. If I debug the program and check the content of the  l_input-dokument before calling the proxy I get binary content: “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” that is in fact correct
    If I check the payload after call I can see that the binary content sent on the XML is not the same, in fact it is totally different: ”SXp3L2VHMXNJSFpsY25OcGIyNDlJakV1TUNJZ1pXNWpiMlJw…” !!
    I’ve tried a lot of different conversions, changed configuration on the communication, port, etc and nothing seems to work. I really can’t figure out why the binary content on the call is not the same as I move to the webservice structure.
    If I use the project from SOAP UI and send the proper binary content, that is “Izw/eG1sIHZlcnNpb249IjEuMCIgZW5jb2Rpbmc9InV0Zi04Ij8…” it works perfectly and the response is successfully.
    Anyone has a clue what could be causing this?
    Appreciate any kind of input.
    Regards,
    João Silva Pinto.

    Anyone? Any clue would be appreciated.

Maybe you are looking for