Re: [PHP] Password in script

2002-07-18 Thread Michael Hall
The GRANT USAGE statement creates a user with no priveleges ... the user exists but can't do anything. See MySQL Manual section 6.13 Michael On Fri, 19 Jul 2002, Sailom wrote: > I just checked grant and it said something like... > GRANT USAGE ON *.* TO 'X'@'%' IDENTIFIED BY . >

Re: [PHP] Password in script

2002-07-18 Thread Michael Hall
Actually, there is Banother way and you should consider it. Sensitive information like passwords should be kept in a file stored outside the live web content directory (ie, outside DocumentRoot on Apache). This file can then be included in your main file. This way, you can be sure that a miscon

Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Philippe Saladin
> If you want 100% accessability, forget cookies were ever invented :) > While you're erasing stuff from your brain, throw out javascript too :D Some people don't have a fast access to internet. Very simple javascript to validate a form before submitting it can be IMHO still useful. But I agree t

RE: [PHP] best way to delete char# 4-7 from a string?

2002-07-18 Thread Martin Towell
dunno how much slower it'd be, but it might look better. You could convert the strings to an array, use array_splice(), and then convert back to a string. -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Friday, July 19, 2002 3:39 PM To: php Subject: [PHP] best way

RE: [PHP] Sorting array based on key string

2002-07-18 Thread Martin Towell
dunno if this'll work... but here goes... sort($data); ksort($data); but ksort() might mangle the order from sort(). In that case, you'll need to write your sort routine that retains the old order -Original Message- From: Peter J. Pieczora [mailto:[EMAIL PROTECTED]] Sent: Friday, July 1

RE: [PHP] vertical word match

2002-07-18 Thread Martin Towell
try changing the "+"'s with "*"'s + = 1 or more * = 0 or more -Original Message- From: Joe Rice [mailto:[EMAIL PROTECTED]] Sent: Friday, July 19, 2002 3:30 PM To: [EMAIL PROTECTED] Subject: [PHP] vertical word match hello, any regex gurus? i'm trying to match words put into a that are

[PHP] Re: Searching...

2002-07-18 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > in ym search page, i construct a sql query from user input to search my > database, and i run this query to get totalresults. Then run another query > with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per > page. My

[PHP] get line from file

2002-07-18 Thread Yamin Prabudy
I got a file line like this This is a line1 this is a line2 this is a line3 this is a line4 how can i grep out the line1,line2,line3 ?? do anyone out there have any idea ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] session_unregister question

2002-07-18 Thread Brad Wright
Is it possible to somehow do a session unregister of all session variables except for (say) 2 variables. varA and varB So if my session had : varA, varB,varC, varD,varE (etc) I want to unregister all but varA and varB. Is there an 'elegant' way to do this without testing for all the variables i

[PHP] best way to delete char# 4-7 from a string?

2002-07-18 Thread Justin French
Hi, Let's say I have the following string: $str = 'abcdefghijklmnop'; ...and I want to strip out char #'s 4 through to 7 (d,e,f,g) $strip_start = 4; $strip_end = 7; ($str would now be 'abchijklmnop';) THEN I want to plug a new string $filler at position 4 $filler = '4567'; ($str would now

[PHP] Sorting array based on key string

2002-07-18 Thread Peter J. Pieczora
Pardon my sloppy explanation but here it is: how can i sort an array based on key element ie. key values are: a1, a2 ,a3 ..., b1, b2 ,b3, ...c1, c1, c3... so doing this: while (list($k, $v) = each($data)) { for ($i=0; $i"; } will list all the $k $v . a = foo a = bar b = another foo ... and s

Re: [PHP] Passing variables to page via POST - How?

2002-07-18 Thread Chris Shiflett
Monty wrote: >This is probably more of an HTML question... Is there a way to pass >variables to another page via POST instead of via the URL? > Yes. ... (form fields here) ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] vertical word match

2002-07-18 Thread Joe Rice
hello, any regex gurus? i'm trying to match words put into a that are in the form of a\np\np\l\e or any combination of new lines in between, before or after. $answer = "hello\na\np\np\nl\ne\n"; /*from textarea in form*/ $word = "apple"; $word = preg_replace("/(.)/","(.?|\s+|\n+|)$1(.?|\s+|\n+

Re: [PHP] Password in script

2002-07-18 Thread Richard Baskett
Ok I am going to give out my little secret that was passed to me. Your worry is warranted in my opinion especially since let's say your isp is in the middle of an upgrade or something happens to php that breaks it.. Now your php code is being shown as regular text.. Anybody can see your code. The

[PHP] Re: Accessing Ports

2002-07-18 Thread Thomas \"omega\" Henning
And what kind of permissions might that be? (server side) "Richard Lynch" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > >Can i access my paralel or USB port with PHP server side? > > The client's (browser's) parallel or USB port? No. See PHP & HASP thread. > > If the web-serve

[PHP] Re: Password in script

2002-07-18 Thread Monty
The password code will be parsed out by PHP, so, it won't be viewable in the HTML source delivered to the browser. Some advice: set up a user for your database that has the minimal amount of access necessary to perform queries or writing to the database and use that in your scripts. Don't ever us

RE: [PHP] Truncate ::: DAM!!!!!

2002-07-18 Thread Rudolf Visagie
str_replace() is faster and better for simple string replacement. -Original Message- From: vins [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 9:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Truncate ::: DAM! LOL.. So after my last post about updating files i sat and thou

[PHP] Help with sockets

2002-07-18 Thread Jeremy
How can I do the following with PHP? 1) Accept more than 1 connections without forking 2) socket_read and fgets from 2 connections at the same time please help! thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Password in script

2002-07-18 Thread Sailom
I just checked grant and it said something like... GRANT USAGE ON *.* TO 'X'@'%' IDENTIFIED BY . Does this means user named 'X' can log in from any server? This may be a silly question. "Jonathan Rosenberg" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROT

[PHP] Re: Passing variables to page via POST - How?

2002-07-18 Thread Anup
Hey, I'm new, but I have some advice. Do you have to POST? becuase you can use sessions, and PHP has a bunch os session functions. Secondly, POST will not attach any variables to the URL, this is done by GET. To access the POST variables traverse through the $HTTP_POST_VARS (or $_POST array, i thi

Re: [PHP] rebooting linux using php

2002-07-18 Thread Richard Lynch
>On Friday 19 July 2002 04:26, Scott Fletcher wrote: >> If you're going to use the cron file (or crontab) then php wouldn't work >> because it is a programming languages for the web pages. For cron files or [Perhaps there was even more text missing that made this all out of context... Sorry.] I

[PHP] Re: modify an element of a HTML tag within a string

2002-07-18 Thread Richard Lynch
>I've asked simular questions before, but I think I'm finally asking the >*right* question to get the right answer. That's often the tricky part :-) >I'm look for some suggestions on the best method of parsing a HTML document >(or part thereof), with the view of CAPTURING and MODIFYING a specifi

[PHP] Re: modify an element of a HTML tag within a string

2002-07-18 Thread Monty
Okay, this is just very general info to help point you in the right direction, but, here are some functions you'll probably need to accomplish this: * Regular Expressions * pregi() and/or eregi() * explode() and implode() * str_replace() Regular expressions will probably be the most impo

[PHP] Passing variables to page via POST - How?

2002-07-18 Thread Monty
This is probably more of an HTML question... Is there a way to pass variables to another page via POST instead of via the URL? I need to pass several variables, one that is an array and another that is a fairly long string, so, I can't really do this via the URL. My initial idea was to just creat

Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Monty
Hi Rasmus, file_gets_contents() doesn't work in my version of PHP (4.2.1). It says "not a valid function" or something like that. Also, I discovered that the filesize() function won't work on files fopened from the include_path. It returns a value of zero, so, I had to hardcode the bytes into the

Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Monty
Andre, here's the function that worked for me... function file_get_contents($filename) { $fd = fopen($filename, "r", 1); $contents = fread($fd, 12000); fclose($fd); return $contents; } $page_string = file_get_contents("my_file.php"); The third parameter in fopen() [1] can be re

RE: [PHP] Password in script

2002-07-18 Thread Jonathan Rosenberg
Yes, but if you're on a shared server, other users of the user will likely be able to read your PHP files & get the password. > -Original Message- > From: Tyler Longren [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 18, 2002 23:10 PM > To: Sailom > Cc: [EMAIL PROTECTED] > Subject: Re:

Re[2]: [PHP] Re: Cookies - good or bad???

2002-07-18 Thread Evgeny Chuykov
Justin French wrote: JF> As has been said on this list MANY times, just have a look at the big sites JF> like amazon.com -- no cookies, no javascript, no reliance on client-side for JF> anything. Take care of it all server-side, where you have a controlled JF> environment. And what about yahoo.

Re: [PHP] rebooting linux using php

2002-07-18 Thread Jason Wong
On Friday 19 July 2002 04:26, Scott Fletcher wrote: > If you're going to use the cron file (or crontab) then php wouldn't work > because it is a programming languages for the web pages. For cron files or > crontab, you can use the bash shell or ksh or whatever you have. It's > simple. All you h

[PHP] modify an element of a HTML tag within a string

2002-07-18 Thread Justin French
Hi all, I've asked simular questions before, but I think I'm finally asking the *right* question to get the right answer. I'm look for some suggestions on the best method of parsing a HTML document (or part thereof), with the view of CAPTURING and MODIFYING a specific element of a specific tag.

Re: [PHP] Re: [PHP-DB] Fatal error: Call to undefined function: pg_connect() in .....

2002-07-18 Thread Rick Widmer
At 11:02 PM 7/18/02 -0300, you wrote: >Is PostgreSQL started with the -i switch? (I think that's the one; it >exposes it to tcp/ip connections.) Check your PGSQL docs to be certain. This is not the problem. >Have you run a page with phpinfo? Is PostgreSQL support compiled into your >installa

Re: [PHP] Searching...

2002-07-18 Thread Jason Wong
On Friday 19 July 2002 10:21, Georgie Casey wrote: > in ym search page, i construct a sql query from user input to search my > database, and i run this query to get totalresults. Then run another query > with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per > page. My questio

RE: [PHP] postnuke / geekware?

2002-07-18 Thread John Holmes
> > > anyone have an opinion on postnuke versus geekware for a php-based > >CMS? > >No...I kind of prefer GeekLog... geeklog.sourceforge.net > Reasons why? I've been looking at a number of them; PostNuke seems to have > the most aggressive development effort, including modules, blocks and > the

Re: [PHP] Password in script

2002-07-18 Thread Tyler Longren
Yes, good point Anas. Make sure that you have mysql set up right. Make sure the root mysql user has a password set and that people can't connect from "%". tyler On Thu, 18 Jul 2002 20:19:05 -0700 (PDT) Anas Mughal <[EMAIL PROTECTED]> wrote: > > Also, allow MySQL connections only from your s

Re: [PHP] Password in script

2002-07-18 Thread Sailom
THANKS :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Password in script

2002-07-18 Thread Anas Mughal
Also, allow MySQL connections only from your server. Tyler Longren <[EMAIL PROTECTED]> wrote: It's fine. There's no other way to do it really. Somebody would have to be able to see the source to the php file before they could see the password for mysql. They won't get it just by viewing the

Re: [PHP] Password in script

2002-07-18 Thread Tyler Longren
It's fine. There's no other way to do it really. Somebody would have to be able to see the source to the php file before they could see the password for mysql. They won't get it just by viewing the webpage that's already been parsed by php. -- Tyler Longren Captain Jack Communications [EMAIL

[PHP] Password in script

2002-07-18 Thread Sailom
I am new to PHP and MySQL and never have experience in this area. I am writing a PHP script that connects to MySQL server. I have to put a password of MySQL into the PHP script. I think it may not be secured. What do you think? How can I make it more secure? Thanks. -- PHP General Mailin

[PHP] Re: Windows Sockets Problem Socket_Read

2002-07-18 Thread Richard Lynch
>I'm trying to setup a basic TCP server which I will later expand. Right now >I get this error on the loop after it receives data the first time: > >Warning: socket_read() unable to read from socket [317]: in >f:\public\www\josiah\josiah2\consultation\chat\test_server2.php on line 43 >socket_read

[PHP] Re: Refreshing session variables

2002-07-18 Thread Richard Lynch
>I got a problem with refreshing session variables. >When the following code is run , for the first time >both $z and $secretstring are showing same values. > >But when page is refreshed, the $secretstring variable >is still having the old value no matter how many times >I click refresh. > >Am I

[PHP] Re: Arrays and Regs

2002-07-18 Thread Richard Lynch
>Just a performance question, if anyone knows for sure. Within a large >array, would using numerical indices be quicker than associative? I'm >talking about a *noticeable* difference in performance, here. Almost for sure, nope. Run a test for yourself. >Also, on Regular Expression replaceme

[PHP] Re: spawning scripts to different graphical targets

2002-07-18 Thread Richard Lynch
>Is there a way I can decide where to target my output from server side? No. The FRAME asks the web-server for some content, and the server delivers it. You could, I suppose, tag every line of content with which frame it belongs in, and then have JavaScript on FRAME A, shove it over to FRAME B.

[PHP] Re: Check for Associative Array

2002-07-18 Thread Richard Lynch
>What's the best way to check for an Associative Array? There is no >is_assoc() or similiar function listed in the manual (I don't think anyway). All arrays are associative, really. Just some happen to have integers as their keys in the association. >I'm using mysql_fetch_array() and I want to

[PHP] Re: apache.conf for php

2002-07-18 Thread Richard Lynch
>I recently upgraded Apache to 1.3.26 and am currently configurating hte >httpd.conf. I noticed that > >--snip-- >AddType application/x-httpd-php .php >AddType application/x-httpd-php-source .phps >--snip-- > >does not exist in this version as it does in the older version. > >Is it now automatic

[PHP] Re: rebooting linux using php

2002-07-18 Thread Richard Lynch
>Can we reboot a linux server using a php page? Under certain conditions, probably. You could run Apache as root, but that's stupid. Instead, you'd need a sudo script that does shutdown without requiring a user to actually *BE* root. That script should almost-for-sure be owned and executable

[PHP] Re: Upload File Problem

2002-07-18 Thread Richard Lynch
>I have a simple script that attempts to upload a file and save it on the >server. When I click send file I get this error message 'Warning: Unable to >open '' for reading: No such file or directory in /var/www/html/upload.php >on line 5 >Couldn't copy the file!'. The file is being uploaded from a

[PHP] Re: Accessing Ports

2002-07-18 Thread Richard Lynch
>Can i access my paralel or USB port with PHP server side? The client's (browser's) parallel or USB port? No. See PHP & HASP thread. If the web-server has a parallel or USB port and you want to access that, probably, if you have (or can get) sufficient permissions from the OS for PHP to do so.

[PHP] Re: Creating Dynamic Variables

2002-07-18 Thread Richard Lynch
>Hello, I have captured variables from any HTML that is POSTed to me from a >'foreach' clause. Now, possibly in this foreach clause I want to register >these name/value pairs into a session var. I have tried : >session_start(); >foreach ($HTTP_POST_VARS as $name=>$value) { >$name=$value; >session_

[PHP] Re: PHP & HASP

2002-07-18 Thread Richard Lynch
>I am planning to setup a web server of using RedHat Linux. The purpose >of the web server is to provide product information for only registered >customers. >I plan to send the HASP parallel port keylock to the registered >customers. >Can I use PHP to monitor the status HASP parallel port keylock

[PHP] Re: ldap_add() - null values in fields produce an "value #0 invalid per syntax" error on ldap server

2002-07-18 Thread Richard Lynch
>The problem comes when fields in the html pages are left empty, which is >normal for this application. For those familiar with the ldap_add/modify >functions in PHP, the array that is passed in has some values, say for >example title, fax, mobile, ... left empty, and therefore NULL (I have >chec

[PHP] Re: Segmentation fault with Sablotron xslt_process()

2002-07-18 Thread Richard Lynch
>I am getting random Segmentation faults when I use >the following script. This does not happen when I run >scripts that do not include the xslt_process() >So I am assuming it has something to do with Sablotron and xslt. >Below is also the back trace with the problem. >Can anyone suggest a solutio

[PHP] Re: how many requests can php serve?

2002-07-18 Thread Richard Lynch
>I am wondering how many requests at one time php can serve before the site >brakes down. Someone told me that my site has been down yesterday for a >while after I did anounce it through a university email list going to 2500 >users. There are many factors that will cause what you think happened..

[PHP] Re: Confused about the list() function

2002-07-18 Thread Richard Lynch
>Now that I have a string of colors delimited by commas, I would like to >parse the string and print out all my colors. I have read the >documentation on using the list() function but I find it confusing. Can >someone clear the fog from my mind please? Remember when "deconstructionism" was a

[PHP] Re: Queries - Sometimes I need to use apostrophe, other times i don't

2002-07-18 Thread Richard Lynch
>When running a mysql_query, sometimes i need to have apostrophes >surrounding variables...other times i don't > >example... > >$query = "SELECT * FROM table WHERE id='$id'"; > >or > >$query = "SELECT * FROM table WHERE id=$id"; > >...it kinda seems random when it wants apostrophes and when i

[PHP] Re: File reading help with Syntax

2002-07-18 Thread Richard Lynch
>I am getting data froma website for stock information. If I type in the >brower the URL I get a text file display list this; > >Date,Open,High,Low,Close,Volume >16-Jul-02,7.92,8.10,7.68,7.82,605500 >15-Jul-02,7.98,8.02,7.59,8.02,577200 >12-Jul-02,7.80,8.00,7.57,7.95,411100 >11-Jul-02,7.82,7.94,7.

[PHP] Re: imap connection problem

2002-07-18 Thread Richard Lynch
>when i try to connect to my local imap server by php i get the message >(standard ie message) that the page can't be shown. with another server >(imap.web.de) everything works fine. with outlook i can access my server >without any problems and also mtest seems to work without any errors. what's >

[PHP] Re: Debugging LDAP_connect problems

2002-07-18 Thread Richard Lynch
>I'm trying to connect to a server using ldap_connect. The connection is >failing, but I'm not sure why. When I try to use ldap_error() to narrow >down the problem, I get a messaging saying "... 0 is not a LDAP link >index at " I'm not sure what other options I have. Any suggestions >w

[PHP] Re: Sessions Vars under 4.0.4pl1

2002-07-18 Thread Richard Lynch
>Hello All, > >I, having problems getting HTTP_SESSION_VARS to work the way I think they >should. >Shouldn't I just be able to do something like: > >in a file called index.php I have the following; > >session_start(); >?> > > > >The session_id is > >Next >$HTTP_SESSION_VARS['count']=123; Don't s

[PHP] Re: php Similar to C in Pointer Memory Accessing or not?

2002-07-18 Thread Richard Lynch
>The last statement does not generate an error but lets you >access that location... That's because C is broken :-) >Firstly I want to know if PHP has pointers PHP does not have a 'pointer' type. Read the manual. >(I know it uses >dereferencing values via &) and if it does use pointers >does

[PHP] Re: Forms problem?

2002-07-18 Thread Richard Lynch
>why the images won't display. Any ideas would be helpful and I can post more >code if required. You're going to have to post all of it, almost for sure... I'm not seeing a missing " in there, but you surely have one. Or get an editor that understands PHP and JavaScript that will color-code it

[PHP] Re: remove header tags - include file

2002-07-18 Thread Richard Lynch
>This is my problem: >I want include the file html.html inside of my file index.php, but before >include it I want to remove .. tags from my html.html file. ')){ $rest = substr($rest, 7); echo $rest; $found = 1; } } } ?> Although, honestly, this is just WRONG

[PHP] Re: Problem on file_exists() function

2002-07-18 Thread Richard Lynch
>I had made a test.txt file which stored in the following window path : >c:\pdf_reports\dealing\test.txt, >In my page, i ask php to check the test.txt exist in foler >(c:\pdf_reports\dealing) using the following script: > >if (file_exists("c:\\pdf_reports\\dealing\\test.txt")) >{ >print ("

Re: [PHP] Re: PHP and Jigsaw

2002-07-18 Thread Richard Lynch
>Some careful testing and results... I know nothing about Jigsaw, whatever that is. >All tests invoke the URL "http://myserver:jigsawport/phpinfo.php"; > >Test 1: >* phpinfo.php contains exactly one line > > >* Jigsaw's debug flag in the default extension indexer cgiframe definition >for ".php"

[PHP] Re: Bug in PHP?

2002-07-18 Thread Richard Lynch
>Hello, > >I'm trying to explode an associative array element in $HTTP_POST_VARS >retrieved from submitting am html form. The URL to the form is: >http://www.funfry.com/form.html > >Now when I try to explode $HTTP_POST_VARS["domains"] it doesn't seem to have >the desired effect. I use the syntax

[PHP] Re: problem with IMAP support

2002-07-18 Thread Richard Lynch
>We've installed and recompiled PHP but I still get "undefined function" >errors when I try to use imap_open(). > >Does anybody have any ideas? Does show IMAP support as being there? Probably not. Even if you *think* you have --with-imap in your configure line, what does phpinfo() show? Did y

[PHP] Re: transparent clusters + sessions

2002-07-18 Thread Richard Lynch
>If I have say 20 web servers in a cluster behind something like a Cisco >LocalDirector, will session data remain constant over the 20 web servers if >they use a shared NFS or similar mount to save session data on? Almost for sure, yeah, but NFS is probably not the best answer, unless you know ho

[PHP] Re: calling a cgi script from php

2002-07-18 Thread Richard Lynch
>$returndata=exec($cmd); Change this to: exec($cmd, $returndata, $error); echo implode("\n", $returndata); if ($error){ echo "OS Error $error. Usually path/permissions. Read 'man errno' to look up $error\n"; } -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (htt

[PHP] Re: GIF Manipulation

2002-07-18 Thread Richard Lynch
>I'm currently developing a site which needs the ability to do server-side >image cropping and resizing. I currently have a current version of GD >installed with PHP, however the lack of support for GIFs is causing endless >headaches. > >Is there any way to support GIFs in PHP without revertin

[PHP] Re: function for finding one character in a string?

2002-07-18 Thread Richard Lynch
>I have been looking around in the PHP function listing for a function that >can find or match one character from a string. I thought it would be >something like post_str() or something but never found anything close to >that. I get the idea of post and str from the SQL command. I did check the

[PHP] Re: Good instruction for installing webserver using RPM and tar.gz files???

2002-07-18 Thread Richard Lynch
>Re: Good instruction for installing webserver using RPM and tar.gz files??? Don't. :-) >I'm pretty used to installing OpenSSL, Mod_SSL, Mcrypt, cURL, PHP and Apache >with all of them in tar.gz files. Now I'm experiementing it on the Linux >and mySQL. Never tried it on both Linux and mySQL bef

[PHP] Re: PHP Functions Essential Reference??

2002-07-18 Thread Richard Lynch
>does anyone have a copy of the electronic version (free, i believe?) of >the book "PHP Functions Essential Reference" ? >the website http://www.php-er.com has been down and i am trying to >locate it... http://php.net ? :-) Given the price of the book, just buy a paper copy :-) -- Like Music

[PHP] Re: Fopen errors out when opening a URL

2002-07-18 Thread Richard Lynch
>I am trying to do a simple fopen("http://www.weather.com/index.html";, "r"); >For some reason I cannot Open any URL's after trying several. > >I get the following error > >Warning: stat failed for Resource id #1 (errno=2 - No such file or >directory) It's possible that weather.com is sending c

[PHP] Re: exec() function question on Solaris

2002-07-18 Thread Richard Lynch
>I have an interesting question. I am working on a system that I need to >run two commands in the shell, but when I use passthru() on the first >command then run the second command to get the results from the first >command, it doesn't work. Is there any way I can run 2 shell commands in >the same

[PHP] Re: Search Page question

2002-07-18 Thread Richard Lynch
>I was looking at using the LIMIT feature in MySQL, but the MySQL manual said >that if you use ORDER BY with LIMIT in the same SELECT it does the LIMIT >before the ORDER BY. Therefore it does the limit then orders the limit list >only, not order the entire list then returns the limit from that.

[PHP] Re: Problem with implode() function

2002-07-18 Thread Richard Lynch
>Hi, > I have an array of elements which are separated with the operator >comma(,). > >== > $array = implode(",", $checkb); > > echo $array.'\n'; > > $result = mysql_query("DELETE FROM temp WHERE inv_tag IN >($array)") or die('Error in query'.mysql_e

[PHP] Re: Classes vs. Functions

2002-07-18 Thread Richard Lynch
>Could someone please explain the difference between classes and functions >and how to use a class. I write alot of PHP, but I never understood this at >all. I use an include statement in many of my pages and include a file with >a bunch of functions. For instance, I might have a function called s

[PHP] Re: php/mysql simple math

2002-07-18 Thread Richard Lynch
>I have created a table which has a column called cost. How do I add up all >the numerical data in the cost column and display that on a webpage? -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

[PHP] Re: file() and array values contain extra \n

2002-07-18 Thread Richard Lynch
>$users=file('.users'); >fwrite ($fd, join("\n",$users)); file puts each line in a separate element of the array, but it does *NOT* strip off the \n in doing so. When you join them back together, *YOU* added an extra \n in the join. You want join('', $users) That will join them with no extra

[PHP] Re: Purpose of $$var ?????

2002-07-18 Thread Richard Lynch
>The script was working great before PHP 4.2.x and not after that. So, I >looked through the code and came upon this variable, "$$var". I have no >idea what the purpose of the double "$" is for a variable. Anyone know? >$var = "v".$counter."_high_indiv"; >

[PHP] Re: PostgreSQL

2002-07-18 Thread Richard Lynch
>PHP is compiled with PostgreSQL support but I can not connect. I get >this error message What does it mean and what do I need to do to fix >it > >Warning: pg_connect() unable to connect to PostgreSQL server: connectDB() >-- connect() failed: Connection refused Is the postmaster running (with -i)

RE: [PHP] postnuke / geekware?

2002-07-18 Thread Vail, Warren
I use MyPhpNuke (MPN) http://www.myphpnuke.com/ which appears to have lots of nice extensions to the phpnuke product including a forums, picture gallery, contact form, user mailing system, and many others. These things are so tightly integrated into the product, that it's tough to tell which opti

[PHP] Re: [PHP-DB] Fatal error: Call to undefined function: pg_connect() in .....

2002-07-18 Thread Miles Thompson
Is PostgreSQL started with the -i switch? (I think that's the one; it exposes it to tcp/ip connections.) Check your PGSQL docs to be certain. Have you run a page with phpinfo? Is PostgreSQL support compiled into your installation of PHP? This is a file consisting of , named phpinfo.php. Again,

RE: [PHP] postnuke / geekware?

2002-07-18 Thread Miles Thompson
At 08:16 PM 7/18/2002 -0400, John Holmes wrote: > > hi, > > > > anyone have an opinion on postnuke versus geekware for a php-based >CMS? > > > > cheers, > > jaxon > >No...I kind of prefer GeekLog... geeklog.sourceforge.net > >---John Holmes... > > >-- >PHP General Mailing List (http://www.php.net/

Re: [PHP] Re: Cookies - good or bad???

2002-07-18 Thread Justin French
on 19/07/02 4:49 AM, Scott Fletcher ([EMAIL PROTECTED]) wrote: > I never heard of this php function, "link()". Sound like a good function, > I'm going to have to look it up! Ummm, sorry, it's one that I wrote myself in my library of code -- not an official function. my function link() takes th

Re: [PHP] Cookies - good or bad???

2002-07-18 Thread Justin French
on 19/07/02 3:47 AM, Alberto Serra ([EMAIL PROTECTED]) wrote: > We use but one cookie, for returning user recognition. That is, the sort > of info your soft can survive without. As for passing values on the GET > channel to iframes, we do it all the time and have never seen a single > problem. P

RE: [PHP] Searching...

2002-07-18 Thread John Holmes
> in ym search page, i construct a sql query from user input to search my > database, and i run this query to get totalresults. Then run another query > with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries > per > page. My question is, is this inefficient? is there any better wa

[PHP] Searching...

2002-07-18 Thread Georgie Casey
in ym search page, i construct a sql query from user input to search my database, and i run this query to get totalresults. Then run another query with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per page. My question is, is this inefficient? is there any better way i dont k

Re: [PHP] Please Help with LOOP!! - Questions Answered!!!

2002-07-18 Thread Wee Keat
THANK YOU S MUCH FOR ALL YOUR HELP!! God... in just five minutes you guys have helped me solved a problem I've tried to figure out in an hour!!! I finally decided to take off the loop and used only the while loop it WORKED beautifully! Thank you s much Lejanson, Asmodean

RE: [PHP] Please Help with LOOP!!

2002-07-18 Thread Jerome Houston
martin- you're totally right except for one thing >$count=1; >while($query_data = mysql_fetch_array($result)) >{ > $price = $query_data["price_lq"]; > $RowColor = useColor(); > // current echo statements here >} >$count++; this code will give him the exact same problem. the $count++;

RE: [PHP] Please Help with LOOP!!

2002-07-18 Thread Martin Towell
Asmodean - using comma is another way of using echo... Wee - try this instead - you're putting two loops together when you don't need to for($count=1; $count<=$rows; $count++) { $query_data = mysql_fetch_array($result); $price = $query_data["price_lq"]; $RowColor = useColor(); // current

Re: [PHP] Please Help with LOOP!!

2002-07-18 Thread Asmodean
Hello Wee, Friday, July 19, 2002, 2:36:40 AM, you wrote: WK> Hi all... WK> I'm a complete beginner in programming. Just started a few months ago. WK> So, I'm sorry if this is a stupid question to ask. But I'm at a dead end here and do not know where else to go. WK> I'm trying to automate a

[PHP] Please Help with LOOP!!

2002-07-18 Thread Wee Keat
Hi all... I'm a complete beginner in programming. Just started a few months ago. So, I'm sorry if this is a stupid question to ask. But I'm at a dead end here and do not know where else to go. I'm trying to automate a checkbox name to have the name "choice1" to have incremental effect on the

RE: [PHP] Refreshing session variables

2002-07-18 Thread John Holmes
> $x = mt_rand (1000,1); > $y = mt_rand (1000,1); > > $text = $x.$y; > $secretstring =$x.$y; > > session_start(); > if(session_is_registered("secretstring")){ > session_unregister("secretstring"); > } > session_register("secretstring"); What good do you think this does? There is no 'el

RE: [PHP] postnuke / geekware?

2002-07-18 Thread John Holmes
> hi, > > anyone have an opinion on postnuke versus geekware for a php-based CMS? > > cheers, > jaxon No...I kind of prefer GeekLog... geeklog.sourceforge.net ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Function Upload? Função Upload ?

2002-07-18 Thread Skyhawk
Alguém sabe o que esse erro significa? Which the mistake in this function? Warning: HTTP request failed! HTTP/1.1 404 Objeto não encontrado in D:\Projetos\Websites\Portal_Origem\adm\incprodutos.php on line 64 Warning: copy("http://doiscliques/origem-novo/web/upload/alias.bmp";) - No error in D:

Re: [PHP] ARRAY_PUSH with $key

2002-07-18 Thread Analysis & Solutions
On Fri, Jul 19, 2002 at 01:58:42AM +0300, Pekka Saarinen wrote: > > I think array_push gets you cleaner lookin code (subjective). It also > ensures you always add to end of the array - good for novices like > me. Array_push is also TWO times faster (academic difference in the speeds > of mode

[PHP] utf8_decode missing?

2002-07-18 Thread Les Barstow
Not sure if this is something Mandrake could have done by accident, or if it's release related to PHP... I'm trying to run ldap navigator, and it runs fine on my Mandrake 8.1 box, but moving it to Mandrake 8.2, it complains about missing utf8_decode... PHP package version is 4.1.2-1mdk. The

Re: [PHP] Re: Includes vs. Functions

2002-07-18 Thread Michael Sims
On Thu, 18 Jul 2002 08:40:08 -0600, you wrote: See below... >At 09:20 PM 7/17/02 -0500, Michael Sims wrote: > >>$superglobals = array("var1", "var2", "var3", "var4", "var5", "..."); >> >>Now inside the function you can do this: >> >>function somefunction ($somevar) { >> >> global $superglobals

RE: [PHP] postnuke / geekware?

2002-07-18 Thread jon roig
I've been reasonably happy with postnuke -- easy to go in and modify stuff yourself. htp://jonroig.com ... but maybe that's just me. I'd actually be curious as to what kind experience people have had with the other systems. -- jon -Original Message- From: jaxon [mailto:[EMAIL P

Re: [PHP] Refreshing session variables

2002-07-18 Thread Kevin Stone
I think you're missing some fundamental concepts of sessions here. You must think of the session as a file that you're going to include into the script (becuase.. that's litteraly what it is). But instead of using include() you're going to use session_start(); (refresh)"; ?> When you activate

  1   2   3   >