close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Web pages not finding data on server but do so on development PC

Thread began 11/20/2015 3:24 pm by Ian | Last modified 11/23/2015 3:58 pm by Ray Borduin | 1170 views | 5 replies |

Ian

Web pages not finding data on server but do so on development PC

My web site access data OK on my localserver, but once I upload to my online server, it can't find it. It is there because I can access it via my ISPs software.
The error I get is - The website encountered an error while retrieving http://bega.org.uk/gateway/graveyard/public/data/view_graves_date.php. It may be down for maintenance or configured incorrectly.

Through trial and error I have found (I think) that the problem is the code on my web page

<?php require_once('../../../../Connections/Graveyard.php'); ?>
<?php require_once('../../../../webassist/mysqli/rsobj.php'); ?>
<?php
$rsGraveyard = new WA_MySQLi_RS("rsGraveyard",$Graveyard,0);
$rsGraveyard->setQuery("SELECT * FROM gravestones ORDER BY grave_funeral_yyyy DESC");
$rsGraveyard->execute();
?>
<!doctype html>
<html>
<head>

Again by a process of trial and error I believe the Connections file graveyard.php has an error in the path or there is a case issue between graveyard.php and Graveyard.php.
The Connections file is

<?php
# FileName="WADYN_MYSQLI_CONN.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_Graveyard = "localhost";
$database_Graveyard = "graveyard";
$username_Graveyard = "*******";
$password_Graveyard = "************";
@session_start();

$Graveyard = new mysqli($hostname_Graveyard, $username_Graveyard, $password_Graveyard, $database_Graveyard);

?>


Thanks for your help.

Sign in to reply to this post

Ray BorduinWebAssist

Have you uploaded all of the files?

Do you have a dollar sign in your password?

Are you sure the databasew and connection information are correct for the remote server?

You can narrow down the line of code causing the error by adding this to the top of the page:

<?php
ini_set('display_errors',1);
?>

Another trick is to add this to the page:
<?php
die("made it");
?>

start at the top and slowly move it down... once you stop seeing it you know the error is above. We need to narrow down the problem to figure out the cause, because there is nothing inherently wrong with the code or else it wouldn't work locally either.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ian

Web pages not finding data on server but do so on development PC

Got it! Rather stupid on my part. Using the suggestions I realised it was clearly the line that called the Connections file. I eventually realised that the on-line database I had setup several months ago might have a different password. When I started working on the site again recently I had changed the access password on my local database but forgot to change it on the server. Once I got the password right all was well. As I said - stupid.

I still have problems with one of the three databases involved but I assume the problem is much the same. Your code above should help me track it down.

Incidentally, I found the line to switch error messages on in the queryobj.php file (as you suggested on another thread) but I can't find it on the rsobj.php file so still not getting full SQL error messages.

Thanks for the help.

Ian

Sign in to reply to this post

Ray BorduinWebAssist

Did you download and install the latest version of the MySQLi server behaviors? We didn't have that line in earlier versions, so perhaps yours is still an older version.

Sign in to reply to this post
Did this help? Tips are appreciated...

Ian

I have version 1.0.4 which I think is the latest.
I found the line
$this->Debug = true; (which was set to false)

I can't see any obvious line in the rsobj.php to alter.

Sign in to reply to this post

Ray BorduinWebAssist

Here is a more recent version with debug turned on.

Attached Files
rsobj.php
Sign in to reply to this post
Did this help? Tips are appreciated...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...