473,385 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Blank Screen still happening...

18
I know there have been various questions about blank screens from php but I've looked around and they aren't helping me at all.

I wrote a .php page and put it up on the hosting server but the page keeps on returning blank. I've checked that I have all my brackets and semicolons placed correctly.
I've added
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. //turn on error reporting
  3. ini_set('display_errors',1);
  4. ERROR_REPORTING(E_ALL);
  5. ?>
to the top of page but it is still returning blank without any error reports.
I found my php.ini file and checked that also. The display_errors is set to ON. Also, there isn't anything logged in a .txt file.
I wrote in phpinfo(); previously and it worked; the server has php up and running correctly. The version is 4.3.11
However, I did notice that even though I changed display_errors to ON it still says OFF in the info that shows up, however that shouldn't matter since I specified having error reporting on in the specific page.
_______________
I deleted everything and just put this in the body
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. //turn on error reporting
  3. ini_set('display_errors',5);
  4. ERROR_REPORTING(E_ALL);
  5. ?>
  6. <?php
  7. echo "Hello World
  8. ?>
I still get a blank screen when there should be an error showing.
Sep 2 '09 #1
4 2081
koager
18
I ended up inputting it line by line to see where the error is.
Found that and fixed it. However I have another problem now...
It seems that it is now not connecting to the database.
I believe I have the host, username, and password correct.

$con = @mysql_connect("FAAMDLDatamysql.db.2233605.hostedr esource.com","________","******");

I've checked, double checked, and triple checked my username and password and they are spelled correctly and with capitals and everything.
For the host I've also tried their IP 10.6.186.63 but still no connection.

The server version is 5.0.67.d7-ourdelta-log
and I tried
running this sql

SET PASSWORD FOR user@localhost = OLD_PASSWORD('******');

but it didn't work
Sep 2 '09 #2
dlite922
1,584 Expert 1GB
can you ping the host? can you telnet form a command line to that host on the MySQL default port 3306?

The problem is most likely your connection rather than PHP.

Remove the @ sign in front of mysql_connect and append this:

Expand|Select|Wrap|Line Numbers
  1. ....****") or die("Could Not Connect, here's the error<br>" . mysql_errno()); 
  2.  

Let us know,



Dan
Sep 2 '09 #3
koager
18
I deleted the @localhost part and it worked.
Right now I'm trying to solve the problem of the string that I return with my form needs to be stored with " " around it for my SELECT * WHERE to be able to locate the data.
I have $_GET['stock'] stored into $stock but I need it to be stored along with " " to be usable as it is a string and it needs to be defined as one with the quotes for it to be found in the database. /" isn't working...
_______________
Maybe not...
I got quotes around it with
$stock = '"' . $_GET['stock'] . '"';
but my SELECT * WHERE Stock_code="$stock" still doesn't seem to be locating the data

Unless it's my display code that is not functioning correctly
Expand|Select|Wrap|Line Numbers
  1. //Display result
  2.     //create header cells
  3. echo "<table border='1'>
  4.         <tr>
  5.             <td><b>Stock Code / Component</b></td>
  6.             <td><b>Description</b></td>
  7.             <td><b>System Model #</b></td>
  8.             <td><b>Rotocraft Make</b></td>
  9.             <td><b>Rotocraft Applicable Models</b></td>
  10.             <td><b>STC</b></td>
  11.         </tr>";
  12. //input data into cells of table
  13. while ($row=mysql_fetch_array($result)){
  14.     echo "<tr>";
  15.     echo "<td>".$row['Stock_code']."</td>"; 
  16.     echo "<td>".$row['Description']."</td>";
  17.     echo "<td>".$row['System_Model']."</td>";
  18.     echo "<td>".$row['Rotocraft_Make']."</td>"; 
  19.     echo "<td>".$row['Rotocraft_Applicable_Models']."</td>"; 
  20.     echo "<td>".$row['STC']."</td>";
  21.     echo "</tr>";
  22.     }
  23. echo "</table>";
Sep 2 '09 #4
koager
18
Nevermind about the echoing out the data retrieved.
I replaced $stock in the SELECT * WHERE statement with a stock code that I know and it would display it fine.

Logically, it makes sense for it to work
I retrieve the string that is inputted, add quotes around it, insert that into the SELECT * WHERE statement, which then takes that to the database and locates anything that matches the string, stores it as $result, and, from my while statement, displays it in a table.
Sep 2 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: charlie_M | last post by:
Is there a way to blank the screen in a FORM's onsubmit=... to blank the screen for the user?? I asked this before and got a way to blank a table by id with ...
2
by: Amir | last post by:
I really hope someone can explain this behavior. I have spend quite a bit of time and tried a bunch of things, so far nothing has worked. I have a page on which I have a datagrid with template...
3
by: shishuda91 | last post by:
I'd like to display scrolling, word-wrapped, centered text on a blank white screen with no window borders, nothing. Just a pure white screen with big letters in the middle (in an invisible box)....
5
by: carqs123 | last post by:
I have an application that does alot of work and calculations. It updates it's internal status on a windows form. When I debug single step the numbers appear just right on the form. When I run...
2
by: Eric | last post by:
We have a page that displays a datagrid with quite a bit of data in it. We have a few comb-boxes that we filter data on when we click the search button. I can change the combo-boxes and click the...
1
by: Raul Elms | last post by:
Hi, I'm running Apache2 together with the php and mysql modules on an opensuse 10.1 machine. Most scripts run well, I can connect and query databases without any problems. But some well known...
2
tdw
by: tdw | last post by:
I have tried to search everywhere for solutions to this. My problem is that on some programs, certain windows are blank white. An example: I installed Adobe Acrobat 8, also Adobe Reader 8. On...
0
by: crankeboy | last post by:
Hi Folks, My setup: Visual Studio Express 2008, VC++, .NET, BitBlt Here is a summary of the problem: - I am trying to copy a bitmap of my main form into a picture box. - To do this, I bitblt...
2
by: Lawrence Krubner | last post by:
Imagine a template system that works by getting a file, as a string, and then putting it through eval(), something like this: $formAsString = $controller->command("readFileAndReturnString",...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.