[PHP] Re: permission denied

2003-01-14 Thread Lars Olsson
Hi Anthony! Have you tried giving the full path of 'data.txt' to fopen? Like this: $file = fopen(d:\\inetpub\\www.blahblah.org\\formtest.php, a+); Is it you or your ISP that uses win98? Kindly /Lars Olsson ([EMAIL PROTECTED]) Anthony Ritter wrote: Using MS Win98 / php 4: Any ideas

[PHP] Re: problems to get image informations form local harddrive usinggetimagesize

2003-01-14 Thread Lars Olsson
Hi! It could be a permission problem. What OS are you using? Win98? Win2000? WinXP? Kindly /Lars Olsson ([EMAIL PROTECTED]) Harald Mohring wrote: isn't it possible to get image informations from the local harddrive? $fotoinfo=getimagesize(C:\\Files\\Temp\\Image.jpg); if i use that code

[PHP] Re: imap_open failure

2003-01-14 Thread Lars Olsson
Hi! Shouldn't it be: $pop_inbox = imap_open({$mailserver:110/pop3}INBOX, $login, $password); (as on http://www.php.net/manual/en/function.imap-open.php) Kindly /Lars Olsson ([EMAIL PROTECTED]) Jeff Schwartz wrote: I'm using imap_open in PHP 4.3.0 to successfully access every pop server

[PHP] Re: Amount of data in the database

2003-01-14 Thread Lars Olsson
(size) FROM sometable WHERE user=someuser Hope this helps /Lars Olsson ([EMAIL PROTECTED]) PS. Ive done this in a file upload script I created a while ago. If you want, I can mail you the relevant bits and bytes. DS. Denis L. Menezes wrote: Hello friends. I have a need for checking how much

Re: [PHP] Re: Amount of data in the database

2003-01-14 Thread Lars Olsson
to find out the total amount of data (check my previous post) Kindly /Lars Olsson ([EMAIL PROTECTED]) Denis L. Menezes wrote: Thanks Lars. Sorry, then I have another question. How do I find the size of the record? Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe

[PHP] attachment problem

2003-01-13 Thread Lars Olsson
Hi all! I'm writing a webmail application in PHP and most basic things are working now. However, I've recently run into a problem concerning mail attachments. This is the situation right now: When the user opens a letter there are links to all attachments. The links looks like this:

Re: [PHP] attachment problem

2003-01-13 Thread Lars Olsson
(for this particular request) should be image/bmp (Mozillas Page Info tab confirms this). Still, wget claims it is text/html...hm...strange...now what? /Lars Olsson ([EMAIL PROTECTED]) Timothy Hitchens ) wrote: So you have tried as per the manual: header(Content-Disposition: attachment; filename

Re: [PHP] attachment problem

2003-01-13 Thread Lars Olsson
It doesn't matter whether I choose 'inline' or 'attachment', browser doesn't seem to care...but at least I found out why wget -S got me text/html instead of image/bmp. I had some session variables that messed things up, but I hacked it a bit and now wget -S is giving me the following headers:

Re: [PHP] attachment problem

2003-01-13 Thread Lars Olsson
Well, I'll be damned...don't know why, but suddenly everything seems to work! Guess some little gnome inside my computer finally decided it was time for me to get some sleep... Many thanx for for your help, Timothy! /Lars ([EMAIL PROTECTED]) Lars Olsson wrote: It doesn't matter whether I

[PHP] Re: Querying two tables

2002-12-15 Thread Lars Olsson
Hi! To fetch information from several tables you usually use a join operation. Here's a starting point in the MySQL manual. http://www.mysql.com/doc/en/JOIN.html /Lars ([EMAIL PROTECTED]) Cesar Aracena wrote: Hi all, I have several tables from which I have to fetch certain products

[PHP] Re: PHP native session

2002-08-15 Thread Lars Olsson
Hi! There are several ways. You could use a database or a text file. If your server comes with dba support, I'd try that. Manual reference http://www.php.net/manual/en/ref.dba.php /lasso ([EMAIL PROTECTED]) Mattia wrote: I'm looking for a way to have a list of the users logged in my site

[PHP] Re: Problem with output buffering in PHP 4.0.6 and Apache/1.3.20

2002-08-10 Thread Lars Olsson
Ing.Martin prek wrote: Hi.. I have found a strange problem. I try to use php output buffering, but I found this problem. Working with small amount of data everything is fine. But If I set example script like this: ? function callback($buffer) { return do_something_with($buffer);

[PHP] Re: Using ini_set with session.gc_maxlifetime

2002-08-09 Thread Lars Olsson
Neil Innes wrote: I've got a site on a server where I can't change the php.ini setting for session.gc_maxlifetime, which is set at the default 1440 seconds. My client wants to entend the time to an hour. The only way I am aware of how to do this kind of thing is through ini_set.

[PHP] Re: FILEMTIME

2002-08-08 Thread Lars Olsson
Mike Zagorski wrote: Hello, I amusing the following PHP code.. but I want to make it so that it also displays the time in 24 hr mode and the time is +3600 seconds. (1 hour) ? $last_modified = filemtime(about.php); print(Last Updated ); print(date(m/j/Y, $last_modified)); ? How can

[PHP] Re: PHP multipart form data

2002-08-08 Thread Lars Olsson
Mike Dunlop wrote: hello, i have php 4.2.2 compiled with --enable-ftp running (as a module in apache under red-hat 6.2) and I can not get file uploads through a web page to work!?!? The form variable $userfile (which is the file input name) is returning false; Any ideas how to

[PHP] Re: what is equivalent to Response.End ?

2002-08-03 Thread Lars Olsson
Hi! try exit() (http://www.php.net/exit) or die() (http://www.php.net/die) Kindly /lasso ([EMAIL PROTECTED]) Ing. Rajesh Kumar wrote: Hi everybody Can someone tell me what is the PHP equivalent code to ASP's Response.End ? I want to stop my code at a given position so i need this.

[PHP] Re: Undefined Index

2002-08-02 Thread Lars Olsson
Hi! JüRgen wrote: It's me again, i don't mean to be a bugger, but i really like to learn as much as possible, that's why i ask (or will ask so many questions). Consider the following (i shortened this a lot, but it will do the trick) $op = $_GET['op']; switch ( $op ) { case admin:

[PHP] Re: Function search utility

2002-08-02 Thread Lars Olsson
It still works...try http://www.php.net/mysql or http://www.php.net/fopen for example... /lasso ([EMAIL PROTECTED]) Brian V Bonini wrote: There used to be a utility that let you search php functions from the address bar in your browser by simply appening PHP to the function name eg, php

[PHP] calculating psysical path (a first try)

2002-08-01 Thread Lars Olsson
Hi list! Something I use quite often when programming in ASP is the Server.MapPath method. This method expects a virtual path (on the web server) and returns the corresponding psysical path. I haven't seen this anywhere in PHP, so I've hacked my own little routine to do this (see below). But

[PHP] Re: MySQL password()

2002-07-30 Thread Lars Olsson
To my knowledge it isn't possible to decrypt the PASSWORD function in MySQL (you need to use MySQL ENCRYPT/DECRYPT for that). However, it's possible to use PASSWORD on the user-provided string too. You could try the following code: $query=SELECT * FROM users where username='$PHP_AUTH_USER'

[PHP] A somewhat unusual session question...

2002-07-30 Thread Lars Olsson
Hi all! The manual claims here (http://se2.php.net/manual/en/ref.session.php) that: /snip ...If session.save_path's path depth is more than 2, garbage collection will not be performed. /snip Anyone know why this is the case? And can you get around it? My scripts currently lives on a shered

[PHP] Re: A somewhat unusual session question...

2002-07-30 Thread Lars Olsson
I'm aware that the server cannot know whenever a user just quits without logging out, but I was under the impression that the flags session.gc_maxlifetime and session.gc_probability in php.ini would control when and how often leftover session files would be removed. If this isn't true, what

[PHP] Re: A somewhat unusual session question...

2002-07-30 Thread Lars Olsson
Hm...seems it works after all...Tried extremely short session.gc_maxlifetime and a 100% session.gc_probability...works like a charm! Sorry for not checking this thoroughly enough before whining... ;) /lasso ([EMAIL PROTECTED]) Lars Olsson wrote: Hi all! The manual claims here (http

[PHP] Re: Dynamic Web Pages

2002-07-30 Thread Lars Olsson
Hi! Database queries and global variables are not related to each other. It usually just boils down to the following steps 1. Collect data that that's needed for the database query (via $_GET or $_POST) 2. Run the query against the database and store the results in some nice variables

[PHP] Re: Is it possible...

2002-07-27 Thread Lars Olsson
No. Since PHP is executed on the server, the only thing that is sent to the browser is pure HTML (and client-sided scripts like JavaScript). This means you cannot just get the source code of a PHP page by just browsing it. /lasso ([EMAIL PROTECTED]) Apollo wrote: Is it possible download

Re: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions4.2.0

2002-07-22 Thread Lars Olsson
The correct path for the windows binary version is http://www.php.net/do_download.php?download_file=php-4.2.2-Win32.zip /lasso ([EMAIL PROTECTED]) Rouvas Stathis wrote: Hi all, Just wanting to notify everyone that the link for the PHP.4.2.2 download is broken. -Stathis. -- PHP

Re: [PHP] Preventing Multiple Log-Ins after Authentication

2002-07-17 Thread Lars Olsson
I agree. Using a database is usually a good way of storing session information. But as noted by Dennis below, automatic logout may require additional scripts running in the background. This is a bit inferior in PHP compared to ASP. In ASP, support for automatic session destruction is

[PHP] Re: Create Thumbnail from Blob online

2002-07-16 Thread Lars Olsson
Well, if you're just going to show your image (no resizing or other image operations) you don't need to use gd at all. You could just change the Content-Type and print. snippet header(Content-Type: $mimetype); print($imagedata); /snippet /lasso ([EMAIL PROTECTED]) Tommi Trinkaus wrote:

[PHP] Re: ' giving problem while inserting in table.

2002-07-16 Thread Lars Olsson
Since ' is a string delimiter in MySQL it has to be escaped. Try using mysql_escape_string($string) (http://se.php.net/manual/en/function.mysql-escape-string.php) on all the strings before you try to insert them into MySQL. /lasso ([EMAIL PROTECTED]) Anil Garg wrote: Hi, I am making a

[PHP] session_start and HTTP headers in Mozilla, plz help

2002-07-11 Thread Lars Olsson
Hi! I've run across a problem when using session_start and HTTP headers in Mozilla. I'm trying to write a snippet of code that checks whether a user has logged in or not. If the user has a session variable set I want to display the page and if he or she hasn't I want to give them a 403