Jump to content


Photo

web pages wont load once i upload them


  • Please log in to reply
9 replies to this topic

#1 totalnewbie

totalnewbie
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 07 May 2006 - 02:50 PM

hi guys

ive made some webpages in dreamweaver using mysql db. when i try and load my pages on my virtual server, the pages load up with the information from my live database!

now when i load the pages up onto my live server, they dont work! these are PHP pages.

im getting the error:

Fatal error: Call to undefined function: virtual() in D:\inetpub\websitename\subfolder\dpage.php on line 1

(the address above is edited)

can anyone tell me what might be wrong?? im really struggling at this. thanks for ur help!

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 May 2006 - 02:54 PM

Like the error message says ... the script is trying to access a function named 'virtual' which it cannot find. Maybe there are other files you need to upload to your live server and/or put them in the expected folder.
Legend has it that reading the manual never killed anyone.
My site

#3 totalnewbie

totalnewbie
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 07 May 2006 - 03:06 PM

[!--quoteo(post=372014:date=May 7 2006, 09:54 AM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 7 2006, 09:54 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Like the error message says ... the script is trying to access a function named 'virtual' which it cannot find. Maybe there are other files you need to upload to your live server and/or put them in the expected folder.
[/quote]


hi

well, what ive done is make my entier site using dreamweaver, so i dont know much about the rest. it has made a folder called 'connections' and a php file inside it which contains the username and password etc to connect to my database.

the rest of my pages connect to this file in order to connect to my database.

where can i find this file which has a virtual function??

im using a virtual server program on my pc which uses the apache server.

can you please tell me how i can fix this? thanks!

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 May 2006 - 03:18 PM

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]where can i find this file which has a virtual function?? [/quote]
That's pretty well impossible for me to tell you - after all, these are your scripts - and I don't use DreamWeaver . Maybe someone else has a clue as to what DW has done for you.
Legend has it that reading the manual never killed anyone.
My site

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 May 2006 - 03:21 PM

Well theres a clue in the error message. virtual is being called on line 1 in dpage.php.

If you post the code here we should be able to help. As far as I know virtual is used to include and parse shtml files and is an Apache specific function.

#6 totalnewbie

totalnewbie
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 07 May 2006 - 03:48 PM

[!--quoteo(post=372025:date=May 7 2006, 10:21 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ May 7 2006, 10:21 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Well theres a clue in the error message. virtual is being called on line 1 in dpage.php.

If you post the code here we should be able to help. As far as I know virtual is used to include and parse shtml files and is an Apache specific function.
[/quote]


right guys this is the real code. the above one was edited.

<?php virtual('/Connections/salford.php'); ?>
<?php
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_salford, $salford);
$query_Recordset1 = "SELECT * FROM asif_planets, asif_images WHERE asif_images.Related_to = asif_planets.Planet_name";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $salford) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>


The virtual function connects to this:

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_salford = "213.171.193.146";
$database_salford = "salford";
$username_salford = "";
$password_salford = "";
$salford = mysql_pconnect($hostname_salford, $username_salford, $password_salford) or trigger_error(mysql_error(),E_USER_ERROR);
?>


any ideas??

thanks!

#7 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 May 2006 - 03:51 PM

I see the error now. Change this:
<?php virtual('/Connections/salford.php'); ?>
to
<?php require_once('/Connections/salford.php'); ?>


#8 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 May 2006 - 03:53 PM

Replace:
<?php virtual('/Connections/salford.php'); ?>
With this:
<?php require('/Connections/salford.php'); ?>

edit ... too slow :)
Legend has it that reading the manual never killed anyone.
My site

#9 totalnewbie

totalnewbie
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 07 May 2006 - 04:05 PM

[!--quoteo(post=372038:date=May 7 2006, 10:53 AM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 7 2006, 10:53 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Replace:
<?php virtual('/Connections/salford.php'); ?>
With this:
<?php require('/Connections/salford.php'); ?>

edit ... too slow :)
[/quote]
hi

i now get this error:

Fatal error: main(): Failed opening required '/Connections/salford.php' (include_path='.;c:\php\pear') in D:\inetpub\csesalford\asiffyp\planets.php on line 1

what can this mean and how do i rectify this? also when i preview the page on my localhost server, it no longer shows up.

#10 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 07 May 2006 - 11:31 PM

It appears that your connection information resides in a file named Connection_php_mysql.htm. Assuming that's true, then that is the file you need to include - if that file is in the same folder as the script that's looking for it (otherwise, adjust the filename in the require function below):

<?php require('Connection_php_mysql.htm'); ?>

Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users