Problem with PHP Include statements...

Discussion in 'Troubleshooting' started by ukonline, Jul 30, 2008.

  1. ukonline

    ukonline New Member

    Joined:
    Apr 30, 2008
    Messages:
    3
    I get the following error message when I
    try to open a PHP page in my protected folder
    which has include statements for files in the
    parent directory.

    Warning: include() [function.include]: URL file-access is disabled in the server configuration in /mounted-storage/home66a/sub002/sc40096-IFCC/joblotsources.co.uk/members/newpage2.php on line 25

    Warning: include(http://www.joblotsources.co.uk/header.php) [function.include]: failed to open stream: no suitable wrapper could be found in /mounted-storage/home66a/sub002/sc40096-IFCC/joblotsources.co.uk/members/newpage2.php on line 25

    Warning: include() [function.include]: Failed opening 'http://www.joblotsources.co.uk/header.php' for inclusion (include_path='.:/usr/local/lib/php/') in /mounted-storage/home66a/sub002/sc40096-IFCC/joblotsources.co.uk/members/newpage2.php on line 25

    This only happens when I use include to call in files from parent directories. Includes work fine when calling files in the same directory.

    The directory has a .htaccess file as follows:

    ########### AMEMBER START #####################
    Options +FollowSymLinks
    RewriteEngine On

    ## allow access for any active subscription
    RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
    RewriteCond /mounted-storage/home66a/sub002/sc40096-IFCC/joblotsources.co.uk/amember/data/new_rewrite/%1 -f
    RewriteRule ^(.*)$ - [L]

    ## if user is not authorized, redirect to login page
    # BrowserMatch "MSIE" force-no-vary
    RewriteCond %{QUERY_STRING} (.+)
    RewriteRule ^(.*)$ http://www.joblotsources.co.uk/amember/plugins/protect/new_rewrite/login.php?v=-any&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R]
    RewriteRule ^(.*)$ http://www.joblotsources.co.uk/amember/plugins/protect/new_rewrite/login.php?v=-any&url=%{REQUEST_URI} [L,R]
    ########### AMEMBER FINISH ####################

    Any help would be appreciated.

    Brian.

Share This Page