Re: [PHP-DB] php5 busts php4 code
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: 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
RE: [PHP-DB] php5 busts php4 code
No default support for MySQL in PHP 5. Did you enable it manually? Rich -Original Message- From: Hassan Ebrahimi-Nuyken [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 2:06 PM To: php-db@lists.php.net Subject: [PHP-DB] php5 busts php4 code 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 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php5 busts php4 code
Hassan Ebrahimi-Nuyken wrote: 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/ This isn't php5 busting php4 code - it's running an application that was programmed for/against php4 under php5, and figuring out what's wrong. This is a major version change, and it is possible it could take some work to get things perfectly. My gut reaction is somethings wrong if you're not getting any errors with all error reporting turned on, unless you had previously gone ahead and tweaked this for use under php5 - but maybe I use array_merge more often than most :). How was data integrity checked with a separate application - what exactly did you test? Do you mean you logged in (under the php5 version) and added some data, then viewed it on an apache running under your original configuration? Go read up on http://us3.php.net/manual/en/faq.migration5.php#faq.migration5.php45 (which points you to http://us3.php.net/manual/en/migration5.php ). The main area you need to look at is http://us3.php.net/manual/en/migration5.incompatible.php One possible suggestion is check your data sources - it may be that whatever (class/etc) reading the data is in some way using different libraries/includes from what's setting it - and it's somehow misconfigured/etc. Different users, different paths, different libraries to read vs. save data, etc. I dunno, nobody turned the light on here so it's a shot in the dark. If your application is constantly suppressing errors (@ prefixing function calls), or just not testing what's returned, then you're going to have a long couple of days/nights - so go get some caffeine before anything else. Good luck, shed some more light and we'll see if we can't help you better. Cheers, -- - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php