php-general Digest 7 Nov 2007 08:02:07 -0000 Issue 5114

2007-11-07 Thread php-general-digest-help
php-general Digest 7 Nov 2007 08:02:07 - Issue 5114 Topics (messages 264146 through 264167): Re: Can I make a process run in background? 264146 by: Robert Cummings 264162 by: Per Jessen Re: PHP Won't Access Files Outside Web Root (Leopard/MacOS X 10.5) *SOLVED*

[PHP] back-up mysql database using PHP

2007-11-07 Thread Vanessa Vega
hello thereis there a way to create a back-up database through PHP?...i would like to create a file maybe an sql file that would served as back up of my database. Im using mysql database. I know i could use phpmyadmin to do this but i just like to have a function that would do this without

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread Per Jessen
[EMAIL PROTECTED] wrote: The documentation for zlib says that it expects an Adler-32 checksum at the end of the file. PHP follows this [largely outdated] standard. Uh, nothing to do with PHP, the code is in zlib. Python, on the other hand, doesn't, and uses a different checksum, CRC-32.

[PHP] enhanced_list_box, 2 tables from a database

2007-11-07 Thread kNish
Hi, A newbie question. I have more than one table to access from a database. When I use the code as below, it gives no response on the web page. What may I do to run more than one table from the same database into the script. BRgds, kNish . . . . tr td height=33nbsp;/td td width=14%

Re: [PHP] enhanced_list_box, 2 tables from a database

2007-11-07 Thread Robin Vickery
On 07/11/2007, kNish [EMAIL PROTECTED] wrote: Hi, A newbie question. I have more than one table to access from a database. When I use the code as below, it gives no response on the web page. What may I do to run more than one table from the same database into the script. Firstly, turn

Re: [PHP] More info on timeout problem, with code

2007-11-07 Thread Jochem Maas
Jon Westcot wrote: Hi Chris: ... That is, I need to close the single quote, place a comma after the field, and then add in another opening quote. One other thing: I suspect I need to use addslashes() to the elements in $data -- is there a way to do this with one statement as you've

[PHP] Re: back-up mysql database using PHP

2007-11-07 Thread Sebastian Hopfe
Dear Vanessa You can use the SELECT ... INTO OUTFILE 'file_name' with mysql_query($vAnf, $dbconn); For the syntax you can have a look at http://dev.mysql.com/doc/refman/5.0/en/select.html Should you be allowed to send system-queries to the Server, than you should have a look to

Re: [PHP] php.ini include_path and symlinks

2007-11-07 Thread Ravi Menon
Are you using a compile cache like eaccelerator or APC etc? Sometimes it's the cache that doesn't realize things have changed. I use a symlink switcher for version releases also and I always flush the eaccelerator directory when I do that. Yes we use APC ( with apc.stat on ). This was the

Re: [PHP] Regular Expressions

2007-11-07 Thread Mark Summers
There was no escaping in the original either. Also, I did assume that the list of replacements would grow to become pretty large. I wouldn't suggest doing this for a small list such as that given in the example. Robert Cummings wrote: On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote:

[PHP] MEID to ESN Conversion

2007-11-07 Thread Jay Blanchard
In hopes that I will not have to invent (or re-invent) the wheel I am looking for PHP code that does MEID to ESN conversion (telecom folks will know what I am speaking of). I have been doing a lot of searching this morning and know the algorithm but was hoping someone already had it and could

Re: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Joker7
In news: [EMAIL PROTECTED] - Brad wrote : Sure thing, The site is http://www.gaymillionaire.net You can see that I have a bunch of text underneath the flash animation in the middle. I am trying to fill the dead space to the right of it. In the code, I can see where to widen the table.

Re: [PHP] Re: back-up mysql database using PHP

2007-11-07 Thread Philip Thompson
On 11/7/07, Sebastian Hopfe [EMAIL PROTECTED] wrote: Dear Vanessa You can use the SELECT ... INTO OUTFILE 'file_name' with mysql_query($vAnf, $dbconn); For the syntax you can have a look at http://dev.mysql.com/doc/refman/5.0/en/select.html Should you be allowed to send system-queries to

Re: [PHP] Regular Expressions

2007-11-07 Thread Robert Cummings
On Wed, 2007-11-07 at 14:53 +, Mark Summers wrote: There was no escaping in the original either. Also, I did assume that the list of replacements would grow to become pretty large. I wouldn't suggest doing this for a small list such as that given in the example. Given that you expect

RE: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Per Jessen
Brad wrote: In the code, I can see where to widen the table. One would think that php would fill the dead space if the is nothing blocking it. But it is not. Like Jochem already said, your question is probably best asked on an html mailing list. It's not really a PHP issue. /Per Jessen,

Re: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Per Jessen
Brad wrote: I just picked up an account to fix a website and the code is making no sense. Brad, it's been barely six hours since you first posted that question. 1) be patient. 2) it's a lot of code to ask someone else to look at for you. I would start by narrowing down the problem/code a

Re: [PHP] Regular Expressions

2007-11-07 Thread Mark Summers
This is a much better solution. I didn't realise that str_replace() accepted arrays as arguments for the search and replace terms. Mental note: reading mailing lists backwards doesn't work. Robert Cummings wrote: On Tue, 2007-11-06 at 23:24 -0300, Martin Alterisio wrote: 2007/11/6,

RE: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Brad
Sure thing, The site is http://www.gaymillionaire.net You can see that I have a bunch of text underneath the flash animation in the middle. I am trying to fill the dead space to the right of it. In the code, I can see where to widen the table. One would think that php would fill the dead space

[PHP] Re: enhanced_list_box, 2 tables from a database

2007-11-07 Thread Sebastian Hopfe
Dear kNish, first of all i have formated your PHP Code it looks better now. ?php echo tr\n; echo td height=\33\nbsp;/td\n; echo td width=\14%\ class=\style3\Artist/td\n; $options = mysql_query(SELECT artist_name FROM artist); $options=mysql_fetch_array($options); echo 'td';

[PHP] Re: Sessionvariable

2007-11-07 Thread Sebastian Hopfe
Dear Ronald, I would like to ask you, want kind of session you use in you application. regards Sebastian Ronald Wiplinger [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] I use at the first page a session variable to set a flag. After a few pages, or if somebody wait too

[PHP] Annoying PHP - MySQL communication timeout

2007-11-07 Thread Mark Summers
Has anyone here experienced a problem where a MySQL server seemingly closes a connection opened by PHP whilst the PHP script is still running? The problem only seems to affect scripts that run for a long time but there are a few things that make it unusual: 1) There is no obvious correlation

Re: [PHP] Regular Expressions

2007-11-07 Thread Robert Cummings
On Wed, 2007-11-07 at 14:33 +, Mark Summers wrote: This is a first attempt but the general idea is that the regular expression matching is done in one operation and then str_replace() is called only as many times as required instead of once for every line in your list. Also, str_replace()

Re: [PHP] Regular Expressions

2007-11-07 Thread Mark Summers
This is a first attempt but the general idea is that the regular expression matching is done in one operation and then str_replace() is called only as many times as required instead of once for every line in your list. Also, str_replace() is faster than ereg_replace(). ?php $replace = array(

Re: [PHP] PHP 5.1 memory leak?

2007-11-07 Thread Paul Scott
On Wed, 2007-11-07 at 15:21 -0200, Egon Hilgenstieler wrote: I have a really complex report which uses a tree-like structure of data base objects. Usually it consumes a lot of memory but that it is not really an issue because it is an intranet application with few users and a dedicated server

[PHP] php and ms-sql 2000 character-set

2007-11-07 Thread edwardspl
Dear All, How to control the character set for php and ms-sql 2000 ? Due to the php display the non-english ( eg : Chinese ) is ok, but the DB table is problem... Thanks ! Edward, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread heavyccasey
They're exactly the same, except of the last 4 bytes. Python calculates them differently than PHP. PHP follows the standards, Python does not :] This would be more concise if PHP included the gzdecode (http://us2.php.net/gzdecode) function. On Nov 7, 2007 12:12 AM, Per Jessen [EMAIL PROTECTED]

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread Per Jessen
[EMAIL PROTECTED] wrote: They're exactly the same, except of the last 4 bytes. Python calculates them differently than PHP. PHP follows the standards, Python does not :] That is exactly what is so weird - does Python maybe have its own implementation of the gzip compression algorithm? I

Re: [PHP] re-post (unanswered) Tables, flash and text

2007-11-07 Thread Jochem Maas
Per Jessen wrote: Brad wrote: I just picked up an account to fix a website and the code is making no sense. Brad, it's been barely six hours since you first posted that question. 1) be patient. 2) it's a lot of code to ask someone else to look at for you. I would start by

Re: [PHP] Re: enhanced_list_box, 2 tables from a database

2007-11-07 Thread Philip Thompson
On 11/7/07, Sebastian Hopfe [EMAIL PROTECTED] wrote: Dear kNish, first of all i have formated your PHP Code it looks better now. ?php echo tr\n; echo td height=\33\nbsp;/td\n; echo td width=\14%\ class=\style3\Artist/td\n; $options = mysql_query(SELECT artist_name FROM

[PHP] PHP 5.1 memory leak?

2007-11-07 Thread Egon Hilgenstieler
Hi All, My apologies if this question was already answered, I just couldn't find it on the mail archive. I have a really complex report which uses a tree-like structure of data base objects. Usually it consumes a lot of memory but that it is not really an issue because it is an intranet

[PHP] help with link from mysql

2007-11-07 Thread Joey
Hello All, I have a situation where I am storing data to a blob field. Everything works in respect to in and out of the DB, however when we type in a link like so HYPERLINK http://www.abc.com/subfolder/folder2/http://www.abc.com/subfolder/folder2/ the link stops at the domain, so the

Re: [PHP] Re: Sessionvariable

2007-11-07 Thread Ronald Wiplinger
Sebastian Hopfe wrote: Dear Ronald, I would like to ask you, want kind of session you use in you application. I get information and put these information into a session variable, like which language the page should be displayed. I have two frames on that web page. One is the main page and one

[PHP] Help with preg_replace

2007-11-07 Thread Richard Luckhurst
Hi I am in the process of porting a Perl application to PHP and I have hit a snag with trying to substitute test within a file. I have looked at the PHP manual and believe I should be using preg_replace but I have tried the examples and am not getting the result I would expect. I would

Re: [PHP] help with link from mysql

2007-11-07 Thread Andrew Ballard
On Nov 7, 2007 5:22 PM, Joey [EMAIL PROTECTED] wrote: I have a situation where I am storing data to a blob field. Everything works in respect to in and out of the DB, however when we type in a link like so HYPERLINK http://www.abc.com/subfolder/folder2/http://www.abc.com/subfolder/folder2/

[PHP] html parsing

2007-11-07 Thread Ron Croonenberg
Hello, I have a script that ads data to a html template. However when there is an include in the html like: !--#include file=include/header.sinc -- it is not processed, but just ends up as a string in the page. So I guess it needs to be parsed. Is there an easy way to do that ? thanks, Ron

Re: [PHP] html parsing

2007-11-07 Thread Casey
Can you just change it to ?php include('include/header.sinc); ? ? On Nov 7, 2007, at 7:24 PM, Ron Croonenberg [EMAIL PROTECTED] wrote: Hello, I have a script that ads data to a html template. However when there is an include in the html like: !--#include file=include/header.sinc -- it

[PHP] Re: Help with preg_replace

2007-11-07 Thread Al
Delimiters needed. Can use about anything not already in your pattern. / is very commonly used; but I like # or % generally; but, you can't use % because your pattern has it. $html = preg_replace(#%ResID#,$bookid,$html); Richard Luckhurst wrote: Hi I am in the process of porting a Perl

Re: [PHP] Re: Help with preg_replace

2007-11-07 Thread Jochem Maas
Al wrote: Delimiters needed. Can use about anything not already in your pattern. / is very commonly used; but I like # or % generally; but, you can't use % because your pattern has it. $html = preg_replace(#%ResID#,$bookid,$html); wont a str_replace() do just fine in this case? // and we

Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
ok I wrote something quick and dirty real quick: But somehow it doesn't seem to like recursion. Is there something special one needs to do in php ? here's the code snippet: function parsehtmlline($line) { if (strlen(strstr($line, #include)) == 0 strlen(strstr($line, !--)) == 0) { /*

Re: [PHP] html parsing

2007-11-07 Thread Tom Ray [Lists]
Ron Croonenberg wrote: Hello, I have a script that ads data to a html template. However when there is an include in the html like: !--#include file=include/header.sinc -- it is not processed, but just ends up as a string in the page. So I guess it needs to be parsed. Is there an easy way to

Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
Yes I do have SSI enabled here is what I am doing. I have a php script that reads (a basic) file with html in it. (meaning it it would have an html/shtml extension it would just work in a browser. Now I rename the file to myhtml.dat and let the script read it and print it to stdout. That works

Re: [PHP] html parsing

2007-11-07 Thread Ron Croonenberg
I think the problem is that I read the lines in PHP, I read them with fgets and output them with printf. So the php interpreter never gets to see the line. the apache doesn't parse php output, so it doesn't happen there either. So.. I figured.. I either had to parse it in php myself OR

Re: [PHP] gzuncompress() Not Working.

2007-11-07 Thread heavyccasey
In my tests, Python can parse both Adler-32 and CRC32, while PHP can only do Adler-32. Anyways, I shortened my function: function fixAdler32($data) { static $f; if (!isset($f)) $f = tempnam('/tmp', 'gz_fix'); file_put_contents($f,