0
Blank Screen, GoDaddy, PHP, MySQL
New Here
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/td-p/103245
Jul 17, 2006
Jul 17, 2006
Copy link to clipboard
Copied
I get a blank screen when trying to run a PHP Web App using
MySQL on a GoDaddy server. I have succesfully run the application
locally, and have also successfully ported the site to Godaddy, as
well as exported the MySQL database to the GoDaddy MySQL Server. I
know that PHP is working and that I am in the correct directroy
(folder) because I can run a PHP Test (test time) or html file
successfully and get the correct resonse on the screen.
I know that I have the correct "Host Name" for the MySQL Server, as well as the correct Database name, user name, and password.
I do not get any kind of eror, just a blank screen.
I do not know what I am doing wrong and any help anyone could give me would be very much appreciated.
Dcssr
I know that I have the correct "Host Name" for the MySQL Server, as well as the correct Database name, user name, and password.
I do not get any kind of eror, just a blank screen.
I do not know what I am doing wrong and any help anyone could give me would be very much appreciated.
Dcssr
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103246#M111835
Jul 17, 2006
Jul 17, 2006
Copy link to clipboard
Copied
dcssr wrote:
> I get a blank screen when trying to run a PHP Web App using MySQL on a GoDaddy
> server.
The first thing to check is whether display_errors is on or off. Upload
a file that contains just the following line:
<?php phpinfo(); ?>
Check the value for display_errors. It's extremely unusual for a hosting
company to turn this setting off, but it may explain why you get nothing
on the screen.
The other possibility is that you are running a SQL query that produces
no results.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> I get a blank screen when trying to run a PHP Web App using MySQL on a GoDaddy
> server.
The first thing to check is whether display_errors is on or off. Upload
a file that contains just the following line:
<?php phpinfo(); ?>
Check the value for display_errors. It's extremely unusual for a hosting
company to turn this setting off, but it may explain why you get nothing
on the screen.
The other possibility is that you are running a SQL query that produces
no results.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dcssr
AUTHOR
New Here
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103248#M111837
Jul 17, 2006
Jul 17, 2006
Copy link to clipboard
Copied
Thank you so much for the response.
The resulting file states that "Local Value" as well as "Master Value" for "display_errors" is set to "off".
Since this is a shared server, do I have any way to turn it on. If I am correct I would have to edit php.ini and change it.
The resulting file states that "Local Value" as well as "Master Value" for "display_errors" is set to "off".
Since this is a shared server, do I have any way to turn it on. If I am correct I would have to edit php.ini and change it.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103250#M111839
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
dcssr wrote:
> The resulting file states that "Local Value" as well as "Master Value" for
> "display_errors" is set to "off".
>
> Since this is a shared server, do I have any way to turn it on. If I am
> correct I would have to edit php.ini and change it.
On a shared server, you can't edit php.ini. You can put the following at
the beginning of your script:
<?php ini_set('display_errors', '1'); ?>
Once you have discovered the cause of the error, remove that script.
A better alternative is to find out the file where errors are logged. It
should be listed as error_log.
Displaying errors on a live website not only looks unprofessional, it
can provide useful information to potential attackers.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> The resulting file states that "Local Value" as well as "Master Value" for
> "display_errors" is set to "off".
>
> Since this is a shared server, do I have any way to turn it on. If I am
> correct I would have to edit php.ini and change it.
On a shared server, you can't edit php.ini. You can put the following at
the beginning of your script:
<?php ini_set('display_errors', '1'); ?>
Once you have discovered the cause of the error, remove that script.
A better alternative is to find out the file where errors are logged. It
should be listed as error_log.
Displaying errors on a live website not only looks unprofessional, it
can provide useful information to potential attackers.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103247#M111836
Jul 17, 2006
Jul 17, 2006
Copy link to clipboard
Copied
On 17 Jul 2006 in macromedia.dreamweaver.appdev, David Powers
wrote:
> Check the value for display_errors. It's extremely unusual for a
> hosting company to turn this setting off, but it may explain why you
> get nothing on the screen.
It's off by default. I just looked through the php.ini for the PHP
install on my testing server - 5.0.4 on an FC4 box; on another box
with 4.2.3 the note is the same - it says:
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = Off
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
> Check the value for display_errors. It's extremely unusual for a
> hosting company to turn this setting off, but it may explain why you
> get nothing on the screen.
It's off by default. I just looked through the php.ini for the PHP
install on my testing server - 5.0.4 on an FC4 box; on another box
with 4.2.3 the note is the same - it says:
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = Off
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103249#M111838
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
Joe Makowiec wrote:
> It's off by default. I just looked through the php.ini for the PHP
> install on my testing server - 5.0.4 on an FC4 box; on another box
> with 4.2.3 the note is the same
It depends which version of php.ini you use. It's off by default in
php.ini-recommended, but on by default in php.ini-dist. I don't use
shared hosting, but was under the impression that most hosting companies
switch display_errors on. Maybe they don't any more.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> It's off by default. I just looked through the php.ini for the PHP
> install on my testing server - 5.0.4 on an FC4 box; on another box
> with 4.2.3 the note is the same
It depends which version of php.ini you use. It's off by default in
php.ini-recommended, but on by default in php.ini-dist. I don't use
shared hosting, but was under the impression that most hosting companies
switch display_errors on. Maybe they don't any more.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103251#M111840
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
On 18 Jul 2006 in macromedia.dreamweaver.appdev, David Powers
wrote:
> Joe Makowiec wrote:
>> It's off by default. I just looked through the php.ini for the PHP
>> install on my testing server - 5.0.4 on an FC4 box; on another box
>> with 4.2.3 the note is the same
>
> It depends which version of php.ini you use. It's off by default in
> php.ini-recommended, but on by default in php.ini-dist. I don't use
> shared hosting, but was under the impression that most hosting
> companies switch display_errors on. Maybe they don't any more.
It could be the difference between PHP/Win and PHP/*nix. I just checked
a site I have on a Windows box (on IIS) and it's on.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
> Joe Makowiec wrote:
>> It's off by default. I just looked through the php.ini for the PHP
>> install on my testing server - 5.0.4 on an FC4 box; on another box
>> with 4.2.3 the note is the same
>
> It depends which version of php.ini you use. It's off by default in
> php.ini-recommended, but on by default in php.ini-dist. I don't use
> shared hosting, but was under the impression that most hosting
> companies switch display_errors on. Maybe they don't any more.
It could be the difference between PHP/Win and PHP/*nix. I just checked
a site I have on a Windows box (on IIS) and it's on.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103252#M111841
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
Joe Makowiec wrote:
> It could be the difference between PHP/Win and PHP/*nix. I just checked
> a site I have on a Windows box (on IIS) and it's on.
That may be an explanation. I was rather surprised to see that the PHP
Manual says the default is "1" (in other words, on):
http://www.php.net/manual/en/ini.php
My dedicated server runs on Linux, and I remember having to turn
display_errors off myself, but I rent from a hosting company that runs
mainly shared servers, so they may have just set it up that way out of
habit.
The important point is that you should have it on for a development
machine, but off for a production one.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> It could be the difference between PHP/Win and PHP/*nix. I just checked
> a site I have on a Windows box (on IIS) and it's on.
That may be an explanation. I was rather surprised to see that the PHP
Manual says the default is "1" (in other words, on):
http://www.php.net/manual/en/ini.php
My dedicated server runs on Linux, and I remember having to turn
display_errors off myself, but I rent from a hosting company that runs
mainly shared servers, so they may have just set it up that way out of
habit.
The important point is that you should have it on for a development
machine, but off for a production one.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103253#M111842
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
On 18 Jul 2006 in macromedia.dreamweaver.appdev, David Powers
wrote:
> That may be an explanation. I was rather surprised to see that the PHP
> Manual says the default is "1" (in other words, on):
>
> http://www.php.net/manual/en/ini.php
Hmmmmm...
If you click and go to the notes, it says:
http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors
display_errors boolean
This determines whether errors should be printed to the screen as
part of the output or if they should be hidden from the user.
Note: This is a feature to support your development and should
never be used on production systems (e.g. systems connected to
the internet).
Note: Although display_errors may be set at runtime (with
ini_set()), it won't have any affect if the script has fatal
errors. This is because the desired runtime action does not
get executed.
So there's some disconnect between the documenters and the implementers.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
> That may be an explanation. I was rather surprised to see that the PHP
> Manual says the default is "1" (in other words, on):
>
> http://www.php.net/manual/en/ini.php
Hmmmmm...
If you click and go to the notes, it says:
http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors
display_errors boolean
This determines whether errors should be printed to the screen as
part of the output or if they should be hidden from the user.
Note: This is a feature to support your development and should
never be used on production systems (e.g. systems connected to
the internet).
Note: Although display_errors may be set at runtime (with
ini_set()), it won't have any affect if the script has fatal
errors. This is because the desired runtime action does not
get executed.
So there's some disconnect between the documenters and the implementers.
--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103254#M111843
Jul 18, 2006
Jul 18, 2006
Copy link to clipboard
Copied
Joe Makowiec wrote:
> So there's some disconnect between the documenters and the implementers.
Exactly what I thought. :)
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> So there's some disconnect between the documenters and the implementers.
Exactly what I thought. :)
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dcssr
AUTHOR
New Here
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103255#M111844
Jul 19, 2006
Jul 19, 2006
Copy link to clipboard
Copied
After talking to GoDaddy, they determined that they had my
website on a Windows box and moved it over to a Linux box. Whether
that has anything to do with my problem I don't know. I now get the
following error message after running it on the LInux box. "Access
denied for user: 'ushop@%' to database 'ushop' " I know that Ushop
is a user and that I am putting the correct password in. If I
change either the username or password I get a different error, so
I am assuming it has something to do with the priviledges of ushop.
The code for the connection in my Web App is:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_kart_conn = "mysql1.secureserver.net";
$database_kart_conn = "ushop";
$username_kart_conn = "ushop";
$password_kart_conn = "pwd";
$kart_conn = mysql_pconnect($hostname_kart_conn, $username_kart_conn, $password_kart_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?php
The suggested code on the GoDaddy site is:
<?php
//Connect To Database
$hostname="##DBSERVER##";
$username="##DBUSER##";
$password="your_password";
$dbname="##DBNAME##";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later.");
mysql_select_db($dbname);
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result)){
$name = $row["$yourfield"];
echo "Name: ".$name;
}
}
?>
This seems to be different than before. Are the ## symbols something specific to a Linux Box. Also is the "Usertable" where a developer puts the users for the website. I would assume that I could use the "ushop" as a user since it is the user that created the MySQLDatabase, and has full priviledges.
Thanks for your help.
Dennis
The code for the connection in my Web App is:
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_kart_conn = "mysql1.secureserver.net";
$database_kart_conn = "ushop";
$username_kart_conn = "ushop";
$password_kart_conn = "pwd";
$kart_conn = mysql_pconnect($hostname_kart_conn, $username_kart_conn, $password_kart_conn) or trigger_error(mysql_error(),E_USER_ERROR);
?>
<?php
The suggested code on the GoDaddy site is:
<?php
//Connect To Database
$hostname="##DBSERVER##";
$username="##DBUSER##";
$password="your_password";
$dbname="##DBNAME##";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password) OR DIE ("Unable to connect to database! Please try again later.");
mysql_select_db($dbname);
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result) {
while($row = mysql_fetch_array($result)){
$name = $row["$yourfield"];
echo "Name: ".$name;
}
}
?>
This seems to be different than before. Are the ## symbols something specific to a Linux Box. Also is the "Usertable" where a developer puts the users for the website. I would assume that I could use the "ushop" as a user since it is the user that created the MySQLDatabase, and has full priviledges.
Thanks for your help.
Dennis
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103258#M111847
Jul 20, 2006
Jul 20, 2006
Copy link to clipboard
Copied
quote:
Originally posted by: dcssr
I now get the following error message after running it on the LInux box. "Access denied for user: 'ushop@%' to database 'ushop' " I know that Ushop is a user and that I am putting the correct password in. If I change either the username or password I get a different error, so I am assuming it has something to do with the privileges of ushop.
I had the same error on a godaddy site, so I called them, and even though they have sample code for connecting to a MySQL Database on their help site, they said that they do not support accessing and editing MySQL Databases from a web page, you have to use their control panel to edit them.
In case your still looking for hosting companies, I use Total Choice Hosting for my shared hosting and they have offered everything I've ever needed.
Hope that helps.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103256#M111845
Jul 20, 2006
Jul 20, 2006
Copy link to clipboard
Copied
dcssr wrote:
> This seems to be different than before. Are the ## symbols something specific
> to a Linux Box. Also is the "Usertable" where a developer puts the users for
> the website. I would assume that I could use the "ushop" as a user since it is
> the user that created the MySQLDatabase, and has full priviledges.
No. The connection settings for all operating systems are identical. The
##DBSERVER##, etc. is just GoDaddy's way of saying "use your allotted
server name here". $usertable is also just an example.
The settings that you have in your connection file are fine - at least
from the technical point of view. If you're not being let into the
database, there's a problem with the hostname, username, password, or
database name. All of these are case-sensitive. If you still can't get
in, you need to ask GoDaddy to reconfirm your settings.
Since you wanted to use a different username from the database name,
perhaps your new setup has a place in the control panel for you to
create separate user accounts. If that's the case, you need to create a
user account before you can get in.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> This seems to be different than before. Are the ## symbols something specific
> to a Linux Box. Also is the "Usertable" where a developer puts the users for
> the website. I would assume that I could use the "ushop" as a user since it is
> the user that created the MySQLDatabase, and has full priviledges.
No. The connection settings for all operating systems are identical. The
##DBSERVER##, etc. is just GoDaddy's way of saying "use your allotted
server name here". $usertable is also just an example.
The settings that you have in your connection file are fine - at least
from the technical point of view. If you're not being let into the
database, there's a problem with the hostname, username, password, or
database name. All of these are case-sensitive. If you still can't get
in, you need to ask GoDaddy to reconfirm your settings.
Since you wanted to use a different username from the database name,
perhaps your new setup has a place in the control panel for you to
create separate user accounts. If that's the case, you need to create a
user account before you can get in.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
dcssr
AUTHOR
New Here
,
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103257#M111846
Jul 20, 2006
Jul 20, 2006
Copy link to clipboard
Copied
I believe I am going to look at going dedicated to have the
control I am use to. You had mentioned that you have a dedicated
server. The prices have always been the turn off for me to go
dedicated. What is the minimum that I can expect to spend for an
adequate dedicated server, and would you use Linx or Windows?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/dreamweaver-discussions/blank-screen-godaddy-php-mysql/m-p/103259#M111848
Jul 20, 2006
Jul 20, 2006
Copy link to clipboard
Copied
dcssr wrote:
> I believe I am going to look at going dedicated to have the control I am use
> to. You had mentioned that you have a dedicated server. The prices have
> always been the turn off for me to go dedicated. What is the minimum that I
> can expect to spend for an adequate dedicated server, and would you use Linx or
> Windows?
I haven't shopped around since getting set up several years ago, but I
pay about �2,000 ($3,400) a year. Since I use PHP/MySQL, I use a Linux
server. They're very good, and usually cheaper than Windows. Of course,
if you want to do ASP or ASP.NET, you need Windows.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
> I believe I am going to look at going dedicated to have the control I am use
> to. You had mentioned that you have a dedicated server. The prices have
> always been the turn off for me to go dedicated. What is the minimum that I
> can expect to spend for an adequate dedicated server, and would you use Linx or
> Windows?
I haven't shopped around since getting set up several years ago, but I
pay about �2,000 ($3,400) a year. Since I use PHP/MySQL, I use a Linux
server. They're very good, and usually cheaper than Windows. Of course,
if you want to do ASP or ASP.NET, you need Windows.
--
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

