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 -
<?php
-
//turn on error reporting
-
ini_set('display_errors',1);
-
ERROR_REPORTING(E_ALL);
-
?>
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 - <?php
-
//turn on error reporting
-
ini_set('display_errors',5);
-
ERROR_REPORTING(E_ALL);
-
?>
-
<?php
-
echo "Hello World
-
?>
I still get a blank screen when there should be an error showing.
4 2091
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( "FAAMDLDatamysq l.db.2233605.ho stedresource.co m","________"," ******");
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
dlite922 1,584
Recognized Expert Top Contributor
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: - ....****") or die("Could Not Connect, here's the error<br>" . mysql_errno());
-
Let us know,
Dan
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="$st ock" still doesn't seem to be locating the data
Unless it's my display code that is not functioning correctly - //Display result
-
//create header cells
-
echo "<table border='1'>
-
<tr>
-
<td><b>Stock Code / Component</b></td>
-
<td><b>Description</b></td>
-
<td><b>System Model #</b></td>
-
<td><b>Rotocraft Make</b></td>
-
<td><b>Rotocraft Applicable Models</b></td>
-
<td><b>STC</b></td>
-
</tr>";
-
//input data into cells of table
-
while ($row=mysql_fetch_array($result)){
-
echo "<tr>";
-
echo "<td>".$row['Stock_code']."</td>";
-
echo "<td>".$row['Description']."</td>";
-
echo "<td>".$row['System_Model']."</td>";
-
echo "<td>".$row['Rotocraft_Make']."</td>";
-
echo "<td>".$row['Rotocraft_Applicable_Models']."</td>";
-
echo "<td>".$row['STC']."</td>";
-
echo "</tr>";
-
}
-
echo "</table>";
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
"document.getElementById('tabid').style.display='none';" in the onclick
event and setting the encapsulating table's ID to 'tabid'.
I was wondering if this or some other similar approach that could
possibly be planted globally in my pages in the onsubmit validation
|
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 columns. I
perform regular expression validations in the EditItemTemplate for the
fields that require such validation. The datagrid is inside a div tag
to make it scrollable. I have implemented the solution to freeze header
for this grid - the...
|
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). Then I want to
use the mouse buttons to page up or page down (left and right buttons),
or exit (double click).
Can someone point me in the right direction? I'm new to VB.
Thanks!
|
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 the program
in normal mode the text boxes to which the info is displayed just blank
out. Sometimes the entire form just turns all white. I get the
impression that the updates are happening too fast or something like
that.
What's going on? ...
|
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 search
button, but if during that time I go and look at an email or get a cup
of water, I come back and click the search button I get a white screen
or blank screen. I checked my session and it is still valid. If I
close the page and re-open it...
| |
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 scripts like phpMyAdmin or
Nucleus fail. When accessing a database or table (I don't really know when
PHP crashes) PHP just returns a blank screen (HTML source code is blank as
well).
For instance phpMyAdmin: With only one server configured I can...
|
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 both, the screen where it asks me to accept or decline the user agreement is blank, so I have no way of accepting. All I can do is click the X (close) button, which then tells me that I have declined the agreement and the program will close.
Another...
|
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 using the device contexts of the form and a bitmap object.
- After blitting, the bitmap image is always blank. I don't understand what I'm doing wrong here.
Here is my relevant code:
|
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", $formName);
// 06-22-07 - the next commands try to import all the functions that the
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |