[PHP] Image functions

2002-04-19 Thread Gerard Samuel
Im trying to modify a poll script to not use the hard coded image files and use php's image functions. On the file that will be outputing the poll graphics, I tried at the top of the page -> header("Content-type: image/png"); and header("Content-type: image/jpeg"); For some reason, when the pag

[PHP] GMT Time

2002-04-19 Thread Richard Fox
Ok, I give up. I want to compare a timestamp(14) field in a MySQL table with the current time. Currently I use the following pseudo-sql: select field from table where table.time < date("YmdHis", time()) only, the table timestamp is GMT time and the time function is returning local time. How do

Re: [PHP] GMT Time

2002-04-19 Thread Erik Price
On Friday, April 19, 2002, at 01:23 PM, Richard Fox wrote: > I want to compare a timestamp(14) field in a MySQL table with the > current > time. Currently I use the following pseudo-sql: > > select field from table where table.time < date("YmdHis", time()) > > only, the table timestamp is GMT

[PHP] file_get_contents source??

2002-04-19 Thread Giovanni Lenzi
file_get_contents function is supposed to return the contents of a file in a binary safe manner. I tried it on two different servers which has different versions of APACHE+PHP but it still not works. The server give me this response: Fatal error: Call to undefined function: file_get_contents() in

[PHP] php permissions

2002-04-19 Thread ROBERT MCPEAK
php is running on our box as nobody:nogroup. I'm trying to write php code that will edit/delete files uploaded to the server by other users, and, obviously, I get a permissions error. My sysadmin is hesitant to give php more access until I do some research about the security issues involved, an

Re: [PHP] php permissions

2002-04-19 Thread Dave Raven
chown them to nobody. - Original Message - From: "ROBERT MCPEAK" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, April 19, 2002 7:53 PM Subject: [PHP] php permissions > php is running on our box as nobody:nogroup. I'm trying to write php > code that will edit/delete files

[PHP] Re: file_get_contents source??

2002-04-19 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Giovanni Lenzi) wrote: > file_get_contents function is supposed to return the contents of a file in a > binary safe manner. I tried it on two different servers which has different > versions of APACHE+PHP but it still not works. > The server giv

[PHP] R: file_get_contents source??

2002-04-19 Thread Giovanni Lenzi
thanks very much. now i'll read the entire article. However my problem is that i want to transmit characters like : £ $ % & ^ § so file and readfile function don't work correctly. Can you say me something more?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://w

Re: [PHP] php permissions

2002-04-19 Thread Erik Price
On Friday, April 19, 2002, at 01:53 PM, ROBERT MCPEAK wrote: > My sysadmin is hesitant to give php more access until I do some > research about the security issues involved, and I am a relative newbie > and I'm not sure what the issues are or how to find out more about > them. > > How do I give

[PHP] creating table help

2002-04-19 Thread webmaster
I'm very new to php and PostgreSQL. I keep getting the following error when I try to create a table: Warning: Wrong parameter count for pg_exec() in /var/www/html/elkan/createtable.php on line 23 The table, ghdsl could not be created Here is the code I'm using: thanks for any help. -- PHP

Re: [PHP] php permissions

2002-04-19 Thread ROBERT MCPEAK
How? Manually each time a file is uploaded? Or with PHP somehow? I appreciate your response, but perhaps I'm not clear enough. Isn't it quite common to have php creating/editing/deleting files on the server? How is this done in a secure manner? Could you explain further? Thanks. >>> "Dave

Re: [PHP] creating table help

2002-04-19 Thread Tyler Longren
I checked the php manual, and there doesn't seem to be a pg_exec function. You'll probably be able to use pg_query instead. But that error makes it sound like pg_exec is a valid function for your version of PHP, maybe it's not in newer versions. http://www.php.net/manual/en/function.pg-query.php

RE: [PHP] creating table help

2002-04-19 Thread Craig Vincent
> Warning: Wrong parameter count for pg_exec() in > /var/www/html/elkan/createtable.php on line 23 > The table, ghdsl could not be created > if (pg_exec($dbname, $query, $connect)) I assume pg_exec is a synonym for pg_query (the pg_exec command does exist in the PHP docs). According to the fun

RE: [PHP] php permissions

2002-04-19 Thread Craig Vincent
> How? Manually each time a file is uploaded? Or with PHP somehow? > > I appreciate your response, but perhaps I'm not clear enough. > > Isn't it quite common to have php creating/editing/deleting files on > the server? How is this done in a secure manner? > > Could you explain further? Well t

RE: [PHP] php permissions

2002-04-19 Thread ROBERT MCPEAK
Craig, you seem very knowledgable and I appreciate your help. I confused matters by mentioning the word "upload." I'm actually not using php to upload the files. The user ftps the files to the server, and the ownership permissions prevent php from manipulating the files. I'm looking for a clea

Re: [PHP] php permissions

2002-04-19 Thread Erik Price
On Friday, April 19, 2002, at 02:44 PM, ROBERT MCPEAK wrote: > Isn't it quite common to have php creating/editing/deleting files on > the server? How is this done in a secure manner? Running Apache/PHP as 'nobody' isn't really that secure, since there may be other services running on the sys

[PHP] R: file_get_contents source??

2002-04-19 Thread Giovanni Lenzi
ok thanks, i solved my problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] GMT Time

2002-04-19 Thread Erik Price
On Friday, April 19, 2002, at 01:23 PM, Richard Fox wrote: > I want to compare a timestamp(14) field in a MySQL table with the > current > time. Currently I use the following pseudo-sql: > > select field from table where table.time < date("YmdHis", time()) > > only, the table timestamp is GMT

[PHP] Re: include() and require() problem

2002-04-19 Thread Vins
I'm also having a problem with including file into and include file. my script reads. ( (strpos($PHP_SELF,"admin/")) ? include('../includes/mysql.inc.php') : include('includes/mysql.inc.php') ); @mysql_pconnect($mysqlDBhost,$mysqlDBuser,$mysqlDBpass) or die ("Database access error. Please contac

[PHP] srand, array_rand

2002-04-19 Thread Gerard Samuel
Im trying to get a random value to select a random row out of *a* database. Not just mysql. array_rand would do me just fine, but Im reading in the manual -> "Don't forget to call *srand()* to seed the random number generator. " Im not too ce

Re: [PHP] srand, array_rand

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Gerard Samuel wrote: > Im trying to get a random value to select a random row out of *a* > database. Not just mysql. > array_rand would do me just fine, but Im reading in the manual -> > > "Don't forget to call *srand()* >

[PHP] Re: Image functions

2002-04-19 Thread Matthew Gray
You won't get very far if you aren't outputting an image to the browser using ImageJpeg(), etc. Matt Matthew J Gray UWRF - Information Technology Services [EMAIL PROTECTED] Gerard Samuel wrote: > Im trying to modify a poll script to not use the hard coded image files > and use php's image func

[PHP] header redirection

2002-04-19 Thread Norman Zhang
Hi, I use header(location: ...) for redirection to another page. But I also want to include , and tags in the other page. Is there a way to this? Because php complains that the header already been sent. Regards, Norman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] header redirection

2002-04-19 Thread Kevin Stone
Headers will be created whenever information is outuputted to the browser. In this case when you include the .html file into your php script the browser is going to create all the headers it will ever know for that page. Obviously this does you no good if you want to add headers later. Ways aroun

[PHP] Leading zeros in array index

2002-04-19 Thread Kent Briggs
My first post here, sorry if this has been covered before: Why does including a leading zero in an array index cause problems? For example, the output of this script: $x = array("a","b","c","d","e","f","g","h","i","j"); echo $x[0]; echo $x[1]; echo $x[2]; echo $x[3]; echo $x[4

Re: [PHP] Leading zeros in array index

2002-04-19 Thread Joshua b. Jore
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oh it's probably because your numbers are being interpreted as octal. Either use the array as '00' .. '09' or just 0 .. 9. 00 .. 09 is valid for 00 to 07 but there is no such thing as 08 and 09 in octal. Joshua b. Jore http://www.greentechnologist.or

[PHP] $HTTP_*_VARS ?

2002-04-19 Thread Tobias Lindqvist
Hi there. Hoe come I cant use $HTTP_*_VARS in my script ? I have register_globals on, track vars is also on and i have made the necessary changes in my apache config ( the ALLOWOVERRIDE ALL ). My system is Win XP, Apache ( newest ) and newest PHP release. Thanks. -- PHP General Mailing List (h

[PHP] URL for "Powered by PHP" gif

2002-04-19 Thread Todd Cary
Can someone provide me with the URL for a gif that I can place on my pages so that I can give credit to PHP (Apache would be nice too). Many thanks.. Todd -- Todd Cary Ariste Software 2200 D Street Extension Petaluma, CA 94952 707-773-4523 [EMAIL PROTECTED] -- PHP General Mailing List (

Re: [PHP] URL for "Powered by PHP" gif

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 06:46, Todd Cary wrote: > Can someone provide me with the URL for a gif that I can place on my pages > so that I can give credit to PHP (Apache would be nice too). Presumably you've already looked on www.php.net? You can get the PHP logo and a "Powered by Zend" logo usi

[PHP] Getting All Variables?

2002-04-19 Thread Devin Atencio
Is there an easy way in PHP to have it display to screen all the variables that it has in memory? So i can see what variables there is and what they are set to? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] PHP @ 24-hour programming competition

2002-04-19 Thread Visontay Peter
Hi! I have quite an unusual problem for you :) There will be a 24-hour programming competition at our university, where teams of 3 have one day to solve a complex problem (which will be revealed on the day of the competition). Teams cannot get help from "outside", so no outward network / phone co

[PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
I've switched "register_globals=off" and "register_argc_argv=off" in php.ini to use $_SESSION and/or $_POST. All my code had been written using $var Unfortunately, I cannot seem to access the arrays in either $_SESSION and $_POST. I've set each page to start with since I'm also processing the

[PHP] multidimensional array

2002-04-19 Thread Rodrigo Peres
Hi list, In order to avoid many left joins I took an aproach that I didn't know if it's good, but I couldn't figure out another way. If my cliente has 10 phone numbers I buld an array, serialize it and store in database, so I didn't have to create another table. The problem is now I need to migra

[PHP] Out of memory error message

2002-04-19 Thread Mullin, Reginald
Hi Guys, Does anyone know what the following error message is and how I can go about solving it? ***ERROR MSG*** Out of memory during "large" request for 2147487744 bytes, total sbrk() is 1459608 bytes. This error message gets written to Apache's error logs every other time I execute my MSSQL q

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Andre Dubuc wrote: > Whenever I try: > > print("$_SESSION['sfname']); or print("$_POST['scity'] > > I get a parse error "expecting 'T_STRING' . . ." -- obviously there's nothing > in the array or I haven't set it. You just have a simple syntax error. You can use any of

Re: [PHP] multidimensional array

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Rodrigo Peres wrote: > In order to avoid many left joins I took an aproach that I didn't know > if it's good, but I couldn't figure out another way. If my cliente has > 10 phone numbers I buld an array, serialize it and store in database, so > I didn't have to create another t

Re: [PHP] Leading zeros in array index

2002-04-19 Thread Kent Briggs
"Joshua B. Jore" wrote: > > Oh it's probably because your numbers are being interpreted as octal. > Either use the array as '00' .. '09' or just 0 .. 9. 00 .. 09 is valid for > 00 to 07 but there is no such thing as 08 and 09 in octal. Ok, thanks. -- Kent Briggs, [EMAIL PROTECTED] Briggs Soft

[PHP] Re: 3dim Array problem

2002-04-19 Thread Hugh Bothwell
> while( $res=$UDV -> getDbAns()) {// fetch mains Just checking: On success, $UDV->getDbAns() returns array of string; On fail, it returns false. > if(strlen($res[0]) > 2) { // if result is OK > $menarr[$h]=$res[0]; // put them in array Here is your problem - you set $menarr[$h]

[PHP] redirect browser

2002-04-19 Thread Joe
I had developed the web-based survey for student. And I need to check that each only fill in the form once time. So I write following code to check if the student number exist in the database or not. if yes, don't let them to fill in again. if no, redirect the browser to the page for them to fill

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien
> On Friday 19 April 2002 09:31, Jeff Oien wrote: > > I have a script which retrieves the body of an email message from > > a MySQL database to be sent to someone who applies using a form. > > The script contains this: > > > > $url = " > href=\"http://$HTTP_HOST$SCRIPT_NAME\";>http://$HTTP_HOST$SC

Re: [PHP] some problems about gd in php

2002-04-19 Thread zhaoxd
Yeah,I have already restarted web server and there was no error in compiling during configure/make/install .Using gd,I get the information that concern about GD Support ,GD version,WBMP Support ,etc.as follow: GD Support ---enabled GD Version

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Jeff Oien wrote: >> Use eval(). > > I have $url (literally) embedded in some text in the database that is to be > sent as an email message. I'm using this and $url disappears with a blank > spot in the text: > eval("\$body = \"$body\";"); > I've tried variations and can't ge

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
On Friday 19 April 2002 08:13 pm, you wrote: > On Fri, 19 Apr 2002, Andre Dubuc wrote: > > Whenever I try: > > > > print("$_SESSION['sfname']); or print("$_POST['scity'] > > > > I get a parse error "expecting 'T_STRING' . . ." -- obviously there's > > nothing in the array or I haven't set it. >

[PHP] Does anyone have auto-signup stopping code? URGENT!

2002-04-19 Thread Leif K-Brooks
I have a website where people can signup. Some jerk just made a program that cheats by signing up automaticly and transfering what he gets when he starts (you can get virtual money in my game). Does anyone have code to stop automatic signups? I would write it, but he's about to distribute his p

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Jeff Oien
> On Fri, 19 Apr 2002, Jeff Oien wrote: > >> Use eval(). > > > > I have $url (literally) embedded in some text in the database that is to be > > sent as an email message. I'm using this and $url disappears with a blank > > spot in the text: > > eval("\$body = \"$body\";"); > > I've tried variati

Re: [PHP] Does anyone have auto-signup stopping code? URGENT!

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Leif K-Brooks wrote: > I have a website where people can signup. Some jerk just made a program > that cheats by signing up automaticly and transfering what he gets when > he starts (you can get virtual money in my game). Does anyone have code > to stop automatic signups? I

RE: [PHP] Variable Inside Variable

2002-04-19 Thread Miguel Cruz
On Fri, 19 Apr 2002, Jeff Oien wrote: >> Far better would be to put a placeholder in $body like @@@ and then just >> do $body = ereg_replace('@@@', $url, $body); > > That's giving me a blank also. The form for changing the email is in a > password protected area where only two people are allowe

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Andre Dubuc
I'm running PHP 4.1.2 + Apache 1.3.23 + PostgreSQL 7.2. I've tried reverting back to globals=on, and same problem. Yet, earlier in another script I used $sfname = $_GET['sfname']; to get the value of sfname -- now, it won't work. I'm truly stumped -- I don't know whether it's my code? [I begin

[PHP] Re: [PHP-INST] can't view PHP

2002-04-19 Thread Andre Dubuc
Hi Joey, Don't know whetehr I can help, but I ran into the same problem with my Linux box. In Mozilla et al, I had to change in "Preferences > Advanced > Proxies > Manual Proxy Config >> No proxy for: Localhost". I haven't followed your thead, and I'm no familair with networking, butthta migh

[PHP] .phps

2002-04-19 Thread Mantas Kriauciunas
Hey [EMAIL PROTECTED], as i understand files .phps should view code nice and in colors... but when i set up everything good in http.conf and (as i think) everything is perfect it wants me to download that .phps file...what can be wrong? im using PHPTriad on win2k thank you :---

[PHP] Attachments

2002-04-19 Thread Jason Soza
I apologize in advance, this question most likely doesn't belong here, but if anyone can help that'd be great: Using both Perl and PHP to send mail with attachments from forms, the attachments get truncated. Since both Perl scripts and PHP scripts do this, I'm ruling out coding error, and since m

Re: [PHP] Attachments

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 12:29, Jason Soza wrote: > Using both Perl and PHP to send mail with attachments from forms, the > attachments get truncated. Since both Perl scripts and PHP scripts do this, > I'm ruling out coding error, and since my mailserver has been receiving > e-mails from other s

[PHP] About socket function

2002-04-19 Thread KeithAY
Hi all, I got a problem when I using socket function in PHP. After I use fsockopen() to open socket, I send a msg using fwrite() and receive a msg using fread(), this work fine. However, I use fwrite() again to send a msg and use fread() to receive a response msg, it failed. The sequence of funct

Re: [PHP] Getting All Variables?

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 07:23, Devin Atencio wrote: > Is there an easy way in PHP to have it display to screen all the variables > that > it has in memory? So i can see what variables there is and what they are > set to? print_r($GLOBALS); -- Jason Wong -> Gremlins Associates -> www.gremlins.

Re: [PHP] Empty $_SESSION and $_POST ??

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 09:41, Andre Dubuc wrote: > Is there a way I can verify that (a) globals are off and (b) $_SESSION or > $_POST are on? This probably what's happening -- I can't access the arrays > at all -- so, I think that might be where the problem lies. The $vars still > work though

Re: [PHP] redirect browser

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 09:26, Joe wrote: > = > > > Warning: Cannot add header information - headers already sent > by (output started at c:\html\html\check.php:4) in > c:\html\html\check.php on line 42 > > > I had no idea about th

Re: [PHP] some problems about gd in php

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 09:36, zhaoxd wrote: > Yeah,I have already restarted web server and there was no error in > compiling during configure/make/install .Using gd,I get the information > that concern about GD Support ,GD version,WBMP Support ,etc.as follow: > GD Support

Re: [PHP] header redirection

2002-04-19 Thread Jason Wong
On Saturday 20 April 2002 05:07, Norman Zhang wrote: > Hi, > > I use header(location: ...) for redirection to another page. But I also > want to include , and tags in the other page. Is there > a way to this? Because php complains that the header already been sent. Show us your code. -- Jason

Re: [PHP] $PHP_SELF question

2002-04-19 Thread Justin French
Spend a bit of time reading up on predefined variables (like $PHP_SELF) in the manual: http://www.php.net/manual/fi/reserved.variables.php I believe you're after SCRIPT_NAME, but it's worth familiarising yourself with them all for future reference. Justin French Creative D

Re: [PHP] Australian *nix Hosts?

2002-04-19 Thread Justin French
Hi, I stopped searching in Australia and looked over to the US, and am pretty happy with experthost.com (2GB/50meg/20POP starting at US$15/m)... since signing up, I changed over to a reseller account to run multiple domains for clients, and am now paying around US$6.25/m per domain. I know that

<    1   2