Reply LinkBack Thread Tools Search this Thread
Old 25-06-2007, 19:21   #1 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
php errors: Simple yet annoying, please help

Could anyone help me with these errors please

Warning: main(/public_html/social/include/common.php) [function.main]: failed to open stream: No such file or directory in /home/gameupli/public_html/social/mainfile.php on line 52

Warning: main() [function.include]: Failed opening '/public_html/social/include/common.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gameupli/public_html/social/mainfile.php on line 52

Fatal error: Call to undefined function: site_cache() in /home/gameupli/public_html/social/header.php on line 6

Im sure I have tried everything, could you please help me.

Many THanks if you can
  Reply With Quote
Old 25-06-2007, 19:32   #2 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
Without seeing the code this is guesswork?

Does social/include/common.php exist?

How are you addressing it in the include on line 52?

Can we see line 52?
  Reply With Quote
Old 25-06-2007, 19:34   #3 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
Yeh sorry just realised lol

Line 52:
include_once(XOOPS_ROOT_PATH.'/include/common.php');

Line 6:
site_cache('read');

And the common.php file does exist in that directory
  Reply With Quote
Old 25-06-2007, 19:39   #4 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
being as mainfile and include/common are in the same directory is the XOOPS-ROOT-PATH necessary? Does it work without it?
  Reply With Quote
Old 25-06-2007, 19:41   #5 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
mainfile is in the public_html/social and common is in public_html/social/include so it would need the XOOPS-ROOT-PATH
  Reply With Quote
Old 25-06-2007, 19:43   #6 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
include_once('include/common.php');

?
  Reply With Quote
Old 25-06-2007, 19:46   #7 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
Nope, it just changes the first error line to

Warning: main(/include/common.php) [function.main]: failed to open stream: No such file or directory in /home/gameupli/public_html/social/mainfile.php on line 52
  Reply With Quote
Old 25-06-2007, 19:48   #8 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
I'm no expert but my concern is that the urls do not match.

The file calling is addressed as
/home/gameupli/public_html/social/mainfile.php

The file called
/public_html/social/include/common.php

Perhaps your XOOPS_ROOT_PATH definition requires /home/gameupli adding?

Or use the relative URL as I suggested?
  Reply With Quote
Old 25-06-2007, 19:49   #9 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
here is the php script for the whole of mainfile.php


PHP Code:
<?php

if ( !defined('XOOPS_MAINFILE_INCLUDED') ) {
    
define('XOOPS_MAINFILE_INCLUDED'1);

    
// Physical Path
    // Physical path to your main directory WITHOUT trailing slash
    
define('XOOPS_ROOT_PATH''/public_html/social');

    
// Virtual Path (URL)
    // Virtual path to your main directory WITHOUT trailing slash
    
define('XOOPS_URL''http://social.gameuplink.com');

    
// Database
    // Choose the database to be used
    
$xoopsConfig['database'] = 'mysql';

    
// Table Prefix
    // This prefix will be added to all new tables created to avoid name conflict in the database. If you are unsure, just use the default 'pop'.
    
$xoopsConfig['prefix'] = 'pop_';

    
// Database Hostname
    // Hostname of the database server. If you are unsure, 'localhost' works in most cases.
    
$xoopsConfig['dbhost'] = 'localhost';

    
// Database Username
    // Your database user account on the host
    
$xoopsConfig['dbuname'] = 'gameupli_social';

    
// Database Password
    // Password for your database user account
    
$xoopsConfig['dbpass'] = 'password';

    
// Database Name
    // The name of database on the host. The installer will attempt to create the database if not exist
    
$xoopsConfig['dbname'] = 'gameupli_greg';

    
// Use persistent connection? (Yes=1 No=0)
    // Default is 'Yes'. Choose 'Yes' if you are unsure.
    
$xoopsConfig['db_pconnect'] = 0;

    
// Default setup language.
    
$xoopsConfig['default_language'] = 'english';

    if ( 
XOOPS_ROOT_PATH == '' ) {
        if ( @
file_exists('_install/index.php') ) {
            
header('Location: _install/index.php');
            exit();
        }
    }

    include_once(
XOOPS-ROOT-PATH.'/include/common.php');
}

?>

EDIT: TRIED WHAT YOU SUGGESTED AND HASNT CHANGED ANYTHING
  Reply With Quote
Old 25-06-2007, 19:51   #10 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
No typo on folder name, not named includes plural and coding as include?
  Reply With Quote
Old 25-06-2007, 19:52   #11 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
Nope
  Reply With Quote
Old 25-06-2007, 19:59   #12 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
When you tried this relative URL I suggested.
include_once('include/common.php');

did you leave the leading / like this?
include_once('/include/common.php');

Try it without as top?
  Reply With Quote
Old 25-06-2007, 20:03   #13 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
That hasnt and wouldnt work because the address comes out as
public_html/socialinclude/common.php

needs to be
public_html/social/include/common.php
  Reply With Quote
Old 25-06-2007, 20:10   #14 (permalink)
dh
just one more thing..
 
dh's Avatar
 
Join Date: Dec 2006
Location: Brackendale
Posts: 97
No the file you are calling from is in social so is relative address to its position.

Indulge me try this.

include('include/common.php');

If this doesn't work I will have to leave you to it as I have to bed now.

Sorry I could not help more
  Reply With Quote
Old 25-06-2007, 20:14   #15 (permalink)
gk
geek
 
gk's Avatar
 
Join Date: Oct 2006
Location: *.everywhere
Posts: 204
Send a message via ICQ to gk Send a message via AIM to gk Send a message via MSN to gk Send a message via Yahoo to gk
Quote:
Originally Posted by Evostance
needs to be
public_html/social/include/common.php

obviously not because its not working.

IT looks like it acctualy should be
/home/gameupli/public_html/social/include/common.php

or

public_html/social/include/common.php


or

./public_html/social/include/common.php
__________________
Quote:
"Why reinvent the wheel"? Simply because it's not round enough and I don't like the treads.
  Reply With Quote
Old 26-06-2007, 10:24   #16 (permalink)
Evostance
Registered User
 
Join Date: May 2007
Posts: 48
Quote:
Originally Posted by gk
obviously not because its not working.

IT looks like it acctualy should be
/home/gameupli/public_html/social/include/common.php

or

public_html/social/include/common.php


or

./public_html/social/include/common.php

I tried them and now just get

Parse error: syntax error, unexpected '.' in /home/gameupli/public_html/social/mainfile.php on line 52

Meh
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8