Re: [PHP] php versions between os/platform

2006-02-10 Thread Dan Trainor
pedro mpa wrote: Greetings! I am building a website using PHP 5.1.2 and MySQL 5.0.18 and I am using windows xp with IIS. All the hosting companies I have contacted are using php 4.x.x and mysql 4.x.x or 3.x.x, on linux I suppose. Are php versions the same for every os/platform? Thanks in

[PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the archives, it looks like I'm not alone. I've even written to the list on several occasions looking for a solution, to no avail. I think that

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Dan Trainor wrote: Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the archives, it looks like I'm not alone. I've even written to the list on several occasions looking for a solution, to no avail

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Jasper Bryant-Greene wrote: On Tue, 2005-11-08 at 13:36 -0700, Dan Trainor wrote: [snip] So, as you can see, nothing completely out of the 'norm. The examples given in the manual are not all that clear, so by using absolute path names, I'm just guessing. I have used relative paths as well

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Jasper Bryant-Greene wrote: On Tue, 2005-11-08 at 13:43 -0700, Dan Trainor wrote: Well, the problem is simple; it just doesn't work. No script is prepended to the page that I access from within /demo/protected. My prepend script consists of the following line of code: ? echo

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Curt Zirzow wrote: On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: Dan Trainor wrote: Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the archives, it looks like I'm not alone. I've even

Re: [PHP] Use of auto_prepend_file inside an Apache directory container

2005-11-08 Thread Dan Trainor
Dan Trainor wrote: Curt Zirzow wrote: On Tue, Nov 08, 2005 at 01:36:24PM -0700, Dan Trainor wrote: Dan Trainor wrote: Good afternoon, all - I've had problems with auto_prepend_file off and on for as long as I can remember. It's hit or miss, and browsing the archives, it looks like I'm

[PHP] Using PHP for accsess control, preventing access to static files

2005-10-27 Thread Dan Trainor
Hello, all - I'm designing a controlled access system in PHP, and it's coming along quite well. It's very simple, and just sets a session varibale, such as $_SESSION['authenticated'] = 1, not a whole lot. Now I run a small sniplet of code on the top of each HTML and PHP file, which checks for

Re: [PHP] Using PHP for accsess control, preventing access to static files

2005-10-27 Thread Dan Trainor
Jason Motes wrote: I'm designing a controlled access system in PHP, and it's coming along quite well. It's very simple, and just sets a session varibale, such as $_SESSION['authenticated'] = 1, not a whole lot. Now I run a small sniplet of code on the top of each HTML and PHP file, which

Re: [PHP] Using PHP for accsess control, preventing access to staticfiles

2005-10-27 Thread Dan Trainor
Ben wrote: Dan Trainor said the following on 10/27/2005 10:39 AM: Jason Motes wrote: However, how do people protect against the downloading of real files, ones which are not parsed by PHP? .WMV, .MOV, .ZIP, .EXE and so on? I want to protect access to these as well, and if a visitor

Re: [PHP] Using PHP for accsess control, preventing access to staticfiles

2005-10-27 Thread Dan Trainor
Ben wrote: Dan Trainor said the following on 10/27/2005 01:34 PM: Ben wrote: Move the files outside the document root so that they aren't available via a direct URL, then create a 'file access page' in php that will check for the session variable and either send or not send the file based

Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-23 Thread Dan Trainor
Richard Lynch wrote: On Sat, October 22, 2005 11:42 pm, Dan Trainor wrote: This would be a great solution, and I'm sure my concern is something that's been discussed many times on this list - I'm worried about the performance hit that the machine would take, if/when parsing a large number

[PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess require valid-user

2005-10-22 Thread Dan Trainor
Hello, all - I'm trying to think of how this might be possible, but I can't seem to come up with anything. I'd like to make a login form of sorts, which would enable a user to authenticate against. A simple HTML form, with a PHP back-end, where a user enters a username and password. If

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess require valid-user

2005-10-22 Thread Dan Trainor
Robert Cummings wrote: On Sat, 2005-10-22 at 19:28, Dan Trainor wrote: Hello, all - I'm trying to think of how this might be possible, but I can't seem to come up with anything. I'd like to make a login form of sorts, which would enable a user to authenticate against. A simple HTML form

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess require valid-user

2005-10-22 Thread Dan Trainor
Richard Lynch wrote: You USED to be able to do that by putting http://username:[EMAIL PROTECTED] but then Microsoft, in its infinite wisdom, decided that was a security risk and stopped supporting it. AFAIK, there's no way to SET the USER/PASS from server to browser... H. You could

[PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-22 Thread Dan Trainor
Hello, all - Anyone know if it's possible to use auto_prepend_file to force the appending of a file to the request, regardless of what kind of document is generated? I can see this being a problem if the document was a picture or a video or some such - but is thre a hidden argument list to

Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-22 Thread Dan Trainor
Richard Lynch wrote: On Sat, October 22, 2005 11:25 pm, Dan Trainor wrote: Anyone know if it's possible to use auto_prepend_file to force the appending of a file to the request, regardless of what kind of document is generated? I can see this being a problem if the document was a picture

Re: [PHP] Installing under IIS6.0

2005-09-20 Thread Dan Trainor
Jay Blanchard wrote: [snip] However, this really isn't what I'm looking for. I'm simply looking for a way to parse PHP code from within existing HTML pages, so that I can migrate a site from Apache to IIS6.0. Like I said, if I were using Apache, I would just add .html to my AddType

[PHP] Installing under IIS6.0

2005-09-19 Thread Dan Trainor
Hello, all - This is a subject that I've seen pop up on the list a few times, but not in great detail about setting up PHP under IIS 6.0. What I'm trying to achieve here is to install PHP to process PHP code embedded inside of HTML pages. Under Apache, I'd just add .html to my AddType directive

[PHP] Generating images on the fly, linking via symlink?

2005-09-03 Thread Dan Trainor
Hello, all - This is a question that could depend on a completely different (yet, relayed) subject, so I'm sending this email to both php-general@ and [EMAIL PROTECTED] I thank you in advance for your understanding. I am currently generating some images on the fly using some of PHP's image

Re: [PHP] Generating images on the fly, linking via symlink?

2005-09-03 Thread Dan Trainor
Dan Trainor wrote: Hello, all - This is a question that could depend on a completely different (yet, relayed) subject, so I'm sending this email to both php-general@ and [EMAIL PROTECTED] I thank you in advance for your understanding. I am currently generating some images on the fly using

[PHP] Questions regarding distribution of PHP modules as binaries

2005-08-30 Thread Dan Trainor
Hello, all - I've got one more question for you all, which I don't quite understand. What if, say, I'd like to develope an application which requires the use of, well for simplicity, some SSL functionality. I would distribute my PHP application, but then would provide compiled modules for

Re: [PHP] User redirection, passing HTTP AUTH credentials

2005-08-30 Thread Dan Trainor
Kristen G. Thorson wrote: Dan Trainor wrote: Hello once more, all - I was wondering if it's at all possible to redirect a user to a remote site, while passing HTTP AUTH credentials somehow. I've been tinkering around with making a secure login gateway, and the first server that they log

[PHP] htpasswd-style password generation w/PHP

2005-08-30 Thread Dan Trainor
Hello, all - I've been trying to figure out a reliable way of creating user:pass combinations to be used from within an Apache-based .htpasswd file. From what I understand, PHP's crypt() function is almost identical to the Linux system crypt() function, which 'htpasswd' uses. However, when

Re: [PHP] Automatically generated emails

2005-08-29 Thread Dan Trainor
Rory Browne wrote: The thing is that we do want to help. We want everyone to have as positive experience as possible with PHP, and I've personally spent hours in the past helping people with their various PHP Problems, both on this list and elsewhere, so you'll understand if I take issue with

[PHP] Sessions, Constructors, and Destructors - Oh my!

2005-08-29 Thread Dan Trainor
Hello, all - I was doing some thinking today about the above three subjects. Now, I might sound like a complete tool here because I don't think I quite know exactly in which instances constructors and destructors can be used - but what about inside a session? Say I had a visitor hit a site. A

Re: [PHP] Sessions, Constructors, and Destructors - Oh my!

2005-08-29 Thread Dan Trainor
Nathan Tobik wrote: Does your load balancer support sticky sessions? What this means is a client will make a request and the request will be sent through a load balancer. That LB will remember the client and always point the client's requests to the same webserver. This way you don't have

Re: [PHP] Sessions, Constructors, and Destructors - Oh my!

2005-08-29 Thread Dan Trainor
Thanks for replying, Jasper - snip Is this possible? Does it work this way? If so, or if not for that matter, please help me out here to better understand how these three elements interact with eachother, if at all. Ah yes, me being quite new didn't take into consideration in which

Re: [PHP] Sessions, Constructors, and Destructors - Oh my!

2005-08-29 Thread Dan Trainor
Nathan Tobik wrote: I've never looked into some of the open-source load balancing solutions, but I know they exist are are out there. The F5's I mentioned are probably around $20k each, and you need two obviously, so if you're on a limited budget those are not the solution for you. I'd

[PHP] User redirection, passing HTTP AUTH credentials

2005-08-29 Thread Dan Trainor
Hello once more, all - I was wondering if it's at all possible to redirect a user to a remote site, while passing HTTP AUTH credentials somehow. I've been tinkering around with making a secure login gateway, and the first server that they log in to would negotiate the login sequence, but the

[PHP] Image Rendering/Generation Options

2005-08-27 Thread Dan Trainor
Hello, all - I've seen a few times, albeit I don't know how, people generate images on a page in different ways, such as maybe using base64 to output the raw image data into a page? Is this correct? If so, what does it look like? How would one go about doing this? If not, what are my

Re: [PHP] Resizing thumbnails to the browser

2005-08-22 Thread Dan Trainor
Richard Lynch wrote: On Sun, August 21, 2005 3:04 pm, Murray @ PlanetThoughtful wrote: I have a series of thumbnails on my site of photos I've taken that are all 150px in width, but of variable height. I want to randomly display one of the thumbnails each time the home page of my site is loaded

Re: [PHP] Resizing thumbnails to the browser

2005-08-22 Thread Dan Trainor
Jasper Bryant-Greene wrote: Dan Trainor wrote: Would the abovementioned use of ForceType also allow one to produce an image given an HTTP GET query? I was tinkering around with something in the past where I wanted to implement something such as: img src=http://example.com/myscript.php

[PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Dan Trainor
Hello, all - As a pet project of mine, I've decided to write a bit of code. This is what I have, and it's not working as expected: if ($action == prepareforupdate) { @unlink(UPDATES/.$id./9.jpg); $query0 = SELECT * FROM updates WHERE id=.$id.; if (!$dbdata =

Re: [PHP] Need help with for loop, pulling MySQL data, completely lost

2005-08-21 Thread Dan Trainor
-- { build query1 run query1 } ? Excellent description of your problem, by the way; this one's tricky and definitely had me for a while when I first ran into it. Evan On Aug 21, 2005, at 7:24 AM, Dan Trainor wrote: Hello, all - As a pet project of mine, I've decided to write

[PHP] Help with a home-grown function

2005-07-21 Thread Dan Trainor
Hello, all - I've been looking around for a function that would tell me if a $value in a $key=$value array was empty, and I could not find one. So I decided to make my own. Even if I am re-inventing the wheel, I thought that the practice might be good for me. However, my function doesn't

Re: [PHP] Help with a home-grown function

2005-07-21 Thread Dan Trainor
Mike Johnson wrote: From: Dan Trainor [mailto:[EMAIL PROTECTED] Hello, all - I've been looking around for a function that would tell me if a $value in a $key=$value array was empty, and I could not find one. So I decided to make my own. Even if I am re-inventing the wheel, I thought

Re: [PHP] Help with a home-grown function

2005-07-21 Thread Dan Trainor
Dan Trainor wrote: Mike Johnson wrote: From: Dan Trainor [mailto:[EMAIL PROTECTED] Hello, all - I've been looking around for a function that would tell me if a $value in a $key=$value array was empty, and I could not find one. So I decided to make my own. Even if I am re-inventing

Re: [PHP] Help with a home-grown function

2005-07-21 Thread Dan Trainor
Chris W. Parker wrote: Dan Trainor mailto:[EMAIL PROTECTED] on Thursday, July 21, 2005 2:03 PM said: I never see hi even if an array is set as such: $vars = array(one,two,three,four,five); That's because your function always returns true. If it finds a missing value it returns

Re: [PHP] force https

2005-06-28 Thread Dan Trainor
Ross wrote: Hi, I need to force the url from http://mydomain.com to https://mydomain.com, so my ssl is active. Anyway this can be done with php? R. i'm a newbie, you've been warned header('Location: https://mydomain.com'); ? /i'm a newbie, you've been warned I don't know if that

Re: [PHP] force https

2005-06-28 Thread Dan Trainor
Robert Cummings wrote: On Tue, 2005-06-28 at 23:26, Dan Trainor wrote: Ross wrote: Hi, I need to force the url from http://mydomain.com to https://mydomain.com, so my ssl is active. Anyway this can be done with php? i'm a newbie, you've been warned header('Location: https://mydomain.com

[PHP] PHP's auto_prepend_file inside an Apache Directory container

2005-05-04 Thread Dan Trainor
Hello, all - I've been tinkering around with PHP's auto_prepend_file, specifying this from inside an Apache VirtualHost container, something as such: VirtualHost 1.2.3.4 blah blah blah php_value auto_prepend_file /super_duper_file.php /VirtualHost THis works fine

Re: [PHP] Temporary storage of data

2005-03-11 Thread Dan Trainor
Jason Barnett wrote: Dan wrote: dan wrote: ... Before we go through all of this, why isn't SQLite an option? It is in by default as of PHP5.0.0 so if the server is / will be PHP5 soon then I would go that route. http://php.net/manual/en/ref.sqlite.php Jason - Yea, I saw that, but for this I have

Re: [PHP] Semi-OT: Anti-password trading/sharing solutions

2005-03-01 Thread Dan Trainor
AdamT wrote: On Mon, 28 Feb 2005 15:42:37 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: I know absolutely nothing about how ProxyPass, iProtect, and PureMember work 'Pure'member seems such an odd choice of name for something used on pr0n sites. This product is not marketed exclusively for

Re: [PHP] Semi-OT: Anti-password trading/sharing solutions

2005-03-01 Thread Dan Trainor
Jochem Maas wrote: Hi Mikey, you writing is very balanced, nicely put... I very much agree with the position you take/have (maybe my OP didn't put it quite so clearly ;-) but you write that Dan probably agrees that (any) exploitation (that occurs) is a bad thing... a logical assumption now

Re: [PHP] On Topic - Theoretical Concents of Anti-password trading/sharing solutions

2005-03-01 Thread Dan Trainor
[EMAIL PROTECTED] wrote: I agree with Mikey on the live and let live side of things. This forum is about sharing technical knowlege and helping other users overcome technical challenges relating to PHP. Yeah, a site that's adult oriented is most likely a pay site. Doesn't mean they make money,

Re: [PHP] Semi-OT: Anti-password trading/sharing solutions

2005-03-01 Thread Dan Trainor
Mikey wrote: To address Mikey's question - I am not looking for a way to uniquely identify users. For one, it's just not possible. On top of that, the vast majority of members with to stay anonymous for reasons that I am not even going to begin to state on this list, because we all know

Re: [PHP] On Topic - Theoretical Concents of Anti-password trading/sharing solutions

2005-03-01 Thread Dan Trainor
Robert Cummings wrote: On Tue, 2005-03-01 at 09:58, Dan Trainor wrote: [-- SNIIIP --] Dear Dan, You have yourself to blame for the responses you have been receiving. You opened up the floodgates of personal opinion when you mentioned your were a pr0n pusher. The fact that you deal

[PHP] Semi-OT: Anti-password trading/sharing solutions

2005-02-28 Thread Dan Trainor
Hello, all - First, I'd like to appologize for treading a bit off-topic here, but I think that it will cover a lot of questions that others may have. My company hosts several Adult-oriented Web Sites. Among other tools that we use to combat Password Trading are ProxyPass and iProtect. They're

Re: [PHP] Using

2005-02-09 Thread Dan Trainor
Jochem Maas wrote: Richard Lynch wrote: Jochem Maas wrote: Dan Trainor wrote: Hello, all - Being still fairly new to PHP, I thought I'd ask a few more questions and get on to the right track here, developing correct coding habits before I start to teah myself incorrect habits. 7. let others

[PHP] Using

2005-02-08 Thread Dan Trainor
be greatly appreciated. Best Regards -Dan Trainor -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Using

2005-02-08 Thread Dan Trainor
Jay Blanchard wrote: [snip] ...stuff... [/snip] This is really a broad request, and you'll get as many opinions as there are posters. Instead of IFs you may want to use a SWITCH (http://www.php.net/switch). Why do you want to do the application all in one file? Is it small enough to be justified?

[PHP] Changing PHP properties (Previously: Cannot upload a file greater than 500 KB)

2005-02-08 Thread Dan Trainor
Todd Cary wrote: Richard - It turned out that the following was missing from Apache's httpd.conf file: Files *.php SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 500 /Files Not sure what that does or where I should have read about it, but I did find that in an email I got with

Re: [PHP] Re: Changing PHP properties (Previously: Cannot upload a file greater

2005-02-08 Thread Dan Trainor
...more reading for me I am sure! Todd Dan Trainor wrote: Todd Cary wrote: Richard - It turned out that the following was missing from Apache's httpd.conf file: Files *.php SetOutputFilter PHP SetInputFilter PHP LimitRequestBody 500 /Files Not sure what that does or where I should have read

Re: [PHP] phpBB alternatives?

2005-02-08 Thread Dan Trainor
Tony Di Croce wrote: Due to the recent vulnerabilities discovered in phpBB and the content of this page: http://www.phpbb.com/ I have decided to consider other options for my forum needs... Does anyone have any reccomendations for a PHP based forum software? I'm not an advocate for phpBB by any

Re: [PHP] Public/Private Key Encryption

2005-02-06 Thread Dan Trainor
Daniel Bowett wrote: Is there any way I can use public/private key encryption in php in a similar way to mcrypt. I have got php encrypting the data using gnugp but need to automate the decrytping element which is proving difficult because of the way the password is passed. While Daniel has

Re: [PHP] Checking directory existance

2005-02-06 Thread Dan Trainor
Ashley M. Kirchner wrote: Through ftp commands, how can I check whether a directory already exists before executing ftp_mkdir() ? Thanks! Ashley - Try using: if (!ftp_chdir($ftpc,$ftproot.$srcrela)) Thanks -dant -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Connecting To Multiple MySQL Databases

2005-02-03 Thread Dan Trainor
NathanielGuy#21 wrote: I know this may be slightly off topic for a PHP listserv but I cant find my answer anywhere else. I start off generating a page connected to one database as a certain user and I call a script that requires a connection to a second database as a different user. Is there any