Re: [PHP] php code in templates... how to?

2002-10-04 Thread olinux
eval() should work for you http://www.php.net/eval You also may want to consider including files coded something like this: html head?=$headers;?/head title?=$title;?/title body ?=$header;? ?=$body;? ?=$footer;? /body /html Then you just set the values for the vars in your code - include the

[PHP] Re: No ouput until program end, why?

2002-10-04 Thread Ernani Joppert Pontes Martins
Have you tried this way ? php -q your_file.php /path/to/output_filename Jean-Christian Imbeault [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am running a PHP program under Linux on the command line. The problem I have is that I get no output to the

[PHP] Please help - Safe mode and directory permission

2002-10-04 Thread Rudolf Wolf
Hello, I'm working with Safe mode and I have a big trouble how the PHP is behaved. I have the web root and under them is directory, where my scripts are. This is my situation: rwxr-xr-x www www /var/www/htdocs Web root rwxr-xr-x www www /var/www/htdocs/test

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
this is what i have exactly in my code... header(Content-Type: application/force-download; name=\$file\); header(Content-Disposition: attachment; filename=\$file \); header(Content-Transfer-Encoding: binary); header(Content-Length: $content_length); readfile($file_fullpath); exit;

[PHP] Re: Mime Types

2002-10-04 Thread christian haines
you could use the command file -bin your_filename and capture the output using popen or exec. i have found this to work well.. seee below function mimetype($file) { // execute command $fp = popen(file -bin $file,r); // determine mimetype to output if(!$fp) { // default

SV: [PHP] --enable-trans-sid ?

2002-10-04 Thread Daniel Alsen
[EMAIL PROTECTED] propably said: I am trying to re-compile php 4.2.2. It seems that the option --enable-trans-sid is no longer there (but still in the manual). The reason for a re-compilation is that I was not able to have SID printed out. Here is the code I tried, but SID is empty: ?php

Re: [PHP] recent encrpyt decrypt code... (problems)

2002-10-04 Thread Tom Rogers
Hi, Friday, October 4, 2002, 3:01:53 PM, you wrote: JB I've seen a few other post on this, and it sounds like there is more then JB one of use that is trying this script. I've got it so that I can use the JB commands, but I still get errors on the page... JB here is what I have done. JB I

[PHP] Re: Thumbnail with GD

2002-10-04 Thread Erwin
Net Php wrote: Hi, I am pretty lost.. I am trying to create a php thumbnail with php without using any *sql database.this script was supposed to open a directory then read it resize the images without losing quality and displays it on screen. ok, here is what I am trying to do and its now

Re: [PHP] force download and file size issue

2002-10-04 Thread Rasmus Lerdorf
Which OS and which PHP version? On Fri, 4 Oct 2002, christian haines wrote: this is what i have exactly in my code... header(Content-Type: application/force-download; name=\$file\); header(Content-Disposition: attachment; filename=\$file \); header(Content-Transfer-Encoding: binary);

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
PHP Version 4.1.2 Red Hat Linux release 7.3 (Valhalla) (Kernel 2.4.18-3 on an i686) Apache/1.3.23 Rasmus Lerdorf wrote: Which OS and which PHP version? On Fri, 4 Oct 2002, christian haines wrote: this is what i have exactly in my code... header(Content-Type:

[PHP] Re: No ouput until program end, why?

2002-10-04 Thread Jean-Christian Imbeault
Ernani Joppert Pontes Martins wrote: Have you tried this way ? php -q your_file.php /path/to/output_filename How would this help?? All that would do is redirect the output to a file. My problem is that I want output *before* the program ends ... Why aren't the echo statements I have in

[PHP] Umm... Uh-oh

2002-10-04 Thread Rick Beckman
Okay, I was mistaken... There is a gaping security hole in my simple li'l script... How do I modify it to only accept files from a certain path? I want the url format to be script.php?call=1 where 1 is the called file in the /includes/ directory. Just when I get optimistic I leave the entire

[PHP] RE: No ouput until program end, why?

2002-10-04 Thread Tim Ward
does output buffering not work with command line PHP? http://www.php.net/manual/en/ref.outcontrol.php Tim Ward www.chessish.com -Original Message- From: Jean-Christian Imbeault [mailto:[EMAIL PROTECTED]] Sent: 04 October 2002 05:59 To: [EMAIL PROTECTED] Subject: No ouput until

[PHP] after mysqlfront?

2002-10-04 Thread lallous
Hello MySqlfront.de's mysqlfront program has been discontinued any equivalent alternative? thanks, Elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: after mysqlfront?

2002-10-04 Thread Ernani Joppert Pontes Martins
Mascon or Free Mascon is really a good value HTH, Ernani Lallous [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello MySqlfront.de's mysqlfront program has been discontinued any equivalent alternative? thanks, Elias -- PHP General Mailing

[PHP] timeout

2002-10-04 Thread lallous
Hello, if i set set_time_limit(0) will my script still timeout and see in the browser: Page timed out and cannot be displayed? is there is anything I can do to prevent a script that takes an hour to finish processing from being killed when timeout occurs? Thanks, Elias -- PHP General

Re: [PHP] timeout

2002-10-04 Thread Rasmus Lerdorf
If you set_tiome_limit(0) your script will not be timed out as long as it keeps sending something every now and then. If it just sits there without outputting anything, then Apache will kill it off eventually. On Fri, 4 Oct 2002, lallous wrote: Hello, if i set set_time_limit(0) will my

Re: [PHP] timeout

2002-10-04 Thread lallous
so do you suggest that I send space-characters and then do a flush() ? Thanks, Elias Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... If you set_tiome_limit(0) your script will not be timed out as long as it keeps sending something every now and

Re: [PHP] force download and file size issue

2002-10-04 Thread christian haines
thanks for all your help and that last suggestion. it helped me isolate the issue. which i believe relates to a header previously sent.still debugging it but got a simple vers running cheers christian Rasmus Lerdorf wrote: Which OS and which PHP version? On Fri, 4 Oct 2002, christian

RE: [PHP] Re: after mysqlfront?

2002-10-04 Thread Brendon G
DB tools (getting better every version) http://www.dbtools.com.br/EN/ Cheers Brendon -Original Message- From: Ernani Joppert Pontes Martins [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 6:34 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: after mysqlfront? Mascon or Free

[PHP] Can't put Inquiry and Response into same form

2002-10-04 Thread Darya Said-Akbari
Hello, in the example on the bottom of this email I try to make an inquiry from my form to a PHP script and get the response, created by the PHP script, back into my form. Does anyone know what I am doing wrong? Any hints from you are welcome, regards, Darya Here the 2 PHP files: 1)

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread Marek Kilimajer
Use realpath() to check the path. I also suspect your script is vulnarable to cross-site includes (include('http://hacker.com/script.inc');) Rick Beckman wrote: Okay, I was mistaken... There is a gaping security hole in my simple li'l script... How do I modify it to only accept files from a

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards
erm..would that alow hackers access? Say I have a database include file would hackers be able to get access to my database like this? (include('http://mysite.com/datainc.php');) I hope bloody not!!! if so how on earth do i get round that! John On Friday 04 Oct 2002 10:52 am, Marek

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread Justin French
all my include files are *.inc, and I have a .htaccess file that makes apache refuse to serve those files directly thru http. Justin on 04/10/02 7:58 PM, John Wards ([EMAIL PROTECTED]) wrote: erm..would that alow hackers access? Say I have a database include file would hackers be able

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards
so as my files are all .php I would be okay from an external hacking attempt? I don't have any worry about internal as I am on a dedicated server John On Friday 04 Oct 2002 11:02 am, Justin French wrote: all my include files are *.inc, and I have a .htaccess file that makes apache refuse to

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread Marek Kilimajer
That would not help you if you include files based on unchecked user input. Justin French wrote: all my include files are *.inc, and I have a .htaccess file that makes apache refuse to serve those files directly thru http. Justin on 04/10/02 7:58 PM, John Wards ([EMAIL PROTECTED]) wrote:

Re: [PHP] Include

2002-10-04 Thread Marek Kilimajer
You can include as many files as you want (or manage to), but you can declare functions only once. So include your files declaring functions using require_once(); Matias Silva wrote: This might sound like a dumb question but I just need verification so that I can convince myself that I'm going

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread Stas Maximov
The easiest and safest way to get around this problem is to place all your include files outside of your webroot directory (say one level up), so they will be accessible locally via includes, but NOT accessible via http. HTH, Stas - Original Message - From: John Wards [EMAIL PROTECTED]

Re: [PHP] Umm... Uh-oh

2002-10-04 Thread John Wards
ah never thought of that! John On Friday 04 Oct 2002 11:14 am, Stas Maximov wrote: The easiest and safest way to get around this problem is to place all your include files outside of your webroot directory (say one level up), so they will be accessible locally via includes, but NOT

Re: [PHP] Re: No ouput until program end, why?

2002-10-04 Thread Marek Kilimajer
Try checking the output_buffering option Jean-Christian Imbeault wrote: Ernani Joppert Pontes Martins wrote: Have you tried this way ? php -q your_file.php /path/to/output_filename How would this help?? All that would do is redirect the output to a file. My problem is that I want

Re: [PHP] timeout

2002-10-04 Thread Marek Kilimajer
Is this true? I haven't heard about this. I thought it's the browser that closes conection a thus terminates the script, but this can be avoided using ignore_user_abort(false); Rasmus Lerdorf wrote: If you set_tiome_limit(0) your script will not be timed out as long as it keeps sending

[PHP] Unix passwd file

2002-10-04 Thread Scott
I apologize if this is might be OT. I have 5,000+ users in a unix passwd file that I would like to move to a MySQL table to build a login system with php. I could then use this table for Postfix and Radius. I know about the getpwent in perl, but does anyone know if I populate a MySQL table

[PHP] Good Practice: Variables, Error Reporting and Security

2002-10-04 Thread Adam Royle
Hi All, I have been a subscriber of php-db for quite some time, and I have seen MANY ppl ask why their variables aren't being passed though, etc, due to register_globals, etc, blah blah blah I have kept my eyes open reading all the material I can, and I understand the security implications

[PHP] Error disabling

2002-10-04 Thread Davíð Örn Jóhannsson
I need to be able to disable error reporting on one page with php, I just don’t remember how to do this, if I remember correctly I could call some function in the begining of a php doc and tell it not to disply any errors that occur while parsing the doc.

Re: [PHP] Unix passwd file

2002-10-04 Thread Peter Janett
You can just put the username and password in the MySQL database as normal text, then build your applications that are reading them to check the passwords with the UNIX Crypt function. In other words, just as your passwords are stored in a plain text file, store them in plain text in the db.

Re: [PHP] Error disabling

2002-10-04 Thread John Wards
A quickie woudl be put an before every function that would report an error like mysql_query etc John On Friday 04 Oct 2002 11:51 am, Davíð Örn Jóhannsson wrote: I need to be able to disable error reporting on one page with php, I just don’t remember how to do this, if I remember correctly I

Re: [PHP] Unix passwd file

2002-10-04 Thread Jakob Breivik Grimstveit
Scott wrote: [...] does anyone know if I populate a MySQL table with the login/password can php then use that encrypted password to validate users? http://www.php.net/manual/en/function.crypt.php should be the answer to your questions. -- jakob -- PHP General Mailing List

Re: [PHP] Unix passwd file

2002-10-04 Thread lallous
Peter, I think he's stuck with the parsing part? you can file() the /etc/passwd file then explode() it and add the username,passhash parts and/or more values into the mysql table. Elias, Peter Janett [EMAIL PROTECTED] wrote in message

[PHP] Need to move all MySQL tables to another server

2002-10-04 Thread Peter Janett
I'm upgrading a web server, and need to move all the MySQL data from the old box to the new one. I have approx. 50 databases, some of which have a lot of tables in them. I know I can write a script to list all the databases, then export the sql for each database, then each table in it, then the

Re: [PHP] Error disabling

2002-10-04 Thread Maxim Maletsky
Error Reporting : php.net/error_reporting looks like this: error_reporting(0); // for outputting nothing error_reporting(55); // PHP4's default error_reporting(E_ALL | E_NOTICE); // for anything PHP can complain of Maxim Maletsky [EMAIL PROTECTED] www.PHPBeginner.com // where PHP

[PHP] Re: Installing PHP

2002-10-04 Thread lallous
did you try www.phpbuilder.com for how to install PHP /win ? Elias, Dan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am trying to create a message board. I setup a windows 2000 server and installed IIS. In order to setup this messageboard i need to have PHP

[PHP] Re: Need to move all MySQL tables to another server

2002-10-04 Thread lallous
With the mysqldump utility (comes with mysql) you can backup/restore any database. I don't know if you can tell it to dump all databases and their tables too. If you've got root access, you can simply copy the 'data' (i.e: C:\mysql\data) from a server to another. good luck, Elias Peter Janett

Re: [PHP] Unix passwd file

2002-10-04 Thread Josep R. Raurell
I found this code in a web (or somthink like this), but can remever where to give the credits, sorry. include_once('/etc/php/bases.php'); function autentifica($user,$pass) { global $db1Host, $db1User, $db1Pass; $auth = false; mysql_connect($db1Host,$db1User,$db1Pass) or die

Re: [PHP] Need to move all MySQL tables to another server

2002-10-04 Thread Jason Wong
On Friday 04 October 2002 18:58, Peter Janett wrote: I'm upgrading a web server, and need to move all the MySQL data from the old box to the new one. I have approx. 50 databases, some of which have a lot of tables in them. I know I can write a script to list all the databases, then export

Re: [PHP] Good Practice: Variables, Error Reporting and Security

2002-10-04 Thread Maxim Maletsky
On Fri, 4 Oct 2002 20:50:32 +1000 Adam Royle [EMAIL PROTECTED] wrote: Hi All, I have been a subscriber of php-db for quite some time, and I have seen MANY ppl ask why their variables aren't being passed though, etc, due to register_globals, etc, blah blah blah I have kept my eyes

Re: [PHP] Error disabling

2002-10-04 Thread Holger Heinze, Portalmeister GmbH
Hi there, i use this line in my code. #error_reporting(E_ALL); // set to -- (E_ERROR) (E_WARNING) (E_PARSE) (E_NOTICE) (E_CORE_ERROR) (E_CORE_WARNING) (E_ALL) check out the docs: http://www.php.net/manual/en/function.error-reporting.php holger - Original Message - From: Davíð Örn

RE: [PHP] Umm... Uh-oh

2002-10-04 Thread John W. Holmes
That still wouldn't fix anything if you're including a file based on unchecked user input. Make an array in your file of safe files to include, that can be designated by the user. $safe_files = array(file1,file2,file3); include(/path/to/include/ . $safe_files[$_GET['include']] . .php);

RE: [PHP] No ouput until program end, why?

2002-10-04 Thread John W. Holmes
I am running a PHP program under Linux on the command line. The problem I have is that I get no output to the screen until the program finishes. I have lots of echo statements throughout the program to help me debug but none of them are printed until the program finishes, which is really a

[PHP] help on regex

2002-10-04 Thread andy
Hi everybody, I am trying to learn regex and could need some help. There are 2 function I would need. 1 which returns false if the data does contain anything else than numbers or fullstops I tryed this: function validate_phone ($phone) { return (ereg('^[0-9][:punct:]', $phone)); } The next

[PHP] the files I'm working with

2002-10-04 Thread Rick Beckman
song.php is the file that I'm using as my template file, and it calls information from the includes/ directory, which the file 1 would be in. If someone would please look at song.php (I stripped it down to the basics pretty much) and let me know the best and most secure way to do what I want it

[PHP] Re: the files I'm working with

2002-10-04 Thread Rick Beckman
Outlook Express added a .dat extension to the 1 file... The actual files I'm working with do NOT have extensions. Just wanted to clear that up. -- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/ Rick Beckman wrote: song.php is the file that I'm using as my template file, and it calls

RE: [PHP] Good Practice: Variables, Error Reporting and Security

2002-10-04 Thread Jay Blanchard
[snip] I made one. Here: // Alter variables for the versions prior to 4.1.0 // NOTE: $_REQUEST global variable is NOT supported. if(strnatcasecmp('4.1.0', PHP_VERSION)=0) { foreach(Array( '_GET' = 'HTTP_GET_VARS'

Re: [PHP] the files I'm working with

2002-10-04 Thread Marek Kilimajer
safe enough would be to put this at the begining if(!ereg('^[0-9]+$',$song) { die('Sorry...') } Rick Beckman wrote: song.php is the file that I'm using as my template file, and it calls information from the includes/ directory, which the file 1 would be in. If someone would please look at

[PHP] help me please.

2002-10-04 Thread Steve Jackson
got a problem here people. What I want to do is upload a file and store its name in a database. For some reason I cant. I can upload the file fine but can't pass it's name to the mysql DB. Any ideas: Upload form: ? require( ../Cart.php); Brand(); DBInfo(); echo bYou can now upload a

[PHP] XML dom encode

2002-10-04 Thread Dav rn Jhannsson
?php header(Content-Type: application/xml); //query database records $connection = mysql_connect(localhost, user, pass) or die(can't connect); mysql_select_db(webbish); $query = SELECT id, title, artist FROM xmldb; $result = mysql_query($query); if(mysql_num_rows($result) 0){

[PHP] Distance Script Available?

2002-10-04 Thread RoyW
There has to be somewhere you can pick up a script or function that will calculate distance? :-) Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: XML dom encode

2002-10-04 Thread Manuel Lemos
On 10/04/2002 09:14 AM, 翽 wrote: But I need to modify this script so that I can set the encoding of the xml document to ISO-8859-1 so it would look like this: ?xml version=1.0 encoding=”iso-8859-1” ? - cds - cd id=1 titlesdfsdfsdf/title artistssdfsdf/artist /cd - cd id=2

[PHP] Re: help me please.

2002-10-04 Thread Erwin
got a problem here people. What I want to do is upload a file and store its name in a database. For some reason I cant. What version of php are you using? Did you check the register_globals in php.ini??? O...in the process script, you have $usefile, but in the submit script, it's $useRfile

Re: [PHP] Unix passwd file

2002-10-04 Thread Scott St. John
At 04:54 AM 10/4/2002 -0600, Peter Janett wrote: You can just put the username and password in the MySQL database as normal text, then build your applications that are reading them to check the passwords with the UNIX Crypt function. Basically that is what I am trying to do. I just converted a

[PHP] Re: help on regex

2002-10-04 Thread Mark Harwood
I am trying to learn regex and could need some help. There are 2 function I would need. 1 which returns false if the data does contain anything else than numbers or fullstops I tryed this: function validate_phone ($phone) { return (ereg('^[0-9][:punct:]', $phone)); } try using

RE: [PHP] Re: XML dom encode

2002-10-04 Thread Dav rn Jhannsson
-Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: 4. október 2002 12:23 To: [EMAIL PROTECTED] Subject: [PHP] Re: XML dom encode On 10/04/2002 09:14 AM, 翽 wrote: But I need to modify this script so that I can set the encoding of the xml document to ISO-8859-1 so

Re: [PHP] Unix passwd file

2002-10-04 Thread Scott St. John
At 01:54 PM 10/4/2002 +0200, lallous wrote: Peter, I think he's stuck with the parsing part? you can file() the /etc/passwd file then explode() it and add the username,passhash parts and/or more values into the mysql table. I can parse the file just fine, what I am trying to do is actually make

Re: [PHP] Distance Script Available?

2002-10-04 Thread Maxim Maletsky
Distance of what? On Fri, 4 Oct 2002 07:21:53 -0500 RoyW [EMAIL PROTECTED] wrote: There has to be somewhere you can pick up a script or function that will calculate distance? :-) Roy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Unix passwd file

2002-10-04 Thread Erwin
Username is no problem, the Unix encrypted password is the one I am trying to work out. If the user has a password of: phprocks and in /etc/passwd that encrypted password works out to be: !#@KJCKMSD, then I validate the user, they enter the correct username and password, will PHP be able

Re: [PHP] XML dom encode

2002-10-04 Thread Tom Rogers
Hi, Friday, October 4, 2002, 10:14:31 PM, you wrote: DÖJ ?php DÖJ header(Content-Type: application/xml); DÖJ //query database records DÖJ $connection = mysql_connect(localhost, user, pass) or die(can't connect); DÖJ mysql_select_db(webbish); DÖJ $query = SELECT id, title, artist FROM

Re: [PHP] Distance Script Available?

2002-10-04 Thread Miles Thompson
From concept to reality? mt At 02:51 PM 10/4/2002 +0200, Maxim Maletsky wrote: Distance of what? On Fri, 4 Oct 2002 07:21:53 -0500 RoyW [EMAIL PROTECTED] wrote: There has to be somewhere you can pick up a script or function that will calculate distance? :-) Roy -- PHP

RE: [PHP] the files I'm working with

2002-10-04 Thread Jon Haworth
Hi Marek, safe enough would be to put this at the begining if(!ereg('^[0-9]+$',$song) { die('Sorry...') } Sure, but why incur the expense of using the ereg() parser? If you're only ever going to be testing whether $song is a number or not, use http://php.net/is-numeric. Cheers Jon --

[PHP] Re: mail headers filtering

2002-10-04 Thread Henry
I like that ;-) Manuel Lemos [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, On 09/30/2002 01:29 PM, Henry wrote: How about somebody making a javascript email encoder so that if you use a javascript enabled mail client it will get decoded only once

[PHP] Re: $B$($($H(B

2002-10-04 Thread Rick Beckman
The best translation I could find comes from worldlingo.com ... $B$3(B $B$l(B $B$C(B $B$F(B $B$I(B $B$(B $B$d(B $B$C(B $B$F(B solution? $B$9(B $B$k(B $B$s(B $B$G(B $B$7(B $B$g(B $B$(B? Obviously, that's not enough to help.. Sorry. However, they do offer

[PHP] Re: $B$($($H(B

2002-10-04 Thread Rick Beckman
And I see my post got butchered... Well, that's what I get for trying to help. :-\ -- Kyrie Eleison, Rick www.spiritsword.com/phpBB2/ Rick Beckman wrote: The best translation I could find comes from worldlingo.com ... $B$3(B $B$l(B $B$C(B $B$F(B $B$I(B $B$(B $B$d(B $B$C(B

Re[2]: [PHP] XML dom encode

2002-10-04 Thread Tom Rogers
Hi, Untested but it would be something like this: ?php header(Content-Type: application/xml); //query database records $connection = mysql_connect(localhost, user, pass) or die(can't connect); mysql_select_db(webbish); $query = SELECT id, title, artist FROM xmldb; $result =

[PHP] Re: $B$($($H(B

2002-10-04 Thread @ Edwin
Not that this is relevant but... "$B2rFI$9$k(B"(kaidoku suru) means "to decipher" or "to decode". So, perhaps, the person who posted the message was just wondering how will the ml figure out what the message was. Or, ... (I don't really know... there's a Japanese ml so the post must be a

[PHP] Problem uploading files

2002-10-04 Thread Wilmar Perez
Hello guys This is my first post to the list, hope you can give point me to the right direction. Well, I've been trying to upload a file without much success so far. All I get is my firs error message: There is no file to send (shown in the script). This is my form: form

Re: [PHP] Problem uploading files

2002-10-04 Thread Justin French
A few observations: if ($formfile == none) { echo There is no file to send; exit; } for starters, I don't see how $formfile could ever be none... secondly, if you have register_globals set to off in your php.ini, $formfile wont' even be a variable, but you've only sent what looks like partial

Re: [PHP] Problem uploading files

2002-10-04 Thread Wilmar Perez
Hello Justin, thanks for your comments. Well just to answer your questions: 1. I've got register_globals set to ON. I have never had problem before with my forms, but this is the first time I try to upload a file. 2. I'm following the sample code you recommend. They're in fact pretty

[PHP] GD on Linux

2002-10-04 Thread Joshua E Minnie
I was wondering if anyone could point me in the right direction as to why I can't get image manipulation with PHP to work. I am running 4.1.2 on Redhat with Apache. The configure script has --with-gd and in the php.ini file I added the line extension=gd.so. I got it working on my W2K IIS5

[PHP] Re: GD on Linux

2002-10-04 Thread Joshua E Minnie
Joshua E Minnie [EMAIL PROTECTED] wrote: : I was wondering if anyone could point me in the right direction as to why I : can't get image manipulation with PHP to work. I am running 4.1.2 on Redhat : with Apache. The configure script has --with-gd and in the php.ini file I : added the line

[PHP] globals not working?

2002-10-04 Thread Paul Kaiser
I have an odd problem. I have a file called evt_to_web.php. This file contains some variable assignments and a few functions. I have used require_once evt_to_web.php; in another file, indextest.php. In indextest.php, I then call a function that is in evt_to_web.php. That function cannot seem

[PHP] use_cookies not working

2002-10-04 Thread Richard Fox
I am using ini_set(session.use_cookies,0); to disable cookies but I don't see PHPSESSID showing up like I thought it would, so I don't think its working. I call it before session_start(). After the ini_set call I do session_log(CSE_Session_Start);

RE: [PHP] globals not working?

2002-10-04 Thread Jon Haworth
Hi Paul, function testGlobal() { global $evtredir_site; echo TestGlobal: '$evtredir_site'br\n; } When I do testGlobal(); I get: TestGloal: '' Change this function to: function testGlobal() { global $evtredir_site; echo TestGlobal: . $evtredir_site.

[PHP] form and php

2002-10-04 Thread Tao Hou
Hi, I jsut install apache1.3.26 and php 4.2.3 on my win2000 machine for my course project. when I run: ? phpinfo(); ? everything works fine, it will show me the information. but when I try the followings, it give me an error: test.html html titleThis page

[PHP] Obfuscating E-Mail

2002-10-04 Thread Ashley M. Kirchner
What's the best (or easy, whichever) way to obfuscate e-mail addresses, either in plain HTML, or through a PHP script to prevent harvesters from collecting them? I don't mind if the address shows up as 'mickey at disney dot com (as opposed to [EMAIL PROTECTED]), however I want it to be a

Re: [PHP] form and php

2002-10-04 Thread Gerard Samuel
I believe - html titleTest/title body pbTest/b/p ?php $tmp = 20; print(the value of tmp variable is $tmp); print(the first variable is . $_POST['varone']); print(the second variable is . $_POST['vartwo']); ? /body /html Tao Hou wrote: Hi, I jsut install apache1.3.26 and php 4.2.3 on my

Re: [PHP] Obfuscating E-Mail

2002-10-04 Thread Justin French
simple str_replace() stuff will get the address into a mickey at disney dot com format... but the link needs to be done with javascript, and you have to accept that it will not work for everyone. the phpclasses.org site does this along with 1000's of others, so I'm sure you can find some code.

Re: [PHP] Obfuscating E-Mail

2002-10-04 Thread Ashley M. Kirchner
Justin French wrote: simple str_replace() stuff will get the address into a mickey at disney dot com format... but the link needs to be done with javascript, and you have to accept that it will not work for everyone. What about if I made the link point to another PHP script that will

Re: [PHP] recent encrpyt decrypt code... (problems)

2002-10-04 Thread Jeff Bluemel
I had not downloaded mcrypt, but I download it (which required a later version of mhash so I downloaded, and installed it too). I compiled everything with the instrucitons you listed, and I am still getttng the same error messages. Jeff Tom Rogers [EMAIL PROTECTED] wrote in message [EMAIL

[PHP] Need help with fsockopen()

2002-10-04 Thread Cliff Small
I have a script that downloads html pages from many different sites. The script executes as expected but is slw. I would like to replace fopen() with fsockopen() so that I can set a time limit for the page downloads. Here is an example of how I'm using fopen(): $OpenFile =

Re: [PHP] Need help with fsockopen()

2002-10-04 Thread bbonkosk
http://www.php.net/manual/en/function.fsockopen.php Seems to be A LOT of useful information there? Did you check it out? -Brad I have a script that downloads html pages from many different sites. The script executes as expected but is slw. I would like to replace fopen() with

[PHP] PHP debugger

2002-10-04 Thread Anna Gyor
Hello, is there any application with I can test my php-based web site? I know Zend Studio and PHPEdit but I can't use them if any variable comes from an other html site. (For example in logging there are loginname and password as html variable and the debugger don't see them and the script

[PHP] Modifying the size of a jpg.

2002-10-04 Thread nicos
Hello, I'm trying to modify the size of jpgs so they can be less big, so easily downloadable. If anyone has worked on it, contact me please. Thanks. -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet -- PHP General Mailing List

Re: [PHP] Distance Script Available?

2002-10-04 Thread Edward Marczak
On 10/4/02 8:21 AM, RoyW [EMAIL PROTECTED] tapped the keys: There has to be somewhere you can pick up a script or function that will calculate distance? If you can search by US Zip Code or lat/long, search the archives of this list for 'proximity'. You'll find this comes up quite often.

[PHP] Uploading Files

2002-10-04 Thread Jason
I would like to be able to upload files from the client computer to the server via a form. I know how to build the form, but am not sure of the best way to process this. I know there are certain ftp functions that can do this, which I'm not sure how to use. Are there any others? Jason D.

[PHP] Re: Uploading Files

2002-10-04 Thread eriol
Jason [EMAIL PROTECTED] disgorged: : I would like to be able to upload files from the client computer to the : server via a form. I know how to build the form, but am not sure of the : best way to process this. I know there are certain ftp functions that can : do this, which I'm not sure how

[PHP] Re: Uploading Files

2002-10-04 Thread Jason
Okay, I checked out the link listed below, and tried using what is given there, but I get the following error: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in d:\www_root\locutus\phpman\admin\test.php on line 16 Here's the code

[PHP] RE: Incrementing the value

2002-10-04 Thread Jason D
It's not very clear what you want but the following could be it: ?if(!isset($_GET['hid'])) {$h=1;} else {$h=$_GET['hid'];}? a href=Delay.php?hid=?php echo $h+1; ? img src=Gif/nextque.gif border=0/a i have written code such that initially it will display the value correspond to the value

[PHP] Problem uploading PDF files

2002-10-04 Thread Wilmar Perez
Hello guys I do have a problem uploading PDF files. Whenever I try to upload a PDF file, the enviromental variable of the file field in the form gets set to none, otherwise it goes fine. Any idea? *** Wilmar Pérez

RE: [PHP] Execution Time

2002-10-04 Thread Mark Olton
Edit your php.ini, change max_execution_time to something greater than 30. Mark -Original Message- From: Pong-TC [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] Execution Time Hello All I have a problem with the

[PHP] elseifs and ereg

2002-10-04 Thread Bryan Koschmann - GKT
Okay, I think I'm just being stupid here. Can someone please tell me why this is wrong? Yeah I know it looks lame, but I'm just testing something. This always returns no matches Thanks, Bryan ? $now = strtotime(now); $out = never set; if ($now == ereg([2200-2230])) $out =

[PHP] Re: elseifs and ereg

2002-10-04 Thread Nick Eby
check the manual page for ereg... you'll find that it takes 2 parameters minimum, and the return value is not what your code expects it to be. http://www.php.net/ereg Bryan Koschmann - Gkt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Okay, I think I'm just

[PHP] Re: Uploading Files

2002-10-04 Thread eriol
Jason [EMAIL PROTECTED] disgorged: : ?php : move_uploaded_file($_FILES['userfile']['tmp_name'], : ../images/$_FILES['userfile']['name']); : ? : : I am able to get rid of this error, but changing the line to: : move_uploaded_file($_FILES['userfile']['tmp_name'], :

  1   2   >