Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

PHP 5.4 APP Issue

Posted on 2013-01-23
8
Medium Priority
?
244 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 84

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 84

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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 84

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
 

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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 750 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 750 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 111

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

885 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