Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
But, Robert, doesn't this technique leave a connection open on the server--and, won't it cause the server to run out of resources after a very finite number of connections has been established? Marco On Mon, 2002-10-07 at 14:07, Robert Cummings wrote: > You can have your script en

Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
nd long for the list (and I have no time to write it...), but hopefully, this will give you the gist of it. Cheers, Marco On Mon, 2002-10-07 at 13:43, Oliver Witt wrote: > I attempted to write a oage that you can chat on with php. It ended up > being a page that reloads itself all the time

Re: [PHP] Sockets

2002-10-07 Thread Marco Tabini
e documentation for your version to see if this extension was included when the package was compiled from the source. Cheers, Marco On Mon, 2002-10-07 at 14:22, Asmodean wrote: > Hey everyone, > > Does anybody know what the current support / functionality for PHP > with s

Re: [PHP] Chat with php

2002-10-07 Thread Marco Tabini
eloading the page usually does (like the stupid click click click in IE). Marco On Mon, 2002-10-07 at 14:25, Oliver Witt wrote: > Brad Dameron schrieb: > > > Another way is to use javascript with PHP to pull the database every so many > > seconds. I have seen this in I think i

Re: [PHP] Grabbing auto_increment during insert?

2002-10-07 Thread Marco Tabini
If you're using MySQL: mysql_insert_id If you're using MSSQL, you need to execute SELECT @@IDENTITY right after your insertion operation. The result will give you the ID of your last insertion. This won't work well if you're doing a bulk insert, though. On Mon, 2002-10-07 at 15:46, Jason Young

Re: [PHP] how to build a webmail

2002-10-07 Thread Marco Tabini
Try this: http://www.horde.org/imp/ On Mon, 2002-10-07 at 16:26, Nagib Abi Fadel wrote: > > Hi i want to build a webmail with PHP, can someone give me some guidelines. > > thx. > > > > - > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos, & more >

Re: [PHP] Deleting multiple items from database using checkboxes

2002-10-07 Thread Marco Tabini
Thus, I assume that you will want to put a *lot* of checking around that code! Marco On Mon, 2002-10-07 at 16:05, Davy Obdam wrote: > Hi people,. > > I have a guestbook admin page were i would like to delete one item or > more items from the database if necessary. I have modified my

Re: [PHP] Execute...

2002-10-08 Thread Marco Tabini
as an example: http://freespace.virgin.net/naeem.malik/calculator.htm Marco On Tue, 2002-10-08 at 06:55, Bsantos PHP wrote: > Hi people: > > Can anyone tell me if I can execute windows calculator trought a PHP script > on a web page to allow customers to check final prices?! >

Re: [PHP] PHP AND C

2002-10-08 Thread Marco Tabini
Passing that many parameters shouldn't be a problem, I think...argv/argc parsing in the standard C library is pretty fast. On Tue, 2002-10-08 at 06:04, karthikeyan wrote: > Hi, > > I want to pass some 10 to 15 parameters as input to an C Program. Does passing it >as command line argument thr

Re: [PHP] shell_exec('cp...

2002-10-08 Thread Marco Tabini
Have you tried redirecting stderr to a file? On Tue, 2002-10-08 at 11:50, Alec Solway wrote: > I'm having problems running cp from shel_exec(). Nothing is returned, but > the copy is unsuccessful. The same call works as user nobody from the > actual shell. Any ideas? > > -Alec > > > -- > PH

Re: [PHP] PHP socket connections with SSL

2002-10-08 Thread Marco Tabini
ver for a while without much in the way of problems). An alternative would be to compile the curl library in a 4.2 release and use that one to pull SSL pages. Marco On Tue, 2002-10-08 at 18:49, Darren Gamble wrote: > Good day, > > I'm trying to create a PHP app to connect t

Re: [PHP] Speeding up a Mysql Select

2002-10-09 Thread Marco Tabini
Also, probably a stupid question, but, is the `begintime` column indexed? If it isn't, no matter what you do, the whole thing will keep getting slower at an alarmingly fast pace :) Marco On Wed, 2002-10-09 at 07:14, Maurits Lawende wrote: > You should include a LIMIT to the sql-query

Re: [PHP] Encrypting passwords in a flat file before import

2002-10-09 Thread Marco Tabini
I think that generally you do not want passwords to be decryptable. What I normally do is try to encrypt whatever the user enters as a password and compare the resulting encrypted string with what's in the database to make sure they correspond. If the encrypting function is univocal (and md5 is) t

Re: [PHP] ASP Option Explicit equivalent in PHP

2002-10-09 Thread Marco Tabini
Well, you can set error_reporting to E_ALL, which will cause PHP to complain if you use a variable without having it initialized. There is no exact equivalent to Option Explicit--and there still isn't any need to declare the variables, just to initialize them before use. Marco On Wed, 20

Re: [PHP] problem with SUM and Postgres

2002-10-09 Thread Marco Tabini
= pg_exec($connect, $sql1); $hosting_data = pg_fetch_row ($hosting_rs, 0); $hosting = $hosting_data[0]; Marco On Wed, 2002-10-09 at 19:29, webmaster wrote: > I can't figure out why the following code is not returning a column > total: > > $sql1 = "SELECT SUM(hostingcost)

Re: [PHP] problem with SUM and Postgres

2002-10-09 Thread Marco Tabini
Sorry, folks... I meant "result" and not "returns" below. End of day = brain fried. :) Marco On Wed, 2002-10-09 at 19:32, Marco Tabini wrote: > Because pg_exec only executes the query and returns the resource that's > associated with the returns. If you want

Re: [PHP] Problems pulling up a certain url with curl

2002-10-10 Thread Marco Tabini
Did you compile curl from scratch? If so, did you enable https? On Thu, 2002-10-10 at 12:13, Brandon Orther wrote: > Hello, > > I am farely familar with the use of curl. I have used it in the past > and it seems to be working going to test pages such as php.ner and so > on. When I try to got

Re: [PHP] help with mysql query / logic

2002-10-10 Thread Marco Tabini
Can you perhaps post the structure of your tables? That would make it easier to help (at least for me) On Thu, 2002-10-10 at 15:40, Pablo Oliva wrote: > I have 2 tables, one with job ad information, and a second one with the > locations that this ad applies to. > > When a person queries the jo

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
= $a * 10; Will cause a warning if $a is not set to something. Marco On Thu, 2002-10-10 at 16:07, Justoman wrote: > I get this with almost all the scripts I run, > > It's a whole shit load of undefined variables! what are these and please, > how can they be fixed? > > Here

Re: [PHP] Undefined variables?

2002-10-10 Thread Marco Tabini
I think the problem is simply that the other server had a different configuration setting for error reporting, since I can't find $debug_wintrmte configured anywhere. I don't know what this code is for, so it's difficult for me to say how to fix it, since any changes I make may affect the outcome

Re: [PHP] MS SQL server TEXT column

2002-10-10 Thread Marco Tabini
ction between Set TEXTSIZE and your actual query--PHP uses the most recently opened connection as a default, and if you open a new connection between the two queries, the second connection will not have the TEXTSIZE set. Hope that helps. Marco On Thu, 2002-10-10 at 17:04, Vail, Warren

Re: [PHP] Accessing serial ports from PHP

2002-10-11 Thread Marco Tabini
If you're using UNIX, you can try reading and writing to/from /dev/ttyS* or /dev/ttyS/* On Fri, 2002-10-11 at 06:34, José León Serna wrote: > Hello: >I would like to read and write to serial ports from PHP, is possible? > if so, how? > > Regards. > > > -- > PHP General Mailing List (http

Re: [PHP] MSSQL_RESULT Problem

2002-10-11 Thread Marco Tabini
Hi! This is actually a limitation of the sql libraries used by PHP (I assume you're using Windows). Try using a cast to a text field: Select Cast(Field As Text) As Field This should (and I say should because I can't test it right now :) take care of the problem, although it might make your db a

Re: [PHP] how to configure with ldap?

2002-10-11 Thread Marco Tabini
You need an LDAP package like OpenLDAP: http://www.openldap.org/ On Fri, 2002-10-11 at 10:37, Jody Cleveland wrote: > Hello, > > I'm trying to configure php with ldap support. Looking at ./configure > --help, I noticed that when I configure it, I need to put this in: > ./configure --with-ldap=[

Re: [PHP] php cgi question

2002-10-13 Thread Marco Tabini
Without seeing your code... only one guess: what are the permissions on the file like? When you're running the script from the web server, you're running it as the user under which the web server is running (usually nobody or apache if you're using Apache on Linux), and this causes problem if that

Re: [PHP] PHP/mySQL help or advice

2002-10-13 Thread Marco Tabini
booked and then whenever you have to check just hit the database: if there is a row corresponding to the day you're checking, then the day is booked, otherwise it isn't. This is kind of the short version, but hopefully it should give you enough to get going! Cheers, Marco On Sun, 2002-10-1

Re: [PHP] Multiple Return Values from function

2002-10-13 Thread Marco Tabini
Well, you could return an array that contains more than one value, or you could pass some parameters by reference rather than by value (although that's not always a good idea). On Sat, 2002-10-12 at 22:49, Paul Maine wrote: > Can I return more than one value from a function? > > php > > Thank Y

Re: [PHP] syntax error on mysql select statement

2002-10-13 Thread Marco Tabini
Yes, the LIMIT clause must be at the end of the line. Take a look at the documentation: http://www.mysql.com/doc/en/SELECT.html On Sun, 2002-10-13 at 00:12, Pablo Oliva wrote: > Can anyone see any problems with the following: > SELECT * FROM ad AS t1, ad_location AS t2 ORDER BY t1.ad_ts_update

Re: [PHP] php cgi question

2002-10-13 Thread Marco Tabini
g from the sell, imho you made a good decision not to post the source, since the problem was clearly somewhere else. Marco On Sun, 2002-10-13 at 11:20, David Cook wrote: > Hi Marco > > Thanks for the tips, they were what I was thinking was the problem, that > even when the php cgi wa

Re: [PHP] Best Forum System

2002-10-13 Thread Marco Tabini
I use phpbb for our internal forums as well as a public forum on a website (http://www.nonsologiochi.com/forums -- it's in Italian) and it works pretty well. On Fri, 2002-10-11 at 17:36, Stephen wrote: > Hello, > > I know there will be a load of different responses but I'm after the most freque

Re: [PHP] $HTTP_GET_VARS within a function ??

2002-10-13 Thread Marco Tabini
Try using global $HTTP_GET_VARS; at the beginning of your function. $HTTP_GET_VARS has global scope, and by default PHP isolates functions from the parent scope. Marco On Sun, 2002-10-13 at 16:39, John Negretti wrote: > Hello All, > > I am calling a particular function. Wi

Re: [PHP] Re: php cgi question

2002-10-13 Thread Marco Tabini
I think you might be unable to access documents outside the root if you're in safe mode. Just out of curiosity--have you tried su-ing to the Apache user and executing your script as that user? On Sun, 2002-10-13 at 21:36, David Cook wrote: > Hi again all > > Just a bit more info, trying to trac

Re: [PHP] Re: php cgi question

2002-10-13 Thread Marco Tabini
Ok, that's a big step forward then. It's possible that your user does not have access to the directory tree where the file resides? Have you tried listing that directory and or opening the file (for example with cat) while using that file? If you can narrow it down to a permission problem (and, at

Re: [PHP] What's wrong with my regular expression?

2002-10-14 Thread Marco Tabini
ns the first match print ($matches[1][0]); // Returns the second match } Also, your regular expression didn't cover all the possibility (eg: spaces between href and =. I might have overdone it with mine but, hey, I've got a turkey to cook and it's already late ;-) Cheers,

Re: [PHP] What's wrong with my regular expression?

2002-10-14 Thread Marco Tabini
. > > but ,thanks. > > -- > Regards, > > "Marco Tabini" <[EMAIL PROTECTED]> wrote in message >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > If you want to match more than one occurrence of the same pattern, you > > must use preg_matc

Re: [PHP] Inserting special characters into text fields

2002-10-14 Thread Marco Tabini
x27;m doing this by memory and have probably left something out (I'm cooking our Thanksgiving dinner and I need a break!), but hopefully it should give enough of an idea to get going. Marco On Mon, 2002-10-14 at 08:27, Phil Schwarzmann wrote: > I need users to be able to insert speci

Re: [PHP] Inserting special characters into text fields

2002-10-14 Thread Marco Tabini
Well, in Linux (if you're using X) we have "key bindings" and "dead keys", that allow you to create combinations of keypresses that are translated into special characters. For example, since I sometimes write in Italian and need accented letters, I have programmed my X so that if I press the left

Re: [PHP] weird IE cookie problem

2002-10-14 Thread Marco Tabini
Is the time set properly on your machine? Double check both the time AND the timezone. I went nuts trying to fix a similar problem once just to find out that someone had changed the timezone on the PC for a test and then forgot to put it back. On Mon, 2002-10-14 at 13:25, Javier Montserat wrote:

RE: [PHP] php mail()

2002-10-14 Thread Marco Tabini
You'd have to make the user under which Apache runs a "trusted" user in Sendmail and then use the -f switch in the additional parameters section of the mail command. On Mon, 2002-10-14 at 15:44, Brad Dameron wrote: > Hey do you guys know how to correct this problem with sending email? > > A cus

Re: [PHP] Re-populating File field in form - won't work??

2002-10-14 Thread Marco Tabini
I think it's a "security" feature to prevent people from doing things like inserting a hidden file field with a pre-defined value (e.g.: "/etc/passwd") and then tricking the user to unwittingly submit the form. The same probably applies to all browsers. On Mon, 2002-10-14 at 16:05, Monty wrote:

Re: [PHP] crypt() function

2002-10-14 Thread Marco Tabini
Have you considered using md5() instead? On Mon, 2002-10-14 at 16:27, Adam Plocher wrote: > Hello, I am trying to authenticate a password using the crypt() > function. Here's what I got: > > if (crypt($_SERVER['PHP_AUTH_PW'],$data[1]) == $data[1]) > { > ... > } > > $data[1] being the s

Re: [PHP] PhpMyAdmin Help Needed

2002-10-16 Thread Marco Tabini
ll get an error, then you're pointing your browser to the wrong location. Cheers, Marco On Wed, 2002-10-16 at 18:08, Pushpinder Singh Garcha wrote: > Hi > > I am wanting to use PhpMyAdmin for my project . I am developing using > PHP and MySQl and the OS is Jaguar > I ha

Re: [PHP] to use switch or not to use switch

2002-10-16 Thread Marco Tabini
Suggestions: 1) Use javascript to determine the script to run--slow and prone to attacks because you have little control over 2) Code different functions depending on the size of the text 3) Include a different file with the code to execute depending on the size of the text Cheers, Marco

Re: [PHP] HTML file to a $var: Pls Help

2002-10-25 Thread Marco Tabini
Try this: implode ('', file ($filename)); On Fri, 2002-10-25 at 19:26, Shane wrote: > Any way to plug an entire HTML file into a variable? > > I looked into file_get_contents() but that was CVS format only. > > I need to take a simple HTML file and pass it as a string variable to a mail >funct

RE: [PHP] How many is too many?

2002-10-25 Thread Marco Tabini
IMHO it depends on the O/S and filesystem. For example, there's an fs for Linux called Reiser FS that uses semibalanced binary trees to speed up file organization, so that even with high file counts you shouldn't experience major delays. Some other filesystems have hard limits on the number of file

Re: [PHP] stipslashes

2002-10-31 Thread Marco Tabini
But you could do this: function f(&$value, $key) { $value = stripslashes ($value); } array_walk($_POST, 'f'); On Thu, 2002-10-31 at 13:41, 1LT John W. Holmes wrote: > > Is > > > > stripslashes($_POST); > > > > the same as > > > > stripslashes($_POST['var1']); > > stripslashes($_POST

Re: [PHP] fopen() with permissions?

2002-11-05 Thread Marco Tabini
If you're using Apache, have you considered suexec? You can write an external script that takes care of that. Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Tue, 5 Nov 2002, Charles Wiltgen wrote: &g

Re: [PHP] Using info from a MySQL Query

2002-11-05 Thread Marco Tabini
27;pass'); $a = mysql_fetch_array ($rs); echo $a['company']; echo $a['name']; Minus some error checking, this is pretty much it. Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Tue, 5 Nov

Re: [PHP] sql error

2002-11-05 Thread Marco Tabini
"where" is a reserved keyword in SQL--try changing the name of that column to something else. Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Tue, 5 Nov 2002, Jule Slootbeek wrote: > I know this

Re: [PHP] sql error

2002-11-05 Thread Marco Tabini
I'm not entirely sure... different configurations perhaps? Have you verified that that's indeed the problem? Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Tue, 5 Nov 2002, Jule Slootbeek wrote: >

Re: [PHP] mySQL relations query

2002-11-05 Thread Marco Tabini
appropriate information from both tables merged. Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web at http://www.phparch.com! On Wed, 6 Nov 2002, Edgard Berendsen wrote: > I know this can be a little out of topic but: > > I hav

Re: [PHP] Bar Codes

2002-11-05 Thread Marco Tabini
This might be an overly simple solution for your needs (depending on which kind of barcodes you need), but you can cheat with this: http://www.barcodesinc.com/generator/index.php Hope it helps. Marco --- php|architect -- The Monthly Magazine For PHP Professionals Visit us on the web

Re: [PHP] Running functions as other than nobody

2002-11-06 Thread Marco Tabini
There was actually a brief thread about this last night. If you're using Apache, you could look into suexec--this may or may not be a possibility depending on the degree of control that you have on your server. Marco -- php|architect - The magazine for PHP Professionals The

Re: [PHP] publishing php > mysql website on cd-rom

2002-11-06 Thread Marco Tabini
That would be a bit difficult--you would have licensing issues, particularly with MySQL, unless you actually distribute the sources. Would publishing all the files in "static" format be an option? -- php|architect - The magazine for PHP Professionals The first monthly worldwide maga

Re: [PHP] Getting Newest

2002-11-06 Thread Marco Tabini
That depends on what DBMS you are using. Which one is it? Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- I have three tables with certain

Re: [PHP] fopen() with permissions?

2002-11-06 Thread Marco Tabini
Charles, can you not create and write the file locally and then upload it directly via ftp? I'm not much of a PHPriest, but I love PHP because it's the first web scripting language that I have encountered that actually make sense, is coincise and very powerful. It's the old question--do we make co

Re: [PHP] Getting Newest

2002-11-06 Thread Marco Tabini
ou execute your query--that will print out what the MySQL server thinks is wrong with your current query. Hope this helps! Cheers, Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit

Re: [PHP] File locking problem

2002-11-06 Thread Marco Tabini
Just a (possibly stupid) suggestion--is it possible that the file is being overwritten by another instance of your script that's run in the meantime? - php|architect -- The Magazine for PHP Professionals Check us out on the web at http://www.phparch.com On Wed, 2002-11-06 at 23:06, Ch

Re: [PHP] POP3 Email

2002-11-07 Thread Marco Tabini
Hi Nick, You can actually use the imap extension to pick up POP3 mail (although, in my experience, it's pretty slow). There are also POP3 classes available... here's an example: http://www.thewebmasters.net/php/POP3.phtml Marco -- php|architect - The magazi

Re: [PHP] PHP and JavaScript

2002-11-07 Thread Marco Tabini
After--that's client-side stuff. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- On a PHP event, does the onLoad event in a documen

Re: [PHP] PHP not working in html

2002-11-07 Thread Marco Tabini
What extension are your files? Your web server is probably not set up to handle your files as PHP files. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com

Re: [PHP] " getting changed to \" when pulled from a

2002-11-07 Thread Marco Tabini
There's actually a setting: http://ca.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc and a set of functions: http://ca.php.net/manual/en/function.get-magic-quotes-gpc.php http://ca.php.net/manual/en/function.set-magic-quotes-gpc.php Marco -- php|architect - The mag

RE: [PHP] " getting changed to \" when pulled from a

2002-11-07 Thread Marco Tabini
That's not "necessarily" true--if you're using MSSQL quotes are escaped with quotes, I think. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com!

Re: [PHP] File locking problem

2002-11-07 Thread Marco Tabini
tions :-) Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- Charles Wiltgen wrote... > I'm having file locking problems. > > I'

Re: [PHP] Notice problem...

2002-11-07 Thread Marco Tabini
le without the leading $ sign. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Thu, 2002-11-07 at 17:23, R B wrote: > When i set display_errors = On and error_reporting = E_ALL in my php.ini, > i get the

Re: [PHP] File locking problem

2002-11-07 Thread Marco Tabini
shing it might cause the o/s to properly flush the file buffers. Just a couple of thoughts. Hope this helps. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Thu, 2002-11-07 at 17:58, Charles Wiltgen wrote: &g

Re: [PHP] Multple Form Values with Same Name

2002-11-07 Thread Marco Tabini
Yeah, PHP can do that for you. All you need to do is add the array indicator at the end of the variable name in your HTML code: That should make your PHP variable an array. Marco Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http

Re: [PHP] How to limit chars?

2002-11-07 Thread Marco Tabini
an simply truncate the string using substr as Martin suggested. Marco Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Thu, 2002-11-07 at 20:53, Håkan wrote: > Let's say I have a text field in my mysq

Re: [PHP] file upload broken in my case?

2002-11-07 Thread Marco Tabini
s the first time I tried file uploading! Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 00:16, sam clanton wrote: > > Hello, > > I was wondering if anyone could help me out with t

Re: [PHP] Weird behaviour with references to objects...

2002-11-07 Thread Marco Tabini
milar problem on PHP-DEV a while back--if you search the forums you should be able to find it. Hope this helps... Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Thu, 2002-11-07 at 21:36, Tim Molendijk wrote: &g

RE: [PHP] Graphics question

2002-11-07 Thread Marco Tabini
It's explained in the header() page of the manual: Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Thu, 2002-11-07 at 22:35, Robbert van Andel wrote: > Is there a way I can keep the caching from h

Re: [PHP] Help w/ 4.2.3 Problem

2002-11-08 Thread Marco Tabini
Most likely a register_globals settings problem. Try checking the manual in the php.ini settings page for more info. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 03:11, Jack Sasportas

Re: [PHP] Wildcard search

2002-11-08 Thread Marco Tabini
How about: $a = explode (' ', shell_exec ("ls $foldername/*.html")); This should return an array that contains the name of all the *.html files in the folder $foldername, if any. Hope this helps. Cheers, Marco - php|architect -- The Monthly Magazine For PH

Re: [PHP] Other Notice problem...

2002-11-08 Thread Marco Tabini
of your code we can help better? Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 10:31, R B wrote: > This is not the same question i asked yesterday. > > When i set error

Re: [PHP] Other Notice problem...

2002-11-08 Thread Marco Tabini
Try if (isset ($status) && $status == 'ADD') instead... this should take care of the error--IF you're sure that the fact that the $status variable is not set at that point is ok. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visi

Re: [PHP] Wildcard search

2002-11-08 Thread Marco Tabini
ing on the degree of control you have over the server). Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 11:14, Mako Shark wrote: > > <<$a = explode ('

Re: [PHP] ftp file exists

2002-11-08 Thread Marco Tabini
Try $f = fopen ('ftp://server/filename', 'r'); if $f is null, the file doesn't exist. Otherwise, it exists and you have to fclose ($f). FTP support has to be compiled into your version of PHP for this to work. Marco - php|architect -- The Monthly Magaz

Re: [PHP] Other Notice problem...

2002-11-08 Thread Marco Tabini
Well, it's possible he's using an older version of PHP in which superglobals did not yet exist. Marco - php|architect -- The Monthly Magazine For PHP Professionals Come visit us on the web at http://www.phparch.com! On Fri, 2002-11-08 at 12:09, Jason Wong wrote: > O

Re: [PHP] Search engine simulation...

2002-11-08 Thread Marco Tabini
You should be able to sort records and limit the output with MySQL... -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- I'm making a php database app

Re: [PHP] Wildcard search

2002-11-08 Thread Marco Tabini
If you're only executing one-liners and get all the results back you're better off using shell_exec(). popen() lets you open a pipe to a command--that way, you can funnel data to it as if you were typing from the keyboard. Permissions would be a problem with readdir() as wel

Re: [PHP] arg parsing

2002-11-08 Thread Marco Tabini
Well, it's probably the fifth time it's asked today :-) The setting is register_globals Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Beg

Re: [PHP] LDAP + Exchange

2002-11-08 Thread Marco Tabini
>i have never done this, there are some serious risks to exchange if you >do this... Yea, it's dangerous to let Microsoft software come into contact with something that actually works... :-) Sorry, had to come up with my stupid joke of the day. --- Begin Message --- I followed the instructions

Re: [PHP] php.ini

2002-11-08 Thread Marco Tabini
That's probably because when you recompiled PHP you specified a different path for it. On my computer, for example, it's /usr/local/lib/php.ini -- that's the default for me if you don't specify it when you run configure. -- php|architect - The magazine for PHP Professionals The first

Re: [PHP] Questions on PHP Variables

2002-11-08 Thread Marco Tabini
nsidered a potential security issue. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmer Come visit us at http://www.phparch.com! --- Begin Message --- I'm running PHP 4.2.3 as an Apache Module Wh

Re: [PHP] php.ini

2002-11-08 Thread Marco Tabini
I don't think that has to with it... the setting is --with_config_file_path=path if you grep PHP_CONFIG_FILE_PATH config.status in your PHP source folder, you should see where PHP is expecting php.ini to be--and you won't probably find it there, you'll have to copy it there yo

Re: [PHP] big include

2002-11-08 Thread Marco Tabini
You should probably look at a caching system, like APC (free) or the Zend stuff (commercial). Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! --- Begin Message

Re: [PHP] Finding HTML

2002-11-08 Thread Marco Tabini
Well, you can turn your PHP script into a shell script and run it once a month using cron -- that's of course assuming you're using UNIX. In Windows, you can use the scheduler. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwid

Re: [PHP] Finding HTML

2002-11-08 Thread Marco Tabini
your web browser. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com! --- Begin Message --- I'm on neither, I have a webhost. Gasping goes through the crowd, I

Re: [PHP] Finding HTML

2002-11-08 Thread Marco Tabini
ge --- Err, not sure how with Windows XP. Plus my computer might crash or something since I use this for buisness/gaming/whatever else. - Original Message ----- From: "Marco Tabini" <[EMAIL PROTECTED]> To: "Stephen" <[EMAIL PROTECTED]> Cc: "PHP List" &

Re: [PHP] mkdir()

2002-11-08 Thread Marco Tabini
The problem is that your webserver is not running as "you"...it's running under a common user (probably nobody or apache) and that user does not--and cannot--have access to your folder for security reasons. You can try creating the directory through ftp via PHP. Marco -- -

Re: [PHP] php header function...

2002-11-08 Thread Marco Tabini
Try removing all leading spaces between the shebang and the beginning of the script: #!/usr/bin/php -q Hey, > > > > Got a problem using the header function on a file upload page to redirect > the user back to a web page. Here's the code: > > > > #!/usr/bin/php -q > > > > > > > $file

Re: [PHP] Setup-dependent quotes problem

2002-11-09 Thread Marco Tabini
Ciao Daniele, Check this out: http://ca.php.net/manual/en/ref.info.php#ini.magic-quotes-gpc Also, programmatically: http://ca.php.net/manual/en/function.set-magic-quotes-runtime.php Hope it helps. Marco -- php|architect - The magazine for PHP Professionals The first monthly

Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
How is your database organized? you might be able to pull this information from the query by using an appropriate group-by clause. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web

Re: [PHP] How to know files in a directory

2002-11-09 Thread Marco Tabini
Try readdir() http://www.php.net/manual/en/function.readdir.php Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-09 at 15:01, Mohd_Q

Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
irst time. Hopefully, it gives you an idea of how it could be done. If I could make a suggestion without knowing how your system works, I think you should revisit your database design a little. Hope this helps, Marco -- php|architect - The magazine for PHP Professionals The first mo

Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Marco Tabini
I think the only way to do it the way you want to do it is through buffering (with the ob_functions or via the php.ini file). Turning off error printing is another possibility--that way you can have the errors logged to a file rather than to the screen. Marco -- php|architect - The

Re: [PHP] Handling Errors Gracefully

2002-11-09 Thread Marco Tabini
look messy and/or not work at all. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sat, 2002-11-09 at 18:05, Ernest E Vogelsinger wrote: > Ok, it

Re: [PHP] Automatic Colspan from database data

2002-11-09 Thread Marco Tabini
Dhaval, did you try the code I sent you? Marco On Sat, 2002-11-09 at 23:59, Dhaval Desai wrote: > Hi! > > > Well let's make it simple.. We can see that the following values: > > 211 > are stored in just one row in 31 different columns

Re: [PHP] Function Problem

2002-11-09 Thread Marco Tabini
Either add global $db; as the first line of the function or change your function call to: $db = db_conn("$host","$user","$pass","$dab"); I assume that $host, $user, $pass and $dab actually contain some correct values. Marco -- php|archit

Re: [PHP] Strange ....Date problem

2002-11-10 Thread Marco Tabini
I think you should convert them to dates--otherwise the server compares them as strings. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sun, 2002

<    1   2   3   4   5   >