php-general Digest 19 Jan 2007 14:06:08 -0000 Issue 4578

Topics (messages 247368 through 247392):

Storing dynamic attribute data in a db
        247368 by: Chris W. Parker
        247374 by: Chris
        247376 by: Chris W. Parker
        247378 by: Paul Novitski
        247379 by: Chris W. Parker

Re: Displaying Results on different rows in tables
        247369 by: Chris

Re: email validation string.
        247370 by: Roman Neuhauser
        247386 by: WeberSites LTD
        247388 by: Roman Neuhauser
        247389 by: WeberSites LTD
        247390 by: Roman Neuhauser

Re: Storing values in arrays
        247371 by: Ryan A
        247372 by: Ryan A

problems with sessions variables and virtual domains in apache
        247373 by: esteban
        247375 by: Chris
        247377 by: Andre Dubuc
        247392 by: esteban

nuSoap -method '' not defined in service
        247380 by: blackwater dev
        247381 by: Chris

Re: Oracle Execute Function
        247382 by: Chris
        247383 by: Nicholas Yim

what do i need to disable
        247384 by: Don
        247385 by: WeberSites LTD

Re: Script to generate a site thumbnails
        247387 by: WeberSites LTD

Re: Newbie - help with a foreach
        247391 by: Németh Zoltán

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        php-general@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
Hello,

This is now my 3rd attempt at writing this email. :) The first two were
pretty long...
 
I'm currently working on trying to find a solution that is both simple
and flexible for storing the data of a complicated set of dynamic
options for some of our products. My current thinking is that I will use
Modified Preorder Tree Traversal to organize the data. Each record will
have the following:
 
id (auto-number)
sku (related product's sku)
lft (hierarchy data)
rgt (hierarchy data)
attribute (like: Size, Color, Style)
option (like: Blue, Large, Plain)
pricemodifier (-$20, +$20)

This kind of data is not difficult to handle if every combination that
is available through the different options is actually available from
the manufacturer. However, some combinations are not possible so the
data needs to represent itself that way. For example, all t-shirts come
in Red, Green, or Blue but only Green shirts come in Large. All other
colors have only Small and Medium.

Is there a standard way to handle this kind of thing if not, how would
you handle it?

(On a side note, when the solution is found, could it be called a
"pattern"?)



Thanks,
Chris.

p.s. Yes this is the short email.

--- End Message ---
--- Begin Message ---
Chris W. Parker wrote:
Hello,

This is now my 3rd attempt at writing this email. :) The first two were
pretty long...
I'm currently working on trying to find a solution that is both simple
and flexible for storing the data of a complicated set of dynamic
options for some of our products. My current thinking is that I will use
Modified Preorder Tree Traversal to organize the data. Each record will
have the following:
id (auto-number)
sku (related product's sku)
lft (hierarchy data)
rgt (hierarchy data)
attribute (like: Size, Color, Style)
option (like: Blue, Large, Plain)
pricemodifier (-$20, +$20)

This kind of data is not difficult to handle if every combination that
is available through the different options is actually available from
the manufacturer. However, some combinations are not possible so the
data needs to represent itself that way. For example, all t-shirts come
in Red, Green, or Blue but only Green shirts come in Large. All other
colors have only Small and Medium.

Is there a standard way to handle this kind of thing if not, how would
you handle it?

I don't think there's a standard way, just whatever works best at the time and most importantly what you understand.

If you have to write a 6 page document to explain what's going on, that's probably bad.. because in 6 months time if you need to revisit it, you're going to have issues.

Why do you think you need to use a tree? I'm sure it's just a case of me not understanding something..

Anyway I'd move the attributes to another table (pseudo-sql):

create table attributes (
  attributeid auto increment,
  attributename ('color'),
  attributevalue ('blue'),
  productid references products(id)
);

No idea what price modifier is or if it applies to specific attributes but if it does, move it as well.

Then you can get all attributes easily:

select * from attributes where productid='X';

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
On Thursday, January 18, 2007 3:51 PM Chris <mailto:[EMAIL PROTECTED]>
said:

Hey Chris,

> If you have to write a 6 page document to explain what's going on,
> that's probably bad.. because in 6 months time if you need to revisit
> it, you're going to have issues.

hehe I wouldn't say that my other emails were 6 pages(!) but I tend to
ramble on sometimes. And not only that, sometimes complicated problems
are difficult to explain simply. As I think we've discovered. :P

> Why do you think you need to use a tree? I'm sure it's just a case of
> me not understanding something..
>
> Anyway I'd move the attributes to another table (pseudo-sql):
[snip]
> Then you can get all attributes easily:
> 
> select * from attributes where productid='X';

Consider this. You have three attributes: Color, Size, Collar.

Colors:

Red
Green
Blue

Sizes:

Small
Medium
Large

Collars:

V-Neck
Plain
Turtleneck

If the manufacturer allowed me to order any combination of the above
attributes (and their options) I would need to create only three tables
to organize it: products, products_attributes, and
products_attributes_options. This would allow me to do basically what
your SQL from above does.

1. Give me all the attributes for product 'X'.
2. Then give me all the options for all the attributes returned in Step
1.
3. Display three dropdown boxes.

But the complication comes when the manufacturer says:

1. You can only order a turtleneck if the shirt is green.
2. You can only order red shirts in small and medium.

At this point there is a breakdown in the data.

With the three table setup how can I indicate these requirements in the
data? I don't think I can, but I'm not positive.

On the other hand, if I use a hierarchical dataset I can make the
following tree:

(Copy and paste this into Notepad if it doesn't appear aligned
properly.)
Root
|-Red
| |-Small
| | |-V-Neck
| | |-Plain
| |-Medium
|   |-V-Neck
|   |-Plain
|-Green
| |-Small
| | |-V-Neck
| | |-Plain
| | |-Turtleneck
| |-Medium
| | |-V-Neck
| | |-Plain
| | |-Turtleneck
| |-Large
|   |-V-Neck
|   |-Plain
|   |-Turtleneck
|-Blue
  |-Small
  | |-V-Neck
  | |-Plain
  |-Medium
  | |-V-Neck
  | |-Plain
  |-Large
    |-V-Neck
    |-Plain

The reason I am writing to the list is to see if there is an easier way
to do this or if I'm heading in the right direction.

> No idea what price modifier is or if it applies to specific attributes
> but if it does, move it as well.

I should have left this part out... It's just the amount the price of a
product will change for that option. Example: Large green shirts are +$5
while all small shirts are -$2.



Chris.

--- End Message ---
--- Begin Message ---
At 1/18/2007 02:56 PM, Chris W. Parker wrote:
I'm currently working on trying to find a solution that is both simple
and flexible for storing the data of a complicated set of dynamic
options for some of our products. My current thinking is that I will use
Modified Preorder Tree Traversal to organize the data.


Are you considering keeping all the levels of your data tree in a single table because you can't predict how many levels there will be? If you CAN predict its depth, wouldn't it be simpler and easier to conceive, code, and debug with N tables chained in parent-child relationships?

I'm not asking rhetorically but seriously, for discussion. How are you weighing the pros & cons of using MPTT?

Regards,
Paul
--- End Message ---
--- Begin Message ---
On Thursday, January 18, 2007 5:09 PM Paul Novitski
<mailto:[EMAIL PROTECTED]> said:

> Are you considering keeping all the levels of your data tree in a
> single table because you can't predict how many levels there will
> be?  If you CAN predict its depth, wouldn't it be simpler and easier
> to conceive, code, and debug with N tables chained in parent-child
> relationships?
> 
> I'm not asking rhetorically but seriously, for discussion.  How are
> you weighing the pros & cons of using MPTT?

Good question.

In my case it is not possible to determine the depth of each product's
attributes. We deal with many different manufacturers and they all set
their products up differently. Some have (maybe) one attribute while
others can have four or five. I wouldn't doubt that sometime in the
future I will see six or more.

Also, I personally prefer not to hard code values and to instead make
everything flexible. I've done that in the past and it kicks my butt
when requirements change and I have to go through and "fix" things. I
prefer a slightly higher learning curve in the beginning for greater
flexibility in the future.

Lastly, I don't know if you're familiar with MPTT but it's actually
quite easy to work with once you have a stable set of functions to
manipulate the tree. (I got mine from the Sitepoint article where I
learned about it a few years ago.)

Hope that answers your question.


Chris.

--- End Message ---
--- Begin Message ---
Dan Shirah wrote:
The code above displays no information at all.

What I want to do is:

1. Retrieve my information
2. Assign it to a variable
3. Output the data into a table with each unique record in a seperate row


As Brad posted:

echo "<table>";
while ($row = mssql_fetch_array($result)) {
   $id = $row['credit_card_id'];
   $dateTime = $row['date_request_received'];
   echo "<tr><td>$id</td><td>$dateTime</td></tr>";
}
echo "</table>";


If that doesn't work, try a print_r($row) inside the loop:

while ($row = mssql_fetch_array($result)) {
  print_r($row);
}

and make sure you are using the right id's / elements from that array.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-18 06:07:24 -0800:
> I just got this from: http://php.net/preg_match
> 
> <?php
> if(eregi ("^[[:alnum:[EMAIL PROTECTED],6}$", stripslashes(trim($someVar))))

That would reject many of my email addresses.  This is more in line with
the standards:

http://marc.theaimsgroup.com/?l=postgresql-general&m=112612299412819&w=2

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

--- End Message ---
--- Begin Message ---
Try this : http://www.weberdev.com/get_example-3274.html

berber 

-----Original Message-----
From: Don [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 10:41 PM
To: php-general@lists.php.net
Subject: [PHP] email validation string.

I'm trying to get this line to validate an email address from a form and it
isn't working.

if (ereg("[EMAIL PROTECTED]",$submittedEmail))

 

The book I'm referencing has this line

if (ereg("[EMAIL PROTECTED]",$submittedEmail))

 

Anyway.. I welcome any advice as long as it doesn't morph into a political
debate on ADA standards and poverty in Africa. :-)

 

Thanks

 

Don

--- End Message ---
--- Begin Message ---
# [EMAIL PROTECTED] / 2007-01-19 10:55:21 +0200:
> From: Don [mailto:[EMAIL PROTECTED] 
> > I'm trying to get this line to validate an email address from a form and it
> > isn't working.
> > 
> > if (ereg("[EMAIL PROTECTED]",$submittedEmail))
> > 
> > The book I'm referencing has this line
> > 
> > if (ereg("[EMAIL PROTECTED]",$submittedEmail))

1. Why did you remove the backslash? (the original was correct)
2. What do you expect the regexp to match?
3. Define "it isn't working".
 
> Try this : http://www.weberdev.com/get_example-3274.html

This will reject addresses that use greylisting, and 600 lines
in a single function is gross.  I wouldn't touch that.
 
-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

--- End Message ---
--- Begin Message ---
You can always go to http://www.weberdev.com/ and write "email validation"
in the Top Ajax search box. There are many other email validators that
should have less than 600 lines in one function :)

berber 

-----Original Message-----
From: Roman Neuhauser [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 19, 2007 12:17 PM
To: WeberSites LTD
Cc: 'Don'; php-general@lists.php.net
Subject: Re: [PHP] email validation string.

# [EMAIL PROTECTED] / 2007-01-19 10:55:21 +0200:
> From: Don [mailto:[EMAIL PROTECTED]
> > I'm trying to get this line to validate an email address from a form 
> > and it isn't working.
> > 
> > if (ereg("[EMAIL PROTECTED]",$submittedEmail))
> > 
> > The book I'm referencing has this line
> > 
> > if (ereg("[EMAIL PROTECTED]",$submittedEmail))

1. Why did you remove the backslash? (the original was correct) 2. What do
you expect the regexp to match?
3. Define "it isn't working".
 
> Try this : http://www.weberdev.com/get_example-3274.html

This will reject addresses that use greylisting, and 600 lines in a single
function is gross.  I wouldn't touch that.
 
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

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

--- End Message ---
--- Begin Message ---
Don't top-post.
Trim quoted material.
Use a mail user agent that doesn't screw up quoting. There's a plugin
for Outlook to fix it.
Thanks.

# [EMAIL PROTECTED] / 2007-01-19 12:15:15 +0200:
> From: Roman Neuhauser [mailto:[EMAIL PROTECTED] 
> > # [EMAIL PROTECTED] / 2007-01-19 10:55:21 +0200:
> > > Try this : http://www.weberdev.com/get_example-3274.html
> > 
> > This will reject addresses that use greylisting, and 600 lines in a single
> > function is gross.  I wouldn't touch that.
  
I should have also mentioned that the function is fundamentally flawed,
and the whole section dealing with deliverability should be removed.
The only way to reliably find out about an email address deliverability
is to send it a secret and receive it back (filtering out bounces).
This mathematician, Daniel Bernstein, has a proof-of-concept code in
ezmlm. :) (Or just google for VERP.)

> You can always go to http://www.weberdev.com/ and write "email validation"
> in the Top Ajax search box.

What's "Top Ajax"?

> There are many other email validators that should have less than 600
> lines in one function :)

I already have a regular expression that matches a reasonable subset of
the grammar defined in RFC 822.  Why should I use someone else's square
wheel when I have mine own? :)

Also, if there are many email validators with better code, please offer
those better ones if you must.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

--- End Message ---
--- Begin Message ---

tedd <[EMAIL PROTECTED]> wrote: At 7:15 AM -0800 1/17/07, Ryan A wrote:
>True, but thats not the most important part... I guess I wrote it 
>wrong, I meant that it should not write to disk before 1 minute...
>anyway... about the "array saving" any ideas?
>
>Thanks!
>R

Why?

 Hey Tedd,

Aww, nothing serious... just had a few ideas running in my head that needs 
something like this... and was wondering if it would save on server processing 
time and resources if done like this rather than writing to disk on every 
login...

Cheers!
R    


------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

--- End Message ---
--- Begin Message ---

Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-01-17 at 07:15 -0800, 
Ryan A wrote:
> > Hey!
> > Thanks for replying.
> > 
> > Instead of CRON i was thinking of having a file created and check the
> > creation time everytime someone logged in... if its less than 1 min
> > then don't do anything, if  1 min or more old... write file...
> 
> But then it wouldn't be written to disk every one minute if someone
> didn't log in for 3 minutes ;)
> 
> True, but thats not the most important part... I guess I wrote it wrong, I 
> meant that it should not write to disk before 1 minute...
> anyway... about the "array saving" any ideas?


// untested

if( ($fptr = fopen( '/tmp/mySavedArray.dat', 'wb' )) !== false )
{
    fwrite( $fptr, serialize( $myArray ) );
    fclose( $fptr );
}

?>

There's also file_put_contents() but I generally go with backward
compatible methods.
Thanks, will give it a go!

Cheers!
R


------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
 
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.

--- End Message ---
--- Begin Message ---
I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
variables to validate users, each page have something like this:

if($_SESSION["validated"]==0){
  header("Location: index.php");
  exit;
 }

This worked fine when i had only one domain, but when i began to use virtual
domains, sometimes, not always, the session variable lost the value or the
session variable is distroyed, i don't know what really happens.  I add this
lines to httpd.conf for each domain and the main domain is first:

<VirtualHost *:80>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/domain"
    ServerName www.domain.com
    ErrorLog logs/domain.com-error_log
    CustomLog logs/domain.com-access_log common
    php_admin_value upload_tmp_dir "C:/Program Files/Apache
Group/Apache2/htdocs/domain/tmp"
    php_admin_value session.save_path "C:/Program Files/Apache
Group/Apache2/htdocs/domain/session"
</VirtualHost>

At the beginning i didn't use the two last lines with php_admin_value, i add
the lines for trying to solve the problem but it doesn't work.

I have an application made with phpmaker and SquierreMail v.1.4.7 too, and i
have the same problem in both. In both case sometimes, when i want to go to
other page, the server ask me for the username and the password, it is not
always.

Please help me

Thanks.

--- End Message ---
--- Begin Message ---
esteban wrote:
I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
variables to validate users, each page have something like this:

if($_SESSION["validated"]==0){
  header("Location: index.php");
  exit;
 }

This worked fine when i had only one domain, but when i began to use virtual
domains, sometimes, not always, the session variable lost the value or the
session variable is distroyed, i don't know what really happens.  I add this
lines to httpd.conf for each domain and the main domain is first:

<VirtualHost *:80>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/domain"
    ServerName www.domain.com
    ErrorLog logs/domain.com-error_log
    CustomLog logs/domain.com-access_log common
    php_admin_value upload_tmp_dir "C:/Program Files/Apache
Group/Apache2/htdocs/domain/tmp"
    php_admin_value session.save_path "C:/Program Files/Apache
Group/Apache2/htdocs/domain/session"
</VirtualHost>

At the beginning i didn't use the two last lines with php_admin_value, i add
the lines for trying to solve the problem but it doesn't work.

I have an application made with phpmaker and SquierreMail v.1.4.7 too, and i
have the same problem in both. In both case sometimes, when i want to go to
other page, the server ask me for the username and the password, it is not
always.

If you are going across domains (page 1 is on domain 'a' and page 2 is on domain 'b'), you need to explicitly pass the session across in the query string.

Even them I'm not sure it will work for security reasons.

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
On Thursday 18 January 2007 06:26 pm, esteban wrote:
> I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
> variables to validate users, each page have something like this:
>
> if($_SESSION["validated"]==0){
>   header("Location: index.php");
>   exit;
>  }
>
> This worked fine when i had only one domain, but when i began to use
> virtual domains, sometimes, not always, the session variable lost the value
> or the session variable is distroyed, i don't know what really happens.  I
> add this lines to httpd.conf for each domain and the main domain is first:
>
> <VirtualHost *:80>
>     ServerAdmin [EMAIL PROTECTED]
>     DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/domain"
>     ServerName www.domain.com
>     ErrorLog logs/domain.com-error_log
>     CustomLog logs/domain.com-access_log common
>     php_admin_value upload_tmp_dir "C:/Program Files/Apache
> Group/Apache2/htdocs/domain/tmp"
>     php_admin_value session.save_path "C:/Program Files/Apache
> Group/Apache2/htdocs/domain/session"
> </VirtualHost>
>
> At the beginning i didn't use the two last lines with php_admin_value, i
> add the lines for trying to solve the problem but it doesn't work.
>
> I have an application made with phpmaker and SquierreMail v.1.4.7 too, and
> i have the same problem in both. In both case sometimes, when i want to go
> to other page, the server ask me for the username and the password, it is
> not always.
>
> Please help me
>
> Thanks.

Following Chris' idea - going from http to https - try this simple technique - 
works for me:

<?php session_start(); ob_start(); ?>
<?php if ($_SERVER['HTTPS'] != "on")    {
        header("Location: https://your_domain/the_page_you_want_at_https";);
        exit;}
?>

Saves you having to explicitly set the page for https

Hth,
Andre

--- End Message ---
--- Begin Message ---
The don't want to pass the session variable across domains.  The problem is
in the main domain, i don't know what happens, the session variable lost the
value or is distroyed.

"Chris" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
esteban wrote:
> I have a windows 2000 server with apache 2.0 and php 5.1.2. I use session
> variables to validate users, each page have something like this:
>
> if($_SESSION["validated"]==0){
>   header("Location: index.php");
>   exit;
>  }
>
> This worked fine when i had only one domain, but when i began to use
virtual
> domains, sometimes, not always, the session variable lost the value or the
> session variable is distroyed, i don't know what really happens.  I add
this
> lines to httpd.conf for each domain and the main domain is first:
>
> <VirtualHost *:80>
>     ServerAdmin [EMAIL PROTECTED]
>     DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/domain"
>     ServerName www.domain.com
>     ErrorLog logs/domain.com-error_log
>     CustomLog logs/domain.com-access_log common
>     php_admin_value upload_tmp_dir "C:/Program Files/Apache
> Group/Apache2/htdocs/domain/tmp"
>     php_admin_value session.save_path "C:/Program Files/Apache
> Group/Apache2/htdocs/domain/session"
> </VirtualHost>
>
> At the beginning i didn't use the two last lines with php_admin_value, i
add
> the lines for trying to solve the problem but it doesn't work.
>
> I have an application made with phpmaker and SquierreMail v.1.4.7 too, and
i
> have the same problem in both. In both case sometimes, when i want to go
to
> other page, the server ask me for the username and the password, it is not
> always.

If you are going across domains (page 1 is on domain 'a' and page 2 is
on domain 'b'), you need to explicitly pass the session across in the
query string.

Even them I'm not sure it will work for security reasons.

-- 
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
I have the following code but when I hit the page, I get the xml error of
method '' not defined in service.  I don't have a wsdl or anything defined.
Is there more I need to do to get the SOAP service set up?

Thanks!

include("nusoap/nusoap.php");

$server=new soap_server();
$server->register('getColumns');

function getColumns(){

       $search= new carSearch();

       return $search->getSearchColumns();

}
$server->service($HTTP_RAW_POST_DATA);

--- End Message ---
--- Begin Message ---
blackwater dev wrote:
I have the following code but when I hit the page, I get the xml error of
method '' not defined in service.  I don't have a wsdl or anything defined.
Is there more I need to do to get the SOAP service set up?

Try the nusoap mailing list. They would have a lot more experience with it than the people on this list.

http://sourceforge.net/mail/?group_id=57663

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Brad Bonkoski wrote:
Brad Bonkoski wrote:
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-18 11:46:10 -0500:
Hello All,

I have this Oracle function, and within my code I call it like this:

$sql = "BEGIN :result := my_funtion_name('$parm1', $parm2, null, null, null); END;";
       $stmt = $db->parse($sql);
       $rc = null;
       ocibindbyname($stmt, ":result", &$rc);
       $db->execute($stmt, $sql);

The problem is that the execute function spits back an error/warning message, but the Oracle function properly executes and the data is in the Database.

And the warning is...?

Nothing of real use from what I can see..
It falls into this statement:
die('Invalid Statement: ' . $stmt .'('.$query.')'. ' ' . htmlentities($error['message']));

So, I get this message back (and the error['message'] part is blank.

It gets there from this:
$result = @ociexecute($stmt);
if(!$result) {
   ...
}
so the return from ociexecute appears to be FALSE.

After removing the '@' from the ociexecute ... I get this:
PL/SQL: numeric or value error: character string buffer too small
Does this trigger any ideas?


Sounds like an issue with your function. Does it work ok outside of php?

--
Postgresql & php tutorials
http://www.designmagick.com/

--- End Message ---
--- Begin Message ---
Hello ,

>  "BEGIN :result := my_funtion_name('$parm1', $parm2, null, 
>null, null); END;";

  try this
  
  "select  my_funtion_name('$parm1', $parm2, null,null, null)  as result from 
dual"

Best regards, 

Nicholas Yim
[EMAIL PROTECTED]
2007-01-19

--- End Message ---
--- Begin Message ---
Ok,

 

You have been very helpful with my questions so far and I thank you for
that.

 

My next task is disable harmful tags/scripts in a full text field.

 

I want to store a bio type field and I am considering allowing html (to
allow a myspace type of customization to the page), but I am really new to
this so I really don't know what kind of trouble I am asking for. 

 

I'm sure that I need to block JavaScript, but are there other things (tags,
scripting, etc.)  that can be input into my DB that will cause problems
either being stored as such or when accessed?

 

Again, thanks for the advice in advance.

 

Don


--- End Message ---
--- Begin Message ---
Check this out : 

http://www.weberdev.com/get_example-4473.html

berber 

-----Original Message-----
From: Don [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 19, 2007 7:38 AM
To: php-general@lists.php.net
Subject: [PHP] what do i need to disable

Ok,

 

You have been very helpful with my questions so far and I thank you for
that.

 

My next task is disable harmful tags/scripts in a full text field.

 

I want to store a bio type field and I am considering allowing html (to
allow a myspace type of customization to the page), but I am really new to
this so I really don't know what kind of trouble I am asking for. 

 

I'm sure that I need to block JavaScript, but are there other things (tags,
scripting, etc.)  that can be input into my DB that will cause problems
either being stored as such or when accessed?

 

Again, thanks for the advice in advance.

 

Don

--- End Message ---
--- Begin Message ---
If you can get the image to your server, try using one of these examples :

http://www.weberdev.com/AdvancedSearch.php?searchtype=title&search=thumb

berber 

-----Original Message-----
From: Pablo L. de Miranda [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 18, 2007 12:56 AM
To: php-general@lists.php.net
Subject: [PHP] Script to generate a site thumbnails

Hi People,

I'm needing a script that generate a site thumbnail from a given URL.
Anybody can help me?

Thanks,

--
Pablo Lacerda de Miranda
Graduando Sistemas de Informação
Universidade Estadual de Montes Claros
[EMAIL PROTECTED]

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

--- End Message ---
--- Begin Message ---
On cs, 2007-01-18 at 20:46 +0100, Jochem Maas wrote:
> Németh Zoltán wrote:
> > On cs, 2007-01-18 at 02:04 -0800, pub wrote:
> >> On Jan 18, 2007, at 2:00 AM, Németh Zoltán wrote:
> >>
> 
> 
> ...
> 
> > maybe you should use a parameter for it, place it into the link in the
> > first query loop, get it here and query based on it
> > 
> > like "SELECT * FROM job WHERE id={$_GET['job_id']}" or whatever
> 
> SQL INJECTION WAITING TO HAPPEN.

true, sorry
so check the value first

greets
Zoltán Németh

> 
> 
> ...
> 
> >>    foreach($row as $url)
> >>            {
> >>            $row = mysql_fetch_array($result2,MYSQL_ASSOC);
> >>            if ("url={$row['url']}")
> 
> what is this IF statement supposed to be doing???
> because it will always evaluate to true

--- End Message ---

Reply via email to