php-general Digest 4 Apr 2007 11:47:20 -0000 Issue 4715
Topics (messages 252015 through 252025):
Re: Cannot remove PHP Version 5.2.1-0.dotdeb.1
252015 by: Miles Thompson
252018 by: Mario Guenterberg
Re: Audio CAPTCHA review request
252016 by: Daevid Vincent
dynamic web interface and size
252017 by: Alain Roger
Re: PDO mssql + multiple rowsets
252019 by: Javier Ruiz
252020 by: Javier Ruiz
help me to solve this math maze
252021 by: Faisal Murad
252022 by: Zoltán Németh
252023 by: Satyam
252024 by: Jochem Maas
Problems downloading a PDF
252025 by: Mário Gamito
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 ---
Mario,
Boy it's been a long day - it seems that every item I had in by configure
batch had to be installed; then at the very end of the day it finally got to
the --with-mysql. Had quite a scramble tryingto find the correct dev
environment, then finally I was down to to two warning errors, one of which
was for sqlite.
Tried a make, but it wouldn't go, so I ran configure again, explicitly
stating with no sqlite.
Tried make again and it completed.
Ran checkinstall and it packaged the puppy, installed it and signed off with
a pleasant note on how to uninstall if necessary.
Tomorrow we'll see how it works, and I hope I did not clobber mysql as part
of this.
There's an incompatibility between bzip2 and prefork-apache2-dev (or
something like that). Running one clobbers the other, so since I needed
apxs2 more than bzip2, that was dropped from the configuration.
If you're interested I'll post another update tomorrow.
Regards - Miles Thompson
On 4/3/07, Mario Guenterberg <[EMAIL PROTECTED]> wrote:
On Tue, Apr 03, 2007 at 08:50:31AM -0300, Miles Thompson wrote:
> Mario,
>
> That did it - when I tried to reload the phpinof.php script Apache did
not
> know what to do with the file.
>
> Now I'll drag the compiler from it's dusty corner and start from
scratch.
Not the debian/ubuntu way but sometimes the best solution ;-)
> Thanks a million - Miles
:-)
Greetings
Mario
--
-----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel: 033876-21 966 |
| Notruf: 0173-277 33 60 |
| http://www.havelsoft.com |
| |
| Inhaber: Mario Günterberg |
| Mützlitzer Strasse 19 |
| 14715 Märkisch Luch |
-----------------------------------------------------
--- End Message ---
--- Begin Message ---
On Tue, Apr 03, 2007 at 08:56:12PM -0300, Miles Thompson wrote:
> Mario,
>
> Boy it's been a long day - it seems that every item I had in by configure
> batch had to be installed; then at the very end of the day it finally got to
> the --with-mysql. Had quite a scramble tryingto find the correct dev
> environment, then finally I was down to to two warning errors, one of which
> was for sqlite.
>
> Tried a make, but it wouldn't go, so I ran configure again, explicitly
> stating with no sqlite.
>
> Tried make again and it completed.
>
> Ran checkinstall and it packaged the puppy, installed it and signed off with
> a pleasant note on how to uninstall if necessary.
>
> Tomorrow we'll see how it works, and I hope I did not clobber mysql as part
> of this.
>
> There's an incompatibility between bzip2 and prefork-apache2-dev (or
> something like that). Running one clobbers the other, so since I needed
> apxs2 more than bzip2, that was dropped from the configuration.
>
> If you're interested I'll post another update tomorrow.
>
Hi Miles,
can you post your ./configure options.
apache2-prefork-dev is the right devel package and in my environment
that works fine with bzip2 and sqlite. Have you installed the
libsqlite0-dev and libsqlite3-dev packages and the libbz2-dev
package?
I've written a little install shellscript for my own use.
Greetings
Mario
--
-----------------------------------------------------
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel: 033876-21 966 |
| Notruf: 0173-277 33 60 |
| http://www.havelsoft.com |
| |
| Inhaber: Mario Günterberg |
| Mützlitzer Strasse 19 |
| 14715 Märkisch Luch |
-----------------------------------------------------
build-php5.sh
Description: Bourne shell script
--- End Message ---
--- Begin Message ---
> -----Original Message-----
> From: Daevid Vincent [mailto:[EMAIL PROTECTED]
>
> I will point you at http://www.cepstral.com/ for a possible
> solution to your
> .mp3 usage. You could use Cepstral's "swift" tool to say the text
> dynamically.
Actually Ted, what I was referring to was that you could say actual "words"
like "rainbow6", or even made up strings such as "A35SFX". Much like a text
captcha does. As it stands, I think most audio captchas use simply digits,
which means you only need to understand [0-9] in your voice-breaker-code
(http://vorm.net/captchas). Mixing in letters means another 26 variants, and
if you went with words (which 'swift' will 'speak'), then you're in another
stratosphere all together...
D.Vin
--- End Message ---
--- Begin Message ---
Hi,
My question is not so much about PHP language but more about concept and PHP
result.
Basically i'm currently working on web application to administrate the web
content of a website. My customer would like to have a nice web application
interface, so it means a lot of images, and so on.
However, he would like also to have as PHP/postgreSQL results some tables
with quite enough information, so it means several fields data to collect
and to show.... so, a huge width for each table.
Here is my dilema... basically and based on web standard all website should
have an interface of 1024px (less scrollbar = 1000 px) width.
How can i display enough data on such width ?
I was thinking to display data into a div and to make this div scrollable in
order to respect those 1000px width.
I would like to have your experiences point of view in such situation.
thanks a lot,
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5
--- End Message ---
--- Begin Message ---
I've seen there's an open bug on the missing feature I pointed out in my
first email, but it's even not assigned and I cannot get an answer from the
developer... so... does anybody know if there is any plan to finish the
PDO-dblib driver?
TIA
---------- Forwarded message ----------
From: Javier Ruiz <[EMAIL PROTECTED]>
Date: Apr 2, 2007 9:54 AM
Subject: Re: [PHP] PDO mssql + multiple rowsets
To: "Frank M. Kromann" <[EMAIL PROTECTED]>, <php-general@lists.php.net>
Hi again. Sorry I was out of my city during the weekend and had no
connection available...
So Frank, please lemme know, is the feature (multiple rowsets) planned to be
included in the pdo-dblib driver? I would like to know to include or not pdo
in my development needs against mssql.
Thanks, greetings!
On 3/29/07, Frank M. Kromann <[EMAIL PROTECTED]> wrote:
It Is doable. The native mssql/dblib extension does support that features.
I just have'nt had the time to code it for pdo_dblib.
- Frank
> I too have been having problems getting the PDO dblib for mssql to play
> well (getting the same error actually). If you find a reason or work
> around for it I would appreciate hearing about it. Thinking of going
> the odbc route myself if I can't get it to work.
>
>
> Respectfully,
> Ligaya Turmelle
>
> -----Original Message-----
> From: Javier Ruiz [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 28, 2007 8:21 PM
> To: php-general@lists.php.net
> Subject: [PHP] PDO mssql + multiple rowsets
>
> Hi!
>
> I want to use PDO in my apps for connecting to several RDBSs, one of
> them, sql server 2000 and 2005. I tried to use as DSN something like
> "mssql:..."
> (as I've seen in the php manual pages) but I get a PDOException with
the
> message "Unable to open PDO connection [wrapped: could not find
> driver]". I can work well with the mssql built-in functions (like
> mssql_connect, mssql_query and so on...) and even I can almost work
> perfectly using in my dsn "dblib:...".
> So first question: is the PDO's driver "mssql" deprecated or is it me
> doing something wrong in the PHP installation?
> BTW, I use php-5.2.1
>
> In case that the answer to the first question is that "mssql" is no
more
> used as a PDO driver, I have a problem... I have stored procedures in
> sql server that return multiple rowsets, I've seen that PDO offers
> functionability to manage this, but not for the dblib driver... if I
try
> to use the $stmt->nextRowSet() method, I get an exception like "Driver
> does not support this function: driver does not support multiple
> rowsets"
> What can I do then to work with my stored procs?
>
> Thanks in advance
>
> --
> PHP General Mailing List ( http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
btw... the bug: http://pecl.php.net/bugs/bug.php?id=10530
---------- Forwarded message ----------
From: Javier Ruiz <[EMAIL PROTECTED]>
Date: Apr 4, 2007 9:10 AM
Subject: Fwd: [PHP] PDO mssql + multiple rowsets
To: php-general@lists.php.net
I've seen there's an open bug on the missing feature I pointed out in my
first email, but it's even not assigned and I cannot get an answer from the
developer... so... does anybody know if there is any plan to finish the
PDO-dblib driver?
TIA
---------- Forwarded message ----------
From: Javier Ruiz <[EMAIL PROTECTED]>
Date: Apr 2, 2007 9:54 AM
Subject: Re: [PHP] PDO mssql + multiple rowsets
To: "Frank M. Kromann" <[EMAIL PROTECTED]>, < php-general@lists.php.net>
Hi again. Sorry I was out of my city during the weekend and had no
connection available...
So Frank, please lemme know, is the feature (multiple rowsets) planned to be
included in the pdo-dblib driver? I would like to know to include or not pdo
in my development needs against mssql.
Thanks, greetings!
On 3/29/07, Frank M. Kromann < [EMAIL PROTECTED]> wrote:
It Is doable. The native mssql/dblib extension does support that features.
I just have'nt had the time to code it for pdo_dblib.
- Frank
> I too have been having problems getting the PDO dblib for mssql to play
> well (getting the same error actually). If you find a reason or work
> around for it I would appreciate hearing about it. Thinking of going
> the odbc route myself if I can't get it to work.
>
>
> Respectfully,
> Ligaya Turmelle
>
> -----Original Message-----
> From: Javier Ruiz [mailto: [EMAIL PROTECTED]
> Sent: Wednesday, March 28, 2007 8:21 PM
> To: php-general@lists.php.net
> Subject: [PHP] PDO mssql + multiple rowsets
>
> Hi!
>
> I want to use PDO in my apps for connecting to several RDBSs, one of
> them, sql server 2000 and 2005. I tried to use as DSN something like
> "mssql:..."
> (as I've seen in the php manual pages) but I get a PDOException with
the
> message "Unable to open PDO connection [wrapped: could not find
> driver]". I can work well with the mssql built-in functions (like
> mssql_connect, mssql_query and so on...) and even I can almost work
> perfectly using in my dsn "dblib:...".
> So first question: is the PDO's driver "mssql" deprecated or is it me
> doing something wrong in the PHP installation?
> BTW, I use php-5.2.1
>
> In case that the answer to the first question is that "mssql" is no
more
> used as a PDO driver, I have a problem... I have stored procedures in
> sql server that return multiple rowsets, I've seen that PDO offers
> functionability to manage this, but not for the dblib driver... if I
try
> to use the $stmt->nextRowSet() method, I get an exception like "Driver
> does not support this function: driver does not support multiple
> rowsets"
> What can I do then to work with my stored procs?
>
> Thanks in advance
>
> --
> PHP General Mailing List ( http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
i am making a program to give money to a group of people
lets say that i have to distribute 3000 among 12
people 6 of them are adult and will get 100%
6 them are children those will get 75% from the overall amount.
a common solution might appear as
divide 3000 to 12 which is 250
give 250 to adults and 75% percent of it to children which is 187.5
after this kind of calculation i have 375 more to give which was supposed to be
equally distributed among them
can anyone understand my problem and assists me.
faisal
--- End Message ---
--- Begin Message ---
2007. 04. 4, szerda keltezéssel 12.44-kor Faisal Murad ezt írta:
> i am making a program to give money to a group of people
> lets say that i have to distribute 3000 among 12
> people 6 of them are adult and will get 100%
> 6 them are children those will get 75% from the overall amount.
>
> a common solution might appear as
>
> divide 3000 to 12 which is 250
> give 250 to adults and 75% percent of it to children which is 187.5
> after this kind of calculation i have 375 more to give which was supposed to
> be
> equally distributed among them
>
> can anyone understand my problem and assists me.
$adultmoney = $totalmoney / ($adultnumber + 0.75 * $childnumber);
$childmoney = 0.75 * $adultmoney;
greets
Zoltán Németh
>
> faisal
--- End Message ---
--- Begin Message ---
You'll give 100 'units' to 6 of them, and 75 to 6, thus:
6 * 100 + 6 * 75 ==> 1050 units
Each 'unit' is valued at:
3000 / 1050 ==> 2.8571
Thus, you give:
6 * 285.71 + 6 * 214.28 ==> 2999.94, and you may keep the change ;-)
Satyam
----- Original Message -----
From: "Faisal Murad" <[EMAIL PROTECTED]>
To: <php-general@lists.php.net>
Sent: Wednesday, April 04, 2007 11:44 AM
Subject: [PHP] help me to solve this math maze
i am making a program to give money to a group of people
lets say that i have to distribute 3000 among 12
people 6 of them are adult and will get 100%
6 them are children those will get 75% from the overall amount.
a common solution might appear as
divide 3000 to 12 which is 250
give 250 to adults and 75% percent of it to children which is 187.5
after this kind of calculation i have 375 more to give which was supposed to
be
equally distributed among them
can anyone understand my problem and assists me.
faisal
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.25/745 - Release Date: 03/04/2007
12:48
--- End Message ---
--- Begin Message ---
Satyam wrote:
> You'll give 100 'units' to 6 of them, and 75 to 6, thus:
>
> 6 * 100 + 6 * 75 ==> 1050 units
>
> Each 'unit' is valued at:
>
> 3000 / 1050 ==> 2.8571
>
> Thus, you give:
>
> 6 * 285.71 + 6 * 214.28 ==> 2999.94, and you may keep the change ;-)
pity you don't work as bank director Satyam (notice that in real
life it's the bank that always pockets the change ;-)
>
> Satyam
>
>
>
> ----- Original Message ----- From: "Faisal Murad" <[EMAIL PROTECTED]>
> To: <php-general@lists.php.net>
> Sent: Wednesday, April 04, 2007 11:44 AM
> Subject: [PHP] help me to solve this math maze
>
>
> i am making a program to give money to a group of people
> lets say that i have to distribute 3000 among 12
> people 6 of them are adult and will get 100%
> 6 them are children those will get 75% from the overall amount.
>
> a common solution might appear as
>
> divide 3000 to 12 which is 250
> give 250 to adults and 75% percent of it to children which is 187.5
> after this kind of calculation i have 375 more to give which was
> supposed to be
> equally distributed among them
>
> can anyone understand my problem and assists me.
>
> faisal
>
>
>
> --------------------------------------------------------------------------------
>
>
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.25/745 - Release Date:
> 03/04/2007 12:48
>
--- End Message ---
--- Begin Message ---
Hi,
I'm building this site that has several PDFs to download, but only to
registered users.
To prevent people to insert the full URL to the documents, i moved them
outside Apache's DocumentRooot, which is /var/www.
My site is in /var/www/telbit and i put the PDFs in /var/www
I've coded in order to do the trick, but it's failing.
I can't get the name of the file.
Notice that the page which has the code is products-teststudio.php itself.
The code follows my signature.
Any help would be appreciated.
Warm Regards
--
:wq! Mário Gamito
--
<?php
if (isset($_SESSION['email'])) {
echo"<a href=\"products-teststudio.php?file=testudio.pdf\"
rel=\"external\">Download TESTUDIO flyer</a>";
$file = $_GET['file'];
// try to sanitize the filename
if (preg_match('/[^A-Za-z0-9._]/', $file))
die("Invalid filename.");
$path = '/var/www/';
$full = $path . $file;
header('Content-type: application/pdf');
header("Content-Length: " . filesize($full));
header('Content-disposition: attachment; filename="'. basename($file)
.'"');
readfile($full);
}
--- End Message ---