Solved

PHP 5.4 APP Issue

Posted on 2013-01-23
8
234 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 82

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 82

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 82

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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 82

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The viewer will learn how to count occurrences of each item in an array.
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.

707 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

18 Experts available now in Live!

Get 1:1 Help Now