[PHP] Database problem - works in Windows - not Linux

2003-02-12 Thread Lee P. Reilly
Hi there, I'm moving an application from Windows -> Linux, and am having a problem with the database. I have the following script to test my database connection (Linux): -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= $connection = mysql_connect("localhost","","") or die

Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Problem solved: I forgot to add the enctype to the original FORM tag. Cheers, Lee, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Thanks for all the replies. However, I still have problems as the following code produces the following output: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= echo "0: " . $userfile . ""; echo "1: " . $HTTP_POST_FILES['userfile']['size'] . ""; echo "2: " . $HTTP_POST_FILES['userfil

[PHP] $HTTP_POST_VARS problem

2002-12-16 Thread Lee P. Reilly
Hi there, I'm currently using PHP 4.2.2 and I am have encountered some problems when trying to access $HTTP_POST_VARS. The following statements have the following return values: echo $HTTP_POST_VARS['userfile']; => C:\\Documents and Settings\\Administrator\\Desktop\\IR Files\\gmp1.ir echo $userf

[PHP] external program execution error

2002-12-09 Thread Lee P. Reilly
Hi there, I am having problems with passthru, exec, etc. on Red Hat 8 (w/ PHP 4.2.3; Apache 1.3.27). When I use passthru / exec to execute "pwd" or "ls-al" I have no problems executing & viewing the output. However, when I try and execute a program using the command line e.g "./lee54 < GNOM_FILE_g

[PHP] Re: Passthru / exec question - '127' returned

2002-12-05 Thread Lee P. Reilly
Ahhh... no reply necessary. safe_mode :-o -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Passthru / exec question - '127' returned

2002-12-05 Thread Lee P. Reilly
Hi, I've ran into a problem using the passthru/exec commands with RH8. When I try and run my program (or even "pwd", "ls", etc) the number '127' is returned every_time. With passthru, the size of the optional return array is 0. Can anyone fathom a guess at the problem? Is the 127 value signifcant?

[PHP] Red Hat 8 Apache problem - stumped :-(

2002-12-02 Thread Lee P. Reilly
Hi there, This might be better suited for an Apache newsgroup, but I thought I'd try here first. I installed Apache and PHP on RH8 a few weeks ago following the instructions on [URL 1, below], and both were running with absolutely no problems. Today however, I rebooted my machine and http://localh

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
t is binary safe. > > Matt > - Original Message - > From: Lee P. Reilly <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday, November 26, 2002 4:09 PM > Subject: Re: [PHP] Upload problem - PC, *nix, and Max EOL characters > > > > &g

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
> $size = strlen($filerow); > $row_split = preg_split("/\s+/", $filerow); > > $value1 = $row_split[0]; > $value2 = $row_split[1]; > $value3 = $row_split[2]; > } > > Matt > - Original Message - > From: Lee P. Reilly <[EMAIL P

Re: [PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
.e. > $fp = fopen($file) > while ($filerow = fgets($fp,1024)) /* Read 1024 bytes or to EOL, whichever > is first) */ > { -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini

[PHP] Upload problem - PC, *nix, and Max EOL characters

2002-11-26 Thread Lee P. Reilly
change the Unix EOL chars to PC EOL chars? Thanks in advance. - Best regards, Lee Reilly *[http://216.239.33.100/search?q=cache:GwerlDVFv8wC:linux.sarang.net/ftp/mirror/development/language/php_cvs/php4/php.ini-dist+MAC+EOL+character+PHP&hl=en&ie=UTF-8] -- Lee P. Reilly,

[PHP] Reasons for error message: Warning: Failed opening'/www/servers/webGNOM/test.php' for inclusion(include_path='.:/usr/local/lib/php') in Unknown on line 0

2002-11-15 Thread Lee P. Reilly
Hi there, Can someone suggest a reason for the following? I am trying to INCLUDE the JPGraph libraries in my PHP script as follows: BEGIN CODE -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- END CODE My INCLUDE_PATH is set to /usr/

[PHP] PHP Installation on Redhat 8 - General Questions

2002-11-13 Thread Lee P. Reilly
Hi there, I wonder if someone could answer a few questions for me? First of all, excuse my ignorance as I'm somewhat of a Linux newbie. I have installed PHP, Apache, Mysql, etc. on Windows numerous times, but have found the Linux installation to be more troublesome due in part (more likely in whol

Re: [PHP] What the heck is this Zope?

2002-08-09 Thread Lee P. Reilly
My two cents: I used Zope a while back for a university project, and I've been using PHP for the best part of a year. Zope is very similar to PHP, but Zope is better suited for the novice web designer / developer. Zope makes it easy to interact with databases and allows you to iterate through a r

[PHP] JPgraph: Autoscaling [OT perhaps]

2002-08-09 Thread Lee P. Reilly
Anybody out there using JpGraph? I directed the following question to the support web site, but as yet... there's been no reply: Could somebody tell me how to disable the autoscaling in JpGraph, and/or how to provide my own scaling? It's perfect for 99% of the graphs and plots I create, but when

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Lee P Reilly
Thanks for the replies. I'm still having a litte trouble though... Say I have an array called $compX, and given the letter 'X'... how can I access the variable $compX using these methods? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: dynamically creating variable names

2002-06-26 Thread Lee P Reilly
No reply neccessary. A list minute search on google proved helpful... [http://216.239.35.100/search?q=cache:hLxGJH-pFeYC:www2.themanualpage.org/php/php_syntax.php3+PHP+dynamic+variable+names&hl=en&ie=UTF-8] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

[PHP] dynamically creating variable names

2002-06-26 Thread Lee P Reilly
Hi, Can someone tell me if it's possible to create variable names from varaible names? I could work around this problem using some if/else statements, but I'm interested to see if there's another solution. I have 20 associative arrays all named compA, compB, compF, etc. The user supplies a strin

[PHP] Re: while loop question - problem (new set of eyes needed)

2002-05-19 Thread Lee P Reilly
I see the problem. No reply neccessary. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] while loop question - problem (new set of eyes needed)

2002-05-19 Thread Lee P Reilly
Hi, I wonder if someone could have a quick look at this for me? It's a simple while loop, but it's not acting the way (I think) it should. If I break down the while loop, it reads: // $result contains 3 rows while($row = mysql_fetch_array($result)

[PHP] Re: Warning: Max file size of 4194304 bytes exceeded...

2002-05-16 Thread Lee P Reilly
> - Is there anyway to prevent the error message from being displayed on > screen, and perhaps set a flag so we know that the problem has occured? I know that if I set display_errors = Off in php.ini I can stop the message from being displayed, but can I set a flag to say the upload_max_filesize

[PHP] Warning: Max file size of 4194304 bytes exceeded...

2002-05-16 Thread Lee P Reilly
Hi, I have another quick question (still on the topic of validating uploaded files). I have upload_max_filesize = 4194304 in my php.ini file. When I upload the file, the script that processes does the following: 1-Sets up the session info 2-Starts the HTML header template 3-Displays user login i

[PHP] recognising plain text files

2002-05-16 Thread Lee P Reilly
Hi, I am doing some validation on files that are being upload. I only wish to allow users to upload files that are in *plain text* format (not neccessarily with a .txt extension). I have the following piece of code, which works fine in IE, but in Netscape Navigator: if ($file_type != "text/p

[PHP] windows development -> linux production

2002-04-29 Thread Lee P Reilly
Hi, Just a quick question. I'm developing on a Windows machine right now, and will later move it onto Linux. Should I expect to run into major difficulty at all? I anticipate a few problems - mainly altering the file system interaction, maybe even database connections. I don't know if anybody el

[PHP] socket support question

2002-04-29 Thread Lee P Reilly
Hi, I understand that PHP has experimental extension for sockets. I am currently running both versions 4 and 4.1.2 on Windows machines, but I have read that in order to use the socket functions, the --enable-sockets option must be enabled at compile time. My problem is the of the "undefined funct

[PHP] MySQL query

2002-04-22 Thread Lee P Reilly
Hi, Can someone tell me if there is a way to execute multiple MySQL statements by passing *one* query containing a number of individual statements to MySQL e.g. UPDATE sampcomp SET fg="N", pctd="69", maxpctd="69.1" WHERE sampcompid="3";UPDATE sampcomp SET fg="N", pctd="69.2", maxpctd="69.3" WHER

[PHP] arrays of strings - accessing elements of array elements

2002-03-28 Thread Lee P Reilly
Hi, Dodgy subject header or what... I have array of strings called $composition, and I itterate through this using: $composition[$i] Is there any way to echo the first character of the string by doing something like: $composition[$i][0] or ($composition[$i)][0] ? I can easily just do s

[PHP] Re: Drawing graphs - opinions

2002-03-22 Thread Lee P Reilly
Lee P Reilly wrote: > with > vertical error margin lines going along the y-axis. Any recommendations? Ahem, the X axis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Drawing graphs - opinions

2002-03-22 Thread Lee P Reilly
Hi, I see there a number of PHP scripts/libraries out there for the purpose of graphing data. Which one is considered to be the best, most powerful / easiest to use? I need to plot X/Y graphs for some data sets with vertical error margin lines going along the y-axis. Any recommendations? Cheers,

[PHP] PHP/MySQL application - how to schedule server processes?

2002-03-12 Thread Lee P Reilly
ules according to some priority. When each analysis is complete, the user will have access to the a results folder in the system containing a list of their submitted analysis (either pending or complete). Can anyone offer any advice/suggestions on how this can be accomplished? Thank you very much

[PHP] removing ALL whitespace from a string

2002-03-11 Thread Lee P Reilly
Can somebody tell me if there is a function that will remove *all* whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning, the end, and the middle?. Something like chop(), trim()? e.g. input = " 12 3ad " e.g. output = "123ad" Thanks, Lee -- PHP General Mailing L

[PHP] regular expression; problem with '-' character

2002-02-28 Thread Lee P Reilly
Hi, Could someone be kind enough to have a look at this regular expression and perhaps tell me why is returns false when a '-' character is included in the $center string? if (eregi("^[a-zA-Z0-9!@#\$%^&\*\(\),/.//<>\?;':\"~`_\+\|\-\\\t\n\ ]*$", $center)) { return true; } else {

Re: [PHP] downloading text files stored in database?

2002-02-25 Thread Lee P Reilly
Hi, Thanks for your help, but that assumes that file is (at least temporarily) stored on disc - I'd like to take the file data straight out of the database and be available for "download" by the user. Is this possible at all, or will I have to create a temporary file to hold the data, and *then*

[PHP] downloading text files stored in database?

2002-02-25 Thread Lee P Reilly
Hi, I wonder if someone can point me in the direction of an example and / or some documentation for the following task: I have a DB table containing the name and contents of plain text files that users have uploaded. I have a facility which allows users to view these, but I would also like the u

[PHP] newbie: regular expression suggestios

2002-01-31 Thread Lee P Reilly
Thanks in advance! - Best regards, Lee Reilly -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini Atoll Rd, Los Alamos National Laboratory, mailto:[EMAIL PROTECTED]

[PHP] browser back button - "Page has Expired.. " problem

2002-01-28 Thread Lee P Reilly
Hi, I wonder if anyone can offer me a few pointers..? I'm building a portal to do various bits and bobs. I'm using sessions to facilitate the user authentication/login, etc. The only problem I have is that when viewing these (.php) pages in IE once the session variable has been set, a "Warning:

[PHP] Newbie: Ending Sessions

2002-01-16 Thread Lee P Reilly
Hi, I wonder if someone could tell me what I am doing wrong with the following? I am trying to end a session (logout), but am having a problem... I register a new session as follows: authenticate.php (snippet) // if the user has just tried to login if ($username &&