RE: [PHP] Send variable in include()

2004-10-21 Thread Zareef Ahmed
-Original Message- From: Pete [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 20, 2004 10:36 PM To: [EMAIL PROTECTED] Subject: [PHP] Send variable in include() I'm trying to send a variable an include that is recieve from another page: - navi.php- a href

RE: [PHP] Validation problem with array.

2004-10-21 Thread Stuart Felenstein
See below: --- Graham Cossey [EMAIL PROTECTED] wrote: Also, this line : foreach($_SESSION['skills'] as $key = $skill) could read foreach($skills as $key = $skill) as you have the line: $skills = $_SESSION['skills']; Same for skys and slus. Graham Graham, I've read this over and over and

Re: [PHP] Validation problem with array.

2004-10-21 Thread Andre Dubuc
Hi Stuart, I haven't followed your thread too closely, but I did see something that might be the cause of your problems: [snip] Let me show you how I set it all up. Remember it's a multi page form: So the form elements are: skills[], skys[], slus[] Then on the next page I have to still

[PHP] php sessions question

2004-10-21 Thread Reinhart Viane
in a page checkuser i do this after the user is logged in: PHP Code // Register some session variables! session_register('userid'); $_SESSION['userid'] = $userid; session_register('first_name'); $_SESSION['first_name'] =

[PHP] Sessions question

2004-10-21 Thread Reinhart Viane
Hey all, i'm new to this list so forgive me if i make any huge mistakes. I'm in a beginning stage of learning php and i hope you guys can help me out with this question: in a file named checkuser i do this when a users logs in: PHP Code // Register some session variables!

Re: [PHP] Validation problem with array.

2004-10-21 Thread Stuart Felenstein
You mean why do i have $_SESSION['skills'] in the foreach ? Stuart --- Andre Dubuc [EMAIL PROTECTED] wrote: Hi Stuart, I haven't followed your thread too closely, but I did see something that might be the cause of your problems: [snip] Let me show you how I set it all up. Remember

RE: [PHP] Validation problem with array.

2004-10-21 Thread Graham Cossey
See inline: [snip] Now the transcation script: $skills = $_SESSION['skills']; $skys = $_SESSION['skys']; $slus = $_SESSION['slus']; foreach($_SESSION['skills'] as $key = $skill) ^^^ ($skills as $key = $skill) { if ($skill != '') // Has this skill

RE: [PHP] Validation problem with array.

2004-10-21 Thread Stuart Felenstein
Graham, I'm going to make those changes. Not sure if that was creating some crazy behaviour. See inline: --- Graham Cossey [EMAIL PROTECTED] wrote: { if ($skill != '') // Has this skill been entered? I don't know if I care if it's been entered. My main concern would

Re: [PHP] Sessions question

2004-10-21 Thread Mike Smith
On Thu, 21 Oct 2004 11:39:23 +0200, Reinhart Viane [EMAIL PROTECTED] wrote: Hey all, i'm new to this list so forgive me if i make any huge mistakes. I'm in a beginning stage of learning php and i hope you guys can help me out with this question: in a file named checkuser i do this when a

RE: [PHP] Validation problem with array.

2004-10-21 Thread Graham Cossey
See inline: [snip] { if ($skill != '') // Has this skill been entered? I don't know if I care if it's been entered. My main concern would be to make sure that if a $skill was entered, then a matching $skys and $slus should be: skills[0]-baker skys[0]-7

RE: [PHP] Validation problem with array.

2004-10-21 Thread Stuart Felenstein
See inline: --- Graham Cossey [EMAIL PROTECTED] wrote: In other words I need to figure out how to check that each line is complete. right now, it is matching all the values/inputs correctly. If someone just chose a slus, seems the database But is this due to the sql statement being

RE: [PHP] Sessions question

2004-10-21 Thread Reinhart Viane
Hey Mike, After some intensive testing it seemed that $user_id did not solve the isue I hereby give the script to get the $user_id: // check if the user info validates the db ($username and $password are the POST values of username and password given in on a form) $sql = mysql_query(SELECT *

RE: [PHP] Validation problem with array.

2004-10-21 Thread Graham Cossey
[snip] Right now I have this [right below]: If I want to check for skys and slus, I add another set of braces with if($sky != '' ... and below end if ($sky != '') foreach($skills as $key = $skill) { if ($skill != '' $skys[$key] != '' $slus[$key] != '') {

[PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread Tristan . Pretty
I'm moving hosts for a freelance site I do... They have an events section, and it's sortable by date, name and category etc... To achieve this, I passed the search/sort variables via the URL... However, I'm testing the new server, and those variables are not being detected? I've put this code

[PHP] Strange Array Error

2004-10-21 Thread Shaun
Hi, I have been trying for the past two hours to understand why I get an error with the following code: ?php $test_array[] = array(); $i = 0; while($i 7){ $test_array[$i] += $i; echo '$day_total[$i] = '.$day_total[$i].'br'; } ? Fatal error: Unsupported operand types in

Re: [PHP] Strange Array Error

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 14:28:26 +0100, Shaun [EMAIL PROTECTED] wrote: I have been trying for the past two hours to understand why I get an error with the following code: ?php $test_array[] = array(); $test_array = array(); $i = 0; while($i 7){ $test_array[$i] += $i; $test_array[$i]

Re: [PHP] Mac OS X and Editor

2004-10-21 Thread Philip Thompson
On Oct 20, 2004, at 3:57 PM, Michael Sims wrote: Jonel Rienton wrote: Hi guys, I just like to ask those using Macs here as to what editor and/or IDE they are using for writing PHP codes. I don't personally use Mac OS X, but let me throw in a recommendation for jEdit (www.jedit.org). It's Java

Re: [PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 14:08:28 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm moving hosts for a freelance site I do... They have an events section, and it's sortable by date, name and category etc... To achieve this, I passed the search/sort variables via the URL... However, I'm

Re: [PHP] Strange Array Error

2004-10-21 Thread Chris Dowell
Shaun The problem is that you've assigned $test_array[] = array(); This means that the first element ($test_array[0]) is an array. You're then trying to add $i to it, as in $test_array[$i] = $test_array[$i] + 1; in terms of types what you're doing is array = array + integer Which doesn't make

Re: [PHP] URL variables, and the $_GET[xxx] function...

2004-10-21 Thread R'twick Niceorgaw
Hi Trisan, Quoting [EMAIL PROTECTED]: I've put this code at teh top of the code on events page '$sort_by = $_GET[sort_by];' etc... And while that sorts out the problem, I'm curious as to why I need to do that, and if those changes will cause me probs elsewhere? Perhaps on your old server,

Re: [PHP] Sessions question

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 14:43:45 +0200, Reinhart Viane [EMAIL PROTECTED] wrote: Hey Mike, After some intensive testing it seemed that $user_id did not solve the isue I hereby give the script to get the $user_id: // check if the user info validates the db ($username and $password are the

RE: [PHP] Strange Array Error

2004-10-21 Thread Graham Cossey
[snip] Hi, I have been trying for the past two hours to understand why I get an error with the following code: ?php $test_array[] = array(); $i = 0; while($i 7){ $test_array[$i] += $i; echo '$day_total[$i] = '.$day_total[$i].'br'; } ? Fatal error: Unsupported

Re: [PHP] Strange Array Error

2004-10-21 Thread Brent Baisley
You are making the first element of the array $test_array and array item. An array inside and array. $test_array[] = array() is the same as $test_array[0] = array() So what you are trying to do is add $i to an array. Kind of like trying to figure out what happens when you add 1 to the color

Re: [PHP] Strange Array Error

2004-10-21 Thread Chris Dowell
That is, expected results, *apart* from the infinite loop you'll have due to not incrementing $i Cheers Chris Chris Dowell wrote: Shaun The problem is that you've assigned $test_array[] = array(); This means that the first element ($test_array[0]) is an array. You're then trying to add $i to it,

RE: [PHP] Mac OS X and Editor

2004-10-21 Thread Michael Sims
Philip Thompson wrote: I don't personally use Mac OS X, but let me throw in a recommendation for jEdit (www.jedit.org). It's Java based, hence [...] Just a side-comment: in general, OS X users enjoy/use Cocoa-based applications over Java-based. Cocoa provides the OS X Experience with the

[PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Scott Fletcher
Hi! I wanted to know is can it be done by passing the array as a parameter to the function? I also wanted to know is is it possible to pass around the array in the object-orientated feature like object/class stuffs? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Strange Array Error

2004-10-21 Thread Graham Cossey
Oh @#*! Thanks Greg, I always get that one wrong ! $test_array = array(); :) -Original Message- From: Graham Cossey [mailto:[EMAIL PROTECTED] Sent: 21 October 2004 14:48 To: Shaun; [EMAIL PROTECTED] Subject: RE: [PHP] Strange Array Error [snip] Hi, I have been trying for

RE: [PHP] Sessions question

2004-10-21 Thread Reinhart Viane
Thanks Greg, I'll try this, but I do not think this will solve the issue since at first hand the session variables are correctly made. The problem arrises (I think) whenever two or more users are logged in and one closes the pages (so his session is killed I suppose). Sometimes after that, the

Re: [PHP] Sessions question

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 16:06:37 +0200, Reinhart Viane [EMAIL PROTECTED] wrote: I don't know if this can be caused by the fact register_globals seem to be 'on' on the server (btw PHP Version 4.2.3) You can override that setting if the web server is running apache and AllowOverrides is set for your

Re: [PHP] php sessions question

2004-10-21 Thread raditha dissanayake
Reinhart Viane wrote: in a page checkuser i do this after the user is logged in: PHP Code // Register some session variables! session_register('userid'); $_SESSION['userid'] = $userid; session_register('first_name');

Re: [PHP] Sessions question

2004-10-21 Thread Mike Smith
On Thu, 21 Oct 2004 14:43:45 +0200, Reinhart Viane [EMAIL PROTECTED] wrote: Hey Mike, After some intensive testing it seemed that $user_id did not solve the isue I hereby give the script to get the $user_id: // check if the user info validates the db ($username and $password are the

Re: [PHP] Sessions question

2004-10-21 Thread raditha dissanayake
hi, Please don't send multiple posts, I just replied to your previous message thinking that it had not been answered, a little further down I come across this. It's very confusing to everyone. thanks -- Raditha Dissanayake.

Re: [PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 09:57:07 -0400, Scott Fletcher [EMAIL PROTECTED] wrote: I wanted to know is can it be done by passing the array as a parameter to the function? Yes. By reference and by value. I also wanted to know is is it possible to pass around the array in the

Re: [PHP] Validation problem with array.

2004-10-21 Thread Brent Baisley
Since your data on the client is linked, you should keep it linked on submission by nesting an array with in the array. Your client HTML should like something like this: input type=text name=skills[0][skill] value= size=20 select name=skills[0][skys] size=1 option ... /select select

Re: [PHP] Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 09:57 -0400, Scott Fletcher wrote: Hi! I wanted to know is can it be done by passing the array as a parameter to the function? I also wanted to know is is it possible to pass around the array in the object-orientated feature like object/class stuffs? yes

Re: [PHP] A better way to do this in php???

2004-10-21 Thread Brent Baisley
Here's a one liner that gives the minutes since midnight: floor( (time()-mktime(0,0,0, date( 'm' ), date( 'd' ), date( 'Y' )))/60); Both time() and mktime() return the seconds since epoch. Time is based on current time, and the mktime parameters base it on midnight. A simple subtraction gives

Re: [PHP] Sessions question

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 10:14:47 -0400, Mike Smith [EMAIL PROTECTED] wrote: How about changing How about learning to trim your posts? Thanks. :) -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Strange Array Error

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 15:04 +0100, Graham Cossey wrote: Oh @#*! Thanks Greg, I always get that one wrong ! $test_array = array(); :) a few less lines version: $test_array = array(); for ($i=0; $i7; $i++) $test_array[$i] = $i; print_r($test_array); hth, -Robby --

[PHP] Re: Passing the Array as Parameter to either the function or object/class???

2004-10-21 Thread Scott Fletcher
Thanks I wasn't sure if that would work but now I know it does. It is nice to know.. Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Strange Array Error

2004-10-21 Thread M Saleh EG
On Thu, 21 Oct 2004 14:28:26 +0100, Shaun [EMAIL PROTECTED] wrote: Hi, I have been trying for the past two hours to understand why I get an error with the following code: ?php $test_array[] = array(); //Change it to $test_array=array(); /*Your statement adds an array to the

[PHP] Simple Time Question

2004-10-21 Thread Ben Miller
Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions that I can see only seem to get date/time from the server, which knowing where that is, could easily figure out GM time, but would rather go the other way.

RE: [PHP] Simple Time Question

2004-10-21 Thread Daniel Purdy
[snip] Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions that I can see only seem to get date/time from the server, which knowing where that is, could easily figure out GM time, but would rather go the other

Re: [PHP] Simple Time Question

2004-10-21 Thread bbonkosk
Set your server to GMT. - Original Message - From: Ben Miller [EMAIL PROTECTED] Date: Thursday, October 21, 2004 10:48 am Subject: [PHP] Simple Time Question Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date()

Re: [PHP] Simple Time Question

2004-10-21 Thread M Saleh EG
You might want to look at this: http://www.php.net/manual/en/function.date.php On Thu, 21 Oct 2004 08:48:54 -0600, Ben Miller [EMAIL PROTECTED] wrote: Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions that I

Re: [PHP] remote file existance when protected by a .htaccess

2004-10-21 Thread Mag
--- Matt M. [EMAIL PROTECTED] wrote: Nope, no PEAR allowedany other options? curl, Is that available to you? http://us2.php.net/curl Hi Matt, Yep, cURL is available but I was going through the manual for curl (and google too suggests that might be my best option)...but it does not

Re: [PHP] Simple Time Question

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 08:48 -0600, Ben Miller wrote: Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions that I can see only seem to get date/time from the server, which knowing where that is, could easily

Re: [PHP] remote file existance when protected by a .htaccess

2004-10-21 Thread Matt M.
Hi Matt, Yep, cURL is available but I was going through the manual for curl (and google too suggests that might be my best option)...but it does not look very easy to learn :-( It is not to bad. Go through the php manual and look at the examples. That should help. If you still cant figure

Re: [PHP] remote file existance when protected by a .htaccess

2004-10-21 Thread Matt M.
try this function, I lifted almost all of this stuff off of the manual and the zend site function check_link($link , $referer='') { $main = array(); $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $link); curl_setopt ($ch, CURLOPT_HEADER, 1); curl_setopt ($ch,

RE: [PHP] Simple Time Question

2004-10-21 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 21 October 2004 15:49, Ben Miller wrote: Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions

[PHP] Best practices for php application

2004-10-21 Thread abrea
Dear list, Does anybody know of a url where I can find reading materials about best practices to organize the filesystem and variable structure of a php application? Although application purposes probably vary widely, I imagine that in one way or other most include adding, updating, deleting

RE: [PHP] Best practices for php application

2004-10-21 Thread Jay Blanchard
[snip] Does anybody know of a url where I can find reading materials about best practices to organize the filesystem and variable structure of a php application? Although application purposes probably vary widely, I imagine that in one way or other most include adding, updating, deleting and

RE: [PHP] Simple Time Question

2004-10-21 Thread Robert Cummings
On Thu, 2004-10-21 at 12:25, Ford, Mike wrote: To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 21 October 2004 15:49, Ben Miller wrote: Probably a stupid question, but hopefully has a simple answer. Is there a way

[PHP] Re-compiling PHP

2004-10-21 Thread Mike R
I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? ./configure '--prefix=/usr/local' '--enable-exif' '--enable-track-vars'

Re: [PHP] Best practices for php application

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 13:47 -0300, abrea wrote: Dear list, Does anybody know of a url where I can find reading materials about best practices to organize the filesystem and variable structure of a php application? Although application purposes probably vary widely, I imagine that in one

Re: [PHP] Re-compiling PHP

2004-10-21 Thread John Nichel
Mike R wrote: I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? You're trying to compile the binaries? -- John C. Nichel ÜberGeek KegWorks.com

RE: [PHP] Simple Time Question

2004-10-21 Thread Robert Cummings
On Thu, 2004-10-21 at 13:00, Robert Cummings wrote: On Thu, 2004-10-21 at 12:25, Ford, Mike wrote: To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 21 October 2004 15:49, Ben Miller wrote: Probably a stupid

Re: [PHP] Best practices for php application

2004-10-21 Thread Brent Baisley
That's a whopper of an open ended question. I found the biggest help for me was reading up on the MVC (Model, View, Controller) technique, which is probably the most commonly used design pattern for just about any language. On Oct 21, 2004, at 12:47 PM, abrea wrote: Dear list, Does anybody

RE: [PHP] Simple Time Question

2004-10-21 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 21 October 2004 18:01, Robert Cummings wrote: On Thu, 2004-10-21 at 12:25, Ford, Mike wrote: To view the terms under which this email is distributed, please go to

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Mike R
Mike R wrote: I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? You're trying to compile the binaries? Sorry, the tar'd file I

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 14:52 -0400, Mike R wrote: Mike R wrote: I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? You're

Re: [PHP] Re-compiling PHP

2004-10-21 Thread John Nichel
Mike R wrote: Mike R wrote: I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? You're trying to compile the binaries? Sorry, the tar'd file

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Mike R
Sorry, no, its PHP 4.3.9 - and I am upgrading from 4.1.2. I have mysql installed and have been using it. I'll see if I can put something in about the exact location of the libs. Any other suggestions out there? :) Thanks, -Mike Mike R wrote: Mike R wrote: I am trying to

[PHP] Trying to Integrate PHP 4.3.4 w/ JDK 1.5.0

2004-10-21 Thread Andrew Hauger
Everything compiled okay, and I think everything is installed in the right places. When I try to run a test program, I get the error: [error] PHP Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /usr/local/apache/htdocs/java_test2.php on line 5 The file

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Mike R
Even after re-compiling with the location of the mysql headers, it still won't work. :\ Pretty discouraging. What version of PHP did they start dropping the libraries? Maybe I need to just upgrade to that version.. :\ -Mike -Original Message- From: Robby Russell

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Matthew Sims
On Thu, 2004-10-21 at 14:52 -0400, Mike R wrote: Mike R wrote: I am trying to re-compile php, but keep getting erros that the mysql extensions are not installed. I got the binary from php.net and included mysql in configure (following). What am I not doing correctly? You're

Re: [PHP] Re-compiling PHP

2004-10-21 Thread John Nichel
Matthew Sims wrote: I think just doing --with-mysql=/path/to/mysql is all you need to do. Once PHP sees the MySQL base directory it knows where the headers and libs are. Yeah, that works. If MySQL was installed with an RPM (or some other package), you need the devel package as well (maybe the

Re: [PHP] Re-compiling PHP

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 15:35:09 -0400, Mike R [EMAIL PROTECTED] wrote: Even after re-compiling with the location of the mysql headers, it still won't work. :\ Pretty discouraging. What version of PHP did they start dropping the libraries? Maybe I need to just upgrade to that version..

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Mike R
On Thu, 21 Oct 2004 15:35:09 -0400, Mike R [EMAIL PROTECTED] wrote: Even after re-compiling with the location of the mysql headers, it still won't work. :\ Pretty discouraging. What version of PHP did they start dropping the libraries? Maybe I need to just upgrade to that

Re: [PHP] Sessions question

2004-10-21 Thread Curt Zirzow
* Thus wrote Reinhart Viane: PHP Code // Register some session variables! session_register('userid'); $_SESSION['userid'] = $userid; Do not use session_register with $_SESSION. http://php.net/session-register Curt -- Quoth the Raven, Nevermore. -- PHP General Mailing List

RE: [PHP] Re-compiling PHP

2004-10-21 Thread Robby Russell
On Thu, 2004-10-21 at 16:05 -0400, Mike R wrote: On Thu, 21 Oct 2004 15:35:09 -0400, Mike R [EMAIL PROTECTED] wrote: Even after re-compiling with the location of the mysql headers, it still won't work. :\ Pretty discouraging. What version of PHP did they start dropping the

Re: [PHP] Re-compiling PHP

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 16:05:15 -0400, Mike R [EMAIL PROTECTED] wrote: Redhat 7.3, I believe MySQL was installed with an RPM. No, I don't have any development RPMs installed. Should I maybe recompile MySQL first? Installing MySQL from source is an option, but installing the MySQL development rpm

[PHP] I cannot move files

2004-10-21 Thread Giacomo Cantilli
Hi, I am building a mailing list. My OS is MandrakeLinux 10.0. I need to move an uploaded file. That's the script: - function show_info($file) { $utfn = $file['userfile']['tmp_name']; $ufn = $file['userfile']['name']; $dest = /home/yaki/y_uplds/ .

Re: [PHP] I cannot move files

2004-10-21 Thread John Nichel
Giacomo Cantilli wrote: Warning: move_uploaded_file(/home/yaki/y_uplds/page01.html): failed to open stream: Permission denied in /var/www/html/php05.php on line 66 Warning: move_uploaded_file(): Unable to move '/tmp/phpoJDoSs' to '/home/yaki/y_uplds/page01.html' in /var/www/html/php05.php on

Re: [PHP] Simple Time Question

2004-10-21 Thread Marek Kilimajer
Ben Miller wrote: Probably a stupid question, but hopefully has a simple answer. Is there a way to get Grenwich Mean time? time() and date() functions that I can see only seem to get date/time from the server, which knowing where that is, could easily figure out GM time, but would rather go

Re: [PHP] I cannot move files

2004-10-21 Thread Marek Kilimajer
Apache needs write permission to /home/yaki/y_uplds/ Giacomo Cantilli wrote: Hi, I am building a mailing list. My OS is MandrakeLinux 10.0. I need to move an uploaded file. That's the script: - function show_info($file) { $utfn = $file['userfile']['tmp_name'];

Re: [PHP] php sessions question

2004-10-21 Thread Pete
In message [EMAIL PROTECTED], raditha dissanayake [EMAIL PROTECTED] writes Reinhart Viane wrote: in a page checkuser i do this after the user is logged in: PHP Code // Register some session variables! session_register('userid'); $_SESSION['userid'] =

[PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Stuart Felenstein
Hope this is not off topic, and it might be a dumb question, but I'm new. For drop down menus, list boxes, selects etc, would validation be needed to check the string , say for special characters ? (as a security precaution) Thank Stuart -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Graham Cossey
[snip] Hope this is not off topic, and it might be a dumb question, but I'm new. For drop down menus, list boxes, selects etc, would validation be needed to check the string , say for special characters ? (as a security precaution) I have read several posts/articles on this matter and

[PHP] Please Help! Call to undefined function mysql_connect()

2004-10-21 Thread Scott McDonald
Error: Fatal error: Call to undefined function mysql_connect() in d:\inetpub\www\test.php on line 5 System: winXPsp2 Tried: . Re-install IIS . Re-install PHP using installer. . Re-install PHP using zip manual install (both ISAPI and CGI approachs) . Re-install in Safe Mode (d'oh! no IIS in safe

Re: [PHP] Please Help! Call to undefined function mysql_connect()

2004-10-21 Thread Greg Donald
On Thu, 21 Oct 2004 16:41:28 -0500, Scott McDonald [EMAIL PROTECTED] wrote: Error: Fatal error: Call to undefined function mysql_connect() in d:\inetpub\www\test.php on line 5 I am at a loss... any ideas? Did you uncomment the mysql entension in your php.ini ? -- Greg Donald Zend

[PHP] PDFlib 6 and PHP 4.3.8/9

2004-10-21 Thread Brendan P. Caulfield
Hi Everyone, I am hoping someone out there may be able to help... I have recently installed PDFlib 6 and am running PHP 4.3.8. I am having trouble with the pdf_open_file() function. I would like to create a PDF to memory by leaving the second parameter (filename) in the above function empty.

RE: [PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Stuart Felenstein
Graham, Thank you. Actually , you suggested this site to me the other day and it's great! I have read through a number of documents and have a few more to get through. How would a hacker pass an HTTP message ? That is interesting. Stuart --- Graham Cossey [EMAIL PROTECTED] wrote: [snip]

[PHP] mysql and the PHP transition from 4 to 5.

2004-10-21 Thread Nick Lane-Smith
Hello php-list, I'm curious to why default mysql support was dropped from PHP 5? The separation seems to have been done for license issues with the mysql library. PHP 4.X uses a libmysql with an abandoned copyright for mysql access. Would the libmysql still work with PHP 5, or is PHP 5 dependent

RE: [PHP] Question: Validation on select boxes and lists.

2004-10-21 Thread Graham Cossey
[snip] How would a hacker pass an HTTP message ? That is interesting. read the off-list posted message from [EMAIL PROTECTED] (reproduced below for the benefit of other list members) Graham -- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 21 October 2004 23:07 To: Graham

Re: [PHP] PDFlib 6 and PHP 4.3.8/9

2004-10-21 Thread Tom Rogers
Hi, Friday, October 22, 2004, 7:44:37 AM, you wrote: BPC Hi Everyone, BPC I am hoping someone out there may be able to help... BPC I have recently installed PDFlib 6 and am running PHP 4.3.8. I am having BPC trouble with the pdf_open_file() function. I would like to create a PDF BPC to memory

Re: [PHP] Help! No output from PHP CLI

2004-10-21 Thread Jason Wong
On Wednesday 20 October 2004 12:06, Warren Guy wrote: I'm having a strange problem with command line PHP. Scripts seem to function fine, however with no output. [EMAIL PROTECTED]:~ php ? echo moocows\n; ? ^D [EMAIL PROTECTED]:~ Try using ?php ... ? -- Jason Wong - Gremlins Associates -

Re: [PHP] Floating values

2004-10-21 Thread Jason Wong
On Monday 18 October 2004 19:03, Nunners wrote: I'm writing an accounting package, and have setup the MySQL database with decimal(6,2) types for the amount of transactions etc. You should be using the bcmath functions if you aren't already doing so. -- Jason Wong - Gremlins Associates -

Re: [PHP] Trying to Integrate PHP 4.3.4 w/ JDK 1.5.0

2004-10-21 Thread raditha dissanayake
Andrew Hauger wrote: Everything compiled okay, and I think everything is installed in the right places. When I try to run a test program, I get the error: [error] PHP Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /usr/local/apache/htdocs/java_test2.php on line 5

Re: [PHP] php sessions question

2004-10-21 Thread raditha dissanayake
Pete wrote: You should only save the userId in the session, everything else should be retrieved from your database using that id. I normally do as you have suggested here - but why do you suggest that this method is better? One reason is for security. You cannot ever rule out the

Re: [PHP] mysql and the PHP transition from 4 to 5.

2004-10-21 Thread raditha dissanayake
Nick Lane-Smith wrote: Hello php-list, I'm curious to why default mysql support was dropped from PHP 5? The separation seems to have been done for license issues with the mysql library. PHP 4.X uses a libmysql with an abandoned copyright for mysql access. Suffice to say it's pretty hard to find

[PHP] compileproblem gd into php4.3.9 under gentoo

2004-10-21 Thread Patrick Fehr
For the definition of some needed graphical functions, I depend on gd compiled into php. As I am using a linux gentoo2.6.8.1 box, I use portage for that kind. I emerge'd php again, but with the USE-Flag +gd set, this seemed to work. But still the function php_info(); shows that php was compiled

[PHP] ImageMagik

2004-10-21 Thread Mag
Hi, I have a requirment to dynamically brighten, darken or add/remove contrast from a thumbnail image, since I cannot do this in GD I was thinking of doing this in ImageMagik, but searching google I cannot find many tutorials and even visiting the image magik site i only see that it can be used

Re: [PHP] remote file existance when protected by a .htaccess

2004-10-21 Thread Mag
try this function, I lifted almost all of this stuff off of the manual and the zend site... Hey! Thanks Matt, it works like a charm! Exactly what I was looking for, its giving me either a 200status header or a 404 and I can easily work from there. I have been going through the code (the

Re: [PHP] Best practices for php application

2004-10-21 Thread Matthew Weier O'Phinney
* Brent Baisley [EMAIL PROTECTED]: On Oct 21, 2004, at 12:47 PM, abrea wrote: Dear list, Does anybody know of a url where I can find reading materials about best practices to organize the filesystem and variable structure of a php application? Although application purposes probably vary

Re: [PHP] ImageMagik

2004-10-21 Thread Brian V Bonini
On Thu, 2004-10-21 at 14:07, Mag wrote: Hi, I have a requirment to dynamically brighten, darken or add/remove contrast from a thumbnail image, since I cannot do this in GD I was thinking of doing this in ImageMagik, but searching google I cannot find many tutorials and even visiting the

Re: [PHP] MySQL PHP database script PLEASE

2004-10-21 Thread Ramil Sagum
td? echo $row[end]; ?/td tdA HREF=/momatlib/gendai/pdf/? echo $row[GO]; ?.pdfpdf/A/td /tr replace the above block with td? echo $row[end]; ?/td td ?php if($row[GO] = 1000) { ? A HREF=/momatlib/gendai/pdf/? echo $row[GO]; ?.pdfpdf/A ?php }? /td /tr ganbatte!

Re: [PHP] MySQL PHP database script PLEASE

2004-10-21 Thread Matthew Sims
snip I NEED THIS When GO = 1000 ), the links to PDF file are shown, and when GO 1000, the links to PDF file are not shown (just brank cells). So probably I need to change this part. tdA HREF=/momatlib/gendai/pdf/? echo $row[GO]; ?.pdfpdf/A/td But dont know how to do it. Please help

RE: [PHP] php sessions question

2004-10-21 Thread Reinhart Viane
I normally do as you have suggested here - but why do you suggest that this method is better? One reason is for security. You cannot ever rule out the possibility of a user injecting someone else's data into the session to get access to information that he should not have. Of course he

Re: [PHP] Best practices for php application

2004-10-21 Thread Brent Clements
For a pretty cool PHP MVC Framework, check out http://www.phpmvc.net/ -Brent - Original Message - From: Matthew Weier O'Phinney [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 21, 2004 9:11 PM Subject: Re: [PHP] Best practices for php application * Brent Baisley