Re: [PHP-DB] Parse errors ,,, can you. impart me about it.

2004-12-21 Thread Dennis Cole
First, this has nothing to do with anytype of database whatsoever

Second, the code would help

The unexpected $ error is usually caused by a typo on the line above.

- Original Message -
From: amol patil [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, December 21, 2004 2:58 AM
Subject: [PHP-DB] Parse errors ,,, can you. impart me about it.


 hallo friend,

 i have developed simple and small database website using   php ,html and
java script.

 but i am getting these three parse errors on clicking ,

 i have checked 3-4 imes on these line numbers, but there wasn't any $
variable.
 php script is also correctly written.
 what is this T_STRING error.

 can you help me regarding this.

 thank you.

 errors:

 Parse error: parse error, unexpected $ in
/home/dollar1/public_html/signup.php3 on line 379


 Parse error: parse error, unexpected $ in
/home/dollar1/public_html/login.php3 on line 152

  Parse error: parse error, unexpected T_STRING in
/home/dollar1/public_html/addfunds.php3 on line 91



 -
 Do you Yahoo!?
  Yahoo! Mail - Find what you need with new enhanced search. Learn more.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.804 / Virus Database: 546 - Release Date: 12/7/2004

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: PHP Crystal Report

2004-12-21 Thread Bogomil Shopov
Hello
did you try using COM objects? I think that is fully possible.
Regards
Bogomil Shopov
http://purplerain.org
Ng Hwee Hwee wrote:
Hi all,
can someone kindly direct me to resources on generating reports using Crystal 
Report 10 through PHP 4.3.4 and MySQL 4.0.22 database?
thank you.
best regards,
hwee
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Parse errors ,,, can you. impart me about it.

2004-12-21 Thread Norland, Martin
 -Original Message-
 From: amol patil [mailto:[EMAIL PROTECTED] 
 
 Parse error: parse error, unexpected $ in
/home/dollar1/public_html/signup.php3 on line 379
 Parse error: parse error, unexpected $ in
/home/dollar1/public_html/login.php3 on line 152
 Parse error: parse error, unexpected T_STRING in
/home/dollar1/public_html/addfunds.php3 on line 91

I'd wager:
1) line 378 in signup.php3 doesn't have a semicolon.
2) line 151 in login.php3 doesn't have a semicolon.
3) line 90 in addfunds.php3 doesn't have a semicolon, or should be
merged with line 91.  It's also possible you forgot to add print/echo
before the statement on line 91.
4) you thought this was [EMAIL PROTECTED]

The T_STRING error is saying the php parser encountered a string where
it shouldn't have.

For gods sake, post code if you want help tracking errors people!

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



Re: [PHP-DB] Parse errors ,,, can you. impart me about it.

2004-12-21 Thread Jochem Maas
Norland, Martin wrote:
...
4) you thought this was [EMAIL PROTECTED]
that's simply hilarious! :-)
thanks Martin for making me laugh!
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Redhat-MySQL Issues

2004-12-21 Thread Jason Wong
On Tuesday 21 December 2004 12:29, Nathan Mealey wrote:

 I am trying to get PHP (4.3.2) to connect to MySQL 4.1.8 on a Redhat AS
 3.0 server.

 I ran the command: up2date php-mysql

 And on the initial run-through, PHP connected to MySQL no problem. But
 then I changed something in the PHP.ini and the next time I ran a PHP
 to Mysql script, I got the following error message:
  Fatal error: Call to undefined function: mysql_connect()

 All I changed in the PHP.ini was the include path.

My guess is that that is not what you changed (or not the only thing you 
changed). If you're pretty sure that 'include_path' was the only thing you 
changed then just revert it back to what it was before.

 What could have happened? 

It doesn't know about your MySQL extension. You could have a look at the 
'extension_dir' setting to whether you had changed that accidently.

 I am so in the dark on how to fix this! 

If all else fails, extract a fresh copy of php.ini from one of the RPMs. Or 
ask someone on the RH mailing lists to send you one.

Oh, and next time you edit php.ini, make a backup!

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
--
/*
Sattinger's Law:
 It works better if you plug it in.
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] HTTP Auth for PHPMyAdmin

2004-12-21 Thread Mark Benson
What do i need to do to enable proper HTTP authorisation for PHPMyAdmin?

I enabled it in the config  file, but it rejects my attempts to login.


-- 
Mark Benson

http://homepage.mac.com/markbenson

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] HTTP Auth for PHPMyAdmin

2004-12-21 Thread Norland, Martin
 -Original Message-
 From: Mark Benson [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 21, 2004 11:56 AM
 Subject: [PHP-DB] HTTP Auth for PHPMyAdmin
 What do i need to do to enable proper HTTP authorisation for
PHPMyAdmin?
 
 I enabled it in the config  file, but it rejects my attempts to login.

What do you mean proper HTTP authorization for PHPMyAdmin - do you want
it to log you in automatically, or do you want to use .htaccess to
protect your PHPMyAdmin scripts?

By your statement of config file, and talking about PHPMyAdmin - I'm
assuming that you've configured it to automatically log you in - in
which case I would suggest you verify you can login with the same exact
paramters on its normal login, as well as confirming that the parameters
are indeed set when it attempts to check them.

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



RE: [PHP-DB] HTTP Auth for PHPMyAdmin

2004-12-21 Thread Bastien Koert
I just placed it into a separate folder and implermented HTTP Auth on that 
folder, neve went into the config file to make it work

Bastien
From: Mark Benson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] HTTP Auth for PHPMyAdmin
Date: Tue, 21 Dec 2004 17:56:19 +
What do i need to do to enable proper HTTP authorisation for PHPMyAdmin?
I enabled it in the config  file, but it rejects my attempts to login.
--
Mark Benson
http://homepage.mac.com/markbenson
--
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


[PHP-DB] Comparing Two Values

2004-12-21 Thread Andre Matos
Hi List,

I was comparing two values, a current value with a new value to build the
UPDATE instruction and I faced this:

Current value: 2 == new value: 0002

So, PHP is telling me that the current is equal to the new. Is this
possible? Any idea to avoid this problem?

Thanks for any help.

Andre

--
Andre Matos
[EMAIL PROTECTED] 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] _POST, _GET, _REQUEST not working

2004-12-21 Thread Warren

Thanks for your response Jochem.

I realize this is not a DB specific question but this exercise is to get my
mysql routines working.

I did remove the declaration global $_SERVER, $_GET, $_POST, $_REQUEST,
$_SESSION, $_COOKIE but still do not get values.
Funny thing, $_SERVER[QUERY_STRING] returns the query string
var1=334343var2=343434 but $_GET['var1'] or $_REQUEST['var1'] are empty.
phpinfo() shows
SERVER[argv] = Array
(
[0] = /home/www/jakarta-tomcat-5.0.25/webapps/ip7/WEB-INF/cgi/httptest.php
[1] = var2=343434
[2] = var1=334343
)
Very puzzling.

Anyone else?


-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: December 20, 2004 5:53 PM
To: Keane, Warren A FIN:EX
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] _POST, _GET, _REQUEST not working

Warren wrote:
 Hello,

 I am running PHP 4.39 as a CGI under Tomcat 5.025, Linux 2.4.20-31.9.
 Configure = './configure' '--with-java=/usr/java/j2sdk1.4.2_04'
 '--with-servlet=/home/www/jakarta-tomcat-5.0.25' '--with-mysql'

 I cannot get the _GET function or _REQUEST functions to pick up values
from
they are variables not functions.
 a form generating even though I can see the query string values in the URL
 as in:
 http://localhost:8080/ip7/httptest.php?var1=212122var2=343434

 My HTML is very simple:

 form action=http://localhost:8080/ip7/httptest.php; method=get
 input type=text name=var1
 input type=text name=var2
 input type=submit
 /form

 The PHP program httptest.php is also very simple:

 ?PHP
 global $_SERVER, $_GET, $_POST, $_REQUEST, $_SESSION, $_COOKIE;
all the vars listed above are super globals you don't have to declare
them as global - they are everywhere! this may also be the cause of the
problem, what happens when you remove this line?
also have you tried var_dump() or print_r() on the $_GET/$_POST/etc arrays?
ps - not a very DB related question is it?

 if(!empty($_REQUEST['var1'])) { $var1 = $_REQUEST['var1']; }
 else { $var1 ='undefined'; }

 if(!empty($_GET['var2'])) { $var2 = $_GET['var2']; }
 else $var2 ='undefined';

 // Various HMTL tags removed for simplicity
 echo $var1
 echo $var1
 ?

 I have tried everything I can think of including using HTML POST instead
of
 GET, setting register_globals = On/Off.
leaving this off is recommended.

 Thanks in advance.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Comparing Two Values

2004-12-21 Thread tg-php
To be honest, I havn't had much use for it myself but I've done a lot of 'hack' 
projects that didn't need to be this specific.  But as I understand, you might 
want to use the triple-equal sign to determine if they're exactly the same.

Are you comparing...

2

with...

0002

(integer versus a string?)

If so, the === should work I believe.  It should compare variable types as well 
as values so it shouldn't convert 0002 to just 2 before doing the evaluation.

Good luck!

-TG

= = = Original message = = =

Hi List,

I was comparing two values, a current value with a new value to build the
UPDATE instruction and I faced this:

Current value: 2 == new value: 0002

So, PHP is telling me that the current is equal to the new. Is this
possible? Any idea to avoid this problem?

Thanks for any help.

Andre

--
Andre Matos
[EMAIL PROTECTED] 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


___
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Comparing Two Values

2004-12-21 Thread Jochem Maas
Andre Matos wrote:
 Hi List,

 I was comparing two values, a current value with a new value to build 
 the UPDATE instruction and I faced this:

 Current value: 2 == new value: 0002

in short, assuming that both the variables are not integers (i.e.
2 is equal to 0002) you should use === if you want '002' to not equal '2'.
try the following lines of code:
var_dump(2 === 002);
var_dump('2' === '002');
var_dump('2' == '002');
var_dump(2 == 002);
var_dump(2 == '002');
amazing what a bit of experimentation can teach you

 So, PHP is telling me that the current is equal to the new. Is this
 possible? Any idea to avoid this problem?
this is not a problem, its the documented behaviour, actually it's the 
foundation of what makes php so easy to use - namely automatic 
typecasting and dynamic types (I am probably not explaining that too well).

read the manual to understand more:
http://nl.php.net/manual/en/language.operators.comparison.php
http://nl.php.net/manual/en/language.types.string.php#language.types.string.conversion
BTW: this is not a DB question.  ;-)

 Thanks for any help.

 Andre

 --
 Andre Matos
 [EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP-DB] Comparing Two Values

2004-12-21 Thread Bastien Koert
PHP implicitly casts the variables to be the same here...in this case the 
integer 2...if you want to force it to compare as text then you need to 
ensure that both variables are cast as text

see here (http://ca3.php.net/language.types.type-juggling )
bastien

From: Andre Matos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Comparing Two Values
Date: Tue, 21 Dec 2004 18:21:26 -0500
Hi List,
I was comparing two values, a current value with a new value to build the
UPDATE instruction and I faced this:
Current value: 2 == new value: 0002
So, PHP is telling me that the current is equal to the new. Is this
possible? Any idea to avoid this problem?
Thanks for any help.
Andre
--
Andre Matos
[EMAIL PROTECTED]
--
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] _POST, _GET, _REQUEST not working

2004-12-21 Thread Jochem Maas
Warren wrote:
Thanks for your response Jochem.
cheers.
I realize this is not a DB specific question but this exercise is to get my
mysql routines working.
I did remove the declaration global $_SERVER, $_GET, $_POST, $_REQUEST,
$_SESSION, $_COOKIE but still do not get values.
bummer. I have a sneaking suspicion that your problem might be related 
to the fact that you are running the cgi version of php.

Funny thing, $_SERVER[QUERY_STRING] returns the query string
one interim solution could be to write a function that fills the $_GET 
and $_POST vars - getting an array from a string like 
var1=334343var2=343434 is fairly trivial how does the following work 
for you?

parse_str( $_SERVER['QUERY_STRING'], $_GET );
print_r($_GET);
obviously this leaves you nowhere with POST  COOKIE values.
var1=334343var2=343434 but $_GET['var1'] or $_REQUEST['var1'] are empty.
which of the superglobals are actually defined at all?
phpinfo() shows
SERVER[argv] = Array
what does:
print_r( $GLOBALS );
print_r( $HTTP_GET_VARS );
print_r( $HTTP_POST_VARS );
...show you? (you might want to wrap the output in PRE tags for legibility)
(
[0] = /home/www/jakarta-tomcat-5.0.25/webapps/ip7/WEB-INF/cgi/httptest.php
probably a stupid question but: do you actually need tomcat? why not try 
a vanilla setup to begin with?

have you read this page:
http://nl.php.net/manual/en/language.variables.predefined.php#language.variables.superglobals
if not why not? (read the manual from back to front, it save you lots of 
time in the long run)

[1] = var2=343434
[2] = var1=334343
)
Very puzzling.
Anyone else?
-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED]
Sent: December 20, 2004 5:53 PM
To: Keane, Warren A FIN:EX
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] _POST, _GET, _REQUEST not working
Warren wrote:
Hello,
I am running PHP 4.39 as a CGI under Tomcat 5.025, Linux 2.4.20-31.9.
Configure = './configure' '--with-java=/usr/java/j2sdk1.4.2_04'
'--with-servlet=/home/www/jakarta-tomcat-5.0.25' '--with-mysql'
I cannot get the _GET function or _REQUEST functions to pick up values
from
they are variables not functions.
a form generating even though I can see the query string values in the URL
as in:
http://localhost:8080/ip7/httptest.php?var1=212122var2=343434
My HTML is very simple:
form action=http://localhost:8080/ip7/httptest.php; method=get
input type=text name=var1
input type=text name=var2
input type=submit
/form
The PHP program httptest.php is also very simple:
?PHP
global $_SERVER, $_GET, $_POST, $_REQUEST, $_SESSION, $_COOKIE;
all the vars listed above are super globals you don't have to declare
them as global - they are everywhere! this may also be the cause of the
problem, what happens when you remove this line?
also have you tried var_dump() or print_r() on the $_GET/$_POST/etc arrays?
ps - not a very DB related question is it?
if(!empty($_REQUEST['var1'])) { $var1 = $_REQUEST['var1']; }
else { $var1 ='undefined'; }
if(!empty($_GET['var2'])) { $var2 = $_GET['var2']; }
else $var2 ='undefined';
// Various HMTL tags removed for simplicity
echo $var1
echo $var1
?
I have tried everything I can think of including using HTML POST instead
of
GET, setting register_globals = On/Off.
leaving this off is recommended.
Thanks in advance.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] Re: PHP Crystal Report

2004-12-21 Thread Nayyar Ahmed
On Tue, 21 Dec 2004 16:04:12 +0200, Bogomil Shopov [EMAIL PROTECTED] wrote:
 Hello
 did you try using COM objects? I think that is fully possible.
Hello,

Is there any tool for Pro-Linux developers, So that I can develope 
reports like Crystal-Report. As my network has both Linux and Windows
machines so it is supposed to work on both?

TIA 

 
 Regards
 Bogomil Shopov
 http://purplerain.org
 
 Ng Hwee Hwee wrote:
  Hi all,
 
  can someone kindly direct me to resources on generating reports using 
  Crystal Report 10 through PHP 4.3.4 and MySQL 4.0.22 database?
 
  thank you.
 
  best regards,
  hwee
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
Nayyar Ahmad

Lecturer
Faculty Of Computer Science,
Institute Of Management Sciences,
Hayat Abad Peshawar , Pakistan.
Office : 92-091-9217404 , 9217452
Cell :  92-0333-9139461

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] MYSQL

2004-12-21 Thread Balwant Singh
hi to all,

may somebody guide me on the following:

I want to retrieve data from MYSQL and then want that PHP do calculation
- substract a particular field from its previous row. i.e. suppose i
have two field named DATE, STOCK and have 10 rows. Now i want that STOCK
on the 10th row should be substracted from 9th and so on.  May pls. help
me. 


with best wishes
balwant

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: PHP Crystal Report

2004-12-21 Thread Bastien Koert
http://sourceforge.net/projects/datavision/ is one such beast
aslso search sourceforge.net for more (search on reports)
bastien

From: Nayyar Ahmed [EMAIL PROTECTED]
Reply-To: Nayyar Ahmed [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Re: PHP  Crystal Report
Date: Wed, 22 Dec 2004 09:21:59 +0500
On Tue, 21 Dec 2004 16:04:12 +0200, Bogomil Shopov [EMAIL PROTECTED] 
wrote:
 Hello
 did you try using COM objects? I think that is fully possible.
Hello,

Is there any tool for Pro-Linux developers, So that I can develope
reports like Crystal-Report. As my network has both Linux and Windows
machines so it is supposed to work on both?
TIA

 Regards
 Bogomil Shopov
 http://purplerain.org

 Ng Hwee Hwee wrote:
  Hi all,
 
  can someone kindly direct me to resources on generating reports using 
Crystal Report 10 through PHP 4.3.4 and MySQL 4.0.22 database?
 
  thank you.
 
  best regards,
  hwee

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
Nayyar Ahmad
Lecturer
Faculty Of Computer Science,
Institute Of Management Sciences,
Hayat Abad Peshawar , Pakistan.
Office : 92-091-9217404 , 9217452
Cell :  92-0333-9139461
--
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


[PHP-DB] Re: mysql to access

2004-12-21 Thread Bogomil Shopov
Hello
The best decision is to make your own script to migrate database form 
mysql to Acess. You can try this software (working good) 
http://www.handyarchive.com/free/mysql2access/

Regards
Bogomil Shopov
http://purplerain.org
Matthew Perry wrote:
Does anyone know of a FREE program that exports MySQL to access?  The trial
versions of the ones I have downloaded do not export all the records of the
database.
- Matthew 


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php