Solved

PHP 5.4 APP Issue

Posted on 2013-01-23
8
236 Views
Last Modified: 2013-02-07
We have a PHP Version 5.4 App built.  It gathers data from users and creates a data file which is then loaded into MAS90.

There are 2 companies within the APP. Let's Call them Company a and Company b.

One page of the APP brings up items and has a subsection on the page to display the inventory available for the item.  For Company a, this is working and providing a list of inventory available.  For Company b, this section is blank regardless of the item selected.  

1. I went into MAS90 to confirm the available inventory.
2. I then went into SQL to confirm that the inventory table has this same data available.  It does.

we have rebooted the server and we have restarted SQL.

Not sure where to look next.
0
Comment
Question by:btgtech
8 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38811394
Telling us that it is "not working" does not give us any info to work with.  The first thing is what is different between what Company A does and what Company B does?  They are obviously Not identical because they do not produce the same results.  Details are important.  Does anything that Company B does with the APP produce any results or is the whole screen blank?
0
 

Author Comment

by:btgtech
ID: 38811813
Thank you for the questions.  I figured that an experts questions would get us to a solution quicker than writing a long description which may have not answered your questions.

The Page in the APP is designed to provide the same format for the page regardless of the company that the user is logged into.  

The data for this section of the page for both companies is in the same table.  The query which gathers the results has criteria based on the item code and the company code.

I have looked through the table to confirm that:
1. There is data for both company A and company B in the table.
2. The fields for both companies are completed and have acceptable values
3. The query in the PHP code runs fine in SQL and provides the result set for company a and for company b

The screen has three sections:
a. A header section with item name and details
b. A section to show the inventory on hand
c. a section to show the products which use this item
d. the workorders which are currently active for creating the item
e. a footer section which shows the user who is currently logged in

Company A has all sections completed.
Company B has all of the sections completed except b.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38811848
If there are different queries for the two companies, the problem may be simply be some punctuation that either PHP or MySQL doesn't like.  Do you get an error message?  Can you clone the Company B database code and query section to a separate PHP file for testing where you can enable more error checking?  That would be my first step.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 38811867
I must have missed something.  Which SQL driver are you using and which operating system are you on for the PHP?  I don't think it makes a difference but I'm a little confused.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:btgtech
ID: 38812033
Tables are in SQL 2005 Express Edition
Server is 64 bit Server with 2008 Server R2 loaded
PHP is Version 5.4

SQL Drivers - I do not suspect that the SQL drivers are in error because Company A is working and uses the same drivers

There is only one query for the inventory section of the page.  It is displaying data for Company A and not for Company B.

I also checked all of the indexes on the SQL tables and they are all setup properly.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 38812178
If there is only one query, then there is only one place to check.  The problem has to be there or be in the data that PHP puts in it to select for Company B.  I would echo the query string to make sure I was getting what I thought I was.
0
 
LVL 9

Accepted Solution

by:
crazedsanity earned 250 total points
ID: 38814532
It sounds like there's data coming back for both Company A and Company B, so the problem isn't specifically with the query.  I would suggest doing something like this to debug the results:
<$php
.....
print "<pre>";
var_dump($resultsArray);
exit;

Open in new window


If you put that right where the results are coming back, you'll be able to see them in raw form.  I'd guess there's probably some HTML in the results, or something interpreted as HTML, that is causing the page not to render correctly.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 38824660
Check your error report settings.  This might help bring up a message.

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now