php-general Digest 14 Apr 2007 14:07:59 -0000 Issue 4734
Topics (messages 252924 through 252936):
Re: width and height of flash-files
252924 by: Heiko Sudar
252926 by: Tijnema !
Re: Images again
252925 by: Tijnema !
Json.php
252927 by: Otto Wyss
252929 by: Tijnema !
252930 by: Satyam
Re: how to get var name and value from function?
252928 by: Tijnema !
252934 by: Afan Pasalic
Problems installing php with pdflib
252931 by: Merlin
252932 by: Tijnema !
Re: WWE in Stamford, CT needs a kick ass PHP Developer!
252933 by: David Robley
warning message to hide
252935 by: Alain Roger
252936 by: Tom Chubb
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 ---
Hi,
thx fort he fast infos. the solution is clear for .swf files.
does someone have a workaround for flash-video files .flv?
Heiko
-----------------------------------------------
lernen ist wie rudern gegen den strom
hört man damit auf, treibt man zurück!
(laotse)
-----------------------------------------------
heiko sudar
kranzhornstraße 4a
85567 grafing
08092 860585 (t)
08092 860587 (f)
0179 6863181 (m)
www.countingstation.de
www.applico.biz
www.lokalitaeten.net
www.zweiterjuli05.de
--- End Message ---
--- Begin Message ---
On 4/14/07, Heiko Sudar <[EMAIL PROTECTED]> wrote:
Hi,
thx fort he fast infos. the solution is clear for .swf files.
does someone have a workaround for flash-video files .flv?
Heiko
AFAIK, there's not a direct function for that.
So, you have a few options, but depend on what you're going to do with
it. Are you planning to parse a lot and large .flv files? If so, you
should write some code that reads the FLV header. I didn't see someone
else already doing, but you should be looking for Metadata in the FLV
file, and it seems that the metadata isn't in all FLV files, so then
you need to use such tools as FLV Metdata Injector, but i didn't find
a linux alternative.
If you're only doing a few .flv files, and quite small ones, you might
want to convert the FLV files first to another format with ffmpeg.
Then use some tools on that.
Tijnema
--- End Message ---
--- Begin Message ---
On 4/14/07, Børge Holen <[EMAIL PROTECTED]> wrote:
Before mr lynch starts beating up those already dead and probably long since
burried horses...
Images in a database!
See I was just wondering, and that at times leads to late nights
I used to read the images from two different files; one watermarked the image
and one let it throught without any hazzle.
Of course this kind of script was easy enought to get around the watermarking,
witch I fixed with the http referer witch as follows IE don't send. I don't
particulary like ppl who use IE (ups did I upset someone?) ;D.
Hmm, nearly.... I use IE, NOT because i like it, but because i hate
the others more (On windows platform).
However I started compressing my scripts and putting them inside one file.
And the status is so far:
* Query for the image object.
* Query for copyright check in case of watermarking. If no watermarking skip
to echo
* Read the object.
* put object in a file outside webroot like /tmp.
* read both the watermark and object
* merge
* echo
Is it possible to skip one query and still be able to read ownership from a
table and at the same time stream the object, witch lead me to the next
question, I can't seem to be able to make imageCreateFromJPEG handle the
direct stream, nor that I fetch it in an array, is any of this possible?
You should fetch the stream manually in a string, and then use
imagecreatefromstring, http://www.php.net/imagecreatefromstring
As of now I need two files to make this happen. Either I use one file to check
for rights and download throught a second file (close to the old solution) or
I try this new thing and end up with one php file witch needs the object
stream to be saved before it can be managed proberly.
--
---
Børge
http://www.arivene.net
For the rest of your message, i don't understand what you're trying to
do. Show us (parts of) the code you have now, and then explain what
you've wanted to do, and what it does now.
Tijnema
--- End Message ---
--- Begin Message ---
I've seen a json.php file somewhere in a project for cases where the
json module isn't installed (e.g. PHP4), yet I can't find that project
again. Is there an official or unofficial download site for json.php?
Why isn't this available in the PHP manual
(http://ch2.php.net/manual/de/ref.json.php)?
O. Wyss
--- End Message ---
--- Begin Message ---
On 4/14/07, Otto Wyss <[EMAIL PROTECTED]> wrote:
I've seen a json.php file somewhere in a project for cases where the
json module isn't installed (e.g. PHP4), yet I can't find that project
again. Is there an official or unofficial download site for json.php?
Why isn't this available in the PHP manual
(http://ch2.php.net/manual/de/ref.json.php)?
O. Wyss
*ROFLMFAO*...Did you actually try google for json.php?
Second result:
http://mike.teczno.com/JSON/JSON.phps
Tijnema
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
www.json.org lists all json resources in any language you care to think of.
Satyam
----- Original Message -----
From: "Otto Wyss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, April 14, 2007 10:11 AM
Subject: [PHP] Json.php
I've seen a json.php file somewhere in a project for cases where the json
module isn't installed (e.g. PHP4), yet I can't find that project again.
Is there an official or unofficial download site for json.php?
Why isn't this available in the PHP manual
(http://ch2.php.net/manual/de/ref.json.php)?
O. Wyss
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.4.0/760 - Release Date: 13/04/2007
20:04
--- End Message ---
--- Begin Message ---
On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote:
hi,
this one I can't figure out:
I have to assign value of an array to variable named after key of the
array several times in my project to , e.g. after I submit a form with
personal info I have
$_POST['name'] = 'john doe';
$_POST['address'] = '123 main st.';
$_POST['city'] = 'urbandale';
$_POST['zip'] = '12345';
$_POST['phone'] = '123-456-7980';
etc.
Then I assign value to the var name:
foreach ($_POST as $key => $value)
{
${$key} = $value;
}
and then validate submitted.
Are you sure you want to do this? You never know what a hacker inserts
to your POST data, so he could easily define variables inside your
script, especially when you're using more dangerous functions like
system().
Though, to avoid writing all over again the same lines (even it's only 3
lines) I was thinking to create a function something like:
function value2var($array, $print=0)
{
foreach ($_POST as $key => $value)
I think you should change above line to :
foreach ($array as $key => $value)
{
${$key} = $value;
echo ($print ==1) ? $key.': '.$value.'<br>'; // to test
results and seeing array variables and values
}
}
value2var($_POST, 1);
but, I don't know how to get info from function back to script?!?!?
:-(
Uhm, it's not even possible when you don't know the keys i believe.
Tijnema
any help appreciated.
-afan
--- End Message ---
--- Begin Message ---
Tijnema ! wrote:
> On 4/14/07, Afan Pasalic <[EMAIL PROTECTED]> wrote:
>> hi,
>> this one I can't figure out:
>>
>> I have to assign value of an array to variable named after key of the
>> array several times in my project to , e.g. after I submit a form with
>> personal info I have
>> $_POST['name'] = 'john doe';
>> $_POST['address'] = '123 main st.';
>> $_POST['city'] = 'urbandale';
>> $_POST['zip'] = '12345';
>> $_POST['phone'] = '123-456-7980';
>> etc.
>>
>> Then I assign value to the var name:
>> foreach ($_POST as $key => $value)
>> {
>> ${$key} = $value;
>> }
>> and then validate submitted.
>
> Are you sure you want to do this? You never know what a hacker inserts
> to your POST data, so he could easily define variables inside your
> script, especially when you're using more dangerous functions like
> system().
I do validation after this step. :)
>
>>
>> Though, to avoid writing all over again the same lines (even it's only 3
>> lines) I was thinking to create a function something like:
>>
>> function value2var($array, $print=0)
>> {
>> foreach ($_POST as $key => $value)
>
> I think you should change above line to :
>
> foreach ($array as $key => $value)
yup! it's print error. I meant $array.
>> {
>> ${$key} = $value;
>> echo ($print ==1) ? $key.': '.$value.'<br>'; // to test
>> results and seeing array variables and values
>> }
>> }
>>
>> value2var($_POST, 1);
>>
>> but, I don't know how to get info from function back to script?!?!?
>> :-(
>
> Uhm, it's not even possible when you don't know the keys i believe.
after 2 hours of testing and research I realized this too, but want to
be sure.
:-(
thanks.
-afan
>
> Tijnema
>>
>> any help appreciated.
>>
>> -afan
>
--- End Message ---
--- Begin Message ---
Hi there,
I am moving to a new box and want to install php with pdflib again.
After configure I get an error saying:
pdflib.h not found! Check the path passed to --with-pdflib
The path is just fine:
'--with-pdflib=/usr/local/lib'
ls /usr/local/lib/pdflib.*
/usr/local/lib/pdflib.h
ls /usr/local/lib/libpdf.*
/usr/local/lib/libpdf.a /usr/local/lib/libpdf.la
/usr/local/lib/libpdf.so /usr/local/lib/libpdf.so.1
/usr/local/lib/libpdf.so.1.1.3
I do run the same version on the old box which is php 4.4.6 and pdflib
4.03. I do not want to upgrade to a new pdflib since I was totaly
satisfied with the installation which runs perfectly. The php version
seems also not to be the problem since I tried to configure with 4.2.1
and it failed the same way.
I did with pdflib:
./configure
make
make install
Then configured php
Has anybody an idea what is wrong? The only difference I do see, is that
the other box runs suse 9.0 while this one runs suse 9.3
Thank you for any hint or help,
Best regards,
Merlin
--- End Message ---
--- Begin Message ---
On 4/14/07, Merlin <[EMAIL PROTECTED]> wrote:
Hi there,
I am moving to a new box and want to install php with pdflib again.
After configure I get an error saying:
pdflib.h not found! Check the path passed to --with-pdflib
The path is just fine:
'--with-pdflib=/usr/local/lib'
ls /usr/local/lib/pdflib.*
/usr/local/lib/pdflib.h
How did you get header files in the lib dir? pdflib.h(and all other
header files from pdflib) should be in /usr/local/include or
/usr/include.
then your command should be
'--with-pdflib=/usr/local'
or just remove it at all, as PHP will find it automatically (i think)
ls /usr/local/lib/libpdf.*
/usr/local/lib/libpdf.a /usr/local/lib/libpdf.la
/usr/local/lib/libpdf.so /usr/local/lib/libpdf.so.1
/usr/local/lib/libpdf.so.1.1.3
That's fine.
PHP will search for the headers in pdflibdir (--with-pdflib=...)
/include, and for the libraries in pdflibdir/lib
Tijnema
I do run the same version on the old box which is php 4.4.6 and pdflib
4.03. I do not want to upgrade to a new pdflib since I was totaly
satisfied with the installation which runs perfectly. The php version
seems also not to be the problem since I tried to configure with 4.2.1
and it failed the same way.
I did with pdflib:
./configure
make
make install
Then configured php
Has anybody an idea what is wrong? The only difference I do see, is that
the other box runs suse 9.0 while this one runs suse 9.3
Thank you for any hint or help,
Best regards,
Merlin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Stut wrote:
> Richard Lynch wrote:
>> On Fri, April 13, 2007 1:20 am, Stut wrote:
>>> tedd wrote:
>>>> this
>>>> ain't the bad old days.
>>> That's debatable!
>>
>> Damnit!
>>
>> Now I've got that "These are the good ol' days" song stuck in my head,
>> and it's your fault!
>>
>> :-)
>
> Hey, don't forget that you should always look on the bright side of life.
>
> -Stut
Oh, that is so low... You evil b_____d :-)
Cheers
--
David Robley
Catscan: searching for kitty.
Today is Prickle-Prickle, the 31st day of Discord in the YOLD 3173.
--- End Message ---
--- Begin Message ---
Hi,
Today i discovered that when my host webserver has some issue with
PostgreSQL database, my code displays the following error message :
*"Warning*: pg_connect()
[function.pg-connect<http://www.immense.sk/function.pg-connect>]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused Is the server running on host "pgsql.exohosting.sk" and
accepting TCP/IP connections on port 5432? in */www/xxxx.php* on line yyy."
I would like instead of that, to display my own error message... in fact, i
would like to display something like : "We are sorry but temporary we have
some technical issues. Please try again later".
how can i do that ?
i tried to do :
$conn = pg_connect($conn_string);
if ($conn) // check if database is online
{
// close database connection
pg_close($conn);
}
else
{
// impossible to connect to DB
die('Maintenance in progress... Try later.');
}
but it still display the previous warning message.
thanks for your help.
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5
--- End Message ---
--- Begin Message ---
Look at http://devzone.zend.com/node/view/id/652
It explains it there.
On 14/04/07, Alain Roger <[EMAIL PROTECTED]> wrote:
Hi,
Today i discovered that when my host webserver has some issue with
PostgreSQL database, my code displays the following error message :
*"Warning*: pg_connect()
[function.pg-connect<http://www.immense.sk/function.pg-connect>]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused Is the server running on host "pgsql.exohosting.sk" and
accepting TCP/IP connections on port 5432? in */www/xxxx.php* on line
yyy."
I would like instead of that, to display my own error message... in fact,
i
would like to display something like : "We are sorry but temporary we have
some technical issues. Please try again later".
how can i do that ?
i tried to do :
$conn = pg_connect($conn_string);
if ($conn) // check if database is online
{
// close database connection
pg_close($conn);
}
else
{
// impossible to connect to DB
die('Maintenance in progress... Try later.');
}
but it still display the previous warning message.
thanks for your help.
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5
--
Tom Chubb
[EMAIL PROTECTED]
--- End Message ---