• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • Last Modified:

PHP 5.4 APP Issue

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
btgtech
Asked:
btgtech
2 Solutions
 
Dave BaldwinFixer of ProblemsCommented:
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
 
btgtechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
Dave BaldwinFixer of ProblemsCommented:
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
 
btgtechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
crazedsanityCommented:
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
 
Ray PaseurCommented:
Check your error report settings.  This might help bring up a message.

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

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now