PHP script not working

Discussion in 'Installation/Configuration' started by reason8, Oct 5, 2009.

  1. reason8

    reason8 Member

    Hello and good morning.

    I just installed a fresh copy of ISPConfig 3 using the Perfect Server and everthing installed file. I installed a php script in my home directory and I am trying to access it but I am getting the error below:

    not installed.
    \n"; if ( file_exists( "install/index.php" ) ) { echo "Please, wait. Redirecting you to installation form...
    \n"; echo "\n"; } exit; } require_once( 'inc/header.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'members.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'news.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' ); require_once( BX_DIRECTORY_PATH_INC . 'tags.inc.php' ); require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplVotingView.php" ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolArticles.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolClassifieds.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolBlogs.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' ); require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' ); require( BX_DIRECTORY_PATH_ROOT . "templates/base/scripts/BxBaseIndex.php" ); require( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplIndex.php" ); check_logged(); $_page['name_index'] = 1; $_page['header'] = $site['title']; $_page['header_text'] = $site['title']; $_page['css_name'] = 'index.css'; $oIPV = new BxTemplIndexPageView(); $_ni = $_page['name_index']; $_page_cont[$_ni]['promo_code'] = getPromoCode(); $_page_cont[$_ni]['page_main_code'] = $oIPV -> getCode(); // add email to notify emails list if ( $_POST['subscribe'] && $_POST['subscribe_submit'] ) AddNotifyEmail($_POST['subscribe']); PageCode();

    Mod-PHP is active in addition to CGI being ticked.

    If someone could help me out, I would greatly appreciate it.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Where exactly did you upload the php file? Home directories are not able to execute php files, you have to upload the file into the web directory of the website.
     
  3. reason8

    reason8 Member

    It is uploaded to the /web directory. I can execute /install/index.php to run the install but upon completion when it tries to run /index.php to load the program, I get the error above.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe it redirects to a wrong domain or so. Does the domain name in browser stays the same when it redirects?
     
  5. reason8

    reason8 Member

    Yes, it stays the same. When I view the page source, this is what it shows:

    <?

    /***************************************************************************
    * Dolphin Smart Community Builder
    * -----------------
    * begin : Mon Mar 23 2006
    * copyright : (C) 2006 BoonEx Group
    * website : http://www.boonex.com/
    * This file is part of Dolphin - Smart Community Builder
    *
    * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
    * http://creativecommons.org/licenses/by/3.0/
    *
    * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
    * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    * See the Creative Commons Attribution 3.0 License for more details.
    * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
    * see license.txt file; if not, write to [email protected]
    ***************************************************************************/

    if ( !file_exists( "inc/header.inc.php" ) )
    {
    // this is dynamic page - send headers to do not cache this page
    $now = gmdate('D, d M Y H:i:s') . ' GMT';
    header("Expires: $now");
    header("Last-Modified: $now");
    header("Cache-Control: no-cache, must-revalidate");
    header("Pragma: no-cache");

    echo "It seems to be script is <b>not</b> installed.<br />\n";
    if ( file_exists( "install/index.php" ) ) {
    echo "Please, wait. Redirecting you to installation form...<br />\n";
    echo "<script language=\"Javascript\">location.href = 'install/index.php';</script>\n";
    }
    exit;
    }

    require_once( 'inc/header.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' );

    require_once( BX_DIRECTORY_PATH_INC . 'db.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'members.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'news.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' );
    require_once( BX_DIRECTORY_PATH_INC . 'tags.inc.php' );
    require_once( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplVotingView.php" );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolArticles.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolClassifieds.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolBlogs.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolGroups.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolPageView.php' );
    require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' );

    require( BX_DIRECTORY_PATH_ROOT . "templates/base/scripts/BxBaseIndex.php" );
    require( BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$tmpl}/scripts/BxTemplIndex.php" );

    check_logged();


    $_page['name_index'] = 1;
    $_page['header'] = $site['title'];
    $_page['header_text'] = $site['title'];
    $_page['css_name'] = 'index.css';

    $oIPV = new BxTemplIndexPageView();

    $_ni = $_page['name_index'];
    $_page_cont[$_ni]['promo_code'] = getPromoCode();
    $_page_cont[$_ni]['page_main_code'] = $oIPV -> getCode();

    // add email to notify emails list
    if ( $_POST['subscribe'] && $_POST['subscribe_submit'] )
    AddNotifyEmail($_POST['subscribe']);



    PageCode();

    =========================

    /inc/header.inc.php does exist becaused I looked.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There must be one of the PHP parts missing. Did you try to use a different PHP mode for this website?
     
  7. reason8

    reason8 Member

    Yes, I have tried using a different mode and the same thing occurs. I mean, shouldnt I get a different error if I am nothing no cgi or php mode? Or is ISPConfig3 assuming that nothing is installed to support this script?

    If that is the case, the install went fine and it was php based.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig is not testing if anything PHP related is installed. ISPConfig is just writing an apache configuration file. All error that you see come directly from apache and not from ISPConfig.

    1) Do you have a IP address selected for the wesbite or * ?
    2) Is this the main domain of the website or a redirect to a subdirectory?
    3) Do you have any .htaccess files in this website directory?
     
  9. reason8

    reason8 Member

    It copies over numerous .htaaccess files. Initially they all were being prohibited via FTP until I reconfigured pureftp. I dont think it copies over any .htaccess files to the home directory though. The initial one that ISPConfig creates is there.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check all the .htaccess files if one of them reconfigures the .php mime type.
     
  11. reason8

    reason8 Member

    Problem solved.
    Looks like the short_open_tag=off needed to be turned ON in the php.ini file. This resolved the problem.

    Thanks for your help.
     

Share This Page