[PHP-DB] php5 busts php4 code

2005-01-20 Thread Hassan Ebrahimi-Nuyken
Hi,
I am running:
apache 2.0.52
MySQL 4.1.7
php 4.3.9
I have a program for user data entry, retrieval, editing and updating.
Works fine.
When I updated php to 5.0.3:
Data entry works fine (including login with password)
but data requested does not populate populate form anymore.
I have all error reporting turned on and nothing comes back/
Data entry integrity was checked with seperate application = OK/
Any hints?
I can post code if asked.
Thanks,
Hassan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] php5 busts php4 code

2005-01-20 Thread Hassan Ebrahimi-Nuyken
Thank you Martin  Richard,
First Richard's question:
I am using the preconfigured binary install package
for Mac OS X 10.3.7 from Marc Liyanage at:
http://www.entropy.ch/
It has support for mysql compiled into it with
the mysql client library ver. 4.1.3beta as
reported by into.php. It does work in the POST direction
because information entered into html forms is written to
the proper database-tables-columns. I checked this with
a seperate mysql gui application named MySQL4X Manager
for the Mac OS X platform. The POST data arrived just fine.
As to Martin's comments and links, I did check out the php
documentation concerning migrating code from ver. 4 - ver 5.
I thought I had enabled all backwards compatibility pnp.ini
directives. I again checked that the php.ini file was correctly
found by checking the info.php. The thing I'm guessing
(I am a php amateur) is that it has something to do with paths
a.k.a '_SERVER'in conjuction with argc and argv arguements.
I have not exhaustively tested possible changes
The code is a tweaked version of a Dreamweaver MX 2004
(out-of-the-box)routine.
Again the code worked fine under php 4.3.9.
the GET request look like this:
?php
$colname_members_mbr = 1;
$colname_profile_pfl = 1;
$colname_lifetyle_stl = 1;
if (isset($_GET['username_mbr'])) {
  $colname_members_mbr = (get_magic_quotes_gpc()) ? 
$_GET['username_mbr'] : addslashes($_GET['username_mbr']);
}
if (isset($_GET['username_pfl'])) {
  $colname_profile_pfl = (get_magic_quotes_gpc()) ? 
$_GET['username_pfl'] : addslashes($_GET['username_pfl']);
}
if (isset($_GET['username_stl'])) {
  $colname_lifestyle_stl = (get_magic_quotes_gpc()) ? 
$_GET['username_stl'] : addslashes($_GET['username_stl']);
}

mysql_select_db($database_roommatesat8, $roommatesat8);
$query_members_mbr = sprintf(SELECT * FROM members_mbr WHERE 
username_mbr = '{$_SESSION['MM_Username']}', $colname_members_mbr);
$members_mbr = mysql_query($query_members_mbr, $roommatesat8) or 
die(mysql_error());
$row_members_mbr = mysql_fetch_assoc($members_mbr);
$totalRows_members_mbr = mysql_num_rows($members_mbr);

mysql_select_db($database_roommatesat8, $roommatesat8);
$query_profile_pfl = sprintf(SELECT * FROM profile_pfl WHERE 
username_pfl = '{$_SESSION['MM_Username']}', $colname_profile_pfl);
$profile_pfl = mysql_query($query_profile_pfl, $roommatesat8) or 
die(mysql_error());
$row_profile_pfl = mysql_fetch_assoc($profile_pfl);
$totalRows_profile_pfl = mysql_num_rows($profile_pfl);

mysql_select_db($database_roommatesat8, $roommatesat8);
$query_lifestyle_stl = sprintf(SELECT * FROM lifestyle_stl WHERE 
username_stl = '{$_SESSION['MM_Username']}', $colname_lifetyle_stl);
$lifestyle_stl = mysql_query($query_lifestyle_stl, $roommatesat8) or 
die(mysql_error());
$row_lifestyle_stl = mysql_fetch_assoc($lifestyle_stl);
$totalRows_lifestyle_stl = mysql_num_rows($lifestyle_stl);
$sessUsername = $_SESSION['MM_Username'];
$_SESSION['sessName']=$sessUsername;

?
If anyone can point me in the right direction I would appreciate it.
Hassan
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php