cdolson
Posts: 27
|
| Posted: 10/02/2007, 8:21 AM |
|
This one has got me rather stumped.
I'm attempting to migrate my CCS projects to a new webserver. This server is running CentOS 5.0 using Apache 2.2.3 and PHP 5.1.6.
To test connectivity/etc. I created a very simple PHP page that simply lists a table in the SQL database. I tried this page successfully both with the SQL database on the new server and pointing to the SQL database of the old server.
However, when I create any PHP page that utilizes a more advanced query, such as one that simply involved a 'join', the page only displays the template and no data is presented. This error occurs whether I set the database connection to the new MySQL server or the old one.
So, I know the old MySQL server never had a problem serving up the data before, so it is not the query. I also know that the new MySQL server will serve up a simple query. Therefore I feel that the problem rests somewhere in the version of PHP itself, perhaps.
When I create the page on the new server, using the query with the join, the data comes back successfully through the Query Design wizard, using the ODBC connection, therefore the query is not the problem.
Anyone have any clue what might cause such a behavior?
Thanks for any help or hints!
Chris Olson
|
 |
 |
datadoit
|
| Posted: 10/02/2007, 8:52 AM |
|
Do a 'yum update' if you didn't install Apache/PHP/MySQL from rpm's. If
you did install this stuff from rpm's, a 'yum update' will thus proceed
to tear up the manual stuff you've done. I like to use yum to easily
keep the server up to date and secure.
I've learned this the hard way, and now whenever I configure a server
from CentOS, ALWAYS update it via yum.
'yum groupinstall MySQL Database' I think it is is a magical thing. :)
Sit back and enjoy the show, and when all is done everything should work
wonderfully.
If you did install from rpm's, uninstall the rpm's first, then try out yum.
Sounds like something didn't get installed. php-mysql,
MySQL-shared-compat, or something like that.
|
|
|
 |
wkempees
|
| Posted: 10/02/2007, 10:43 AM |
|
Does your calling url look like:
a: yourpagename
or
b: yourpagename.php
if the answer is 'a' then the apache is not set for auto assuming .php, try
the 'b' option and if that actualy works, then you have to change you apache
settings or htacess.
if the answer is 'b', and the browser serves you the template, I am stumped
too.
Just my 2c.
|
|
|
 |
mamboBROWN
Posts: 1713
|
| Posted: 10/02/2007, 6:11 PM |
|
cdolson
What version of MySQL are you using??
If you don't mind can you show us the (SQL) query??
Have you tried the query directly on the MySQL database?? Did it work??
|
 |
 |
cdolson
Posts: 27
|
| Posted: 10/02/2007, 8:32 PM |
|
Quote mamboBROWN:
cdolson
>>What version of MySQL are you using??
5.0.22
>>If you don't mind can you show us the (SQL) query??
The one that won't work on either server (when done through the new server's PHP) is thus:
SELECT tici_mflcomlist.*, salesorder.TxnID AS salesorder_TxnID, IsManuallyClosed
FROM tici_mflcomlist INNER JOIN salesorder ON
tici_mflcomlist.salesorder_ref_num = salesorder.RefNumber
However, that query does work on either the old MySQL or the new MySQL server when done directly through the ODBC interface *or* through a direct query to the server via a client like Navicat.
>>Have you tried the query directly on the MySQL database?? Did it work??
Yes. See above.
It is strange because a simple query such as this:
SELECT *
FROM account
Works fine and parses the data into the PHP page.
I'll keep digging and trying different queries, etc., but if you happen to have any clues I'd appreciate them.
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 10/04/2007, 4:00 PM |
|
cdolson
Have you tried taking the query and creating a view (on the database) and connecting the grid to it?
Also, when you migrated your project did you change your connection to "MySQL Improved"?
|
 |
 |
cdolson
Posts: 27
|
| Posted: 10/04/2007, 9:55 PM |
|
I did not try those solutions, nor am I able to now, though I do not believe they would have solved the problem.
The site had been configured through a manager called ISPConfig, and I believe that was the source of the issues. I rolled back that installation and just went with a straight, manual vhost config and some basic options and then everything worked fine.
I could try and dig out what the source of the issue might of been if I find some time, some time.
Thanks very much for the suggestions and for following the issue. I do appreciate it.
|
 |
 |
|