php-general Digest 8 Dec 2003 17:10:00 -0000 Issue 2461
Topics (messages 172139 through 172155):
Re: getimagesize() & MySQL Image Storage (Running functions on contents of variables)
172139 by: Tom Rogers
Re: Not able to execute Linux binary
172140 by: Jason Wong
172141 by: Jerry M. Howell II
fsocketopen questions
172142 by: David
172144 by: Jason Wong
How do I fake a FORM submission with POST Mothed from PHP
172143 by: leon
172151 by: Chris Shiflett
goto label
172145 by: Nitin
172147 by: Jay Blanchard
developing website in hindi language
172146 by: Nitin
functions for predict satellites
172148 by: tobias.kaboth.materna.de
Need PHP consulting - $!
172149 by: Brian Dunning
Re: Maximum execution time
172150 by: John J Foerch
Re: password protection/encryption
172152 by: Mike
172153 by: Mike
Re: write failed
172154 by: Mike
Re: PHP eregi filtering problem
172155 by: Sven
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,
Sunday, December 7, 2003, 6:38:13 PM, you wrote:
G> I'm using a MySQL database to store images as BLOBs. I know how to
G> handle all the MySQL stuff, it's easy, and really makes keeping track
G> of files nice an clean. No permissions, no risk of getting things out
G> of sync, finding stuff is as easy as SQL.
G> My question is about handling stuff once you pull it out of the
G> database. When I store images in the database, I currently stash the
G> format and the resolution in the database, which works but is a bit
G> messy. I can't find any easy way to run getimagesize on the contents of
G> a variable, not a file. I could write the image to a file if I needed
G> to, but that can be slow and rather inelegant, I'd rather store the
G> values in the DB. Any ideas on how I could use getimagesize or similar
G> function to determine the format and resolution of the image in a
G> variable?
G> I have had a similar problem with ftp uploading. There was no way to
G> upload the contents of a variable, so I had to write everything to the
G> disk, kind of annoying when I have 1,000 files. The script wasn't a
G> very heavily used script nor could the public execute it, but it bugged
G> me to no end. I think there are some other functions that also only
G> operate on files and I've fought with them too.
G> Is there any kind of generic solution for this? Some kind of wrapper I
G> could use to make a variable act like a reference to a file but
G> actually be in memory only?
G> If this seems totally pointless, please tell me. But it seems like
G> there should be a way for almost any function that runs off a file to
G> run off the contents of a variable, it's just binary data.
G> Thanks,
G> Galen
Do the get sizes while it is still as a file after upload then save the size
info with the file in the db or use unpack to get the size from the raw data, it
is usually in the header somewhere.
--
regards,
Tom
--- End Message ---
--- Begin Message ---
On Monday 08 December 2003 12:56, Karam Chand wrote:
> I think there is some problem with the permission.
> Even if I execute a command like -
>
> echo ( "start" );
> exec ( "pwd" );
> echo ( "end" );
>
> the output is - startend
>
> shouldnt be pwd showing the present working directory
> to me.
Yes, but exec() itself does NOT output anything.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Every recipe ever written includes one ingredient that you do not have in your
kitchen
-- Murphy's Food Laws n5
*/
--- End Message ---
--- Begin Message ---
On Mon, Dec 08, 2003 at 01:28:11PM +0800, Jason Wong wrote:
> On Monday 08 December 2003 12:56, Karam Chand wrote:
> > I think there is some problem with the permission.
> > Even if I execute a command like -
> >
> > echo ( "start" );
> > exec ( "pwd" );
> > echo ( "end" );
> >
> > the output is - startend
> >
> > shouldnt be pwd showing the present working directory
> > to me.
>
> Yes, but exec() itself does NOT output anything.
>
If there is a beter way, someone reply but I beleave the command you are
looking for is system()
--
Jerry M. Howell II
--- End Message ---
--- Begin Message ---
Dear All,
I write a php scripts to use the function of fsocketopen to gather some
data on the web, everything is perfect when I test the scripts on the apache
server installed in my pc. But when I upload the codes to the server I
hosted, I always got a time out error, even after I enlarge the time out
setting to 180 secs. Could you tell me why it happen and how to figure it
out?
Thanks,
--- End Message ---
--- Begin Message ---
On Monday 08 December 2003 13:23, David wrote:
> I write a php scripts to use the function of fsocketopen to gather some
> data on the web, everything is perfect when I test the scripts on the
> apache server installed in my pc. But when I upload the codes to the server
> I hosted, I always got a time out error, even after I enlarge the time out
> setting to 180 secs. Could you tell me why it happen and how to figure it
> out?
Check whether the firewall is blocking whatever it is you're trying to access.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
You know, Callahan's is a peaceable bar, but if you ask that dog what his
favorite formatter is, and he says "roff! roff!", well, I'll just have to...
*/
--- End Message ---
--- Begin Message ---
Hi , guys
How can I POST a submit to a webserver and get the response content in PHP script?
And if it must use CURL how can i add this module?
i configure PHP without --with-curl ,:(
--- End Message ---
--- Begin Message ---
--- leon <[EMAIL PROTECTED]> wrote:
> How can I POST a submit to a webserver and get the response content
> in PHP script?
You can do it manually:
http://shiflett.org/hacks/php/http_post
Other options are cURL and various PEAR classes.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Hi all,
I was wondering, if there's any way to achieve 'goto "label":' using PHP
Thanx for ur time
Nitin
--- End Message ---
--- Begin Message ---
[snip]
I was wondering, if there's any way to achieve 'goto "label":' using PHP
[/snip]
Are you trying to go to a section of code to perform some operations on
current variables? If so use functions
http://us3.php.net/manual/en/ref.funchand.php . If you have some sort of
decisive mechanism use switch http://us2.php.net/switch
--- End Message ---
--- Begin Message ---
Hi all,
Can anybody plz help me, setting up mysql and php, so that I can save and show the
data in Hindi language.
I'm using PHP 4.2.x and mysql 4.0.14 on RedHat Linux 7.3
Thanx in advance
Nitin
--- End Message ---
--- Begin Message ---
Hello,
anyone knows PHP-source(functions) for predict satellites (NORAD SGP4/SDP4)?
Greetings,
Tobias
--- End Message ---
--- Begin Message ---
I need some consulting assistance with a project. Complete information
about what I need is on this page -
http://www.briandunning.com/php-help.shtml
THANK YOU!!!
- Brian
--- End Message ---
--- Begin Message ---
Thanks for the help, everyone.
-John
--- End Message ---
--- Begin Message ---
Chris Mach wrote:
Greetings,
I'm working on a project that involves a password protected area of a
website. Some one also involved brought up the point that this area should
be secure (Whit the lock icon indicating it is encrypted).
In this particular project the password protected area will be a quote
generating system for a company. Users would log in and choose the products
they are interested in purchasing and the site would generate a quote
depending on what they selected from the list of products.
So my question is..
At what point is encryption necessary? I've always thought encryption was
only needed when dealing with stuff like credit card information, am I
wrong?
if you are sending passwords over the internet, then they can be sniffed
in transit, it depends on how paranoid / how important the information
is. Unless you encrypt them before sending (client side), but this is
quite complicated
You probably should just use https to do the encryption, it works the
same as normal, the HTTP layer deals with all the encryption for you
How secure is a password protected page done with just PHP?
over http, with no encryption - not very secure
over https - as secure as anything is on the internet
Thanks
Chris
--- End Message ---
--- Begin Message ---
Chris Mach wrote:
Greetings,
I'm working on a project that involves a password protected area of a
website. Some one also involved brought up the point that this area should
be secure (Whit the lock icon indicating it is encrypted).
In this particular project the password protected area will be a quote
generating system for a company. Users would log in and choose the products
they are interested in purchasing and the site would generate a quote
depending on what they selected from the list of products.
So my question is..
At what point is encryption necessary? I've always thought encryption was
only needed when dealing with stuff like credit card information, am I
wrong?
if you are sending passwords over the internet, then they can be sniffed
in transit, it depends on how paranoid / how important the information
is. Unless you encrypt them before sending (client side), but this is
quite complicated
You probably should just use https to do the encryption, it works the
same as normal, the HTTP layer deals with all the encryption for you
How secure is a password protected page done with just PHP?
over http, with no encryption - not very secure
over https - as secure as anything is on the internet
Thanks
Chris
--- End Message ---
--- Begin Message ---
Dan McCullough wrote:
Just wanted to see if this was correct. To me this is saying that /tmp
cannot be written to as there is no space left on device.
Warning: Unknown(): write failed: No space left on device (28) in Unknown on
line 0
Warning: Unknown(): Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0
looks like it...
--- End Message ---
--- Begin Message ---
Purpleonyx schrieb:
Greetings all, I ran into a problem today and was
hoping someone could provide an answer.
I am fetching a web page, and attempting to parse
certain variables from it. I've done this plenty of
times in the past with no problem. The only
difference this time is the file that I am parsing is
much larger. The HTML file is about 42kb in size
(usually I only parse ~4kb worth). In the web
browser, the script seems to just shut down, but
reports no errors, not even to the web server logs.
Is there some specific max size that it can accept or
a setting in php.ini I need to modify?
Thanks
hi,
i don't think, that 42k is too much for the size of your file. mut maybe
php simply times out while parsing? there is a php.ini-parameter
max_execution_time and a runtime-function set_time_limit(). try
set_time_limit(0) at top of your script fo debugging.
also take a look at preg_* functions instead of ereg_*. they are said to
be much faster.
hth SVEN
--- End Message ---