Re: [PHP] Redirect Function?!!

2001-12-06 Thread Jason Brooke
?php header(Location: http://your.domain/path/to/file.html;); ? - Original Message - From: Martin Towell [EMAIL PROTECTED] To: 'Cam' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 07, 2001 3:23 PM Subject: RE: [PHP] Redirect Function?!! how about include'ing the target

Re: [PHP] Passing many valaues to function

2001-11-03 Thread Jason Brooke
maybe in an associative array jason - Original Message - From: Daniel Harik [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 04, 2001 4:53 AM Subject: [PHP] Passing many valaues to function Hello I need to pass about 15 values to function, what would be best way

Re: [PHP] defending PHP mail function

2001-10-31 Thread Jason Brooke
Which addresses won't work? - Original Message - From: Matthew Luchak [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Thursday, November 01, 2001 2:04 AM Subject: [PHP] defending PHP mail function Recently I have had to defend the use of PHP in light of a number

Re: [PHP] defending PHP mail function

2001-10-31 Thread Jason Brooke
Really? No good at all, huh? I would think that would answer the question right there if it was an SMTP problem or a problem that lies elsewhere. If you take SMTP out of the equation, and the problem still occurs, then you know that's not the issue. If the problem does go away, then you've

Re: [PHP] php mysql prob...

2001-10-30 Thread Jason Brooke
Or the single quotes around the table name in the sql string Your query is probably broken - do some error checking after your database call with mysql_error() and see what the problem is. Guess; the table name. -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Re: I rest my case

2001-10-30 Thread Jason Brooke
John, Jason didn't literally mean for you to search for the exact string 'Block' - he was telling you to look through the various types of ThisIsAnApacheDirective tags found in your httpd.conf file, such as Directory, File etc etc There is no BLOCK element in the httpd.conf. Is that where I

Re: [PHP] phpmyadmin is installed, now how to access it?

2001-10-28 Thread Jason Brooke
In your web browser like you would any other web interface on your machine jason - Original Message - From: Chip [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 28, 2001 4:39 PM Subject: [PHP] phpmyadmin is installed, now how to access it? I just installed the FreeBSD

Re: [PHP] posted urls

2001-09-13 Thread Jason Brooke
hi, how can i change variables that has two or more words to variables that has + instead of blanks in that variables. Like this: word1 word2 word3 = word1+word2+word3 thanks http://www.php.net/manual/en/ref.url.php jason -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Changing perl to PHP

2001-09-12 Thread Jason Brooke
# read the post from PayPal system and add 'cmd' read (STDIN, $query, $ENV{'CONTENT_LENGTH'}); $query .= 'cmd=_notify-validate'; # post back to PayPal system to validate use LWP::UserAgent; $ua = new LWP::UserAgent; $req = new HTTP::Request 'POST','https://www.paypal.com/cgi-bin/webscr';

Re: [PHP] Changing perl to PHP

2001-09-12 Thread Jason Brooke
?php $fp = fsockopen(www.paypal.com, 443, $errono, $errstr, 30); if (!$fp) { echo $errstr ($errno)br\n; } else { fputs ($fp, GET https://www.paypal.com/cgi-bin/webscr HTTP/1.1\015\012); fputs ($fp, HOST www.paypal.com\015\012); fputs ($fp, Content-type:

Re: [PHP] Verify email client can read html email?

2001-09-12 Thread Jason Brooke
When sending out email is it possible to know if their email client program will be able to read a html email? If it can't read a html email then it would show a text email. I know it's conventional wisdom that this isn't possible but has anyone even heard of someone figuring this out? If

Re: [PHP] Dynamic Form

2001-09-12 Thread Jason Brooke
Hell0, I have a MySql database with 3 columns. The first column is id second is name and third is value, I have two drop-down lists, with the first filled with an array from the column name. I would like for the second drop-down list be changed according to the value of what has been

Re: [PHP] PHP 4.0.6 bug

2001-09-10 Thread Jason Brooke
I upgraded from PHP 4.0.5 4.0.6 and since i get openbasedir errors all over the place when i try to upload a file through a php script is this a bug? Stefan de Wal dewal.nl Stefan, did you check your open_basedir and/or error_reporting settings in php.ini and apache config? What are the

Re: [PHP] mail() ERROR - WHY, WHY, WHY

2001-09-10 Thread Jason Brooke
I drowing here and need a life-ring! I have a site relying heavily on e-mail registration, forums, etc. and mail() is broken in my php install. I've been using an smtp server other than sendmail, but based on recommendations I have removed that smtp server, removed php, installed sendmail,

Re: [PHP] PHP 4.0.6 bug

2001-09-10 Thread Jason Brooke
Stefan, did you check your open_basedir and/or error_reporting settings in php.ini and apache config? What are the errors? I did. No difference between the old php.ini and the new...the apache config is also unchanged. And the mentioned open basedir errors? What did they say? I think

Re: [PHP] PHP Redirect in the middle of code?

2001-09-10 Thread Jason Brooke
Right off the top of my head, you have three options that I can see: (1) Rewrite the code to avoid any output before the redirect. I'd recommend this one myself jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP] Assigning output of include() to a variable

2001-09-09 Thread Jason Brooke
Hi, I've been trying to figure this thing out for 3 hours now. Lets say we have a variable $x. Now I need to assign $x with similar output that comes from an include function. For anyone who did not understand me -- Instead of the stupid include() function outputing the file contents to

Re: [PHP] Question about running php as root

2001-09-05 Thread Jason Brooke
But is there a way to make one of my root scripts run by sending it a command to do so from the DSO version of PHP like with system command or something like that. Or some roundabout way to make it think root is asking the script run. I hope you understand what I am asking. There possibly

Re: [PHP] Determining IP address

2001-09-05 Thread Jason Brooke
I was wondering if there is a way in PHP that you can determine the IP address? I am wondering because I am developing a simple web based program (in php) for use in a hospital setting and I want to do some checks to make sure that the program is not being run from a computer outside of the

Re: [PHP] PHP and SOCKETS

2001-08-30 Thread Jason Brooke
Hi there, I need use sockets in my code, but PHP doesn't see function named 'socket'. Does any one have any expirience with PHP sockets ? Maybe name has changed ? Did you --enable-sockets in your ./configure line ? jason -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Delete Files on Server with PHP

2001-08-30 Thread Jason Brooke
How can I send a command to remove it from the server within PHP? Thanks, Paul You go to the online manual, browse to the Filesystem Functions section and look up a function that removes files http://www.php.net/manual/en/ref.filesystem.php jason -- PHP General Mailing List

Re: [PHP] POST to port 443 (SSL)

2001-08-28 Thread Jason Brooke
Hello, I am trying to use the UPS Online Tools, the XML version. This requires you POSTing an XML document to their Tools server, which is SSL enabled. I am having a problem getting this to connect in PHP (4.0.6) on my server (Apache 1.3.20). In my scripts, I use $Socket = fsockopen

Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Jason Brooke
if you're using apache, something along the lines of the following untested directives should prevent anyone but the localhost (which is where your virtual() calls should be coming from) from accessing the cgi's via http Directory /path/to/usr/cgi order deny, allow deny from all allow from

Re: [PHP] mcrypt

2001-08-28 Thread Jason Brooke
I use mcrypt to encrypt passwords, I saw somewhere international users had trouble with the high ascii. is the any functions that can convert the high ascii to hex or something ? Thanks Randy Have a squiz here: http://www.php.net/manual/en/ref.strings.php -- PHP General Mailing

Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Jason Brooke
We don't define any virtual hosts in httpd.conf; instead, we use a custom handler hooked into post-read-request. So I won't be able to define /path/to/usr/cgi in httpd.conf. But if that concept will work in user .htaccess files, it would be an improvement over my current techniques. I'll

Re: [PHP] maito function

2001-08-28 Thread Jason Brooke
Hi, I would like to know how to use the mailto function calling the mail client and at the same time having the subject filled with something. This is not a php question, it's html and easily answered by looking at a html reference, but the answer is: a

Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Jason Brooke
After testing this I see that: Apache uses the IP address of the remote host to determine whether to allow or deny access. Even though PHP is running on localhost, and making a request via the virtual() function, Apache still knows the IP address of the remote host, and uses that. I

Re: [PHP] HEAD instead of GET??

2001-08-28 Thread Jason Brooke
For example: HEAD /contact.php4 HTTP/1.0 instead of GET /contact.php4 HTTP/1.0 What does it mean? cheers, - seb From the http1.1 rfc (because it's a http-related thing, not php) ftp://ftp.isi.edu/in-notes/rfc2616.txt 9.4 HEAD The HEAD method is identical to GET

Re: [PHP] PHP mysql admin?

2001-08-27 Thread Jason Brooke
Just gave it a go, it hangs for ages connecting to my servers with many databases, and takes ages to retrieve record sets that load much much faster via the phpmyadmin html interface phpmyadmin, although plenty buggy on certain actions, is far better to use for me so far - Original Message

Re: [PHP] php executable

2001-08-20 Thread Jason Brooke
php -q try php -h for other options - if that fails, there's always the manual - http://www.php.net/manual - Original Message - From: Nick Davies [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 20, 2001 8:06 PM Subject: [PHP] php executable Is it possible to surpress

Re: [PHP] Using mcrypt in PHP

2001-08-19 Thread Jason Brooke
hopefully someone who knows what they're doing can reply to you, but in the meantime this should get you going - it works for me: $td = mcrypt_module_open(MCRYPT_TripleDES, , MCRYPT_MODE_ECB, /usr/lib/mcrypt-modes); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);

Re: [PHP] logging bandwidth

2001-08-12 Thread Jason Brooke
I am logging server activity to a MySQL database. Unfortunately, I have yet found a way to log the number of bytes being transferred to a visitor. The closest I've come to anything like that is apache_lookup_uri() but I'm not sure it's meant to handle such a thing. Does anyone know a

Re: [PHP] IE - View Source

2001-07-26 Thread Jason Brooke
I was under the impression it couldn't be done because it would require your code control the end-user's web browser, no matter what the brand. Can you please show us these sites? - Original Message - From: Steve Haemelinck [EMAIL PROTECTED] To: Brad S. Jackson (E-mail) [EMAIL

Re: [PHP] .htaccess and determining if a user is logged in

2001-07-24 Thread Jason Brooke
I've done further investigation and it seems that if I go with the approach of looking for a REMOTE_USER value, I'll have to do the following: Since Apache only fills out the REMOTE_USER if the file is in a protected directory, I have to make a symbolic link within a protected directory to

Re: [PHP] Stopping stolen / spoofed / linked sessions

2001-06-30 Thread Jason Brooke
I want to use PHP4 sessions for authentication, Ok, stop right there. Sessions and authentication have nothing to do with each other. To create a secure authenticated site you should be using HTTP-based authentication over SSL. Sessions are simply for maintaining state across http

Re: [PHP] Capturing the url in the location bar

2001-05-15 Thread Jason Brooke
$variable = http://;. $HTTP_HOST. $REQUEST_URI; Is there a way of capturing the entire url contianed in the location bar within a variable? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

Re: [PHP] need better solution...

2001-05-14 Thread Jason Brooke
but sometimes I want something like this: ?php session_start(); // for instance code code code if(something) print error message and terminate script; ? html sadasdsa /html what do I do in this case??? I've tried all kinds of programing

Re: [PHP] need better solution...

2001-05-14 Thread Jason Brooke
the problem is, if I terminate the script on that condition the footer won't be displayed... Instant fix - include footer.inc; exit; Better fix: decide your logical layout before you proceed and arrange if/else blocks accordingly so you don't need to terminate the script to avoid showing a

Re: [PHP] server alias

2001-05-14 Thread Jason Brooke
$SERVER_NAME only gives me foober.com (since that is the servername), but not the alias someone typed in to get there ... --Joe Give HTTP_HOST a go Check here for more http://www.php.net/manual/en/language.variables.predefined.php or use phpinfo() to see exactly what you have available

Re: [PHP] finding a variables name

2001-05-14 Thread Jason Brooke
foreach($GLOBALS as $key=$val) echo $key=$valbr\n; see the list() and each() functions in the manual for php3 - Original Message - From: Joseph Blythe [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 15, 2001 1:48 PM Subject: [PHP] finding a variables name Hey ppl,

Re: [PHP] Simulate the Enter key in Unix with PHP

2001-05-11 Thread Jason Brooke
Why don't you just use the -b switch and do it in one hit? - Original Message - From: YoBro [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, May 12, 2001 3:32 PM Subject: [PHP] Simulate the Enter key in Unix with PHP Hello, I have been trying to get PHP to execute some

Re: [PHP] Passing variables to another page - newbie

2001-05-06 Thread Jason Brooke
Thanks to everyone for the help - unfortunately my problem seems to be the function I'm using to do the redirecting. header() is supposed to be the first item passed. What I'm trying to do is use a line of code well down into the logic of my script to redirect the user to another page along

Re: [PHP] appended with \

2001-05-04 Thread Jason Brooke
I am using a form to test posting a variable. If my variable looks like this in script post_var.php3 : stringinaaform then it comes out like this in recieve.php3 : \stringinaaform\ why? thanks in advance. Did you check the manual? http://www.php.net/manual/en/configuration.php

Re: [PHP] sprintf()'s in if()'s

2001-05-04 Thread Jason Brooke
I suppose when you have so few problems you get to nitpick.. Guess my question is; why doesn't this work? if(sprintf(%01.2f,$Result[CurrentPrice]+$Result[Increment]) = sprintf(%01.2f,$BidAmt)) { when this works; if(0.30 = 1.00) { I'll just settle with a workaround for now. Thanks,

Re: [PHP] nesting php

2001-04-27 Thread Jason Brooke
Hello everyone! I am trying to pass a variable in a url and can't seem to do it. The problem is, the url is already being determined by a php if statement. So, when I get to the part where I try to append the url I get parse errors. What I would ideally like to do is generate the url using

Re: [PHP] redirection

2001-04-21 Thread Jason Brooke
header("Location: http://your.dom/file"); - Original Message - From: "Kishore" [EMAIL PROTECTED] To: "phpgeneral" [EMAIL PROTECTED] Sent: Saturday, April 21, 2001 11:28 PM Subject: [PHP] redirection How to redirect to another page in php. Is there any inbuilt function available for

Re: [PHP] IP address enconding

2001-04-19 Thread Jason Brooke
http://www.php.net/manual/en/function.ip2long.php No! I can encode IP address to an Integer: 192.168.0.1 consider as: a.b.c.d and now the formula goes: a shl 24 + b shl 16 + c shl 8 + d but i was looking for something ready made -elias http://www.kameelah.org/eassoft --

Re: [PHP] php equivalent for `command`

2001-04-18 Thread Jason Brooke
echo ++$x; http://www.php.net/manual/en/language.operators.increment.php Is there a php equivalent for the use of ` (I think) in Unix/Perl? So for example echo "`$x++`" would first evaluate $x++ and then print the resulting value. Euan Greig Technical Consultant BRANN DATA [EMAIL

Re: [PHP] Asking for input from shell?

2001-04-08 Thread Jason Brooke
$fp = fopen("php://stdin", "r"); echo fgets($fp, 64); fclose($fp); - Original Message - From: "enthalpy" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 09, 2001 1:10 PM Subject: [PHP] Asking for input from shell? anyone have sample code of how you can have a php

Re: [PHP] PHP + IRC

2001-04-04 Thread Jason Brooke
Yes - see the network and/or socket functions sections in the manual at http://www.php.net You might want to use the IRC RFC as a reference on the protocol jason Hello PHP, Is there any ways to use php with irc? -- Best regards, -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] QSI Payments

2001-04-03 Thread Jason Brooke
Yes Hi all, Has anyone had any experience in using the QSI payments software with PHP4? Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail:

Re: [PHP] Post but not Post

2001-03-28 Thread Jason Brooke
Use fsockopen to send the data: $host = "your.host"; $port = 80; $postdata = "field1=value1field2=value2field3=value3"; if ($sp = fsockopen($host, $port)) { fputs($sp,"POST /path/to/script.php HTTP/1.0\n"); fputs($sp,"Host: $host\n"); fputs($sp,"Content-type:

Re: [PHP] Post but not Post

2001-03-28 Thread Jason Brooke
I was just doing this a while back and ran into problems when going to 443. Any ideas on that? A regular fsockopen failed because of the security needed. -Bob Probably because you weren't following the SSL protocol You'll find the curl functions useful for SSL posting - or even non SSL

Re: [PHP] Fetching mails from a mailbox in PHP

2001-03-11 Thread Jason Brooke
Yes - see the network functions in the Php manual. If you don't already know the protocol commands for the mail retrieval protocol you want to use, see the relevant rfc. jason - Original Message - From: "Filip Olsson" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 12, 2001

Re: [PHP] exec as another user

2001-03-07 Thread Jason Brooke
Or install the cgi version and use it in conjunction with suExec alongside the module version. jason - Original Message - From: "Jon Snell" [EMAIL PROTECTED] To: "php general" [EMAIL PROTECTED] Sent: Thursday, March 08, 2001 9:44 AM Subject: RE: [PHP] exec as another user It would

Re: [PHP] Next month

2001-03-06 Thread Jason Brooke
Hi Tyler - did you check the date functions in the manual? date() with the 'n' format let's you grab the month's ordinal from a unix timestamp, and mktime() let's you easily create unix timestamps $next_mon = date("n", mktime(0,0,0,date("m")+1)); jason Hello, How do I get the number of

Re: [PHP] checking for a defined function

2001-03-01 Thread Jason Brooke
http://www.php.net/manual/en/function.extension-loaded.php jason - Original Message - From: "Eric Peters" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 10:29 AM Subject: [PHP] checking for a defined function how can I do something like

Re: [PHP] php4 as a module AND a cgi

2001-02-26 Thread Jason Brooke
I have to ask, though, why would you want to run it as a cgi? Its slower as cgi and runs more security risks. I'd only run it as a cgi if that was my only choice. It's probably less of a security risk when utilised via the cgi actually, at least when using Apache as the webserver because you

Re: [PHP] php vs perl

2001-02-15 Thread Jason Brooke
When Jason says 'especially when your note using the cgi' he means the cgi version of PHP (I think) in preference to installing PHP as an apache module. Almost, yes - I literally meant the 'common gateway interface', due to the fact that the webserver spawns the requested script/program

Re: [PHP] deleting cart items on session expire

2001-02-15 Thread Jason Brooke
However, there's no necessity to have the cgi version if you already have the modular version. All that is needed is to call the appropriate script using a tool such as 'wget'. This can be done manually or from cron as appropriate. Billy No there's not - I think that goes without saying

Re: [PHP] php vs perl

2001-02-14 Thread Jason Brooke
Is there any reason why php is better than perl for shopping carts and/or product catalogs? Thanks, Jeff It's hard to just come out and say that php is better than perl for shopping carts because there's too many factors to take into consideration. If you were a person who'd never used

Re: [PHP] deleting cart items on session expire

2001-02-14 Thread Jason Brooke
You'll probably need to trigger the deletion of all expired carts with something other than trying to guess when the user closes their browser. Maybe a regular cronjob, or just do it inside your globally-included function definition script so that any hit to the website can trigger it for you,

Re: [PHP] deleting cart items on session expire

2001-02-14 Thread Jason Brooke
If you're already using the CGI version of PHP, there isn't any disadvantage to using either it or perl scripts to do this clean-up. If you're running the Apache module version of PHP, you'll need to find a tool that can be invoked from the command prompt (such as perl) to do this for you.

Re: [PHP] Using php as a shell scripting language

2001-02-12 Thread Jason Brooke
Hi Tony Did you happen to check the manual? :) This will get you started: ./configure --with-your-required-options --enable-discard-path - Original Message - From: "Tony Bibbs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 1:18 PM Subject: [PHP] Using php as

Re: [PHP] Files only available via HTTPS

2001-02-08 Thread Jason Brooke
http://www.modssl.org/docs/2.6/ssl_reference.html#ToC22 jason - Original Message - From: "Daniel Tryba" [EMAIL PROTECTED] To: "Michael Conley" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, February 09, 2001 12:24 PM Subject: Re: [PHP] Files only available via HTTPS On Thu,

Re: [PHP] SQL Statments?

2001-02-05 Thread Jason Brooke
If I have a text file with all my sql statements (from like say mysqldump) what's the easiest way of passing them to mysql? I'm on RedHat6.2 with mysql 3.22.32 Thanks, -Jonathan I'm not sure about the easiest way, but definitely an easy way would be to simply do: cat filename | mysql

Re: [PHP] Apache and PHP

2001-02-04 Thread Jason Brooke
I'm not even sure that the shell escape is even used in win32 perl - I think it's done via a regular file association. I clearly remember setting it to #!/some/fake/rubbish one time as a test and it still worked fine I imagine the same would go for php.exe jason Do you normally have

Re: [PHP] Sockets

2001-01-24 Thread Jason Brooke
The online manual has some working examples Also, using the socket funcs in Php isn't very different from using them in C - try searching www.google.com if the examples in the manual aren't enough jason - Original Message - From: "Boget, Chris" [EMAIL PROTECTED] To: "Php (E-mail)"

Re: [PHP] FW: Cookies, Dammit!

2001-01-16 Thread Jason Brooke
($minisite ? " from $minisite" : "."); ? some possible html tags /minisite45/index.htm html stuff ? $minisite = 45; /* or even a snip that dynamically gets it from the script_name */ include "main_include.inc"; ? - Original Message - From: "Richard S

Re: [PHP] MySQL Newbie ? -Help!

2001-01-09 Thread Jason Brooke
one simple way would be to make a duplicate, empty table and then do: insert into newtable select distinct * from oldtable then try adding a uniqueness constraint if you don't want duplicates in the future jason Hi, Is there a way to go through a table and remove all duplicate entries so