Reply
Fatal Error
Old 04-15-2008, 07:01 PM Fatal Error
Novice Talker

Posts: 8
Im Trying to install a php online game but as i try to install it it keeps saying

Fatal error: install() [function.require]: Failed opening required 'class/class_db_mysql.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/salonart/public_html/gangster-warfare/install.php on line 451

line 451 is - require "class/class_db_{$_POST['driver']}.php";

PHP Code:
fclose($f);
print 
"Config written.<br>
Attempting DB connection<br>"
;
define('MONO_ON'1);
require 
"class/class_db_{$_POST['driver']}.php";
$db=new database;
$db->configure($_POST['hostname'],
 
$_POST['username'],
 
$_POST['password'],
 
$_POST['database'],
 
0); 
MLOVELL is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-15-2008, 07:07 PM Re: Fatal Error
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
PHP Code:
require($_SERVER['DOCUMENT_ROOT']."/class/class_db_{$_POST['driver']}.php"); 
You would need to include the path from your DocumentRoot before the class directory
joder is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 07:13 PM Re: Fatal Error
Novice Talker

Posts: 8
it now says
Fatal error: install() [function.require]: Failed opening required '/home/salonart/public_html/gangster-warfare/class/class_db_mysql.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/salonart/public_html/gangster-warfare/install.php on line 451
:S
MLOVELL is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:05 PM Re: Fatal Error
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
Wireless Audio
Posts: 2,322
Name: Keith Marshall
Location: West Hartford, CT
Does the file:
/home/salonart/public_html/gangster-warfare/class/class_db_mysql.php

exits?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:39 PM Re: Fatal Error
Novice Talker

Posts: 8
Yes It Did Thank You So Much

but....

Parse error: syntax error, unexpected '<' in /home/salonart/public_html/gangster-warfare/explore.php on line 5

PHP Code:
print <b>You begin exploring the area youre inyou see a bit that interests you.</b><br/> 

lol
MLOVELL is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:42 PM Re: Fatal Error
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
Put quotes around the code after print and a ; after that
joder is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:44 PM Re: Fatal Error
Novice Talker

Posts: 8
nope still the same

Parse error: syntax error, unexpected '<' in /home/salonart/public_html/gangster-warfare/explore.php on line 5

PHP Code:
<?php
include "globals.php";
$tresder=(int) rand(100,999);
if(
$ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); }
print <
b"You begin exploring the area you're in, you see a bit that interests you." </b><br/>;
<
table width=75%><tr height=100><td valign=top>
MLOVELL is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:49 PM Re: Fatal Error
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
The quote has include html tags. print is a function and the rest is an argument in which you need to enclose all in quotes.

PHP Code:
print "<b>You begin exploring the area you're in, you see a bit that interests you.</b><br/>"
joder is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 08:54 PM Re: Fatal Error
Novice Talker

Posts: 8
still dosnt work it says unexpected < so i dunno lol
MLOVELL is offline
Reply With Quote
View Public Profile
 
Old 04-15-2008, 10:04 PM Re: Fatal Error
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
Well. You have your table on the next line. HTML tags can't be in PHP like that without being inside a print, echo or a heredoc.

If you are done with your PHP after the if statement line then close the php with ?> and remove the print, quotes and semicolon. Do your html as normal.

PHP Code:
 <?php
include "globals.php";
$tresder=(int) rand(100,999);
if(
$ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); }
?>
<b>You begin exploring the area you're in, you see a bit that interests you.</b><br/>
<table width=75%><tr height=100><td valign=top>
Of course, if you have more php on done the page, you have to open with <?php

Last edited by joder : 04-15-2008 at 10:05 PM.
joder is offline
Reply With Quote
View Public Profile
 
Old 04-16-2008, 09:21 AM Re: Fatal Error
Novice Talker

Posts: 8
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/salonart/public_html/gangster-warfare/explore.php:1) in /home/salonart/public_html/gangster-warfare/globals.php on line 2

PHP Code:
<?php
session_start
();
ob_start();
if(
get_magic_quotes_gpc() == 0)
MLOVELL is offline
Reply With Quote
View Public Profile
 
Old 04-16-2008, 10:13 AM Re: Fatal Error
joder's Avatar
Flipotron

Posts: 6,443
Name: James
Location: In the ocean.
What's at the top of both files. If one is included by the other, then only the one that lists the first code should have session_start() and session_start() has to be the first line of both combined files.
http://us.php.net/session_start

Check out php.net. They have some of the best docs out there.
joder is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Fatal Error
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.16395 seconds with 12 queries