Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
Looks like I was missing a comma after the ssh command and before the id command. Jonathan "Jonathan Duncan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >I have put this in my sudoers file using visudo to edit it: > > www ALL = NOPASSWD: /usr/local/bin/sudo puser, (puser) NOP

Re: [PHP] Apache 2 on RedHat

2004-12-01 Thread Thomas Goyne
On Wed, 1 Dec 2004 22:13:37 -0800, Bart Baenisch <[EMAIL PROTECTED]> wrote: I believe I understand the thread unsafeness problem, and I think a reasonable cure is the prefork MPM for Apache 2, as RedHat distributes. If we decide to avoid the work of removing the Apache 2.whatever that RedHa

[PHP] Sessions and Shopping Cart

2004-12-01 Thread R. Van Tassel
I am programming a site using sessions and a shopping cart and was wondering if someone could point me to some good tutorials online about using sessions and a shopping cart. I have books and can read through both (and am) but want some good *practical* and *functional* examples. Thanks in adva

Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
I have put this in my sudoers file using visudo to edit it: www ALL = NOPASSWD: /usr/local/bin/sudo puser, (puser) NOPASSWD: /usr/bin/ssh /usr/bin/id However the www user is still being asked for a password. Is this too off topic for this list? Jonathan "Jonathan Duncan" <[EMAIL PROTECTED]>

[PHP] Apache 2 on RedHat

2004-12-01 Thread Bart Baenisch
Hi - I believe I understand the thread unsafeness problem, and I think a reasonable cure is the prefork MPM for Apache 2, as RedHat distributes. If we decide to avoid the work of removing the Apache 2.whatever that RedHat distributes and building our own Apache 1.3.3whatever, are there an

Re: [PHP] Date Manipulation

2004-12-01 Thread Christopher Weaver
Sorry about that. Works great with date. Thanks. "Matthew Weier O'Phinney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >* Christopher Weaver <[EMAIL PROTECTED]>: >> This code: >> >> echo strtotime("now"); >> echo mktime("Ymd", strtotime("now")); >> >> is producing this result:

Re: [PHP] Go Back Problem

2004-12-01 Thread Thomas Goyne
On Thu, 2 Dec 2004 09:58:46 +0800, Cyrus <[EMAIL PROTECTED]> wrote: Dear All, I have a problem of back to the previous page in php. I need to create a form let people to fill in .It can let user to preview the form, if information is not correct , user can back to previous page and corre

Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Jonathan Duncan
Perhaps this gets more into server administration, but it is mixed so much into the php script, which is why I am asking it here. Yes, sudo was one of my first thoughts. As far as the implementation goes though. How do you work the remote access bit? Using ssh do you use the ssl cert switch

Re: [PHP] PHP mail redirect ??

2004-12-01 Thread Michael Gale
I am using bogofilter and it works well ... so far. Postfix is taking care of the redirection with regards to redirecting spam mail to the virtual account. What I need now is a way for the user to say ... wait this is not spam, redirect / forward back to my Inbox. The web interface provides a d

RE: [PHP] php extension problem

2004-12-01 Thread Zareef Ahmed
>Hi folks, >well, I hope you can help me out. I have a Windows XP machine running >Apache 2.x and Php 5.x. So far, everything works fine. I have placed >the php5ts.dll file in my System32 directory, kopied the php.ini file >in the Windows root directory and loaded the apache module for php5. So

RE: [PHP] PHP mail redirect ??

2004-12-01 Thread Vail, Warren
OK, now we are getting somewhere. On my machines, this is referred to as an email forwarder and yes SMTP handles it, however, I am not sure how you are handling your spam detection. On my servers I use "spam assassin" and it's detection is not fool proof. If people send images in their email wit

Re: [PHP] PHP mail redirect ??

2004-12-01 Thread Michael Gale
Hello, There is another smtp server ... I should of provided more info ... I set up a postfix server to do the following: 1. Receives mail from outside ... if it is NOT spam 2. Virus scanned and then forward to exchange if it IS SPAM 2. Sent to a virtual type mail box and virus scanned. Thi

Re: [PHP] Organisation of classes

2004-12-01 Thread Greg Donald
On Wed, 01 Dec 2004 22:41:14 -0500, Robert Cummings <[EMAIL PROTECTED]> wrote: > I thought it was Smalltalk. But then I prefer PHP for it's similarities > to C even if I do write 99% of my code into classes. Could be.. I never wrote any Smalltalk so I wouldn't know. -- Greg Donald Zend Certifi

Re: [PHP] Organisation of classes

2004-12-01 Thread Robert Cummings
On Wed, 2004-12-01 at 22:31, Greg Donald wrote: > On Wed, 01 Dec 2004 21:59:25 -0500, Robert Cummings > <[EMAIL PROTECTED]> wrote: > > PHP is plenty well developed, but PHP != Java and nor would most want it > > to be. Java *ACK PTHEEWY*. > > I see alot of Java influence in PHP5 myself. I thought

RE: [PHP] PHP mail redirect ??

2004-12-01 Thread Vail, Warren
> But I want a redirect button so I could send the exact same > message to > the same user and from the same person just but to another > mail box on a > different machine. Not sure I've ever hear the term "redirect" used in reference to email. Understand that email cannot be received on just

Re: [PHP] Organisation of classes

2004-12-01 Thread Greg Donald
On Thu, 2 Dec 2004 09:53:41 +0700, Peter Lauri <[EMAIL PROTECTED]> wrote: > As an "old" java programmer I feel that PHP is not that well deveolped. Was > hoping that it would be some sort of library system that could be used for > classes. Package? pear.php.net has lots of classes. And if you rea

Re: [PHP] Organisation of classes

2004-12-01 Thread Greg Donald
On Wed, 01 Dec 2004 21:59:25 -0500, Robert Cummings <[EMAIL PROTECTED]> wrote: > PHP is plenty well developed, but PHP != Java and nor would most want it > to be. Java *ACK PTHEEWY*. I see alot of Java influence in PHP5 myself. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ ht

[PHP] PHP mail redirect ??

2004-12-01 Thread Michael Gale
Hello, I have been playing around with a web mail app called NOCC (http://nocc.sourceforge.net/) It has some nice features and is quick. I want to add in a redirect button for mail, there is a forward button but it forwards mail just like a regular client for ... as expected. But I want a redi

RE: [PHP] Execution time?

2004-12-01 Thread Vail, Warren
Take a timestamp at the beginning or your script and at the end (subtract) and you have the execution time (reasonably precisely) plus or minus a few microseconds. http://www.php.net/manual/en/function.microtime.php Warren Vail > -Original Message- > From: Peter Lauri [mailto:[EMAIL PRO

Re: [PHP] Organisation of classes

2004-12-01 Thread Matthew Weier O'Phinney
* Peter Lauri <[EMAIL PROTECTED]>: > I have considered that, but I do not like that idéa :) I want php to > recognise what classes it needs to load. Have there been any improvment in > this area to PHP5? I use PHP4 for the moment, but will migrate to PHP5 soon. Yes. In PHP5, you can register an '_

[PHP] Execution time?

2004-12-01 Thread Peter Lauri
Best groupmember, How do I find the execution time for a php-script on a webserver? ms? -- - Best Of Times /Peter Lauri -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Organisation of classes

2004-12-01 Thread Robert Cummings
On Wed, 2004-12-01 at 21:53, Peter Lauri wrote: > I have considered that, but I do not like that idéa :) I want php to > recognise what classes it needs to load. Have there been any improvment in > this area to PHP5? I use PHP4 for the moment, but will migrate to PHP5 soon. > > As an "old" java pr

Re: [PHP] Organisation of classes

2004-12-01 Thread Peter Lauri
I have considered that, but I do not like that idéa :) I want php to recognise what classes it needs to load. Have there been any improvment in this area to PHP5? I use PHP4 for the moment, but will migrate to PHP5 soon. As an "old" java programmer I feel that PHP is not that well deveolped. Was h

Re: [PHP] Organisation of classes

2004-12-01 Thread John Holmes
Peter Lauri wrote: For the moment I have all my classes saved in a file called classes.php in a subdirectory /classes/. I have started to get to many classes in the same file. In java I do this the default way, just naming them myclass.class. Is there a similar way to do this so that I do not need

[PHP] Organisation of classes

2004-12-01 Thread Peter Lauri
Best groupmember, For the moment I have all my classes saved in a file called classes.php in a subdirectory /classes/. I have started to get to many classes in the same file. In java I do this the default way, just naming them myclass.class. Is there a similar way to do this so that I do not need

RE: [PHP] Go Back Problem

2004-12-01 Thread Vail, Warren
If your php form is entered via a post, my experience is that most browsers do not save post information, therefore, clicking "back" to a page that was entered via a form using the post method, the browser complains that it does not have enough information to display the form, and that you must ret

Re: [PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 17:57:28 -0700, news.php.net <[EMAIL PROTECTED]> wrote: > Anyone else doing or done something like this? I use sudo when my web server needs temporary elevated permissions. -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General

Re: [PHP] Go Back Problem

2004-12-01 Thread Greg Donald
On Thu, 2 Dec 2004 09:58:46 +0800, Cyrus <[EMAIL PROTECTED]> wrote: > Dear All, > > I have a problem of back to the previous page in php. > I need to create a form let people to fill in .It can let user to preview the > form, if information is not correct , user can back to previous page and

Re: [PHP] Sessions

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 16:01:07 -0600, Gary Reimer <[EMAIL PROTECTED]> wrote: > Could someone tell me how to control the life span of a session? I > understand that a session can last for the time a browser is running or > something less. It seems like the sessions on my website have a finite > life sp

[PHP] Go Back Problem

2004-12-01 Thread Cyrus
Dear All, I have a problem of back to the previous page in php. I need to create a form let people to fill in .It can let user to preview the form, if information is not correct , user can back to previous page and correct it, I have used the javascript : OnClick='history.go(-1)' and O

Re: [PHP] Date Manipulation

2004-12-01 Thread Matthew Weier O'Phinney
* Christopher Weaver <[EMAIL PROTECTED]>: > This code: > > echo strtotime("now"); > echo mktime("Ymd", strtotime("now")); > > is producing this result: > > 1101945775 > Warning: mktime(): Windows does not support negative values for this > function ... > -1 > > What am I doing wrong? Using the w

RE: [PHP] Spawning new pages

2004-12-01 Thread Chris W. Parker
Christopher Weaver on Wednesday, December 01, 2004 3:58 PM said: >> Of all the correct answers that you received you had to pick and use >> the wrong answer! > > What?! I only see one answer, Brent Clements. How is it that I > could miss some of the messages? I'm

[PHP] Page that checks if a user exists on a remote system

2004-12-01 Thread news.php.net
I have two servers: ServerA and ServerB. One server serves web pages, the other serves mail. I am making a web page on ServerA that will access ServerB to find out if a users exists and if not then add that user to ServerB with information collected from the web page on ServerA. I have this i

Re: [PHP] Date Manipulation

2004-12-01 Thread Christopher Weaver
This code: echo strtotime("now"); echo mktime("Ymd", strtotime("now")); is producing this result: 1101945775 Warning: mktime(): Windows does not support negative values for this function ... -1 What am I doing wrong? Thanks again. "John Holmes" <[EMAIL PROTECTED]> wrote in message news:[EM

Re: [PHP] Spawning new pages

2004-12-01 Thread Christopher Weaver
> Of all the correct answers that you received you had to pick and use the > wrong > answer! What?! I only see one answer, Brent Clements. How is it that I could miss some of the messages? I'm reading these through MS Outlook Express with 'Show All Messages' selected. Anyway, is there any w

Re: [PHP] Upload is not working ( Permission Problem), I tried a number of ways , still no success!!!!!

2004-12-01 Thread Michael Leung
Hi Scott, Thank you for your help, but I have tried to user chown -r apache:apache upload_files. this is not working. yours, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Browsing while downloading?

2004-12-01 Thread adrian zaharia
Hi, Thanks for reply, yet: 1. i know has nothing to do with php but since now i am doing it in php i thought would be a good solution to post here 2. bad browser? hmm... i tried: IE, Mozilla&Firefox (Win+Linux), Opera(Win+Linux), Konqueror maybe there is still one better out there :P Thanks

[PHP] Re: Browsing while downloading?

2004-12-01 Thread M. Sokolewicz
Adrian Zaharia wrote: Hello, I have this problem and maybe smbdy can give me a hint. I have a script which has to pack some server files into a tar created on the fly and then output this archive to the browser via headers. All is grea, the download works BUT, i am speaking of big archives, over 50

[PHP] Browsing while downloading?

2004-12-01 Thread adrian zaharia
Hello, I have this problem and maybe smbdy can give me a hint. I have a script which has to pack some server files into a tar created on the fly and then output this archive to the browser via headers. All is grea, the download works BUT, i am speaking of big archives, over 50M and i noticed tha

Re: [PHP] Re: How to tell if the filepath exist or not before

2004-12-01 Thread M. Sokolewicz
John Nichel wrote: Richard Lynch wrote: Be kinda like isset() issuing a NOTICE for a variable that's not set. Well, duh. That's why I asked. :-) isset() doesn't issue a notice...at least not in php 4.3.9. It just returns true or false. it did for a while in PHP 5.1, for about a day, before it

Re: [PHP] Custom Open Tags

2004-12-01 Thread M. Sokolewicz
Greg Donald wrote: You could always patch zend_language_scanner.c and add your own custom tags. Isn't open source great? :) I think patching zend_language_scanner.l would be easier actually ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Custom Open Tags

2004-12-01 Thread Greg Donald
You could always patch zend_language_scanner.c and add your own custom tags. Isn't open source great? :) -- Greg Donald Zend Certified Engineer http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Custom Open Tags

2004-12-01 Thread M. Sokolewicz
you could edit the parser rules manually, recompile PHP and it should work Sven Schwyn wrote: Hi Trevor I'm not sure, but that may allow you to use AND <% %> tags at the same time. Thought about that, it would actually be very elegant – if it was the other way round. ASP tags would be great inst

[PHP] Sessions

2004-12-01 Thread Gary Reimer
Hello everyone; Could someone tell me how to control the life span of a session? I understand that a session can last for the time a browser is running or something less. It seems like the sessions on my website have a finite life span and I would like to be able to control it. Thanks in advanc

Re: [PHP] Custom Open Tags

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 22:16:25 +0100, Sven Schwyn <[EMAIL PROTECTED]> wrote: > Does anybody know whether there's a way to tell PHP to accept an > alternative open tag like for instance normal http://gdconsultants.com/ http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Custom Open Tags

2004-12-01 Thread Sven Schwyn
Hi Trevor I'm not sure, but that may allow you to use AND <% %> tags at the same time. Thought about that, it would actually be very elegant – if it was the other way round. ASP tags would be great instead of a custom tag, however, that won't do the trick as the execution of the tags can't be

Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread John Nichel
Richard Lynch wrote: Be kinda like isset() issuing a NOTICE for a variable that's not set. Well, duh. That's why I asked. :-) isset() doesn't issue a notice...at least not in php 4.3.9. It just returns true or false. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP

Re: [PHP] Custom Open Tags

2004-12-01 Thread Richard Lynch
Sven Schwyn wrote: > Hi folks > > Does anybody know whether there's a way to tell PHP to accept an > alternative open tag like for instance normal > I'm looking for a way to have two kinds of PHP code in a page. The > first kind tagged contains the PHP code to manage page > elements (like includ

RE: [PHP] Header's download

2004-12-01 Thread Christian Johansson
Hello Richard. I totally agree with you. And I have tried to comment this to my employer. But as a consultant, my short stay has one purpose. Make it work, and then leave us alone. We have employees who keep track of the spaghetti :-) This is a very good example, how not to design systems.. I wi

RE: [PHP] Custom Open Tags

2004-12-01 Thread Gryffyn, Trevor
I think there's a way to redefine what tag PHP uses, but I think it globally resets it. I don't think you can say "use and also use ". I think that setting is in PHP.INI somewhere. It might be easier to change your "to be executed later" php tags to something else and before it's sent to it's f

Re: [PHP] [PHP-WIN] filectime problems

2004-12-01 Thread Richard Lynch
Kevin Glick wrote: > I'm running PHP 5.0.2 on IIS 6/Windows Server 2003. Below is a snippet of > the code from a script that looks into the "news" directory for files > ending > in .txt. After it finds the files, I want to get the creation time of > each > file. The script finds all the files (i

Re: [PHP] classes and variable scope

2004-12-01 Thread Richard Lynch
Josh Howe wrote: > > Hi all, > > If I have the following code: > > $some_global_variable; > > Class foo { > > Function test() { > set_global(); > echo $some_global_variable; > } > > Function set_global () { > $some_global_variable = "abcd"; > echo $some_g

Re: [PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread Richard Lynch
Scott Fletcher wrote: > Never mind that.. I found a different way to use it. It would be so cool > if there is such a feature as directory_exists() to check for partical > filepath... http://php.net/file_exists You'll need to use @ in front, because it generates an error message when it doesn't

Re: [PHP] transparant session propagation and headers

2004-12-01 Thread Richard Lynch
Bas Kamer wrote: > > On Dec 1, 2004, at 21:17, Richard Lynch wrote: > >>> If a client doen't accept cookies and transparant session propagation >>> is enabled, links are changed to include the SID. But this is not the >>> case while redirecting clients. This results in session loss unless >>> you >

[PHP] Custom Open Tags

2004-12-01 Thread Sven Schwyn
Hi folks Does anybody know whether there's a way to tell PHP to accept an alternative open tag like for instance I'm looking for a way to have two kinds of PHP code in a page. The first kind tagged contains the PHP code to manage page elements (like includes, menus etc) while the second kind

Re: [PHP] imagesx(): supplied argument is not a valid Image resource (CODE)

2004-12-01 Thread Richard Lynch
Robert Sossomon wrote: > Chris is quoted as saying on 11/30/2004 2:53 PM: >> imagesx() requires an image resource , not a file path. so you'd need >> to use one of the imagecreatefrom* functions to create the resource. >> >> But it looks like all you want is the width and height of an image >

Re: [PHP] echo

2004-12-01 Thread Richard Lynch
Christopher Weaver wrote: > I can't get this code, pasted from the documentation, to work properly. > The > new lines don't occur where they should. You may also want to check out: http://php.net/nl2br if you were trying to get newlines in your HTML. Another option is to consider the HTML PRE tag

Re: [PHP] Header's download

2004-12-01 Thread Richard Lynch
Christian Johansson wrote: > Header("Content-Type: application/download"); > Header("Content-Disposition: attachment; filename=export.txt"); > > Then after this is done I know that I can write stuff to the file like > this: > > Echo "This will be a line in my file\n"; > > I am standing in a GUI con

Re: [PHP] echo string with question mark in it

2004-12-01 Thread Richard Lynch
Brent Clements wrote: > I have the following string variable > > $string = 'test.php?id=' . $id; > > but when I echo out the string it looks like this > > test.php? > id=# > > ### is the $id variable value btw. > > How do I make the ? part of the string instead of php evaluating that >

RE: [PHP] Date Manipulation

2004-12-01 Thread Gryffyn, Trevor
As was already mentioned, mktime() and strtotime() both return a serial date. I use mktime() a lot to add/subtract days and such. It automatically compensates for leap days and all that. Example: This should output "2/1/2004" (unless I made a typo). The initial 0,0,0 are the hour, minute, se

Re: [PHP] Upload is not working ( Permission Problem), I tried a number of ways , still no success!!!!!

2004-12-01 Thread Richard Lynch
>> Hi all, >>I am still solving my upload script problems. >> Here is the error Msg: >> "Warning: copy(/var/www/html/upload_files/Default.bk1) >> [function.copy]: failed to open stream: Permission denied in >> /var/www/html/simple_upload.php on line 77" >> >> My Upload Code: >> $result = move

Re: [PHP] Redirect after download

2004-12-01 Thread Richard Lynch
Justin England wrote: > I am writing a file download system and I need to be able to do a > redirect after the download is finished. The Redirect is sent as a header, before your download content. The browser is free to act on that Redirect header and IGNORE the file download content as soon as i

Re: [PHP] uploading 'large' files (e.g. 6MB) -> tmp_name is empty?..

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 12:32:07 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > Note that you also get slightly/subtly different results between: > > Successful file upload. > File too large (or too many) from php.ini settings. > User canceled upload. > User did not fill in upload box before

Re: [PHP] uploading 'large' files (e.g. 6MB) -> tmp_name is empty?..

2004-12-01 Thread Richard Lynch
Nico Veenman wrote: > Hi, > > When uploading 'large' files of (for example 6MB) I have a problem that > after uploading to the tmp folder on the server (so when the php script is > called), the tmp_name in the FILES global is empty. So this means I can't > do > a move uploaded file because I don't

Re: [PHP] Exec() command on UNIX

2004-12-01 Thread Richard Lynch
Sitthipong Thuetham wrote: > I have a question on an exec() command, if I would like to switch user > right on Unix server, what command should I use? > > example: on the UNIX shell will be like below > $su root > Password:'password' > > but when I tried running exec() command on PHP, I couldn't do

Re: [PHP] ScreenHeight?

2004-12-01 Thread John Nichel
Wiberg wrote: Hi Is there any way of getting the clients screenheight in PHP? (or do I have to do it in Javascript) PHP is serverside. JavaScript is your answer. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] transparant session propagation and headers

2004-12-01 Thread Richard Lynch
> If a client doen't accept cookies and transparant session propagation > is enabled, links are changed to include the SID. But this is not the > case while redirecting clients. This results in session loss unless you > manually add the session id to the redirect url. Not really > transparant... >

[PHP] Re: How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread Scott Fletcher
Never mind that.. I found a different way to use it. It would be so cool if there is such a feature as directory_exists() to check for partical filepath... Scott "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm wondering how to tell if the filepath exist or not

Re: [PHP] constructing class

2004-12-01 Thread Richard Lynch
Lorderon wrote: > I want to create an instance of a class and construct it with different > params. The class name is a variable and the params change in each class. > Is > there a way to pass params to the constructor of a class like you pass > params in the function call_user_func_array() ? PHP

[PHP] classes and variable scope

2004-12-01 Thread Josh Howe
Hi all, If I have the following code: $some_global_variable; Class foo { Function test() { set_global(); echo $some_global_variable; } Function set_global () { $some_global_variable = "abcd"; echo $some_global_variable; } } The first echo state

Re: [PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Richard Lynch
Robinson, Matthew wrote: > I've kind of solved this question already using recursion but I > recon (in the grand tradition) that someone has a better solution! Recursion and http://php.net/is_array is probably the most clear-cut solution. If you are concerned that the arrays could become *S

[PHP] [PHP-WIN] filectime problems

2004-12-01 Thread Kevin Glick
I'm running PHP 5.0.2 on IIS 6/Windows Server 2003. Below is a snippet of the code from a script that looks into the "news" directory for files ending in .txt. After it finds the files, I want to get the creation time of each file. The script finds all the files (in this case "blah.txt", but fil

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Richard Lynch
Robert Sossomon wrote: > Parse error: parse error, expecting `']'' in file.php First, some minor nits with other posters :-) 1. While it's true that integer and string keys are handled differently in some cases, it has absolutely no bearing when the array reference is buried in a string. 2. The

Re: [PHP] Errors

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 11:51:33 -0800 (PST), Richard Lynch <[EMAIL PROTECTED]> wrote: > That's Geek for "you typed something so wrong, I don't even know what > you're trying to do" Man.. they let just about anyone post to php-general lately. :) How you doing Richard? -- Greg Donald Zend Certifi

Re: [PHP] Errors

2004-12-01 Thread Richard Lynch
olsofty wrote: > I am very new to PHP been working on a script to access MySql have got it > down pretty good, but, being lazy I like to copy code to not have to > re-write it, I am now getting a constant flood of errors. I have looked in > my book I have searched on the php site and have had no lu

Re: [PHP] Upload is not working ( Permission Problem), I tried a number of ways , still no success!!!!!

2004-12-01 Thread Scott Fletcher
The directory folder where you upload the file(s) and folder(s) inito must have the ownership of Apache and the permission of 755. Then you'll have no trouble uploading file(s)/folder(s) into it since Apache would have the permission to create the file(s)/folder(s) where none exist or update them

Re: [PHP] protecting class/include files

2004-12-01 Thread Richard Lynch
Stefan Klopp wrote: > show_source or an fopen of the include files and steal our source code. I > have looked around at a few of the encoders on the market and was > wondering > if that was my only option? Am I missing something simply with permissions > or what not that would prevent users from vi

[PHP] How to tell if the filepath exist or not before attempting to create a directory??

2004-12-01 Thread Scott Fletcher
I'm wondering how to tell if the filepath exist or not, that way, I don't create the directory if the filepath exist. I thought that the is_dir() is the way to go but found that it is not reliable. Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://ww

Re: [PHP] ScreenHeight?

2004-12-01 Thread Larry E . Ullman
Is there any way of getting the clients screenheight in PHP? (or do I have to do it in Javascript) You have to do it with JavaScript. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] ScreenHeight?

2004-12-01 Thread Wiberg
Hi Is there any way of getting the clients screenheight in PHP? (or do I have to do it in Javascript) /Gustav Wiberg @varupiraten.se --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.802 / Virus Database: 545 - Release Date: 2004-11

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Matthew Sims
> Parse error: parse error, expecting `']'' in file.php > > I've been working on this script, and can't see why it fails here, but I > have > another page that uses the same coding and it works correctly. > > OK, here's the code: > $cart1 = ""; > $cart1 = > "'$_POST[nutrition_program_assistant]','$

[PHP] protecting class/include files

2004-12-01 Thread Stefan Klopp
Hello All, I am looking for some advice on how to keep my class files protected. Here is the situation. We have a web system we have built that all of our clients use. Now each client has php files that include our classes. The classes are stored in a common folder. This folder is read accessible

RE: [PHP] Errors

2004-12-01 Thread Thomas S. Crum - AAA Web Solution, Inc.
Incorrect syntax. You likely have a set a variable and not ended it with ';' For example, $some_variable = "some_value"; is the proper syntax. Or, post the code as recommended. Best, Thomas S. Crum -Original Message- From: Greg Donald [mailto:[EMAIL PROTECTED] Sent: Wednesday, Decem

Re: [PHP] Errors

2004-12-01 Thread Jason Wong
On Thursday 02 December 2004 01:44, olsofty wrote: > I am very new to PHP been working on a script to access MySql have got it > down pretty good, but, being lazy I like to copy code to not have to > re-write it, I am now getting a constant flood of errors. I have looked in > my book I have searche

Re: [PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Jason Wong
On Thursday 02 December 2004 01:31, Robinson, Matthew wrote: > lol, perhaps embedded a bit too deep in my pre-amble. My question is > simply what's a good way to reference a given array entry when you don't > know where it is or how deep the array is. I can do a multi dimensional > array search and

Re: [PHP] Errors

2004-12-01 Thread M. Sokolewicz
Greg Donald wrote: On Wed, 1 Dec 2004 10:44:00 -0700, olsofty <[EMAIL PROTECTED]> wrote: I am very new to PHP been working on a script to access MySql have got it down pretty good, but, being lazy I like to copy code to not have to re-write it, I am now getting a constant flood of errors. I have lo

Re: [PHP] Errors

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 10:44:00 -0700, olsofty <[EMAIL PROTECTED]> wrote: > I am very new to PHP been working on a script to access MySql have got it > down pretty good, but, being lazy I like to copy code to not have to > re-write it, I am now getting a constant flood of errors. I have looked in > my

Re: [PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Thomas Munz
> Parse error: parse error, expecting `']'' in file.php > > I've been working on this script, and can't see why it fails here, but I > have another page that uses the same coding and it works correctly. > > OK, here's the code: > $cart1 = ""; > $cart1 = > "'$_POST[nutrition_program_assistant]','$_P

[PHP] Errors

2004-12-01 Thread olsofty
I am very new to PHP been working on a script to access MySql have got it down pretty good, but, being lazy I like to copy code to not have to re-write it, I am now getting a constant flood of errors. I have looked in my book I have searched on the php site and have had no luck. WHAT IN THE HECK IS

RE: [PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Robinson, Matthew
lol, perhaps embedded a bit too deep in my pre-amble. My question is simply what's a good way to reference a given array entry when you don't know where it is or how deep the array is. I can do a multi dimensional array search and return an array of keys to locate the item, I then want to use that

[PHP] Parse error: parse error, expecting `']'' in

2004-12-01 Thread Robert Sossomon
Parse error: parse error, expecting `']'' in file.php I've been working on this script, and can't see why it fails here, but I have another page that uses the same coding and it works correctly. OK, here's the code: $cart1 = ""; $cart1 = "'$_POST[nutrition_program_assistant]','$_POST[County]','$

Re: [PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 17:14:56 -, Robinson, Matthew <[EMAIL PROTECTED]> wrote: > I've kind of solved this question already using recursion but I > recon (in the grand tradition) that someone has a better solution! Recursion and is_array() is the way I'd parse through it. -- Greg Donald

Re: [PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Jason Wong
On Thursday 02 December 2004 01:14, Robinson, Matthew wrote: > I've kind of solved this question already using recursion but I > recon (in the grand tradition) that someone has a better solution! > > I have an multi dimensional array that is of variable depth, a snippet > is shown below. The probl

[PHP] Referencing Multi Dimensional Arrays

2004-12-01 Thread Robinson, Matthew
Hi, I've kind of solved this question already using recursion but I recon (in the grand tradition) that someone has a better solution! I have an multi dimensional array that is of variable depth, a snippet is shown below. The problem is that I don't know how deep the array goes as any entr

[PHP] constructing class

2004-12-01 Thread Lorderon
Hi, I want to create an instance of a class and construct it with different params. The class name is a variable and the params change in each class. Is there a way to pass params to the constructor of a class like you pass params in the function call_user_func_array() ? BTW, there's a solution

[PHP] Re: constructing class

2004-12-01 Thread Matthew Weier O'Phinney
* Lorderon <[EMAIL PROTECTED]>: > I want to create an instance of a class and construct it with different > params. The class name is a variable and the params change in each class. Is > there a way to pass params to the constructor of a class like you pass > params in the function call_user_func_a

[PHP] constructing class

2004-12-01 Thread Lorderon
Hi, I want to create an instance of a class and construct it with different params. The class name is a variable and the params change in each class. Is there a way to pass params to the constructor of a class like you pass params in the function call_user_func_array() ? BTW, there's a solution

Re: [PHP] Exec() command on UNIX

2004-12-01 Thread Greg Donald
On Wed, 1 Dec 2004 16:18:01 +0700, Sitthipong Thuetham <[EMAIL PROTECTED]> wrote: > Dear PHP support, > > I have a question on an exec() command, if I would like to switch user right > on Unix server, what command should I use? > > example: on the UNIX shell will be like below > $su root > Pass

[PHP] transparant session propagation and headers

2004-12-01 Thread B . Kamer
hi all, If a client doen't accept cookies and transparant session propagation is enabled, links are changed to include the SID. But this is not the case while redirecting clients. This results in session loss unless you manually add the session id to the redirect url. Not really transparant...

Re: [PHP] Software patents

2004-12-01 Thread Gareth Williams
No On 1 Dec 2004, at 15:37, abrea wrote: Will the adoption and legalization of software patents actually threaten the activity of PHP software developers? I see some people quite worried about this, e.g. at http://www.knoppix.org and http://swpat.ffii.org/index.en.html Alberto Brea -- PHP General

  1   2   >