php-general Digest 4 Oct 2006 19:19:38 -0000 Issue 4383

Topics (messages 242598 through 242616):

Re: Frustrated trying to get help from your site
        242598 by: Robin Vickery

Re: file to blob
        242599 by: Manuel Lemos
        242600 by: Manuel Lemos

Re: test
        242601 by: Philipp Schwarz
        242607 by: David Robley

Re: Strange error in PHP/MySQL
        242602 by: Ivo F.A.C. Fokkema

Re: RE:[PHP] Client Computer Registration
        242603 by: Wesley Acheson

Re: Understanding persistent connections with oci8
        242604 by: Manuel Lemos
        242613 by: Mendonce, Kiran (STSD)

want to create new format for fckeditor's combo box...
        242605 by: Bipul Dobhal
        242609 by: Kae Verens
        242610 by: Kae Verens

Re: xsl + xml
        242606 by: José Manuel Peso

Re: [PHP-DB] textarea value assignment
        242608 by: Stut

Class sqlite2pgsql -> Export from sqlite to Import in postgresql
        242611 by: Jônata Tyska Carvalho

Re: changing the global variables (_SERVER[HTTP_USER_AGENT])
        242612 by: Richard Lynch

PHP jump to other page
        242614 by: Groundhog
        242615 by: AraDaen

File Uploads not working over SSL
        242616 by: Rahul S. Johari

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:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On 03/10/06, David Robley <[EMAIL PROTECTED]> wrote:
Michelle Konzack wrote:

> Am 2006-09-27 17:39:25, schrieb David Robley:
>
>> 88 tons!! Point us to an image of that please.
>
> Currently not availlable but it is an ex Pershing II Transporter
> from the US-Army manufactured by the german Enterprise MAN.

You surely don't mean the tracked vehicle that was used to transport the
missiles? How the #&%@ can you register and drive something like that.
Boggle!

Probably not. Try looking for a picture of a MAN M1014 Transporter
Erector Launcher.

ummm... here's one:

http://commons.wikimedia.org/wiki/Image:M-1014_MAN.jpg

-robin

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

on 10/03/2006 04:38 PM Joshua Capy said the following:
> I am relatively new to php and could use a good pointing in the right
> direction.
> 
> I have a soap client in NuSoap that I developed for a webservice that I
> wrote in another language and I need it to be able to send a file in a
> blob.
> 
> I can't find an example of how you load a file in its entirety (not just
> the content) into a blob in PHP. I need to be able to do this because
> the webservice that is being called recreates the document locally for
> the user.
> 
> Can this be done in PHP?

You may want to take a look at this HTTP client class. It even comes
with an example of how to submit a SOAP request. Although it will not
build the SOAP request for you, at least it can stream the file data to
the HTTP server so you do not have to load it in memory all at once.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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

Sorry, I sent the message too soon. The HTTP client class is here:

http://www.phpclasses.org/httpclient


on 10/03/2006 04:38 PM Joshua Capy said the following:
> I am relatively new to php and could use a good pointing in the right
> direction.
> 
> I have a soap client in NuSoap that I developed for a webservice that I
> wrote in another language and I need it to be able to send a file in a
> blob.
> 
> I can't find an example of how you load a file in its entirety (not just
> the content) into a blob in PHP. I need to be able to do this because
> the webservice that is being called recreates the document locally for
> the user.
> 
> Can this be done in PHP?

You may want to take a look at this HTTP client class. It even comes
with an example of how to submit a SOAP request. Although it will not
build the SOAP request for you, at least it can stream the file data to
the HTTP server so you do not have to load it in memory all at once.

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
Stupid?

--- End Message ---
--- Begin Message ---
Sheena Mullally wrote:

> test

Sorry, you failed.



Cheers
-- 
David Robley

This tag is devoid of any humor.
Today is Boomtime, the 58th day of Bureaucracy in the YOLD 3172. 

--- End Message ---
--- Begin Message ---
On Sun, 01 Oct 2006 19:59:08 +0100, Deckard wrote:

> Hello,
> 
> I have this code:
> 
>  // insert new user in mysql user table
>   $sqlInsertUser = "INSERT INTO user (Host, User , Password ,
> Select_priv, Insert_priv, Update_priv, Delete_priv) VALUES ('$hostname',
> '$mysql_username', '$mysql_password', 'N', 'N', 'N', 'N')";
> 
>   if (mysql_query($sqlInsertUser, $conn))
>    $messagesqlInsertUser = 'Success...';
>   else
>    $messagesqlInsertUser = 'Error: ' . mysql_error();
>   $result = mysql_query($sqlInsertUser);
> 
> that gives me the error:
> "Error: Duplicate entry 'localhost-' for key 1"
> 
> I can't see nothing wrong with it and if i run it in MySQL's prompt
> everything's fine.
> 
> Any ideas ?
> 
> Besta Regards,
> Deckard.

Hi,

Wouldn't it be easier to just use the MySQL GRANT statement?

Ivo

--- End Message ---
--- Begin Message ---
I don't see how its that much of a secuity risk, they create a ssh
tunnel.  All it does is add an extra layer of authentication.  Its not
like the password requirements are bypassed.


On 10/3/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Tue, October 3, 2006 2:33 am, Wesley Acheson wrote:
> They could also be doing something like giving the client an SSH key
> to download, I've heard of this situation in a bank before.

Is the key tied to my hardware?

At least that stops the virus/Trojan scenario.

But not the petty thief who breaks in and takes my computer, and "oh
look, now I have his bank account too!  Sweet!!!"

Puhleeze!

Do you really want to bank with a place that does this?

--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



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

on 10/03/2006 07:03 PM Mendonce, Kiran (STSD) said the following:
> This is a follow up to the bug (#39029) that I reported earlier which
> has been repeatedly closed as bogus.
> 
> The oci8.persistent_timeout setting in the php.ini file is documented as
> :
> "The maximum length of time (in seconds) that a given process is allowed
> to maintain an idle persistent connection. Setting this option to -1
> means that idle persistent connections will be maintained forever. "
> 
> If I do not want the connection to be persist forever, then by using
> this setting, I should be able to ensure that a connection is not idle
> for longer than what I specified. However, when I set persistent_timeout
> to 10 seconds, I find that the connection is not terminated even after
> 10 seconds have passed. In fact, it doesn't terminate at all. So the
> question is what is the purpose of this setting ? And what does an 'idle
> connection' mean ? A google query for 'idle timeout' yields enough
> results to point that when the timeout occurs, the idle connection is
> terminated.
> 
> Obviously there is a bug somewhere. Either in the documentation or in
> the behavior. Please advise.

I think that there is no bug and that option is useless.

If you are using Apache, it will rotate the processes that serve each
request. So, unless your server is mostly idle or your scripts rarely
access the database, your connections will keep being reused before
reaching that timeout.

If you are willing to reduce the number of persistent Oracle
connections, you will most likely get better results if you move your
site images to a separate Web server. Image requests do not establish
Oracle connections, but they raise the need for Apache to fork more
processes, which leads to more opened persistent connections.

Here you may find more details about that strategy:

http://www.meta-language.net/metabase-faq.html#excessive-connections

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--- End Message ---
--- Begin Message ---
I understand the performance boost one can get by reusing existing
connections. And I did see for myself that with the default settings,
oci_pconnect() does reuse all the connections.

But what should happen if there are idle connections and the timeout is
reached ? That is my question. What is the purpose of the
persistent_timeout setting ? Does it give the user a means of specifying
a timeout after which idle connections are removed ?

-----Original Message-----
From: Manuel Lemos [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 04, 2006 12:16 AM
To: [email protected]
Subject: [PHP] Re: Understanding persistent connections with oci8

Hello,

on 10/03/2006 07:03 PM Mendonce, Kiran (STSD) said the following:
> This is a follow up to the bug (#39029) that I reported earlier which 
> has been repeatedly closed as bogus.
> 
> The oci8.persistent_timeout setting in the php.ini file is documented 
> as
> :
> "The maximum length of time (in seconds) that a given process is 
> allowed to maintain an idle persistent connection. Setting this option

> to -1 means that idle persistent connections will be maintained
forever. "
> 
> If I do not want the connection to be persist forever, then by using 
> this setting, I should be able to ensure that a connection is not idle

> for longer than what I specified. However, when I set 
> persistent_timeout to 10 seconds, I find that the connection is not 
> terminated even after 10 seconds have passed. In fact, it doesn't 
> terminate at all. So the question is what is the purpose of this 
> setting ? And what does an 'idle connection' mean ? A google query for

> 'idle timeout' yields enough results to point that when the timeout 
> occurs, the idle connection is terminated.
> 
> Obviously there is a bug somewhere. Either in the documentation or in 
> the behavior. Please advise.

I think that there is no bug and that option is useless.

If you are using Apache, it will rotate the processes that serve each
request. So, unless your server is mostly idle or your scripts rarely
access the database, your connections will keep being reused before
reaching that timeout.

If you are willing to reduce the number of persistent Oracle
connections, you will most likely get better results if you move your
site images to a separate Web server. Image requests do not establish
Oracle connections, but they raise the need for Apache to fork more
processes, which leads to more opened persistent connections.

Here you may find more details about that strategy:

http://www.meta-language.net/metabase-faq.html#excessive-connections

-- 

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

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

--- End Message ---
--- Begin Message ---
Hi, 

How can i create my own formats for fckeditors combo box.. 

I found the line 
          FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6'; 
in fckconfig.js file. 
I think by setting my own format in this line may handle this problem
because when I added any word or letter in this line like this 
       FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6;Temp'; 

it creates a new format in combo box with named "Undefined".. 

If i will get the source where these formats
('p;dic'pre;address;h1;h2;h3;h4;h5;h6' ) are defined then I will solve my
problem. 

Can any one shed some light on where and how to define the formats so that
it will be rendered on the fckeditor's format combo box..? 

Thanks, 
Bipul Dobhal

-- 
View this message in context: 
http://www.nabble.com/want-to-create-new-format-for-fckeditor%27s-combo-box...-tf2381768.html#a6637711
Sent from the PHP - General mailing list archive at Nabble.com.

--- End Message ---
--- Begin Message ---
Bipul Dobhal wrote:
Hi, How can i create my own formats for fckeditors combo box.. I found the line FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6'; in fckconfig.js file. I think by setting my own format in this line may handle this problem because when I added any word or letter in this line like this FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6;Temp'; it creates a new format in combo box with named "Undefined"..
If i will get the source where these formats
('p;dic'pre;address;h1;h2;h3;h4;h5;h6' ) are defined then I will solve my
problem.
Can any one shed some light on where and how to define the formats so that
it will be rendered on the fckeditor's format combo box..? Thanks, Bipul Dobhal


that's a javascript question, and should be asked in FCKeditor's forums - see under Support at http://fckeditor.net/

Kae

--- End Message ---
--- Begin Message ---
Bipul Dobhal wrote:
Hi, How can i create my own formats for fckeditors combo box.. I found the line FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6'; in fckconfig.js file. I think by setting my own format in this line may handle this problem because when I added any word or letter in this line like this FCKConfig.FontFormats='p;dic'pre;address;h1;h2;h3;h4;h5;h6;Temp'; it creates a new format in combo box with named "Undefined"..
If i will get the source where these formats
('p;dic'pre;address;h1;h2;h3;h4;h5;h6' ) are defined then I will solve my
problem.
Can any one shed some light on where and how to define the formats so that
it will be rendered on the fckeditor's format combo box..? Thanks, Bipul Dobhal


that's a javascript question, and should be asked in FCKeditor's forums - see under Support at http://fckeditor.net/

Kae

--- End Message ---
--- Begin Message ---
Colin Guthrie escribió:
José Manuel Peso Echarri wrote:
Hi people,

I  am looking for a library that mix xsl and xml producing output in
xhtml at server side.
I have readed about sablotron and libxsl, but i am confused.

Which is the best alternative in perfomance terms for the versions 4.2,
4.3?
is there some way for preprocess xsl or let ir in memory or any way for
improve the resources usage?

Dunno about v4, but for v5 at least:

$xsl = DOMDocument::loadXML($xslt_as_a_string);
$xsltproc = new XSLTProcessor;
$xsltproc->importStyleSheet($xsl);
echo $xsltproc->transformToXML($my_xml_dom_doc);

If anybody is interested in the code:

There is in DOM form(compile --with-dom-xslt and libxslt):
$xslDom = domxml_xslt_stylesheet_file($this->xsl);
       $params = array();
       $result = $this->xslDom->process($xml, $params);
       $this->assertEquals($this->html,$result->dumpmem());

There is in Sablotron form( compiling with --enable-xslt and sablotron ext):
$arguments = array('/_xml' => file_get_contents($this->xml), '/_xsl' => file_get_contents($this->xsl)); $xh = xslt_create(); $result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL,arguments); xslt_free($xh);

Of course, all in PHP4


I had tested this two API for processing XSL, but now my question is about the improvement of resources usage.

I want to use eaccelerator extension for caching the xsl_stylessheet objects and give the xmls continuosly for getting xhtml. It not works correctly, because the xsl object contains a handler (that is not serializable).

Any way for caching in memory xsl objects ?


Regards,
Jose
Or something like that..... going form memory, so there may be more
appropriate commands etc.

Col.



--- End Message ---
--- Begin Message ---
Bradley,

There are words to describe people like you, but this list tends to be quite clean so I'll refrain.

Bradley, meet /dev/null, I hope you'll be very happy together!

-Stut

(I'm thinking this fscker has set up an automated response system - someone at PHP must be able to unsubscribe him from the list)

Bradley Stahl wrote:
If anyone is interested in some VERY good webhosting that has support for
PHP and MySQL, please take a look at the following link:

http://www.sturdyhosting.com/idevaffiliate/idevaffiliate.php?id=100

They offer domain names for $8.95 and also webhositng solutions for as low
as $2.95 per month.


I hope that some of you are interested and can join the greatest webhosting
company in the world!


On 10/4/06, *Stut* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Brad Bonkoski wrote:
    > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote:
    >> Hello
    >> how I could assign a textarea with a variable value?
    >> Although I tried to achieve an allocation like a normal <input,
    but
    >> it does not work so I have no success with textarea.
    >>
    >> The code looks like following fragment.
    >>
    >> $problem_val = mysqlclean($_SESSION, "problem_eb", 500,
    $connection);
    >>
    >> <textarea style="width: 320px; height: 150px;" heigth="30"
    width="50"
    >> cols="1" rows="1" name="problem_eb" value="<?php echo
    >> $problem_val?>"></textarea>
    >>
    >>
    >> Best regards, Joerg Kuehne
    >>
    >>
    > There is no value attribute of textarea...to put text in there, you
    > place it between the <textarea></textarea> tags.
    > i.e.
    >
    > <textarea style="width: 320px; height: 150px;" heigth="30"
    width="50"
    > cols="1" rows="1" name="problem_eb" ><?php echo $problem_val;
    > ?></textarea>

    Also worth mentioning that you may run into problems if you don't use
    htmlentities on $problem_val, like so...

    <textarea style="width: 320px; height: 150px;" heigth="30" width="50"
    cols="1" rows="1" name="problem_eb" ><?php echo
    htmlentities($problem_val); ?></textarea>

    -Stut

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



--- End Message ---
--- Begin Message ---
Hi people,

Im working in a class that export a database from sqlite to postgresql. I
will finish my work soon and my doubt is: This class is useful for the php
programers comunnity or is useless because everybody that need to use this,
already develop a class like that ? I needed to do this conversion of
databases and didn't find such class, then i develop one.



P.S: Please forget my english errors.

--
Jônata Tyska Carvalho
-----------------------------------------------------------------
-- Técnico em Informática pelo Colégio Técnico Industrial (CTI)
-- Graduando em Engenharia de Computação
Fundação Universidade Federal de Rio Grande (FURG)

--- End Message ---
--- Begin Message ---
Register Globals will take all the keys/values in
$_SERVER/$_POST/$_GET/$_COOKIES and turn each one into a variable in
your script.

It is equivalent to:
extract($_POST);
extract($_GET);
extract($_COOKIE);
.
.
.

The "GPC" settings in php.ini determine the order of the above
statements, in case *both* POST and GET have 'x' defined, for example.


$_SERVER['USER_AGENT'] or whatever it is, is nothing more than the
User-agent: header sent by your tool.

You can put whatever you want in that header.

What the server decides to *do* because of what you put in there is
another matter.

Some sites don't want to be indexed or otherwise visited by automated
scripts.

Follow the "robot guidelines" [Google for it] or expect to have severe
issues with your webhost/carrier shutting down your account, no
refund, no appeal, because other hosts are complaining about you...

It's also inconceivable that wget, curl, and similar tools cannot do
whatever customization you need.  Those tools exist expressly for that
purpose -- to be customized to automate the retrieval of data.  So,
almost-for-sure, you have not correctly identified your needs and
assessed the tools available, and you're wasting a lot of your time
inventing the wheel.

On Tue, October 3, 2006 1:59 pm, Balaji A wrote:
> Thanks Richard.
> I am returned progarmmer for PHP..I am little confused about register
> globals and Server variables.
>
> Your understanding is corect...I want to masquerade the client
> requests....
> I need to customize the tool thats why I am not ging for public
> tools..
>
> anyway thanks for the info.. :-)
>
>
> On 10/3/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
>>
>> On Tue, October 3, 2006 12:43 pm, Balaji A wrote:
>> > Hi,
>> > in php.ini I have changed the register_global to "On".
>> >
>> > Is it possible to change the global variable
>> _SERVER[HTTP_USER_AGENT]?
>> >
>> > Thanks in advance..
>>
>> Errrr.
>>
>> You're not making sense...
>>
>> You want my browser to LIE to your server about what browser it is?
>> Opera will let you do that.
>>
>> You want to not believe I'm not using the browser I say I'm using,
>> by
>> changing the string it sends you to identify itself?
>> Just ignore what I send.
>>
>> You are trying to masquerede as some other browser, but don't want
>> to
>> let us know because you think it's some big Security thing, or
>> you're
>> scraping things you think somebody cares about or...?
>> I hesitate to help you, but the bottom line is that there are
>> *dozens*
>> of tools to web scrape and masquerede as any browser you want, so
>> even
>> if you're as, errrr, naive, as this post indicates, you're going to
>> find them within a week.
>>
>>
>> None of this has ANYTHING to do with register_globals, so you
>> clearly
>> are not understanding the User-agent: header, or register_globals,
>> or
>> both.  Probably both, to be honest...
>>
>> re-read the register_globals page on php.net
>>
>> And for the User-agent, Opera, wget, Firefox with LiveHTTPHeaders,
>> and
>> dozens of other tools let you alter that.
>>
>> But ain't no way you can make *MY* browser not send you the
>> User-agent
>> it wants to send.  It's *MY* browser, on *MY* computer, thank you
>> very
>> much.
>>
>> --
>> Some people have a "gift" link here.
>> Know what I want?
>> I want you to buy a CD from some starving artist.
>> http://cdbaby.com/browse/from/lynch
>> Yeah, I get a buck. So?
>>
>>
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

--- End Message ---
--- Begin Message ---
how can I jump to another page after IF..ELSE statement, for example:

IF (statement == TRUE)
  { stay on this page, index.php }
ELSE { jump to index2.php}

--
Come and Visit My Blog
http://ubuntu-ku.blogspot.com

--- End Message ---
--- Begin Message ---
If you have not sent any character till that moment, you can use:

IF (statement == TRUE)
   { stay on this page, index.php }
ELSE {
        header("Location: index2.php");




cya

--- End Message ---
--- Begin Message ---
Ave,

I have a File Manager application in place for over 2 years now.
Everything¹s been working groovy!
Until yesterday. Yesterday we purchased and installed an SSL Certificate.
And now the uploads are not working anymore! Gets the ³Page cannot be
displayed² error. Tried the same application without SSL and it¹s working
fine!

What¹s the workaround? How do I get this to work on SSL?
Any suggestions?

Rahul S. Johari
Supervisor, Internet & Administration
Informed Marketing Services Inc.
500 Federal Street, Suite 201
Troy NY 12180

Tel: (518) 687-6700 x154
Fax: (518) 687-6799
Email: [EMAIL PROTECTED]
http://www.informed-sources.com


--- End Message ---

Reply via email to