Richard Lynch | 1 Mar 2005 01:09

Re: Charset and filenames

Gustavo Lopes wrote:
> I'm building a script that makes a list of files available in a directory
> (PHP 4.3.10, Apache 2.0.53, windows, NTFS file system). The XHTML is
> served
> as ISO-8859-1. However, I'm having trouble in generating correct links for
> files with accents, etc.
> The problem is rawurlencode() appears to convert strings by translating

I don't suppose there's any way to just rename the file...

You may be able to do the urlencode() and then un-do the %3E back to, err
whatever it was.

-- 
Like Music?
http://l-i-e.com/artists.htm

--

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

Manuel Lemos | 1 Mar 2005 01:12
Picon
Favicon

Re: php DBMS

Hello,

on 02/28/2005 07:21 PM rogerk <at> queernet.org said the following:
>>>I'm wondering if there is any DBMS, like MySQL, which is (fully)
>>>implemented
>>>in php. This so you don't have to buy a MySQL database.
>>MySQL is free...
> 
> MySQL is free for use with applications that are themselves open source.  If
> you're going to use it with a commercial or non-open-source application, you
> need to buy a commercial license.

You are confused. You only need to buy a commercial license if you want 
to distribute MySQL server itself with closed source applications. If 
you develop closed source applications but you do not distribute MySQL 
with them, you do not need to buy any licenses.

--

-- 

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
(Continue reading)

Richard Lynch | 1 Mar 2005 01:19

Re: break/exit

timothy johnson wrote:
> I have a single php script that I am using to upload my gaim logs to a
> mysql server, but I want to put in some type of means to where if that
> log was already added then it will exit. what ways would you
> recommend?

How do you know if one gaim log matches another one is pretty much your
only question, right?

I mean, http://php.net/exit will take care of the quit part, and if/else
takes care of the PHP part of it.

So, tell us, what do the filenames look like on a gaim log (whatever that
is) and what's inside them, and how do you currently think you know which
one is which?

-- 
Like Music?
http://l-i-e.com/artists.htm

--

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

Manuel Lemos | 1 Mar 2005 01:19
Picon
Favicon

Re: Problem submitting a POST request "by hand"

on 02/28/2005 08:19 AM Vallo Reima said the following:
> Hello!
> 
> I send the parameters from one php script to another via POST method. 
> The solution works (see example  below) but the receiver page loads ONLY 
> if I include the echo $c; command after send_host (see PROBLEM!!! line). 
> Otherwise a blank page loads without any error messages. The problem is 
> same with Microsoft-IIS/5.1-PHP/5.0.3 and Apache/2.0.51-PHP/4.3.10... 
> What can I do to get rid of this?

You may want to try this HTTP client class treats with the HTTP POST 
requests without problems:

http://www.phpclasses.org/httpclient

-- 

Regards,
Manuel Lemos

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

PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/

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

--

-- 
(Continue reading)

Richard Lynch | 1 Mar 2005 01:24

Re: How to handle actions that may take a long time?

Cajus Pollmeier wrote:
> I'd like to know your opinion about how to handle events that may take
> more than a minute to finish in PHP. In this case,  the code is
> performing a recursive action on a large LDAP tree where I'd like to
> present something like a status page ("Please wait, blah blah" with
> some animated gif or so), while the action takes place in background.
>
> Is it possible to fork away this PHP code and set some SESSION vars to
> trigger the end of the status page? Or do I have to put this action
> behind a one pixel image and act when the page is "really" complete?
> Also I'm not sure how to handle the script execution timeout problem...

Do you really expect the user wants to sit there for all the time waiting
for the process to finish?

Is there ANY way to factor out that code and do it before they get there? 
Obviously not for a search where the user types in what they want, but is
that what you are doing?  You don't say; I can't guess.

Basically, if I have to sit there waiting, then I'm not really all that
impressed with an animated gif or whatever...

Perhaps you have them logged in already, and you could record their search
parameters and assign it an ID, and perform the search in the background,
and then have a page to deliver the results to later.

In other words, let me start up a couple searches, go do something else,
and come back later for my answers if I can't have them RIGHT NOW.

The web is all about RIGHT NOW :-)
(Continue reading)

Todd Cary | 1 Mar 2005 01:30

Inline Frame and php

My client insists on using inline Frames that uses my php pages.  As an 
example, this is on one page:

<IFRAME target="_top" frameborder="0" 
SRC="search.php?search_text=<?echo($search_text);?>" WIDTH=592 HEIGHT=282>
</IFRAME>

This works well with the "control" being given to search.php.  What I do 
not understand is that within search.php, I have a statement that is 
suppose to pass "control" to anther page.  The line is

header("location: http://192.168.0.23/mypath/mypage.php");

Rather than going to the page, it opens mypage.php in the inline frame.

Is there a way to "leave" the inline frame?

[Excuse my nomenclature e.g. "control", "leave"]

Todd

--

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

Richard Lynch | 1 Mar 2005 01:31

Re: convert MS DOC -> PDF


mbneto wrote:
> Hi,
>
> I have a bunch of M$ WORD documents (rtf and doc) that I'd like to
> transform to pdf.
>
> It would simple except that I'd like to allow the user to fill a
> couple of variables (name, email, telephone) and replace this before
> if generates the pdf.
>
> After searching the net I found some classes but in order to use it
> seems that I have to rewrite the entire document and some documents
> have tables/images.
>
> Any tips ?

Use MS Word "templates" or form letters or whatever they are called, and
you can provide the CSV file to feed it?

Then you just have to convert the Word doc to PDF, which is sort of
straight-forward.

-- 
Like Music?
http://l-i-e.com/artists.htm

--

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

Richard Lynch | 1 Mar 2005 01:37

RE: PHP slowness

Gerard wrote:
>> I'm no expert on this stuff, but I'd be checking my swap space usage and
>> RAM usage with 'top' or any other tools available...  I suppose you
>> probably already did that, but...
>
> Top shows that there's still normal non-swap memory available, so I don't
> think that's it.

What exactly are you using in httpd.conf to make PHP "work"?

Do you have any mod_rewrite rules going on in httpd.conf?

Do you perhaps have mod_rewrite's engine LOGGING turned on, and cranked up
really high, when rules that involve PHP kick in?

Just a Wild Guess, but perhaps you have some real funkiness going on
before PHP ever gets involved, it just LOOKS like a PHP problem.

Another test:
Did you happen to compile a PHP CGI/CLI at the same time as the PHP Module
you are using?

If so, how long does it take to run "php -f /path/to/your/test/file.php"
from the command line?

Granted, it's not EXACTLY the same code base as the PHP Module, but if
that's "fast" and the Module is "slow" you have more indication that the
problem is really *before* PHP kicks in.

--

-- 
(Continue reading)

dan | 1 Mar 2005 01:43

Re: Semi-OT: Anti-password trading/sharing solutions

Richard Lynch wrote:
> Dan Trainor wrote:
> 
> I'm not quite sure why you chose the PHP community as a recipient -- There
> are quite a few Apache modules out there.
> 
> And Modules such as mod_auth_mysql and mod_auth_ldap (?) and, really, any
> old mod_auth_XYZ module would be a closer "match" for what you want, I
> think.
> 
> I know absolutely nothing about how ProxyPass, iProtect, and PureMember
> work, however, so perhaps there is something about them that just screams
> "use PHP to do this"  [I doubt it though]
> 
> It seems to me, however, that you're still a bit off-target on
> PHP-General, as your target audience is not those who use PHP, but those
> who wrote it and maintain it, particularly the Apache Module part of it.
> 
> I believe, in fact, that the Apache Module part of it boils down to the
> code Rasmus Lerdorf wrote ages and ages ago, and that mostly Rasmus (I
> think) has maintained since then.
> 
> Perhaps with Apache 2, somebody else stepped up to write/maintain that
> code, and I'm under-informed.
> 
> Or maybe Rasmus hasn't touched that code in ages, and somebody else is
> doing it now.  Apologies to those individuals who I've slighted by not
> naming them at this time.
> 
> At any rate, you're trying to get in contact with a handful of people by
(Continue reading)

Richard Lynch | 1 Mar 2005 01:49

Re: getting mac id

Tyler Replogle wrote:
> I'm working at this site that has an MMORPG, a big online game, and we
> have
> this ban script. it bans the ip for the user and the user acount for an
> amount of time. This doesn't seem to be doing its job because people just
> change there ip and make a new user.

There's no way you can stop them from changing their IP -- Hell, for most
of them, there's no way *THEY* can stop their IP from changing if their
ISP wants to change it out from under them.

So using their IP is a Bad Idea.

Get rid of that part of the code now, before you piss of a real user whose
ISP change their IP out from under them.

There is NO WAY to identify a user unless *YOU* id them on *YOUR* server.

So the only part of this process you control is "make a new user"

Now, you probably don't want to out and out CHARGE money for people to
play MMORPG, do you?

Thought not.

But, in order to remove the problem people, what would your userbase say
to this:

"New Members, who are not already 'proven' to be not trouble-makers, will
pay a DEPOSIT of $25.00 via PayPal."
(Continue reading)


Gmane