|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Mon Oct 28 2002 - 11:51:27 CST
php-general Digest 28 Oct 2002 17:51:27 -0000 Issue 1671
Topics (messages 121641 through 121752):
A newbie on Board!
121641 by: Subodh Gupta
121646 by: Justin French
121647 by: Peter Houchin
121652 by: Subodh Gupta
121659 by: Faisal Abdullah
121675 by: Ford, Mike [LSS]
121680 by: Maxim Maletsky
Re: Form element names starting with the "+" character????
121642 by: Dan Tappin
121643 by: Dan Tappin
121645 by: Peter Harkins
121650 by: . Edwin
steganographie or digital watermarking
121644 by: Tom Schulze
Re: What is this??
121648 by: BAROILLER Pierre-Emmanuel
"Please Wait"
121649 by: James Taylor
121651 by: . Edwin
121740 by: Chris Shiflett
general
121653 by: Shaun
121658 by: Jon Haworth
Re: cutted values after posting multiple select list
121654 by: Heiko Mundle
exploding values into new variables
121655 by: Petre Agenbag
121657 by: Erwin
error connecting to oracle.
121656 by: Subodh Gupta
121661 by: Faisal Abdullah
121662 by: Subodh Gupta
121665 by: Faisal Abdullah
121666 by: Gerald Roehrbein/Pctdmn
121667 by: Faisal Abdullah
121668 by: Subodh Gupta
121669 by: Faisal Abdullah
121670 by: Faisal Abdullah
121671 by: Subodh Gupta
121676 by: Maxim Maletsky
121677 by: Ford, Mike [LSS]
121678 by: Maxim Maletsky
121682 by: Maxim Maletsky
Re: newbie: php/mysql
121660 by: Tim Ward
121688 by: Marek Kilimajer
Re: ldap_add problem
121663 by: Gerald Roehrbein/Pctdmn
121664 by: Krzysztof Dziekiewicz
Parsing HTML
121672 by: Henry
121708 by: Henry
121710 by: Jay Blanchard
121712 by: Henry
121714 by: John Nichel
121717 by: Jay Blanchard
121718 by: Henry
121720 by: Henry
121721 by: Jon Haworth
121722 by: Henry
121723 by: John Nichel
121725 by: Jay Blanchard
121726 by: Jay Blanchard
Re: oracle: updating clob causes error 600
121673 by: Juhan Kundla
121679 by: Maxim Maletsky
121734 by: Nick Eby
preg_replace and eval
121674 by: Daniel Pupius
121681 by: Maxim Maletsky
121684 by: Erwin
Html Change
121683 by: Rodrigo de Oliveira
121685 by: Maxim Maletsky
Re: A couple of questions..
121686 by: Marek Kilimajer
dbase verify
121687 by: Plamen Slavov
121689 by: Marek Kilimajer
Re: extract($_POST)
121690 by: Jay Blanchard
Displaying one of three functions.
121691 by: Steve Jackson
121693 by: Martin Hudec
121697 by: Martin Hudec
121719 by: . Edwin
121727 by: Martin Hudec
121730 by: . Edwin
Group by YEAR in date
121692 by: Faisal Abdullah
121694 by: Marek Kilimajer
121695 by: 1LT John W. Holmes
New Error?
121696 by: Steve Jackson
121698 by: Marek Kilimajer
Recommend a merchant/store product
121699 by: Support . Fourthrealm.com
Re: Security Data S.A. releases PHPGrid under GPL license
121700 by: José León Serna
IP addresses
121701 by: Bret L Conard
121704 by: Jome
121705 by: Martin Hudec
121706 by: PHP
121709 by: . Edwin
List archive
121702 by: Chris Boget
121703 by: . Edwin
Re: Findng a pattern
121707 by: Henry
passing varibles into PHP script
121711 by: wh1sp3r
121716 by: John Nichel
121724 by: . Edwin
php4.3.0-pre2 - win32 binaries
121713 by: Vendigo2000.Mail.Ru
Re: [PHP-DEV] php4.3.0-pre2 - win32 binaries
121715 by: Derick Rethans
121728 by: Marcus Börger
121731 by: Vendigo2000.Mail.Ru
Re: Mac OS X EI TEXTAREA Problem
121729 by: Brent Baisley
Week numbers
121732 by: Davíð Örn Jóhannsson
121735 by: Chris Boget
121736 by: 1LT John W. Holmes
Free compiler for Win
121733 by: Marcello Lupo
121744 by: Maxim Maletsky
Failing to Make MySQL Query on Submit
121737 by: user.domain.invalid
121739 by: Martin Hudec
Re: Sessions are acting strangely
121738 by: Joel Boonstra
Re: confirm subscribe to php-general
lists.php.net
121741 by: Steve Purkiss
121742 by: Steve Purkiss
How to pass data without headers
121743 by: Drew Kime
121745 by: Chris Shiflett
Get HTML data from an URL
121746 by: Francisco Vaucher
121748 by: Foldenyi Tamas
121750 by: Francisco Vaucher
for??????
121747 by: Bsantos PHP
121749 by: Martin Hudec
121751 by: 1LT John W. Holmes
121752 by: Martin Hudec
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi,
I have just started off myself to learn PHP. I have installed PHP 4.2.3
and Apache 1.3.27. I have built some sample pages which are running
fine. But now I want to integrate PHP with Oracle. Can somebody help me
how to do it ?
Subodh Gupta
attached mail follows:
Hi,
Please start by looking in the manual... I simply typed
http://php.net/oracle into my browser, which resulted in this page:
http://www.php.net/manual/en/ref.oracle.php
Seems to document all the functions, and there are user-contributed notes
down the bottom which seem to provide even more help, and sample scripts.
THEN if you need some more help, I'm sure there are some people on this list
who can help :)
Justin
on 28/10/02 4:17 PM, Subodh Gupta (Subodh.Gupta
seepz.tcs.co.in) wrote:
> Hi,
>
> I have just started off myself to learn PHP. I have installed PHP 4.2.3
> and Apache 1.3.27. I have built some sample pages which are running
> fine. But now I want to integrate PHP with Oracle. Can somebody help me
> how to do it ?
>
> Subodh Gupta
>
>
>
attached mail follows:
jump along to php.net/manual/en and have a look in there and it will show ya
how to connect to oracle ( I can't remember :D ) also check out
phpbuilder.com and phpbeginner.com they'll both have tutorials for
connecting to oracle from memory :)
Cheers
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, 28 October 2002 5:18 PM
> To: php-general
lists.php.net
> Subject: [PHP] A newbie on Board!
>
>
> Hi,
>
> I have just started off myself to learn PHP. I have installed PHP 4.2.3
> and Apache 1.3.27. I have built some sample pages which are running
> fine. But now I want to integrate PHP with Oracle. Can somebody help me
> how to do it ?
>
> Subodh Gupta
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Hi all,
thanks for the prompt reply.
The problem is not that I don't know how to use functions and all. I tried
using various function. But I get fatal error everytime I use some
function. I think, some extensions (dll files are missing in my
installation of php.) how can I figure this out?
Subodh Gupta
"Peter
Houchin" To: "Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in>,
<php
vfsa.com <php-general
lists.php.net>
.au> cc:
Subject: RE: [PHP] A newbie on Board!
28/10/2002
12:02 PM
jump along to php.net/manual/en and have a look in there and it will show
ya
how to connect to oracle ( I can't remember :D ) also check out
phpbuilder.com and phpbeginner.com they'll both have tutorials for
connecting to oracle from memory :)
Cheers
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, 28 October 2002 5:18 PM
> To: php-general
lists.php.net
> Subject: [PHP] A newbie on Board!
>
>
> Hi,
>
> I have just started off myself to learn PHP. I have installed PHP 4.2.3
> and Apache 1.3.27. I have built some sample pages which are running
> fine. But now I want to integrate PHP with Oracle. Can somebody help
me
> how to do it ?
>
> Subodh Gupta
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
You should probably check whether you environment variables are all set. try phpinfo(), and see under Environment Variables.
Check for: ORACLE_SID ORACLE_HOME LD_LIBRARY_PATH ORACLE_TERM ORA_NLS33
If they aren't there, you should set them up.
Regards, Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 3:11 PM
To: php-general
lists.php.net
Subject: RE: [PHP] A newbie on Board!
Hi all,
thanks for the prompt reply.
The problem is not that I don't know how to use functions and all. I tried using various function. But I get fatal error everytime I use some function. I think, some extensions (dll files are missing in my installation of php.) how can I figure this out?
Subodh Gupta
"Peter
Houchin" To: "Subodh Gupta"
<Subodh.Gupta
seepz.tcs.co.in>,
<php
vfsa.com <php-general
lists.php.net>
.au> cc:
Subject: RE: [PHP] A newbie on
Board!
28/10/2002
12:02 PM
jump along to php.net/manual/en and have a look in there and it will show ya how to connect to oracle ( I can't remember :D ) also check out phpbuilder.com and phpbeginner.com they'll both have tutorials for connecting to oracle from memory :)
Cheers
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, 28 October 2002 5:18 PM
> To: php-general
lists.php.net
> Subject: [PHP] A newbie on Board!
>
>
> Hi,
>
> I have just started off myself to learn PHP. I have installed PHP 4.2.3
> and Apache 1.3.27. I have built some sample pages which are running
> fine. But now I want to integrate PHP with Oracle. Can somebody help
me
> how to do it ?
>
> Subodh Gupta
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________
attached mail follows:
> -----Original Message-----
> From: Justin French [mailto:justin
indent.com.au]
> Sent: 28 October 2002 07:27
>
> Please start by looking in the manual... I simply typed
> http://php.net/oracle into my browser, which resulted in this page:
>
> http://www.php.net/manual/en/ref.oracle.php
>
> Seems to document all the functions, and there are
> user-contributed notes
> down the bottom which seem to provide even more help, and
> sample scripts.
Unfortunately, that's a bit of a newbie trap in itself. If you're using Oracle 7 or higher, you should probably be going for the Oracle8 Call Interface provided by the OCI8 library -- see http://www.php.net/manual/en/ref.oci8.php.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
Actually, one should try always go for OCI8 functions even with lowere versions. Sometiumes, though, these might not work well for < v7.
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
"Ford, Mike [LSS]" <M.Ford
lmu.ac.uk> wrote... :
> > -----Original Message----- > > From: Justin French [mailto:justin
indent.com.au] > > Sent: 28 October 2002 07:27 > > > > Please start by looking in the manual... I simply typed > > http://php.net/oracle into my browser, which resulted in this page: > > > > http://www.php.net/manual/en/ref.oracle.php > > > > Seems to document all the functions, and there are > > user-contributed notes > > down the bottom which seem to provide even more help, and > > sample scripts. > > Unfortunately, that's a bit of a newbie trap in itself. If you're using > Oracle 7 or higher, you should probably be going for the Oracle8 Call > Interface provided by the OCI8 library -- see > http://www.php.net/manual/en/ref.oci8.php. > > Cheers! > > Mike > > --------------------------------------------------------------------- > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Beckett Park, LEEDS, LS6 3QS, United Kingdom > Email: m.ford
lmu.ac.uk > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
I figured it was something like that.
Thanks,
Dan
On Sunday, October 27, 2002, at 01:41 AM, eNetwizard Developers Team wrote:
> My understanding is since $+ is illegal, PHP strips the illegal
> characters from the post variables when creating the post array. I
> once
> read it somewhere and if I recall correctly it either strips them
> entirely or turns them into underscores.
>
> -Samuel | http://enetwizard.net
>
>
> -----Original Message-----
> From: Dan Tappin [mailto:dan
wavefront.ca]
> Sent: Sunday, October 27, 2002 2:20 AM
> To: php-general
lists.php.net
> Subject: [PHP] Form element names starting with the "+" character????
>
> I have a simple method of creating easy form processing.... I
> thought....
>
> I came up with the idea (I am not claiming to be the first) to have
> form
> elements I want to update via MySQL starting with either "-" or "+".
>
> Example:
>
> +name=DAN
> +email=dan
wavefront.ca
> -notes=
> id=1
>
> The first 2 are required and will be updated, the 3rd is optional and
> will
> be updated and the 4th (id) is simply passed as form data.
>
> The idea here is that I parse the $_POST variable to auto create a
> "UPDATE
> table SET name = 'Dan', email = 'dan
wavefront.ca' WHERE = 1" string
> for
> MySQL.
>
> The issue is that if I use the "+" to indicate a required field for
> error
> trapping my $_POST array ends up like this:
>
> +namD=AN
> +emaild=an
wavefront.ca
> -notes=
> id=1
>
> Either this is a PHP / HTTP bug or I am up against some strange post
> naming
> restriction. I searched the web, the PHP site (includeing the bugs)
> and
> could not spot an obvious reference.
>
> Any ideas out there?
>
> Dan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
attached mail follows:
Hello Edwin,
What do you mean by "SQL injection"...?
Thanks,
Dan
On Sunday, October 27, 2002, at 01:01 AM,
Edwin wrote:
> Hello,
>
> Are you sure you want to do something like this?
>
> This seems like a good candidate for an "SQL injection"...
>
> (Well, I'm not really sure how you're doing it so I could be wrong.)
>
> Just wondering...
>
> - E
>
> "Dan Tappin" <dan
wavefront.ca> wrote:
>
>> I have a simple method of creating easy form processing.... I
>> thought....
>>
>> I came up with the idea (I am not claiming to be the first) to have
>> form
>> elements I want to update via MySQL starting with either "-" or "+".
>>
>> Example:
>>
>> +name=DAN
>> +email=dan
wavefront.ca
>> -notes=
>> id=1
>>
>> The first 2 are required and will be updated, the 3rd is optional and
>> will
>> be updated and the 4th (id) is simply passed as form data.
>>
>> The idea here is that I parse the $_POST variable to auto create a
>> "UPDATE
>> table SET name = 'Dan', email = 'dan
wavefront.ca' WHERE = 1" string
>> for
>> MySQL.
>>
>> The issue is that if I use the "+" to indicate a required field for
>> error
>> trapping my $_POST array ends up like this:
>>
>> +namD=AN
>> +emaild=an
wavefront.ca
>> -notes=
>> id=1
>>
>> Either this is a PHP / HTTP bug or I am up against some strange post
> naming
>> restriction. I searched the web, the PHP site (includeing the bugs)
>> and
>> could not spot an obvious reference.
>>
>> Any ideas out there?
>>
>> Dan
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
attached mail follows:
On Sun, Oct 27, 2002 at 11:18:28PM -0700, Dan Tappin wrote: > What do you mean by "SQL injection"...?
Well, to use your example of updating a user record, what if they added form variables?
+admin=1 +paid_until=2102 +balance=1000000000
Of course, not all will be applicable, but there's almost certainly fields in your tables you don't want the entire world editing.
attached mail follows:
Hello Dan,
I'm sure you can google for it. Try:
sql injection
as your keyword.
You'll find many interesting articles about it.
Like this: (found at the end of "results" page)
http://www.webmasterbase.com/article/794
HTH,
- E
"Dan Tappin" <dan
wavefront.ca> wrote:
> Hello Edwin, > > What do you mean by "SQL injection"...? > ...[snip]...
attached mail follows:
Hallo,
does anybody know a class or function (or module) in php to do some simple digital watermarking or steganoraphie. Perhaps in combination with the image functions?
Thanks in advance, Tom
attached mail follows:
You only have a difference into your insert query
like this : insert into table (x,y,z) values(x,y) ..
"Miguel BráS" <molino26
netcabo.pt> a écrit dans le message de news:
20021028024014.6720.qmail
pb1.pair.com...
> Hi guys,
>
> I was doing a script to insert data on a table, and the following message
> appeared me when testing the form for data insertion:
> Column count doesn't match value count at row 1
>
> I lsaw the PHP manual and some other resources that I have, but couldn't
> find anything about it...
>
> Any hint from someone??
>
> Cheers
> Miguel
>
>
attached mail follows:
Just curious if anyone out there knows how to do a "Please wait" type screen while the script is running in the background.. Like say PHP is doing a large select from a database, while the user waits for the script I'd like a graphic or something saying to wait...
Any ideas?
attached mail follows:
Hello,
"James Taylor" <jtx
hatesville.com> wrote:
> Just curious if anyone out there knows how to do a "Please wait" type
screen
> while the script is running in the background.. Like say PHP is doing a
> large select from a database, while the user waits for the script I'd like
a
> graphic or something saying to wait...
>
> Any ideas?
I'm sure something like this was discussed many times recently.
Check the archives:
http://marc.theaimsgroup.com/?l=php-general
And search for:
"progress bar"
or,
"animated gifs"
or any keyword that you think is relevant.
HTH,
- E
attached mail follows:
Here is an example that might help get you started:
http://shiflett.org/tutorials/php_flush.txt
James Taylor wrote:
>Just curious if anyone out there knows how to do a "Please wait" type screen >while the script is running in the background.. Like say PHP is doing a >large select from a database, while the user waits for the script I'd like a >graphic or something saying to wait... > >Any ideas? > > > >
attached mail follows:
hi,
How do you refresh a php page , from within your code. i know that asp uses somthing buffer and expire = 0 or something.
How do i test if a browser supports cookies or not?
When i post a form and i push back , there is an page has expired message - why does it happen + what does it mean?
Thanks
Shaun
attached mail follows:
Hi Shaun,
> How do you refresh a php page , from within your code.
<a href="<?=$PHP_SELF?>">click here to refresh</a> :-)
You can't directly refresh a page with PHP (you can use Javascript though, or a meta refresh tag).
> How do i test if a browser supports cookies or not?
You asked this a couple of days ago, so I'll copy and paste the answer:
> > how can i test if a browser supports cookies > Try and set one on page A, and then read it on page B. > If it's not there, the browser doesn't support cookies.
Shout if that's not clear.
> When i post a form and i push back , there is an page has > expired message - why does it happen + what does it mean?
It happens because the page that you're going back to was the result of you POSTing a form. The only way for your browser to get this page is to resubmit all the POST data, and it won't do that unless you ask (by clicking "Refresh").
If you don't want this to happen, use GET instead of POST for your form.
Cheers Jon
attached mail follows:
It doesn't work with $_POST and it doesn't work with $_GET...
actually I thought there is no difference between the values in $_POST and $_REQUEST
Does the example work on your box?
Heiko
Rick Emery wrote:
> use $_POST, not $_REQUEST
> ----- Original Message -----
> From: "Heiko Mundle" <hmundle1
gmx.net>
> To: <php-general
lists.php.net>
> Sent: Friday, October 25, 2002 10:39 AM
> Subject: [PHP] cutted values after posting multiple select list
>
>
> Hi
>
> i struggling with multiple select lists in HTML forms. The resulting
> $_REQUEST array cuts some characters from the values. If the value is
> value="999999" i will get "99" after posting...
>
> my php file:
> *******
> <html><head></head>
> <?php
> echo "{$_SERVER['REQUEST_URI']} <br>";
> echo "First: {$_REQUEST['msel'][0]} <br>";
> echo "Count: " . count($_REQUEST['msel']) . "<br><hr>";
> $i = 0;
> foreach ($_REQUEST['msel'] as $v)
> {
> echo "$i: $v <br>";
> $i++;
> }
> ?>
> <form method="GET" action="<?= $_SERVER['PHP_SELF'] ?>">
> <select name="msel[]" size="6" multiple="multiple">
> <option value="999999">erwin</option>
> <option value="99999">admin</option>
> <option value="9999">hm10</option>
> <option value="999">hm30</option>
> <option value="99">muhe</option>
> <option value="9">hannes</option>
> </select>
> <input type="submit">
> </form>
> </body></html>
> *******
>
> The result after selecting all:
> ********
> /PARAMOUNT/multisel2.php?msel%5B%5D=999999&msel%5B%5D=99999&msel%5B%5D=9999&msel%5B%5D=999
> &msel%5B%5D=99&msel%5B%5D=9
>
> First: 99
> Count: 6
>
> --------------------------------------------------------------------------------
> 0: 99
> 1: 9
> 2:
> 3: 999
> 4: 99
> 5: 9
> ********
>
> MY system:
> PHP Version 4.2.3
> Apache/1.3.26
> SuSE Linux 8.1
>
> When I use the same php file on a MS windows apache, it works
>
> Regards Heiko
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
attached mail follows:
Hi The manual states:
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = explode(" ", $pizza);
So, if I want to be able to echo piece1 to the screen at a later stage, I would go:
echo $pieces[0];
or $first_piece = $pieces[0]; echo $first_piece;
Right?
Just want to make sure I understand it before I try to use it...
attached mail follows:
Petre Agenbag wrote: > Hi > The manual states: > > $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; > $pieces = explode(" ", $pizza); > > So, if I want to be able to echo piece1 to the screen at a later > stage, I would go: > > echo $pieces[0]; > > or > $first_piece = $pieces[0]; > echo $first_piece; > > Right?
Right!
Grtz Erwin
attached mail follows:
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
attached mail follows:
"undefined function" means PHP doesn't know where to get the function from. You probably didn't configure oci_8 libraries correctly. Try phpinfo(), and see under the configuration. Check whether oci8 is available.
Regards Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: php-general
lists.php.net
Subject: [PHP] error connecting to oracle.
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
______________________________________
attached mail follows:
I checked up phpinfo(). It does not have oracle listed. What do I need to do now?
Subodh Gupta Tata Consultancy Services.
"Faisal
Abdullah" To: "Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error connecting to oracle.
28/10/2002
03:21 PM
"undefined function" means PHP doesn't know where to get the function from. You probably didn't configure oci_8 libraries correctly. Try phpinfo(), and see under the configuration. Check whether oci8 is available.
Regards Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: php-general
lists.php.net
Subject: [PHP] error connecting to oracle.
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
______________________________________
attached mail follows:
Where was it listed? In the 'configure command' section? Or the 'configuration' section? If its available in the 'configure command' ONLY, doesn't mean that its working properly.
Also, check the following:
1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll file is
2. Modify php.ini file for enable oci8 extension. Uncomment the php_oci8.dll line in c:\winnt\php.ini ;extension=php_mssql.dll extension=php_oci8.dll ;extension=php_openssl.dll
3. Edit extension_dir Location ; Directory in which the loadable extensions (modules) reside. extension_dir = "D:\PHP\extensions" // change this to whatever your extention directory is.
Regards, Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; php-general
lists.php.net
Subject: RE: [PHP] error connecting to oracle.
I checked up phpinfo(). It does not have oracle listed. What do I need to do now?
Subodh Gupta Tata Consultancy Services.
"Faisal
Abdullah" To: "Subodh Gupta"
<Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM
"undefined function" means PHP doesn't know where to get the function from. You probably didn't configure oci_8 libraries correctly. Try phpinfo(), and see under the configuration. Check whether oci8 is available.
Regards Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: php-general
lists.php.net
Subject: [PHP] error connecting to oracle.
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php______________________________________
attached mail follows:
Hello,
at Solaris and Windows NT it's first necessary to install the Oracle Client software and then to configure PHP properly the way it is documented! I've done until know only three PHP installations with Oracle support but all three installations where very simple!
Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE, $ORACLE_HOME, $TNS<xyz>) before starting the WEB Server or PHP! For apchache you can do this in apachectl or a subroutine you call from apachectl. In a windows environment you have to set the variables with the appropriate tools (System/Environment/Add Variables)!
In my cases this was everything to do. Try your Oracle Client Installation with tnsping and sqlplus at your machine! This should work before you try to configure PHP.
best regards Gerald
attached mail follows:
Heh..i just noticed something on your error:
>Call to undefined function: ora_logon() in c:\program >files\apache group\apache\htdocs\one.php on line 5
If you've configured OCI8, use: ocilogon("scott","tiger",$db);
instead of ora_logon();
Regards, Faisal
-----Original Message-----
From: Faisal Abdullah [mailto:faisal
magnifix.com.my]
Sent: Monday, October 28, 2002 6:13 PM
To: Subodh Gupta; php-general
lists.php.net
Subject: RE: [PHP] error connecting to oracle.
Where was it listed? In the 'configure command' section? Or the 'configuration' section? If its available in the 'configure command' ONLY, doesn't mean that its working properly.
Also, check the following:
1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll file is
2. Modify php.ini file for enable oci8 extension. Uncomment the php_oci8.dll line in c:\winnt\php.ini ;extension=php_mssql.dll extension=php_oci8.dll ;extension=php_openssl.dll
3. Edit extension_dir Location ; Directory in which the loadable extensions (modules) reside. extension_dir = "D:\PHP\extensions" // change this to whatever your extention directory is.
Regards, Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; php-general
lists.php.net
Subject: RE: [PHP] error connecting to oracle.
I checked up phpinfo(). It does not have oracle listed. What do I need to do now?
Subodh Gupta Tata Consultancy Services.
"Faisal
Abdullah" To: "Subodh Gupta"
<Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM
"undefined function" means PHP doesn't know where to get the function from. You probably didn't configure oci_8 libraries correctly. Try phpinfo(), and see under the configuration. Check whether oci8 is available.
Regards Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: php-general
lists.php.net
Subject: [PHP] error connecting to oracle.
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________
attached mail follows:
There is no entry of oracle in any section. The rest of things which you have pointed out are already in place.
How do I go aheadnow?
Subodh Gupta
"Faisal
Abdullah" To: "Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error connecting to oracle.
28/10/2002
03:42 PM
Where was it listed? In the 'configure command' section? Or the 'configuration' section? If its available in the 'configure command' ONLY, doesn't mean that its working properly.
Also, check the following:
1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll file is
2. Modify php.ini file for enable oci8 extension. Uncomment the php_oci8.dll line in c:\winnt\php.ini ;extension=php_mssql.dll extension=php_oci8.dll ;extension=php_openssl.dll
3. Edit extension_dir Location ; Directory in which the loadable extensions (modules) reside. extension_dir = "D:\PHP\extensions" // change this to whatever your extention directory is.
Regards, Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:35 PM
To: Faisal Abdullah; php-general
lists.php.net
Subject: RE: [PHP] error connecting to oracle.
I checked up phpinfo(). It does not have oracle listed. What do I need to do now?
Subodh Gupta Tata Consultancy Services.
"Faisal
Abdullah" To: "Subodh Gupta"
<Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error
connecting to oracle.
28/10/2002
03:21 PM
"undefined function" means PHP doesn't know where to get the function from. You probably didn't configure oci_8 libraries correctly. Try phpinfo(), and see under the configuration. Check whether oci8 is available.
Regards Faisal
-----Original Message-----
From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
Sent: Monday, October 28, 2002 5:18 PM
To: php-general
lists.php.net
Subject: [PHP] error connecting to oracle.
Hi all,
I get the following error while trying to connect to oracle. Please help me.
Fatal error: Call to undefined function: ora_logon() in c:\program files\apache group\apache\htdocs\one.php on line 5
Subodh Gupta Tata Consultancy Services.
______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
If its not there, than I only see these possibilities:
1. You have not placed the correct dll's in the correct location. 2. You have not edited php.ini to in the extension section for oci8 3. You have not restarted apache after performing item [2] above
Regards, Faisal
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:56 PM
> To: Faisal Abdullah; php-general
lists.php.net
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> There is no entry of oracle in any section.
> The rest of things which you have pointed out are already in place.
>
> How do I go aheadnow?
>
> Subodh Gupta
>
>
>
>
>
>
> "Faisal
>
> Abdullah" To: "Subodh Gupta"
> <Subodh.Gupta
seepz.tcs.co.in>,
> <faisal
magnif
> <php-general
lists.php.net>
> ix.com.my> cc:
>
> Subject: RE: [PHP]
> error connecting to oracle.
> 28/10/2002
>
> 03:42 PM
>
>
>
>
>
>
>
>
>
> Where was it listed?
> In the 'configure command' section? Or the 'configuration' section?
> If its available in the 'configure command' ONLY, doesn't mean that its
> working properly.
>
> Also, check the following:
>
>
> 1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your dll
> file is
>
> 2. Modify php.ini file for enable oci8 extension.
> Uncomment the php_oci8.dll line in c:\winnt\php.ini
> ;extension=php_mssql.dll
> extension=php_oci8.dll
> ;extension=php_openssl.dll
>
> 3. Edit extension_dir Location
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "D:\PHP\extensions" // change this to whatever your
> extention directory is.
>
> Regards,
> Faisal
>
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:35 PM
> To: Faisal Abdullah; php-general
lists.php.net
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> I checked up phpinfo(). It does not have oracle listed. What do
> I need to
> do now?
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
>
>
> "Faisal
> Abdullah" To: "Subodh Gupta"
> <Subodh.Gupta
seepz.tcs.co.in>,
> <faisal
magnif <php-general
lists.php.net>
> ix.com.my> cc:
> Subject: RE: [PHP] error
> connecting to oracle.
> 28/10/2002
> 03:21 PM
>
>
>
>
>
>
> "undefined function" means PHP doesn't know where to get the
> function from.
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
>
> Regards
> Faisal
>
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:18 PM
> To: php-general
lists.php.net
> Subject: [PHP] error connecting to oracle.
>
>
>
> Hi all,
>
> I get the following error while trying to connect to oracle. Please help
> me.
>
> Fatal error: Call to undefined function: ora_logon() in c:\program
> files\apache group\apache\htdocs\one.php on line 5
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
> ______________________________________
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ______________________________________
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________
attached mail follows:
>
>
> > -----Original Message-----
> > From: Gerald Roehrbein/Pctdmn [mailto:groehrbein
bigfoot.com]
> > Sent: Monday, October 28, 2002 10:50 AM
> > To: Subodh Gupta
> > Cc: php-general
lists.php.net
> > Subject: RE: [PHP] error connecting to oracle.
> >
> >
> >
> > Hello,
> >
> >
> > at Solaris and Windows NT it's first necessary to install the
> > Oracle Client
> > software
I think this goes for all operating systems. The libraries required are in oracle itself. No oracle, no libraries.
> >and then to configure PHP properly the way it is documented! > > I've done until know only three PHP installations with Oracle > support but > > all three installations where very simple! > > > > Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE, > > $ORACLE_HOME, $TNS<xyz>) before starting the WEB Server or PHP! For > > apchache you can do this in apachectl or a subroutine you call from > > apachectl.
Be sure to set the appropriate user and group (who has the environment variables set) in httpd.conf
> >In a windows environment you have to set the variables > > with the > > appropriate tools (System/Environment/Add Variables)! > > > > In my cases this was everything to do. Try your Oracle Client > > Installation > > with tnsping and sqlplus at your machine! This should work > before you try > > to configure PHP. > > > > best regards > > Gerald > > > Regards, Faisal
______________________________________
attached mail follows:
I have checked that all my dll's are in c:\winnt\system32 directory. Further I have un-commented the requisite lines from php.ini and as you said, restarted my apache server after doing all this. Still the problem persists.
Subodh Gupta
"Faisal
Abdullah" To: "Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in>,
<faisal
magnif <php-general
lists.php.net>
ix.com.my> cc:
Subject: RE: [PHP] error connecting to oracle.
28/10/2002
04:00 PM
If its not there, than I only see these possibilities:
1. You have not placed the correct dll's in the correct location. 2. You have not edited php.ini to in the extension section for oci8 3. You have not restarted apache after performing item [2] above
Regards, Faisal
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:56 PM
> To: Faisal Abdullah; php-general
lists.php.net
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> There is no entry of oracle in any section.
> The rest of things which you have pointed out are already in place.
>
> How do I go aheadnow?
>
> Subodh Gupta
>
>
>
>
>
>
> "Faisal
>
> Abdullah" To: "Subodh Gupta"
> <Subodh.Gupta
seepz.tcs.co.in>,
> <faisal
magnif
> <php-general
lists.php.net>
> ix.com.my> cc:
>
> Subject: RE: [PHP]
> error connecting to oracle.
> 28/10/2002
>
> 03:42 PM
>
>
>
>
>
>
>
>
>
> Where was it listed?
> In the 'configure command' section? Or the 'configuration' section?
> If its available in the 'configure command' ONLY, doesn't mean that its
> working properly.
>
> Also, check the following:
>
>
> 1.Copy d:\php\php4ts.dll to c:\winnt\system32 // depends on where your
dll
> file is
>
> 2. Modify php.ini file for enable oci8 extension.
> Uncomment the php_oci8.dll line in c:\winnt\php.ini
> ;extension=php_mssql.dll
> extension=php_oci8.dll
> ;extension=php_openssl.dll
>
> 3. Edit extension_dir Location
> ; Directory in which the loadable extensions (modules) reside.
> extension_dir = "D:\PHP\extensions" // change this to whatever your
> extention directory is.
>
> Regards,
> Faisal
>
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:35 PM
> To: Faisal Abdullah; php-general
lists.php.net
> Subject: RE: [PHP] error connecting to oracle.
>
>
>
> I checked up phpinfo(). It does not have oracle listed. What do
> I need to
> do now?
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
>
>
> "Faisal
> Abdullah" To: "Subodh Gupta"
> <Subodh.Gupta
seepz.tcs.co.in>,
> <faisal
magnif <php-general
lists.php.net>
> ix.com.my> cc:
> Subject: RE: [PHP] error
> connecting to oracle.
> 28/10/2002
> 03:21 PM
>
>
>
>
>
>
> "undefined function" means PHP doesn't know where to get the
> function from.
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
>
> Regards
> Faisal
>
> -----Original Message-----
> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
> Sent: Monday, October 28, 2002 5:18 PM
> To: php-general
lists.php.net
> Subject: [PHP] error connecting to oracle.
>
>
>
> Hi all,
>
> I get the following error while trying to connect to oracle. Please help
> me.
>
> Fatal error: Call to undefined function: ora_logon() in c:\program
> files\apache group\apache\htdocs\one.php on line 5
>
> Subodh Gupta
> Tata Consultancy Services.
>
>
> ______________________________________
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> ______________________________________
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Enable oci8 extension
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
"Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in> wrote... :
> > I checked up phpinfo(). It does not have oracle listed. What do I need to > do now? > > Subodh Gupta > Tata Consultancy Services. > > > > > "Faisal > Abdullah" To: "Subodh Gupta" <Subodh.Gupta
seepz.tcs.co.in>, > <faisal
magnif <php-general
lists.php.net> > ix.com.my> cc: > Subject: RE: [PHP] error connecting to oracle. > 28/10/2002 > 03:21 PM > > > > > > > "undefined function" means PHP doesn't know where to get the function from. > You probably didn't configure oci_8 libraries correctly. > Try phpinfo(), and see under the configuration. > Check whether oci8 is available. > > Regards > Faisal > > -----Original Message----- > From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in] > Sent: Monday, October 28, 2002 5:18 PM > To: php-general
lists.php.net > Subject: [PHP] error connecting to oracle. > > > > Hi all, > > I get the following error while trying to connect to oracle. Please help > me. > > Fatal error: Call to undefined function: ora_logon() in c:\program > files\apache group\apache\htdocs\one.php on line 5 > > Subodh Gupta > Tata Consultancy Services. > > > ______________________________________ > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
> -----Original Message-----
> From: Faisal Abdullah [mailto:faisal
magnifix.com.my]
> Sent: 28 October 2002 09:51
> To: Subodh Gupta; php-general
lists.php.net
> Subject: RE: [PHP] error connecting to oracle.
>
>> -----Original Message-----
>> From: Subodh Gupta [mailto:Subodh.Gupta
seepz.tcs.co.in]
>> Sent: Monday, October 28, 2002 5:18 PM
>>
>> I get the following error while trying to connect to oracle.
>> Please help
>> me.
>>
>> Fatal error: Call to undefined function: ora_logon() in c:\program
>> files\apache group\apache\htdocs\one.php on line 5>
>> "undefined function" means PHP doesn't know where to get the
>> function from.
>
> You probably didn't configure oci_8 libraries correctly.
> Try phpinfo(), and see under the configuration.
> Check whether oci8 is available.
Look out! You've got your Oracle libraries in a twist. The oci8 library supports the OCI* functions; the oracle library supports the ora_* functions. OCI is generally considered to be a better interface, and should probably be used by preference with Oracle version 7 and upwards.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford
lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
attached mail follows:
When one uncomments oci8 extension in PHP.INI, then restarts apache, you get an error on Apache's start-up which will mean your dll is not forund, or there are no oci.h lib (wrong $ORACLE_HOME dir, or there is no client at all... whichever) but, if no errors on Apache start were given to you, just type:
OCILogOn($schema, $pass, $listener);
And you should NOT have "undefined function" error enymore. If you do - you got no client, if you don't you got things working well from the PHP-Oracle side.
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Gerald Roehrbein/Pctdmn<groehrbein
bigfoot.com> wrote... :
> > Hello, > > > at Solaris and Windows NT it's first necessary to install the Oracle Client > software and then to configure PHP properly the way it is documented! > I've done until know only three PHP installations with Oracle support but > all three installations where very simple! > > Remember you have to set the Oracle Environmentvariables ($ORACLE_BASE, > $ORACLE_HOME, $TNS<xyz>) before starting the WEB Server or PHP! For > apchache you can do this in apachectl or a subroutine you call from > apachectl. In a windows environment you have to set the variables with the > appropriate tools (System/Environment/Add Variables)! > > In my cases this was everything to do. Try your Oracle Client Installation > with tnsping and sqlplus at your machine! This should work before you try > to configure PHP. > > best regards > Gerald > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
"Ford, Mike [LSS]" <M.Ford
lmu.ac.uk> wrote... :
> Look out! You've got your Oracle libraries in a twist. The oci8 > library supports the OCI* functions; the oracle library supports the > ora_* functions. OCI is generally considered to be a better interface, > and should probably be used by preference with Oracle version 7 and > upwards.
That is correct.
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
attached mail follows:
the best way to do password validation is using one way encryption (e.g. MySQL PASSWORD() function). That way you check the encrypted user entered password against the database ...
" ... WHERE pass = PASSWORD('{$_POST["password"]}')"
Tim Ward www.chessish.com
> -----Original Message-----
> From: Mr. BuNgL3 [mailto:mrbungle
netcabo.pt]
> Sent: 27 October 2002 10:51
> To: php-general
lists.php.net
> Subject: newbie: php/mysql
>
>
> Hey...
> I have a little problem... i want to read an encrypted field
> from mysql
> database to a php variable... what is the code line that i
> must enter? (ex:
> password validation in a login form)
> Thanks...
>
>
>
attached mail follows:
The usual way of doing logins with encrypted/hashed passwords is
adding new user into the table: INSERT users SET username='$_POST[username]', password=MD5('$_POST[pwd]');
checking if username/password match: SELECT * FROM users WHERE username='$_POST[username]' AND password=MD5('$_POST[pwd]');
hashed passwords cannot be decrypted
Mr. BuNgL3 wrote:
>Hey... >I have a little problem... i want to read an encrypted field from mysql >database to a php variable... what is the code line that i must enter? (ex: >password validation in a login form) >Thanks... > > > > >
attached mail follows:
Hello,
it's possible that attribute that have to use during an add do not exist.
For example from core.schema a programmer can retrieve information of the attribute that must exist for a objectclass and the attributes that can given for a class like person. As an example of an entry of the slapd core.schema have a look at the next three lines:
------from SLAPD core.schema------- objectclass ( 2.5.6.6 NAME 'person' SUP top STRUCTURAL MUST ( sn $ cn ) MAY ( userPassword $ telephoneNumber $ seeAlso $ description ) ) ---------------------------------------------------
A programmer of SLAPD have to know all of the attributes and dependencies of the schema directory and in special cases a programmer can modify the schema to fit for special purpose. When using Netscape Directory Server slapd configuration is a little bit easier because Netscape developed a good HTML based admin interface that allows to have a simple look at the object structure and to add, modify or delete everything in the LDAP schema.
Hope ist helps.
Best regards Gerald
attached mail follows:
> I get the following error:
> Warning: LDAP: add operation could not be completed. in > /var/www/html/user/adduser_p.php on line 65
> Where in my log files can I go to look for more detailed info on that error, > I don't know if I have logging enabled for slapd.
1. after ldap_add print ldap_error 2. Problems: 2a: access rights 2b: Wrong objectclass: sure you add it with right values: all attrubites include in class in objectclass.
-- Krzysztof Dziekiewicz
attached mail follows:
Hi All,
I would like to be able to do a serach and replace in a HTML document. For a list of words;
for example: hello become buongiorno yes becomes si size become grossezza
The problem is that if I change the word "size" without considering html tags and html comments in the case of inline javascripts I'll end up with "broken" html.
Is there a way to only do the search and replace outside the tags and comments.
It is further complicated by the fact that I would still like to do the replacements within strings for example within meta tags!
Any ideas.
Henry
attached mail follows:
What; nobody has anything to say about parsing HTML and doing search and replaces!! Is there another news group that might be better suited? I do want to do it PHP if I hadn't made that clear.
Somebody, anybody, please help.
"Henry" <henry
teacake.f9.co.uk> wrote in message
news:20021028103849.2175.qmail
pb1.pair.com...
> Hi All,
>
> I would like to be able to do a serach and replace in a HTML document. For
a
> list of words;
>
> for example:
> hello become buongiorno
> yes becomes si
> size become grossezza
>
> The problem is that if I change the word "size" without considering html
> tags and html comments in the case of inline javascripts I'll end up with
> "broken" html.
>
> Is there a way to only do the search and replace outside the tags and
> comments.
>
> It is further complicated by the fact that I would still like to do the
> replacements within strings for example within meta tags!
>
> Any ideas.
>
> Henry
>
>
attached mail follows:
[snip] What; nobody has anything to say about parsing HTML and doing search and replaces!! Is there another news group that might be better suited? I do want to do it PHP if I hadn't made that clear.
Somebody, anybody, please help. [/snip]
What? No one wants to help someone who didn't search the manual for regular expressions? Things like eregi_replace()?
RTFM, this is very basic.
Having a bad day in Texas... :^[ *grrr*
Jay
attached mail follows:
Thanks Jay, I am still a newbie and I will read the manual, thankyou for the help.
Having an OK day in the UK ..... mmmmmmmm
Henry
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:003f01c27e93$87bc1da0$8102a8c0
000347D72515...
> [snip]
> What; nobody has anything to say about parsing HTML and doing search and
> replaces!! Is there another news group that might be better suited? I do
> want to do it PHP if I hadn't made that clear.
>
> Somebody, anybody, please help.
> [/snip]
>
> What? No one wants to help someone who didn't search the manual for
regular
> expressions? Things like eregi_replace()?
>
> RTFM, this is very basic.
>
> Having a bad day in Texas... :^[ *grrr*
>
> Jay
>
>
attached mail follows:
The tools for you to execute the regular expression are there for you in the manual. The actual regular expression that you're looking for is not a php issue. And I can't say that I'm totally convinced that you're still not trying to circumvent google's TOS.
Henry wrote:
> What; nobody has anything to say about parsing HTML and doing search and
> replaces!! Is there another news group that might be better suited? I do
> want to do it PHP if I hadn't made that clear.
>
> Somebody, anybody, please help.
>
> "Henry" <henry
teacake.f9.co.uk> wrote in message
> news:20021028103849.2175.qmail
pb1.pair.com...
>
>>Hi All,
>>
>>I would like to be able to do a serach and replace in a HTML document. For
>
> a
>
>>list of words;
>>
>>for example:
>>hello become buongiorno
>>yes becomes si
>>size become grossezza
>>
>>The problem is that if I change the word "size" without considering html
>>tags and html comments in the case of inline javascripts I'll end up with
>>"broken" html.
>>
>>Is there a way to only do the search and replace outside the tags and
>>comments.
>>
>>It is further complicated by the fact that I would still like to do the
>>replacements within strings for example within meta tags!
>>
>>Any ideas.
>>
>>Henry
>>
>>
>
>
>
>
attached mail follows:
[snip] Thanks Jay, I am still a newbie and I will read the manual, thankyou for the help.
Having an OK day in the UK ..... mmmmmmmm [/snip]
Henry your questions will get answered more quickly and accurately when you provide
a. A clear explanation of the problem at hand 2. Proof that you have done some research on your own (show your work) [RTFM or STFW]
Coming back with a "What..!!" will get you squat, it is insulting to those who are here to help. Also your original post was about 4:30AM and your follow-up "What..!!" was at 9AM ... on a <em>Monday</em> morning. Think aboout that for a second.
HTH!
Jay
attached mail follows:
Dear Jay,
I have now had a look in the FM and whilst it does help if you know how to use regular expressions I think that you are being a little disingenuous. Having to parse the HTML is more complicated than is suggest in your reply. If it is so simple perhaps you might spend 5 minutes generating the regular expression to use that will ignore the contents of tags save for the contents of quotes within meta tags and do the replace for an associative array of mappings.
Hope your day is getting better in Texas.
Henry
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:003f01c27e93$87bc1da0$8102a8c0
000347D72515...
> [snip]
> What; nobody has anything to say about parsing HTML and doing search and
> replaces!! Is there another news group that might be better suited? I do
> want to do it PHP if I hadn't made that clear.
>
> Somebody, anybody, please help.
> [/snip]
>
> What? No one wants to help someone who didn't search the manual for
regular
> expressions? Things like eregi_replace()?
>
> RTFM, this is very basic.
>
> Having a bad day in Texas... :^[ *grrr*
>
> Jay
>
>
attached mail follows:
I did a search and I remebered that I have previously seen some of your work. In particlar your guide to CMS in evolt.org. Which I think is absolutely wonderful. Thankyou for your help and I hope that I haven't gone to far with my disingenuous comment posting.
I hadn't appreciated the time difference and do appreciate your help.
Thankyou.
Henry
"Jay Blanchard" <jay.blanchard
niicommunications.com> wrote in message
news:004001c27e95$1c4d2580$8102a8c0
000347D72515...
> [snip]
> Thanks Jay, I am still a newbie and I will read the manual, thankyou for
the
> help.
>
> Having an OK day in the UK ..... mmmmmmmm
> [/snip]
>
> Henry your questions will get answered more quickly and accurately when
you
> provide
>
> a. A clear explanation of the problem at hand
> 2. Proof that you have done some research on your own (show your work)
[RTFM
> or STFW]
>
> Coming back with a "What..!!" will get you squat, it is insulting to those
> who are here to help. Also your original post was about 4:30AM and your
> follow-up "What..!!" was at 9AM ... on a <em>Monday</em> morning. Think
> aboout that for a second.
>
> HTH!
>
> Jay
>
>
attached mail follows:
Hi Henry,
> If it is so simple perhaps you might spend 5 > minutes generating the regular expression to > use that will ignore the contents of tags save > for the contents of quotes within meta tags and > do the replace for an associative array of mappings.
http://google.com/search?q=regex+search+replace+outside+html+tags might be a good way for you to pass the time while you're waiting for Jay to write your program ;-)
Cheers Jon
attached mail follows:
I assure you that I am not trying to circumvent google's anything. I'm trying to provide a HTML translation page tool for some of my visitors where they will provide there own URL and a translation of some keywords will be done for them. Thats all.
I never actually was going to flaunt googles terms and conditions and after the replys from Rasmus I went away and looked into the mater. I agree whole heartedly with what Rasmus and others said and will not be circumventing APIs under any circumstance.
Henry
"John Nichel" <jnichel
by-tor.com> wrote in message
news:3DBD546D.3000500
by-tor.com...
> The tools for you to execute the regular expression are there for you in
> the manual. The actual regular expression that you're looking for is
> not a php issue. And I can't say that I'm totally convinced that you're
> still not trying to circumvent google's TOS.
>
> Henry wrote:
> > What; nobody has anything to say about parsing HTML and doing search and
> > replaces!! Is there another news group that might be better suited? I do
> > want to do it PHP if I hadn't made that clear.
> >
> > Somebody, anybody, please help.
> >
> > "Henry" <henry
teacake.f9.co.uk> wrote in message
> > news:20021028103849.2175.qmail
pb1.pair.com...
> >
> >>Hi All,
> >>
> >>I would like to be able to do a serach and replace in a HTML document.
For
> >
> > a
> >
> >>list of words;
> >>
> >>for example:
> >>hello become buongiorno
> >>yes becomes si
> >>size become grossezza
> >>
> >>The problem is that if I change the word "size" without considering html
> >>tags and html comments in the case of inline javascripts I'll end up
with
> >>"broken" html.
> >>
> >>Is there a way to only do the search and replace outside the tags and
> >>comments.
> >>
> >>It is further complicated by the fact that I would still like to do the
> >>replacements within strings for example within meta tags!
> >>
> >>Any ideas.
> >>
> >>Henry
> >>
> >>
> >
> >
> >
> >
>
>
attached mail follows:
What?!? You're not awake at 4:30 in the morning writing code?!? I think the commitee will have to reconsider your geek club membership. :)
Jay Blanchard wrote: > [snip] > Thanks Jay, I am still a newbie and I will read the manual, thankyou for the > help. > > Having an OK day in the UK ..... mmmmmmmm > [/snip] > > Henry your questions will get answered more quickly and accurately when you > provide > > a. A clear explanation of the problem at hand > 2. Proof that you have done some research on your own (show your work) [RTFM > or STFW] > > Coming back with a "What..!!" will get you squat, it is insulting to those > who are here to help. Also your original post was about 4:30AM and your > follow-up "What..!!" was at 9AM ... on a <em>Monday</em> morning. Think > aboout that for a second. > > HTH! > > Jay > > >
attached mail follows:
[snip] I did a search ... [/snip]
My apologies Henry, I had just received a piece of disturbing news along with starting my Monday at 4:30 CST with some database server problems. You just happened to get in the line of fire.
Start with the regular expression functions in PHP. Once you have an understanding of how they work you will start to figure it out. You will be a better programmer for it. Once you have started to assemble your code, post it with questions about the how's and why's. Most folks on this list who are here to help will not take the "5 minutes" to write an untested piece of code for you. They will attempt to point you in a particular direction and teach you how to do it.
Jay
attached mail follows:
[snip] What?!? You're not awake at 4:30 in the morning writing code?!? I think the commitee will have to reconsider your geek club membership. :) [/snip]
How do you think that I knew the original post came in at that time? ROFLMAO. Go ahead ....revoke my Geek Club card, the discounts no longer work! :^]
Jay
attached mail follows:
Hei!
Ühel ilusal päeval [27-10-2002 21:27] kirjutas Nick Eby: > I'm running oracle 8.1.7 w/ php 4.2. I use the oci8 functions to update > clob columns, and maybe 1 out of every 15 or 20 times, updating a clob > column causes the mysterious "ora-600, internal error code". Anybody out > there experienced this (and hopefully resolved it) who can shed some light? > thanks
I'm afraid, the ora-600 errors mean "Call Oracle". You should examine your Oracle server trace file and search the Oracle's Metalink support page, perhaps an obvious solution can be found. The ora-600 internal error is some kind of trap for errors, that shouldn't be occuring. This error can have very different reasons from slightly bad things to very disastrous anomalies. Call support.
Juhan
attached mail follows:
What's the Oracle version?
OCIServerVersion($stmt);
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
Juhan Kundla <juhan.kundla
email.ee> wrote... :
> Hei! > > Ühel ilusal päeval [27-10-2002 21:27] kirjutas Nick Eby: > > I'm running oracle 8.1.7 w/ php 4.2. I use the oci8 functions to update > > clob columns, and maybe 1 out of every 15 or 20 times, updating a clob > > column causes the mysterious "ora-600, internal error code". Anybody out > > there experienced this (and hopefully resolved it) who can shed some light? > > thanks > > I'm afraid, the ora-600 errors mean "Call Oracle". You should examine > your Oracle server trace file and search the Oracle's Metalink support > page, perhaps an obvious solution can be found. The ora-600 internal > error is some kind of trap for errors, that shouldn't be occuring. This > error can have very different reasons from slightly bad things to very > disastrous anomalies. Call support. > > Juhan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
"Maxim Maletsky" <maxim
php.net> wrote in message
news:20021028122405.4F05.MAXIM
php.net...
> What's the Oracle version?
8.1.7
attached mail follows:
Hey there,
We have a class that sets up a tree structure that represents an e-learning object made up of nested "components". We have a function getPropertyValue($name) which returns the property $name for the current component.
Now, we want to allow the user to use something like {parent.property} in a property value, so that it can inherit parts of properties from the parent component. For example: caption = "the name of this component's parent is {parent.name}!"
The following line sort of works: $retVal = preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode->getProper tyValue('\\2').'\\3'",$retVal);
However, if there are more than one string to replace it only works on the last one. So: caption = "the parent's coordinates are ({parent.left}, {parent.top})" would only return something like: "the parent's coordinates are ({parent.left}, 100)"
Hope someone can help.
Thanks
Dan
attached mail follows:
try splitting it first to get several strings into one array, then loop the array and replace its each element concatenating the strings. This is how my mind can process it so far :)
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
"Daniel Pupius" <dan.pupius
actelearning.com> wrote... :
> Hey there, > > We have a class that sets up a tree structure that represents an e-learning > object made up of nested "components". We have a function > getPropertyValue($name) which returns the property $name for the current > component. > > Now, we want to allow the user to use something like {parent.property} in a > property value, so that it can inherit parts of properties from the parent > component. For example: caption = "the name of this component's parent is > {parent.name}!" > > The following line sort of works: > $retVal = > preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode->getProper > tyValue('\\2').'\\3'",$retVal); > > However, if there are more than one string to replace it only works on the > last one. So: > caption = "the parent's coordinates are ({parent.left}, {parent.top})" would > only return something like: "the parent's coordinates are ({parent.left}, > 100)" > > Hope someone can help. > > Thanks > > Dan > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
> The following line sort of works: > $retVal = > preg_replace("/(.*){parent.(.*)}(.*)/e","'\\1'.\$this->parentNode- > >getProper tyValue('\\2').'\\3'",$retVal); > > However, if there are more than one string to replace it only works > on the last one. So: > caption = "the parent's coordinates are ({parent.left}, > {parent.top})" would only return something like: "the parent's > coordinates are ({parent.left}, 100)"
That is because the first (.*) skips the first parent.x pattern. It seems the string is parsed backwards. To avoid this problem, be more specific in your regexp. Don't use (.*), but ([^{]*) instead. The regexp which works in your example is the following:
/([^{]*){parent.([^{]*)}([^{]*)/e
HTH Erwin
attached mail follows:
Hi guys I´d like to know if there is a way for me to browse thru one of mine webpages and dinamicaly change the contents. I mean on the following way:
I´d like to have a php file to read a html document and change some of the words and then show on the net. Thanx, Rodrigo
attached mail follows:
Read about regular expressions.
php.net/pcre
-- Maxim Maletsky maximphp.net
www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home
// my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3
"Rodrigo de Oliveira" <thenewsource
ieg.com.br> wrote... :
> Hi guys I´d like to know if there is a way for me to browse thru one of mine webpages and dinamicaly change the contents. I mean on the following way: > > I´d like to have a php file to read a html document and change some of the words and then show on the net. > Thanx, > Rodrigo
attached mail follows:
I'm sure there are some web based file manegers, check out www.hotscripts.com
For your second problem, check first if you appache is sending the right response. Connect, using telnet, to localhost:80, and write: GET /mp3 HTTP/1.0
(two times enter). Apache should send you "301 Moved Permanently" response and also header "Location: http://localhost/mp3/". If it does, the problem is in your explorer.
eriol wrote:
>I have two very newbie questions.. > >I want to be able to create a directory index view on my local Apache >server other than the default Apache view (similar to Expow, but not as >complex).. Can anyone recommend a simple script that you know of which >can display Name, Type, Size and Modified Date columns as well as allow >users to browse folders/directories and download the files within them? >I was told browsing subdirectories on Win32 machines isn't possible with >PHP, but I've seen it elsewhere (such as using Expow).. > >I assume I could make a simple directory view script myself, but I'm not >familiar enough with PHP to feel comfortable about possible security >issues.. Register globals is off if that has any impact on possible >help.. > >The second question relates to the first, although it's more of an >Apache question.. I hope someone could help me as I assume it'd be an >easy fix, but I don't know what to search for.. I'm running Apache >1.3.27 on WinXP Pro with PHP 4.2.3 locally.. Whether I type in the >SERVER_ADDR IP address, the computer name, localhost or 127.0.0.1, I >still get this following problem.. If I view this: > >http://localhost/mp3/ > >I get the default Apache directory index view.. However, if I view this: > >http://localhost/mp3 (minus the trailing forward slash) > >I can't get a directory listing.. I get the default MSIE error page >similar to no DNS found.. I have most every ErrorDocument number set >correctly and working, but I don't even get an error # or page.. > >Is there something in Apache's httpd.conf that corrects this? I wasn't >sure if the following has anything to do with this.. With my last setup >(Win98/Apache 1.3.26/PHP 4.1.1), I don't remember having the php.exe >Action & ScriptAlias directive there.. As you probably have guessed, I'm >no expert with Apache either.. When I started Apache in the past on my >old setup, it'd start in console and tell me PHP was running as well.. > ><IfModule mod_dir.c> > DirectoryIndex index.html index.o0o index.php > AddType application/x-httpd-php .php .o0o > AddType application/x-httpd-php-source .phps > Action application/x-httpd-php /php/php.exe > ScriptAlias /php/ "D:/Server/PHP/" ></IfModule> > >FYI: It's not a fulltime, always on server by any means, just something >to let friends grab files from me and allows me to locally test php >scripts when I run it.. Any help is appreciated.. TIA.. > >Take care.. peace.. >eriol > > > > >
attached mail follows:
Does anyone know if there is a way to tell if a given file is a valid dbase file, using PHP functions ?
attached mail follows:
Filetypes are usualy recognized by first 4 bytes (or so), so you need to find out what these bytes should be for dbase files
Plamen Slavov wrote:
>Does anyone know if there is a way to tell if a given file is a valid dbase file, using PHP functions ? > >
attached mail follows:
[snip] Lets say you have a statement like: $query = "SELECT * FROM mytable WHERE firstname=$firstname";
And if $firstname is set to: "xyz"; DELETE FROM mytable
Then this is executed as: SELECT* FROM mytable WHERE firstname="xyz";DELETE FROM mytable
This can wipe out your table...a bad thing... [/snip]
Ah! But only if the database user has permissions for DELETE. That is why security must be carefully thought out, because there are so many levels for it to be implemented on.
This has been a great thread, lots of useful information.
Jay
attached mail follows:
I have three functions written which work and I want to only display one of them depending on user input. What is the correct way to code this? I can display all three functions but not one. this is my code: <? include ('products_sc_fns.php'); // The shopping cart needs sessions, so start one session_start(); do_html_header("Checkout"); // if filled out if($cart&&$name&&$address&&$city&&$zip&&$country) { // able to insert into database if( insert_order($HTTP_POST_VARS)!=false ) { //display cart, not allowing changes and without pictures display_cart($cart, false, 0); calculate_weight($cart); //de-bug //echo "test & $country & $express"; display_shipping(calculate_shipping_cost($weight)); display_shipping(calculate_nonfinland_cost($country)); display_shipping(calculate_express_cost($express)); //display_shipping(calculate_temp_shipping_cost($weight)); //get credit card details calculate_final_cost($total_price, $shipping); get_order_id(); display_card_form($name, $final_cost); echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td width='200'> </td>"; echo "<td align='right'>"; display_button("show_cart.php", "continue-shopping", "Continue Shopping"); echo "</td></tr></table>"; } else { // error info and footer goes here. I want to display shipping if the user is from finland and paying an express cost display_shipping(calculate_express_cost($express)); from finland but paying by weight of shipping display_shipping(calculate_shipping_cost($weight));
or from outside of finland display_shipping(calculate_nonfinland_cost($country)); How do I write the If statement to say if country=finland&express=yes display function 1 then if country = finland but express="" display function 2 or if country isn't finland do 3? Tried all morning and repeatedly failed!
Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com <http://www.violasystems.com/>
stephen.jackson
violasystems.com
Mobile +358 50 343 5159
attached mail follows:
Hello Steve,
I hope I understand your questions...so first we will check value of country (if it is other than finland)...then if the first if requirement is not met we will continue to second part (checking express)...and so on....
if {$country!="finland"){ display_shipping(calculate_nonfinland_cost($country)); break; } elsif ($country=="finland" && $express=="no") { display_shipping(calculate_shipping_cost($weight)); break; } else ($country=="finland" && $express=="yes") { display_shipping(calculate_express_cost($express)); break; }
hope it helps...
-- Best regards, Martin mailto:corwincorwin.sk
Monday, October 28, 2002, 2:20:39 PM, you wrote:
SJ> //de-bug SJ> //echo "test & $country & $express";
well shouldn't here be && or and?
attached mail follows:
Hello Steve,
oh my fault...i apologize...this should work....i shouldn't use break ;)
if {$country!="finland"){ display_shipping(calculate_nonfinland_cost($country)); } elsif ($country=="finland" && $express=="no") { display_shipping(calculate_shipping_cost($weight)); } elseif ($country=="finland" && $express=="yes") { display_shipping(calculate_express_cost($express)); }
or (from my point of view is this better)
if {$country!="finland") : display_shipping(calculate_nonfinland_cost($country)); elsif ($country=="finland" && $express=="no") : display_shipping(calculate_shipping_cost($weight)); elseif ($country=="finland" && $express=="yes") : display_shipping(calculate_express_cost($express)); endif;
again i apologize...
-- Best regards, Martin mailto:corwincorwin.sk
attached mail follows:
Hello,
"Martin Hudec" <corwin
corwin.sk> wrote:
> or (from my point of view is this better)
>
> if {$country!="finland") :
> display_shipping(calculate_nonfinland_cost($country));
> elsif ($country=="finland" && $express=="no") :
> display_shipping(calculate_shipping_cost($weight));
> elseif ($country=="finland" && $express=="yes") :
> display_shipping(calculate_express_cost($express));
> endif;
>
How about something like this?
if ($country!="finland"){ display_shipping(calculate_nonfinland_cost($country)); }else{ // if it's not "finland" it should be something else, no? if ($express=="no"){ display_shipping(calculate_shipping_cost($weight)); }else{ // if it's not "no" it should be "yes", no? display_shipping(calculate_express_cost($express)); } }
Just an idea...
- E
attached mail follows:
Hello
Edwin,
of course you can but let me say something
if .. else is used when u need to execute one thing in case that requirement in if is met and second thing if it is not met...
in case of if...elsif : command behind elsif is executed when requirement in if is not met....you can add as many elsif as you want...also u can end whole thing with else which is executed in case when no previous requirements are met...
hope I wrote it good....sorry im too tired to think about english grammar and such things ;)))
-- Best regards, Martin mailto:corwincorwin.sk
Monday, October 28, 2002, 4:18:45 PM, you wrote:
E> Hello,
E> "Martin Hudec" <corwin
corwin.sk> wrote: >> or (from my point of view is this better) >> >> if {$country!="finland") : >> display_shipping(calculate_nonfinland_cost($country)); >> elsif ($country=="finland" && $express=="no") : >> display_shipping(calculate_shipping_cost($weight)); >> elseif ($country=="finland" && $express=="yes") : >> display_shipping(calculate_express_cost($express)); >> endif; >>
E> How about something like this?
E> if ($country!="finland"){ E> display_shipping(calculate_nonfinland_cost($country)); E> }else{ // if it's not "finland" it should be something else, no? E> if ($express=="no"){ E> display_shipping(calculate_shipping_cost($weight)); E> }else{ // if it's not "no" it should be "yes", no? E> display_shipping(calculate_express_cost($express)); E> } E> }
E> Just an idea...
E> - E
attached mail follows:
Hello Martin,
"Martin Hudec" <corwin
corwin.sk> wrote:
> Hello
Edwin,
>
> of course you can but let me say something
>
> if .. else is used when u
> need to execute one thing in case that requirement in if is met and
> second thing if it is not met...
>
> in case of if...elsif : command behind elsif is executed when
> requirement in if is not met....you can add as many elsif as you
> want...also u can end whole thing with else which is executed in case
> when no previous requirements are met...
>
> hope I wrote it good....sorry im too tired to think about english
> grammar and such things ;)))
>
Very clear! I understand.
Well, I understand your point. There is nothing wrong with your style.
I just wanted to give some options/suggestions. Besides, for the most part, it's just a matter of taste :)
Best regards,
- E
attached mail follows:
Hi people,
I have a table (postgres), with a date field (yyyy-mm-dd). How do I group by year?
'select sum(profit) from loan group by apply_date' would group by the DAY, not year. Thanks.
Regards, Faisal
______________________________________
attached mail follows:
In mysql, I would need to select an extra column SELECT SUM(profit), YEAR(apply_date) AS year FROM loan GROUP BY year
Faisal Abdullah wrote:
>Hi people, > >I have a table (postgres), with a date field (yyyy-mm-dd). How do I group by >year? > >'select sum(profit) from loan group by apply_date' would group by the DAY, >not year. >Thanks. > >Regards, >Faisal > >______________________________________ > > > >
attached mail follows:
> I have a table (postgres), with a date field (yyyy-mm-dd). How do I group by > year? > > 'select sum(profit) from loan group by apply_date' would group by the DAY, > not year.
SELECT SUM(profit) FROM load GROUP BY YEAR(apply_date)
---John Holmes...
attached mail follows:
I get this error from my code. Fatal error: Cannot break/continue 1 levels in /www/u1255/shop/purchase.php on line 22
I think I need to end the functions if a condition is met so is there a way to do it without breaking? Where do I go from here? <? include ('products_sc_fns.php'); // The shopping cart needs sessions, so start one session_start(); do_html_header("Checkout"); // if filled out //echo "testing"; if($cart&&$name&&$address&&$city&&$zip&&$country) { // able to insert into database if( insert_order($HTTP_POST_VARS)!=false ) { //display cart, not allowing changes and without pictures display_cart($cart, false, 0); calculate_weight($cart); //determine what shipping we are using if ($country!="Finland"){ display_shipping(calculate_nonfinland_cost($country)); break; } elseif ($country=="Finland" && $express=="no"){ display_shipping(calculate_shipping_cost($weight)); break; } elseif ($country=="Finland" && $express=="yes"){ display_shipping(calculate_express_cost($express)); break; } //de-bug echo "test & $country & $express"; //if($country!="Finland") //display_shipping(calculate_shipping_cost($weight)); //{ //display_shipping(calculate_nonfinland_cost($country)); //} //display_shipping(calculate_express_cost($express)); //display_shipping(calculate_temp_shipping_cost($weight)); //get credit card details calculate_final_cost($total_price, $shipping); get_order_id(); display_card_form($name, $final_cost); echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td width='200'> </td>"; echo "<td align='right'>"; display_button("show_cart.php", "continue-shopping", "Continue Shopping"); echo "</td></tr></table>"; } else { echo mysql_error(); echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td width='200'> </td><td>Could not store data, please try again.</td>"; echo "<tr><td width='200'> </td><td>"; display_button("checkout.php", "back", "Back"); echo "</td></tr></table>"; } } else { echo "<table width='760' cellpadding='0' background='images/shopbg.gif'><tr><td width='200'> </td><td>You did not fill in all the fields, please try again.</td>"; echo "<tr><td width='200'> </td><td>"; display_button("checkout.php", "back", "Back"); echo "</td></tr></table>"; } do_html_footer(); ?>
Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com <http://www.violasystems.com/>
stephen.jackson
violasystems.com
Mobile +358 50 343 5159
attached mail follows:
Break an continue are for loops (while,for ...), if you want to get out of a function, use return
Steve Jackson wrote:
>I get this error from my code.
>Fatal error: Cannot break/continue 1 levels in
>/www/u1255/shop/purchase.php on line 22
>
>I think I need to end the functions if a condition is met so is there a
>way to do it without breaking?
>Where do I go from here?
>
><?
>
> include ('products_sc_fns.php');
> // The shopping cart needs sessions, so start one
> session_start();
>
> do_html_header("Checkout");
> // if filled out
> //echo "testing";
> if($cart&&$name&&$address&&$city&&$zip&&$country)
>
> {
> // able to insert into database
> if( insert_order($HTTP_POST_VARS)!=false )
> {
> //display cart, not allowing changes and without pictures
> display_cart($cart, false, 0);
> calculate_weight($cart);
> //determine what shipping we are using
> if ($country!="Finland"){
> display_shipping(calculate_nonfinland_cost($country));
> break;
> }
> elseif ($country=="Finland" && $express=="no"){
> display_shipping(calculate_shipping_cost($weight));
> break;
> }
> elseif ($country=="Finland" && $express=="yes"){
> display_shipping(calculate_express_cost($express));
> break;
> }
>
> //de-bug
> echo "test & $country & $express";
> //if($country!="Finland")
> //display_shipping(calculate_shipping_cost($weight));
> //{
> //display_shipping(calculate_nonfinland_cost($country));
> //}
> //display_shipping(calculate_express_cost($express));
> //display_shipping(calculate_temp_shipping_cost($weight));
> //get credit card details
> calculate_final_cost($total_price, $shipping);
> get_order_id();
> display_card_form($name, $final_cost);
> echo "<table width='760' cellpadding='0'
>background='images/shopbg.gif'><tr><td width='200'> </td>";
> echo "<td align='right'>";
> display_button("show_cart.php", "continue-shopping", "Continue
>Shopping");
> echo "</td></tr></table>";
> }
> else
> {
> echo mysql_error();
> echo "<table width='760' cellpadding='0'
>background='images/shopbg.gif'><tr><td width='200'> </td><td>Could
>not store data, please try again.</td>";
> echo "<tr><td width='200'> </td><td>";
> display_button("checkout.php", "back", "Back");
> echo "</td></tr></table>";
> }
> }
> else
> {
> echo "<table width='760' cellpadding='0'
>background='images/shopbg.gif'><tr><td width='200'> </td><td>You
>did not fill in all the fields, please try again.</td>";
> echo "<tr><td width='200'> </td><td>";
> display_button("checkout.php", "back", "Back");
> echo "</td></tr></table>";
> }
>
> do_html_footer();
>?>
>
>
>
>Steve Jackson
>Web Developer
>Viola Systems Ltd.
>http://www.violasystems.com <http://www.violasystems.com/>
>stephen.jackson
violasystems.com
>Mobile +358 50 343 5159
>
>
>
>
>
>
>
attached mail follows:
Hey everyone, For years I have used a fantastic merchant ( http://www.ihtmlmerchant.com ), which is feature packed and easy to setup and use. It's written in a competing language called iHTML ( http://www.ihtml.com ).
As I am getting considerably proficient at coding PHP, I find that I require a similar type merchant/store package that I can base future PHP e-commerce sites on. I have mySQL and MS SQL Server available to me.
So... my questions to the list are:
1) What store product/package do you use? Why? URL? 2) What is purchase cost? Is it one-time or per store? 3) What databases does it support?
Many thanks in advance.
Peter
- - - - - - - - - - - - - - - - - - - - -
Fourth Realm Solutions
pbechard
fourthrealm.com
http://www.fourthrealm.com
Tel: 5