Okay
  Public Ticket #1148899
error with Reservation Form
Closed

Comments

  • Andrea started the conversation

    i get this error when clicking “booking now” on Reservation Form:

    Warning: require(D:\inetpub\webs\ilraggiodisolecom\wp-content\themes\starhotel\inc\sendmail\reservation.php/wp-load.php): failed to open stream: No such file or directory in D:\inetpub\webs\ilraggiodisolecom\wp-content\themes\starhotel\inc\sendmail\reservation.php on line 10

    Fatal error: require(): Failed opening required ‘D:\inetpub\webs\ilraggiodisolecom\wp-content\themes\starhotel\inc\sendmail\reservation.php/wp-load.php’ (include_path=’.;C:\php\pear’) in D:\inetpub\webs\ilraggiodisolecom\wp-content\themes\starhotel\inc\sendmail\reservation.php on line 10

    NB: it’s a windows server

    the file wp-load.php is in the root and with read/write permissions

  •  34
    Jorrit replied

    I think we need to set an absolute path. Are you going to use WPmail (recommended), PHP mail or SMTP mail?

    Cheers, Jorrit

  • Andrea replied

    tried both PHP mail and SMTP mail with the same error
    in the same site PHP mail works fine in the contact form: the mail are sent without problems

  •  34
    Jorrit replied

    Okay, this is pretty weird, but somehow Windows interpreters slashes differently than all other servers.

    Could you please go to the file: \inc\sendmail\reservation.php

    and change this piece of code on line 10:

    "/wp-load.php" to "\wp-load.php"

    I hope that fixes it.

  • Andrea replied

    didn't work same error, the code modified:

    require wp_path() . "\wp-load.php"; if (true == $sh_redux['switch-top-header-wpml']) { $sitepress->switch_lang($_SESSION["new_current_lang"]); }

    the page is here

    http://www.ilraggiodisole.com/

  •  34
    Jorrit replied

    Hmm strange...

    Could you please try to replace the require once with: 

    $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
    require_once( $parse_uri[0] . 'wp-load.php' );
  • Andrea replied

    it's ok, i don't receive the error now

    thank you

  •  34
    Jorrit replied

    Great!