[PHP] zlib problem
Hi there, I'm trying to compile php 4.0.5 with zlib support, but i can't get it to work. I'm using Mandrake Linux version 8, and tried to use their zlib packages, but i also tried to compile the zlib packege myself (which went well). Php always says: Configure: error: Zlib module requires zlib >= 1.0.9. Needless to say, i am using a version higher then 1.0.9. I would appreciate it if someone good give me some help. I did not have this problem with PHP 4.04. Thanks, Jeroen Geusebroek P.s. please CC me in your reply, because at the moment i'm not subscribed to the list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MIME Decoding of a string
Hi Guys, I've been struggeling with this for a while but can't seem to find any code that will decode a string MIME encoded. I found one class but it also didn't do what i want. Coding this myself is probably WAY above my head ;P ie. i have this string: --=_NextPart_000_002D_01C0DBE5.49F28C40 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable yadayadayada = yadayadayada This is the body of the message --=_NextPart_000_002D_01C0DBE5.49F28C40-- The string is the body of an email message thats taken out of a database. If it's also necassary to include the headers of the message, that's no problem since i also store that in the database. The reason i need this, is because i am creating a message archive similair to Geocrawler and MARC and it's quite irratating to not be able to decode messages when they are mime encoded. Thanks for the advice, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MIME Decoding of a string
Mark Wrote: >Take a look at my project: http://www.webgadgets.com/phpost >It's a webmail app but it includes code to fully parse MIME messages, >including quoted printable encoding, etc. It uses no third party >libraries or classes, only functions that are native to PHP. >I am about to release 1.06 (tonight likely) which greatly improves the >MIME handling (seems to handle MIME better than Eudora or Outlook now, >especially nested multipart sections). Sounds good ;) I saw you release your version 2 days ago on freshmeat and when i tried it, it didn't handle mime that great yet. Hopefully the new version will be better! Thanks for contributing to the open source community. (My project will also be open source, but first it has to be stable ;) Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Reversing htmlspecialchars()
Hi There, How can i reverse the htmlspecialchars() functions? I can't seem to find a function for that. Thanks, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Reversing htmlspecialchars()
Hi Rasmus, > > How can i reverse the htmlspecialchars() functions? > > I can't seem to find a function for that. > > There is no function to do that. Maybe it would be a nice feature to add in PHP? For the moment i'll just have to make my own version then :) Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] IIS 4 & auto prepend
Hi there, Is it possible with IIS4 to have PHP auto prepend a PHP script, similair to the way Apache can do this with for example a .htaccess file or a server directive? I know i can do this also in the PHP.ini, but i'm running multiple virtual servers so this is not an option. Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: PHP + MySQL, how to get total rows matched when using LIMIT 0, 10?
> I'm trying to get the total matched rows when I'm using "LIMIT 0, 10", > but I only get the number 10, when the total should be around 100. So, > can I get total matched rows without doing a separate query using > count()? You first have to get the whole result set without the limit OR make use of count(*) and parse the result of count. Since it only returns 10, it's correct the the total matched rows is 10. sql query Regards, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Custom 404 Page
>I am running apache and php. I want to create a custom 404 page for my >site. I have created a .htaccess file and "ErrorDocument 404 /error.php3" >line to it. >If someone tries to view www.myserver.com/thispagedoesnotexist.htm the 404 >page is displayed without issue. I guess you are using PHP on Windows? I had the same problem with a development server running IIS. I did not find a solution. IIS starts the PHP parser if you use a file with a .php3 extension (or whatever you configured) even when It does not exist. --- Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP 4.1.2 & Gd2
Hi, I'm trying to install GD2 in PHP, and can't get it compiled. It keeps saying: In file included from gd.c:36: php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows non-static gd.c:92: conflicting types for `gdIOCtx' /usr/include/gd_io.h:18: previous declaration of `gdIOCtx' make[3]: *** [gd.lo] Error 1 ./configure --with-apxs=/usr/local/apache/bin/apxs --with-curl=/usr/local/lib --with-mysql=/usr/local/mysql -- with-zlib --enable-track-vars --with-config-file-path=/usr/local/apache/php --with-gd=/usr --with-ldap --with- interbase=/opt/interbase --with-ttf GD 1.8.x works great, this only happens with GD2. Any suggestions? Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP & Interbase 6.5
Hello, We have ordered Interbase 6.5 last week, but I was wondering if it is even supported by PHP at this moment since the 6.5 version is not open source. Does anyone have experience with this version? Kind regards, Jeroen Geusebroek
[PHP] Frames, Sessions & Search Engines
Hi there, I have a question about how Search Engines handle sessions and frames. Since my site uses frames, and i think search engines link to pages individualy and not the frameset, i wanted to use sessions to indicate if a user comes from a search engine (then it doesn't have a valid session) and if so just redirect the user to the main page. But i'm afraid that search engines will get redirected to the main page everytime it try's to index a page. What do you all think, and might there be another solution? Thanks, Jeroen Geusebroek P.S. Please CC me in your reply, i'm not a member of the list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Detecting browser language
Hi there, Lately you see a lot of sites that detect the language of the client browser. For example if i visit google it's in dutch. I know they detect this using the browser, but i'm not sure on how it's done. Can someone shed some light on this? Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Strange output by phpinfo()
While viewing my phpinfo() page, i got this: QUERY_STRING %u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u%u00 =a REQUEST_URI /default.ida?XXX X%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9 090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0 078%u%u00=a Of course I wasn't using this query for my phpinfo() page. Where did PHP get this information from? This info was under the header "Environment" Not that I have any troubles with this, but it seems weird to me. Thanks, Jeroen Ps. Of course I know what that QUERY is, but why is it in my phpinfo() output when I didn't use that query? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Strange output by phpinfo()
>> While viewing my phpinfo() page, i got this: >> >> QUERY_STRING >> >> >> >> %u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucb >> d3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u%u00 >> =a >That is interesting. Code Red II doesn't trojan browsers, does it??? Hmm >that's an interesting idea... Are you using a (malicious) proxy server? Nope, no trojaned browser and no malicious proxy server. I think it maybe a bug in PHP or Apache. I tried it again a few times today and now the output was ok. Really weird. Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.6 & Mysql 4.0
Hi there, Does the current stable PHP (4.06) support the use of the newly released Mysql 4? Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Spam messages (Was: FREE S E X O
>> ...but then what do you do about the people who have legitimate questions >> who don't want to subscribe to the list? This is a fairly high traffic list >> and not everyone wants that much mail coming at them just to have the >> occasional one-off question answered. >See as this list is mirrored to a newsgroup they could use that instead. >I agree filter software is needed to junk the spam. And then the spammers can use NNTP again. I think it goes both ways. NNTP <> LIST A good spam filter (blacklist) would be a good option. Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] MySQL locks, will PHP wait?
Hi Guys, I have a question; if i lock a mysql table, will a PHP script wait untill there is no lock anymore and then execute the script? Thanks, Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Decode ?iso strings?
Hello, I'm creating a mailinglist archive in PHP, and all is going very well. I'm planning to release it open source when version 1.0 is ready. I have a question, when i get emails and parse them sometimes the name of the sender is in this format: =?iso-8859-13?B?TWFyaXVzIFBldHJhdmnoaXVz?= How do i decode this? Same goes for mime messages, is there any excisting code that decodes mime messages? Thanks for the help, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] var question
Hi Guys, I have a question about the way PHP handles var/strings. Let's say i have this URL: http://foo.bar.com/?login. And in my script i have this code: if($login) { echo "blab"; } or if(isset($login)) { echo "blab"; } It always returns FALSE. I think that is because the string is empty. Shouldn't PHP, even if a var is empty, put it in his var-list? Is there another way to do what i want? Thanks, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regular Expression
Hi, I have question about regular expressions; I don't know anything about it and was wondering if someone could help me out. I have this text: "[ this is atest ] and this is the rest of the text" I want to get the text inbetween the [ and ]. If someone could help me out, i would appreciate it. A link to a tuturial would also be nice. Regards, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Regular Expression
>oops. The expression should read '/\[([^\]]+)\]/' Thanks all, i used this code and it works: preg_match("/\[(.+)\]/",$msg_array[$i],$segments); $title = trim($segments[1]); $description = ereg_replace("\[ $title \]", "", $msg_array[$i]); Does anyone know a good regex tutorial? I'll probably bump into it again. Regex'es seem to be very usefull. Regards, Jeroen Geusebroek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Max execution time while doing DB queries
Hi, I was wondering how i can limit a script from waiting too long for a database query to return. The problem is that it will wait an infinite time while performing a query on a database when there is for example a lock on a table. I want it to exit/fail when a set amount of time has passed. set_time_limit() will not work because it does not have any affect on input. Am i overlooking a function? -- Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max execution time while doing DB queries
On 9/22/05, Michael Sims <[EMAIL PROTECTED]> wrote: > What RDBMS are you using? If you are using Postgres you can use > pg_send_query() > which is non-blocking. I don't think the other database backends/php drivers > support such functionality, but I could be wrong... Maybe someone else knows > of > another way to accomplish this with the other backends... For this application i'm using a MSSQL database. There is an ini setting (mssql.timeout) which should do what i want but afiak doesn't work. It defaults to 60 which i assume are seconds. My app has had times that it was waiting way longer then that before it died without any error message. (6 hours and more). -- Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max execution time while doing DB queries
On 9/22/05, Michael Sims <[EMAIL PROTECTED]> wrote: > What platform/driver? If Linux, are you using FreeTDS and if so what > version? It > looks like the timeout is handled in the TDS library, not at the PHP level. > I did > some poking through the FreeTDS mailing list archives and it seems that PHP > calls > dbsettime() which was unimplemented in FreeTDS in earlier versions, so you > may need > a bleeding edge version of FreeTDS to use it. If you are using FreeTDS you > may want > to ask for help on the their mailing list. > > If you're using Windows with the SQL Client Tools DLL then I'm not sure why > the > queries aren't timing out... I'm using PHP 5.03 (cli) on linux with freetds-0.63. Just before your last email i checked the freetds.conf and i found a timeout option. But unfortunatly that didn't help either. It's quite easy to reproduce. Just create a idiotic long query and see what happens ;) I have the limit now at 10 (which i presume are seconds) But thanks for the tip, i'll have a look at the beedling edge versions of freetds. Thanks! -- Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Max execution time while doing DB queries
On 9/22/05, Michael Sims <[EMAIL PROTECTED]> wrote: > http://lists.ibiblio.org/pipermail/freetds/2005q3/018774.html > > According to that it's in 0.64 I'll have it a go tomorrow. Looks hopeful! Will let you know. -- Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php