Shawn,
>That was it. Thanks John, ya saved my life. :-)
Glad I could be of assistance. The clue here was "Warning: ...". Now
undeclared variables and the like may not be fatal, but from years of
experience, I for one hate to use them.
Take for instance, $category. If I'm going to use that variable in my code,
I'd do the following:
if (!isset($category) || !$category) $category = 'somedefault';
or depending on the usage, maybe
if (!isset($category)) $category = '';
On the defined constants and quoting issue, give this code a run. It uses
PHP4's E_ALL constant, but you can test it under PHP3 with error_reporting(255)
instead. Without error_reporting, you might wonder why the output is blank.
Stick an error_reporting(E_ALL) at the top and it all makes sense:
--- error_test.php ---
<html>
<head>
<title>Error Reporting and Defines/Quoting</title>
</head>
<body>
<?php
define(state, 3); // the run-time state of the application
// s/b 'state', or even better 'STATE'
// the code below also uses the state constant
$aSt = array('state' => 'Oregon', 'county' => 'Jackson',
'city' => 'Ashland', 'country' => 'US');
// default error reporting
echo 'aSt[state] = '. $aSt[state]. '<br>'; // s/b 'state'
// show all errors and warnings
error_reporting(E_ALL);
echo 'aSt[state] = '. $aSt[state]. '<br>'; // s/b 'state' also
?>
</body>
</html>
---
The constant redeclarations scare me, I mean, it is a CONSTANT right? In PHP
I use constants, but consider them to BE of the form 'CONSTANT'. Then the code
change becomes if ('ONE_CONSTANT' || 'TWO_CONSTANT') instead of
if ((ONE_CONSTANT)) || (TWO_CONSTANT)). Not a huge difference, but I always
develop with full error_reporting. It's saved me on too many occasions.
Might be too many years of C programming, but there it is.
John
>----- Original Message -----
>From: "John Steele" <[EMAIL PROTECTED]>
>To: "FreeTrade" <[EMAIL PROTECTED]>
>Sent: Sunday, November 05, 2000 9:06 AM
>Subject: Re: [FreeTrade] Really need HELP.
>
>
>> Shawn,
>>
>> Take a look at the following section of php.ini:
>>
>> ; Error handling and logging ;
>> error_reporting = E_ALL & ~E_NOTICE ; Show all errors except for notices
>>
>> Looks like you want to have warnings suppressed. I would sure like to see
>them
>> 'corrected' in v2 though.
>>
>> John
>>
>> At 11/5/2000 04:54 PM, you wrote:
>> >
>> > Hi All;
>> >
>> > My main Hardrive died yesterday. Luckily I have backups of my data, but
>i
>> > am having trouble getting freetrade to run on my machine. Actually it
>is
>> > running but giving me a wierd situation. I am using the Xitami
>webserver
>> > with PHP4 and MySQL on Win 2000 Pro. Everything works but when i load
>> > freetrade into my browser I get about 50 of the following types of
>messages.
>> >
>> > Warning: Constant l_updateattr_denied already defined in
>> > G:/Xitami/webpages/php/front_to_back//modules/language/english on line
>374
>> >
>> > Warning: Undefined variable: category in
>> > G:/Xitami/webpages/php/front_to_back//modules/navigation/left_side on
>line
>> > 32
>> >
>> > Warning: Use of undefined constant GENERATE_BROWSER_CONSTANTS - assumed
>> > 'GENERATE_BROWSER_CONSTANTS' in
>> > G:/Xitami/webpages/php/front_to_back//modules/navigation/page_top on
>line 66
>> > onClick="popuphelp(this.href); return false;" TARGET="help">Help
>> >
>> > What am I missing in my setup? Other than this everything works and I
>can
>> > use the site as normal and order products.
>> > I am using the most recent version of my code just downloaded from my
>test
>> > site.
>> >
>> > Shawn
--
/* SteeleSoft Consulting John Steele - Systems Analyst/Programmer
* We also walk dogs... [EMAIL PROTECTED] - PHP/MySQL/Linux/Hosting
* http://www.gamecomputer.com/ssc/
*/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]