mysql 5 and php 5 - spills sql / code on login

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
tedzzz
TestLink user
Posts: 2
Joined: Thu Jan 26, 2006 2:59 pm
Location: new England

mysql 5 and php 5 - spills sql / code on login

Post by tedzzz »

configuration background
-------------------------------------------------------------
MySQL Server Information
MySQL Version: MySQL 5.0.18-nt via TCP/IP
Network Name: localhost
Operating System: Windows XP
Hardware: Intel(R) Pentium(R) 4 CPU 3.06GHz, 504 MB RAM
PHP Version 5.1.2

apache 2
-------------------------------------------------------------
PROBLEM:
the index.php dumps code to screen
and part of that file dumps to screen is

\"0) { $cAvailablePlans = 0; // count the available plans while
($myrow = mysql_fetch_row($result)).... \"

--------------------------------------------------------------
this code it is just after following in plan.core.inc.php
--------------------------------------------------------------

$sql = \" SELECT DISTINCT id,name,active,prodid FROM project \" .
\" WHERE active=1 \";

// 20050928 - fm
if ( $filter_by_product )
{
$sql .= \" AND prodid=\\ \" . $productID;

// 20050904 - fm - TL 1.5.1 compatibility, get also Test Plans without product id.
if ($g_show_tp_without_prodid)
{
$sql .= \" OR prodid=0 \";
}
}

$sql .= \" ORDER BY name \";

$result = do_mysql_query($sql);

if ($result) {
$testplanCount = mysql_num_rows($result);
} else {
$testplanCount = 0;
}
if($testplanCount > 0) {


-------------------------------------------------------------
the path taken to get to dump is (educated guessemate)
doAuthorize.php --calls---> users.inc.php --calls---> common.php
--calls---> plan.core.inc.php
--------------------------------------------------------------
QA Venture
getting a new company's software
off on the right foot ... or left
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

1. if this is a bug please use the bug tracking system
2. PHP5 is not yet supported
tedzzz
TestLink user
Posts: 2
Joined: Thu Jan 26, 2006 2:59 pm
Location: new England

Post by tedzzz »

Fixed -
I kept going throught the testing php files
seeing what failed ....
the patern was simple.....in 20/20 hinesight only :-)
Some of the files do not use the convention for open tag of
starting with < and ? and PHP
they skip the PHP - using a short tag
The php.ini has a setting
short_open_tag = On
the default is off. so I switch it .....and now i can log in
sweet

I also set
asp_tags = On (will try default at some point )
and uncommented:
extension=php_mbstring.dll (will try default at some point - it is for multibyte strings http://php.ru.ac.za/manual/en/ref.mbstring.php )
QA Venture
getting a new company's software
off on the right foot ... or left
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Post by fman »

thanks for the help.
Work has been started on new version to use <?php instead of <?
Post Reply