[PHP] SNMP MIB selection under php4
Hello all, I was wondering if there is any way to tell PHP4 to load a specific MIB file? PHP5 has a snmp_read_mib(), but php4 lacks this function. Any help would be apreciated. Thanks, Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Slightly 0T - Smarty problem
Hello, I have been asked to add a "pagination" to one page as the data gets updated to one extra row around every 10-35 seconds. Thats no problem for me as I am used to the pagination concept and have done it before...but never in smarty. I usually did it using classes from phpclasses, I have the classes ready but no ideo how to "intergrate" them into the page/script/template. Problem is, I am working on a project that another developer left, this is my first hurdle, I am learning the basics of Smarty via the crash course at http://smarty.php.net/crashcourse.php but any advise/examples would be appreciated. Please tell me if you want me to send you the page code/template or anything else. Thanks in advance. Mag = -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Fetch & Process
> Zoran wrote: > > >Hi > > > >How can I parse HTML page which I fetched by PHP so some part of text would be replaced by other text. > > > > > As ucfirst(jim) has pointed out strip_tags is a good first step. However I have > always believed that the best language for parsing html is perl and not > PHP that's because there is a perl module (name HTMLParse) available > from CPAN that behaves somewhat like the sax parse api in PHP. > Perl ???!! a not perl! :-( I'm tagging this one OT! :-) Jim Grill > -- > Raditha Dissanayake. > > http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload > Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader > Graphical User Inteface. Just 128 KB | with progress bar. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Fetch & Process
Zoran wrote: Hi How can I parse HTML page which I fetched by PHP so some part of text would be replaced by other text. As jim has pointed out strip_tags is a good first step. However I have always believed that the best language for parsing html is perl and not PHP that's because there is a perl module (name HTMLParse) available from CPAN that behaves somewhat like the sax parse api in PHP. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is it possible using php ?
T UmaShankari wrote: A user on the client side types the URL of a mpeg file on the location bar. The same file is also existing in $DIR of the client (windows) system. Now, since the file is already there on the local hard disk of the client, the file need not be downloaded through the PPP link, instead be played from the local disk - which makes faster access ! Since your webserver does not know what files exist in the client's hard disk this is impossible for a php script to do. What you are looking for is probably some kind of plug in for your browser. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: uppercase sentences
On Friday 03 September 2004 11:16 pm, Chris Martin wrote: > Justin French wrote: > > Hi all, > > > > I'm working with a bunch of users who hardly ever use correct > > punctuation in their submitted content. I realise there's very little I > > can do, but I'm trying to do *something* to make things a little more > > presentable. At the very least, ensuring that all "sentences" begin > > with a capital letter (english) would be a great start. > > > > Has any one come across a library of "punctuation cleaners" or something > > like that? > > > > --- > > Justin French > > http://indent.com.au > > Check out the many wonderful string functions at > http://php.net/strings > > In particular, for all uppercase, you'll probably find 'strtolower()' > helpful. And, as Jim mentioned, ucfirst() will capitalize the first letter. > > There's a bunch more that can help you control what they're sending you. > (Isn't it amazing what people will enter in a form??) > > -- > Chris Martin > Web Developer > Open Source & Web Standards Advocate > http://www.chriscodes.com/ Hi Justin, To add to what Chris mentioned, I always include this little snippet: if (ereg("([A-Z][A-Z][A-Z][A-Z])", $_POST['request'])) { print "PLEASE SET 'CAPS LOCK' TO OFF Then click 'Back' on your browser, and re-enter information."; } [I make the assumption that any word with three or more capitals deserves this message.] Amazing how many people forget to add a space after a period, capitalize proper names, etc. I have a whole mess of little functions that clean up the glaring errors. However, in the long run, I've decided to let the less-glaring stuff through, but clean up the major ones. Just my pence worth Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP to replace javascript
Mark wrote: --- Jack Gates <[EMAIL PROTECTED]> wrote: Greetings, This is my first post here and I am still new to PHP and learning. I just joined this list last night. Javascript can open a separate and specifically sized window from a web page when a user clicks on a link that might reference a note or picture etc. Can this be done with PHP? If yes, will someone tell me where in the manual on the php.net site I can find the information to learn how to do this? I have been looking through the manual on the site but without knowing the name or names of what I am looking for it is real hard to find it. Since PHP is a server-side language, it can't really tell the browser to do anything. However you can generate javascript from your PHP code (if necessary) to open (and close) browser windows. Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** Mark is right, this can be very useful. Especially if, say you have multiple images at different sizes that you're opening in a pop up, and you want each window to fit the image perfectly. You could then use PHP to get the size of the image, to then dynamically insert into the JavaScript. Congrats on RTFM!! It seems daunting at first, but as you learn more, it will become your friend. -- Chris Martin Web Developer Open Source & Web Standards Advocate http://www.chriscodes.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: uppercase sentences
Justin French wrote: Hi all, I'm working with a bunch of users who hardly ever use correct punctuation in their submitted content. I realise there's very little I can do, but I'm trying to do *something* to make things a little more presentable. At the very least, ensuring that all "sentences" begin with a capital letter (english) would be a great start. Has any one come across a library of "punctuation cleaners" or something like that? --- Justin French http://indent.com.au Check out the many wonderful string functions at http://php.net/strings In particular, for all uppercase, you'll probably find 'strtolower()' helpful. And, as Jim mentioned, ucfirst() will capitalize the first letter. There's a bunch more that can help you control what they're sending you. (Isn't it amazing what people will enter in a form??) -- Chris Martin Web Developer Open Source & Web Standards Advocate http://www.chriscodes.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Is it possible using php ?
A server and client are connected using a 35kbps PPP link. A user on the client side types the URL of a mpeg file on the location bar. The same file is also existing in $DIR of the client (windows) system. Now, since the file is already there on the local hard disk of the client, the file need not be downloaded through the PPP link, instead be played from the local disk - which makes faster access ! It is something like this: if file available locally, then use that file else send the file present in the location as given by the URL Is there a way to do this from the server side using php. Or using any other tool, can we do it on the client side - that is, say, some program always runs in the background and whenever a URL is entered, the $DIR is checked to see if the file is present else it is retrieved from the location. All this should be transparent to the user. Can anyone help me please ? Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] bcompiler
* Thus wrote Werthmann, Stefan: > Helo! > > I' m just in trouble with bcompiler. > I want to compile a new bcompiler.so and this is the result: > Any suggestions? > > /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2336: error: `zend_uchar' > undeclared (first use in this function) you might want to contact lammp, or xammp as they call themselves now. This is a very awkward path being used. btw.. the 500 lines weren't necessary, in the future simply provide the beginning and ending. btw2.. please dont cross post. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Win32 can't get PEAR to work
Using win32, Win2k. PHP 4.3.6 Tried installing PEAR. But "pear" is an unknown command after the install in my DOS box. There's no "pear.bat" file anywhere. There's an "pear.bat_old" file but no "pear.bat". Thought I installed PEAR according to the instructions by running "go-pear.bat", it was included w/php afaik. IMO PEAR should be innstalled automatically when PHP installs, but they don't do that for some reason. It should be bundled with PHP and installed by default IMO. Anyway, can anyone help me get PEAR working? I don't know where to start looking for the problem. Thanks please email me cc if possible. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Correct headers for I.E. to open PDF?
* Thus wrote Paul Danko: > > What should the headers be for a client to download a PDF document and > have it open using adobe i.e. pluggin?? > > Here is code I am using, it works on some versions of I.E., but not all: > > > $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; > > $filesize = filesize($pdfdoc); > header("Pragma: "); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); > header("Content-type: application/pdf"); This can be difiult to control sometimes. You could send a header like so: header("Content-Type: application/octet-stream"); Will generally do the trick. There are times when i've seen IE behave in very wierd, no matter the content-type, for example, accessing a url like: http://domain.com/a/file.php?param=1&bar=.jpg IE may attempt to display the thing in the browser because it saw the .jpg extension, even though I sent a headers that should have prompted a download. IE has gotten better but it still all depends on how the person has their computer set up to handle content types (IE tries to be too smart sometimes.) Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I get the fileversion?
* Thus wrote M. Sokolewicz: > Pedro irán méndez pérez wrote: > >Thank you for your help, My question is: > > > >How can I know the version of a file, I mean, in Windows if you press click > >with the mouse right button you can see the file properties, > that is correct > in those > >properties you can see the version. > you can? I can't find any mention of a "version", I can see: > filename > type of file > opens with > location > size > size on disk > created > modified > accessed > attributes It depends on the file and how it was created, many .exe's and most .dll's have that information compiled in them. Its a header that is attached (you'll end up with a 'Version' tab if it is compiled in.) As far as I know there isn't any default way to obtain this information in windows. A dos tool would be needed that can be exec'd in a shell, or read the executable's header information manually. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
* Thus wrote Sam Hobbs: > "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >* Thus wrote Sam Hobbs: > >> It took me a while to find an explanation of what a PECL is. I kept > >> reading > >> comments about things being moved to a PECL but I saw nothing about what > >> is > >> in a PECL or how to get anything out of a (the?) PECL. As far as I knew, > >> there is a danger of all of PHP being in a PECL. > > > > There is documentation on the way for what to do with these PECL > > extension on how to install and upgrade them. > > > Perhaps you did not read everything I said, since there is more to what I > said than what you quoted, and in the other part of what I said, I did say > there is documentation as you say. Is that more or less muddy? I quoted the part of which i was responding to, to let you know that documentation is being worked on to clearify your questions. > > So in other words, yes, there is documentation. The point I was making is > that the documentation is not as easy to find as it could be. So the issue > is not about use of PECL as much as it is use of the PHP documentation to > find the PECL (documentation). Perhaps my little comment really didn't explain exactly what I meant. pecl.php.net is more geared for developers that wish to contribute to writing extensions. The documentation that is being worked on will explain what pecl is, how to install a pecl extension and of course the procedures to upgrade them. Which will be geared more towards the end user of the PECL extension vs the developer. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] DLL's in \php not found
I just installed PHP 5 and Apache 2 on Windows XP. The extensions ext/php_curl.dll and ext/php_mysql.dll cause this error when starting Apache: PHP Startup: Unable to load dynamic library 'D:/Program Files/Apache Group/PHP/ext/php_mysql.dll' - The specified procedure could not be found. These dll's require libmysql.dll and libeay32.dll and ssleay32.dll. For some reason they're not found in php's base directory (yes, I added it to PATH). So...I copied those dll's to \Windows (which PHP's docs don't recommend) and no more errors. Why aren't these DLL's found in PHP's base dir? ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole? OT
"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [snip] > black whole? > [/snip] > > As in, "Is PECL the wholeness of black?" or "Is PECL all that is black?" > > *snicker* It just struck me funny, but everyone knew that you meant > "black hole". I already replied to you, Jay, offline from the group. I would have replied here instead but it is taking me a while to become familiar with the occasional fragmentation of discussions in the newsgroup. However, yes, I meant "black hole"; such as the thing astronomers are surprised to find at the center of all galaxies, including ours. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Copying HTML from a document to another document
"Sam Hobbs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > foreach($ContentsDocument->childNodes as $Node) >$Cell->appendChild($Node); If there is not a different solution that should be used instead, then can anyone confirm this should work? In other words, does this appear to be a bug? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
> >> It took me a while to find an explanation of what a PECL is. I kept > >> reading > >> comments about things being moved to a PECL but I saw nothing about what > >> is > >> in a PECL or how to get anything out of a (the?) PECL. As far as I knew, > >> there is a danger of all of PHP being in a PECL. > > > > There is documentation on the way for what to do with these PECL > > extension on how to install and upgrade them. > > > Perhaps you did not read everything I said, since there is more to what I > said than what you quoted, and in the other part of what I said, I did say > there is documentation as you say. Is that more or less muddy? > > So in other words, yes, there is documentation. The point I was making is > that the documentation is not as easy to find as it could be. So the issue > is not about use of PECL as much as it is use of the PHP documentation to > find the PECL (documentation). All PECL extensions are or will be documented at php.net/manual/ but currently this is not the case, for several reasons, most notably lack of people to create said documentation. While the current state is less than ideal, don't think it's how it will continue to be nor how it's intended to be. And eventually links to this documentation will exist at pecl.php.net/{extname}, there is an open bug report on this. No, PECL is not a black hole, but it is a new hole looking to be filled. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Knowlegde Base
greetings i'm looking for good/free Knowledge Base/ FAQ system any recommendation ? -- http://www.jadmadi.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >* Thus wrote Sam Hobbs: >> It took me a while to find an explanation of what a PECL is. I kept >> reading >> comments about things being moved to a PECL but I saw nothing about what >> is >> in a PECL or how to get anything out of a (the?) PECL. As far as I knew, >> there is a danger of all of PHP being in a PECL. > > There is documentation on the way for what to do with these PECL > extension on how to install and upgrade them. Perhaps you did not read everything I said, since there is more to what I said than what you quoted, and in the other part of what I said, I did say there is documentation as you say. Is that more or less muddy? So in other words, yes, there is documentation. The point I was making is that the documentation is not as easy to find as it could be. So the issue is not about use of PECL as much as it is use of the PHP documentation to find the PECL (documentation). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how can I get the fileversion?
Pedro, Your question is difficult to answer because it is not specific enough. First I tried to identify what you meant by version number. I tried right clicking on the desktop, no version number. I opened windows explorer and tried right clicking on a file listed there, and got modification dates, but no version number. I opened an internet explorer and right clicked on a blank area of the page in the browser window, and properties there did not show me version number. Here is the difficulty, the interface most often used to respond to clicks is a GUI, and PHP doesn't have a GUI, unless you are considering GTK, which you didn't mention. Typical web based applications (like those programmed in PHP) use the web browser as it's GUI, and since PHP only responds to clicks as defined in HTML (not sure how you'd get right clicks). Your question asked about Windows and PHP and to get a good answer, you probably need to be more specific about each. Where in windows do you see your version number? Hope this helps, Warren Vail -Original Message- From: Pedro Irán Méndez Pérez [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 3:09 PM To: John Nichel Cc: Lista de Php-General Subject: RE: [PHP] how can I get the fileversion? Thank you for your help, My question is: How can I know the version of a file, I mean, in Windows if you press click with the mouse right button you can see the file properties, in those properties you can see the version. how can I see, the same thing in php? = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez -Mensaje original- De: John Nichel [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 03 de Septiembre de 2004 01:10 p.m. CC: [EMAIL PROTECTED] Asunto: Re: [PHP] how can I get the fileversion? Pedro Irán Méndez Pérez wrote: > Hello everybody, I am a new in this list, and I can´t find the form of read > from file his file version, I am working with php 4.3.2, Apache > 1.3.x, Win32 (XP). > > Can you help me?? > > PD. Sorry for my english, but I am Mexican :) > > = > "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del > hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" > > Isa 40:27 > = > > Atte Pedro Irán Méndez Pérez > Hi Pedro, Not that I don't want to help you, but with our language differences, I'm not sure I know what you're asking. On this page, there is a Spanish PHP Mailing list which may be of more help to you. Good luck! http://us4.php.net/mailing-lists.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I get the fileversion?
Pedro irán méndez pérez wrote: Thank you for your help, My question is: How can I know the version of a file, I mean, in Windows if you press click with the mouse right button you can see the file properties, that is correct in those properties you can see the version. you can? I can't find any mention of a "version", I can see: filename type of file opens with location size size on disk created modified accessed attributes which one of those are you refering to? how can I see, the same thing in php? = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez -Mensaje original- De: John Nichel [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 03 de Septiembre de 2004 01:10 p.m. CC: [EMAIL PROTECTED] Asunto: Re: [PHP] how can I get the fileversion? Pedro Irán Méndez Pérez wrote: Hello everybody, I am a new in this list, and I can´t find the form of read from file his file version, I am working with php 4.3.2, Apache 1.3.x, Win32 (XP). Can you help me?? PD. Sorry for my english, but I am Mexican :) = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez Hi Pedro, Not that I don't want to help you, but with our language differences, I'm not sure I know what you're asking. On this page, there is a Spanish PHP Mailing list which may be of more help to you. Good luck! http://us4.php.net/mailing-lists.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] how can I get the fileversion?
Thank you for your help, My question is: How can I know the version of a file, I mean, in Windows if you press click with the mouse right button you can see the file properties, in those properties you can see the version. how can I see, the same thing in php? = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez -Mensaje original- De: John Nichel [mailto:[EMAIL PROTECTED] Enviado el: Viernes, 03 de Septiembre de 2004 01:10 p.m. CC: [EMAIL PROTECTED] Asunto: Re: [PHP] how can I get the fileversion? Pedro Irán Méndez Pérez wrote: > Hello everybody, I am a new in this list, and I can´t find the form of read > from file his file version, I am working with php 4.3.2, Apache 1.3.x, > Win32 (XP). > > Can you help me?? > > PD. Sorry for my english, but I am Mexican :) > > = > "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo > de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" > > Isa 40:27 > = > > Atte Pedro Irán Méndez Pérez > Hi Pedro, Not that I don't want to help you, but with our language differences, I'm not sure I know what you're asking. On this page, there is a Spanish PHP Mailing list which may be of more help to you. Good luck! http://us4.php.net/mailing-lists.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] remote script execution
I've done a number of these and the choice depends on many things but perhaps the biggest factor is; Is server 1 and server 2 behind the same firewall or are they exposed to the internet? Behind a firewall you can probably get away with running any one of the following commands to remotely execute your script on server 2, from server 1; Rexec, rsh, rpc, just to name 3. The client part of the protocol is required on server 1 and the daemon part needs to be running on server 2. Across the open internet, be very careful here, I would think the choice would be ssh (secure shell). This has several nice features that could be useful internally as well. You start out by exchanging encryption keys between the two servers and because of this handshake, each server trusts the other in a way that the correct execution permissions can be established on server 2, and of course the data sent between the servers is encrypted rendering it virtually useless to third parties. Google for ssh for more info. Warren Vail -Original Message- From: Sean Smith [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: [PHP] remote script execution Scenario: Server 1 is a LAMP webserver Server 2 is an email server I have a php script on server 2 that creates user accounts. It works great when your logged into the server and running it from the CLI. I have a GUI on server 1 that is used to input user info into a database. Question: What I'd like to do is have server 1 call the script on server 2 and have server 2 return a variable back to server 1 to be displayed and ultimately entered into the database. If you understand my rambling above and have any insight into how to get this accomplished, it would be greatly appreciated. Thank you. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
John Nichel wrote: $output = array(); exec ( "locate whatever" $output ); And loop thru the $output array. It's all in the manual http://us4.php.net/manual/en/function.exec.php Oops, I forgot the comma... exec ( "locate whatever", $output ); -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions and Logins
On Fri, 2004-09-03 at 15:27, Dennis Gearon wrote: > I am designing my own 'usr' class that takes care of logins. I need > to know the following to finish it. > --- > A/ Does anybody use sessions for users who are not logged into the site, and why? Yes. Because I allow anonymous users _some_ interaction with my site. > B/ If a user goes from unlogged in, unidentified user to a logged in, identified > user, is the first session canceled and new session started? Depends on your definition of "logged in". My users are logged in when they have $_SESSION['user_id'] set to some integer greater than 0. I can call session_destroy() to kill the whole session or just unset the one variable with unset($_SESSION['user_id']). Either way they will be logged out. I usually follow either method with a header("Location: index.php") call to some main page in the site. > C/ (The reverse), if a user goes from logged in, identified user to a unlogged in, > unidentified user, is the first session canceled and new session started? Only if you call session_destroy(). > D/ How is it possible, using PHP4+ sessions, to cancel a session a page is opened > with, and starting a new session? session_destroy(); -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sessions and Logins
Hi Dennis, see below "Dennis Gearon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Please CC me > - > > I am designing my own 'usr' class that takes care of logins. I need > to know the following to finish it. > --- > A/ Does anybody use sessions for users who are not logged into the site, and why? This might make sense when you have a protected area on your web site. Having the session run all the time would allow the user to naviagte the whole site *after* login without losing his authentication. When he is logged in, just store some kind of value or object in the session. On the protected pages check for this value. If it's not in the session redirect to a login page. > > B/ If a user goes from unlogged in, unidentified user to a logged in, identified user, is the first session canceled and new session started? You can control this yourself - usually you don't have to start a new session after login. But applying session_regenerate_id() adds a bit of security because it changes the session id (which might have been public before login). See: http://de3.php.net/manual/en/function.session-regenerate-id.php > > C/ (The reverse), if a user goes from logged in, identified user to a unlogged in, unidentified user, is the first session canceled and new session started? Use session_destroy() and redirect to the start/login page with a clean: header('location: http://www.yoursite.com'); exit; This will start a new session. You might also need to unset a cookie before session_destroy() if you are using cookies. > > D/ How is it possible, using PHP4+ sessions, to cancel a session a page is opened with, and starting a new session? Again, use a header redirect. > thanks all of you. I **LOVE** using this PHP 'thang' :-) > > Dennis Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Correct headers for I.E. to open PDF?
This has nothing to do with PHP or the server, but with the way the client computer is configured. If the user doesn't want to open a .pdf file in the browser but to be prompted for saving the file, that's the way he will have it. ...fortunately. Teddy Teddy - Original Message - From: "Paul Danko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 03, 2004 10:05 PM Subject: [PHP] Correct headers for I.E. to open PDF? I have searched the net, and found tons of developers with different solutions to this problem, none of which I have found to work. What should the headers be for a client to download a PDF document and have it open using adobe i.e. pluggin?? Here is code I am using, it works on some versions of I.E., but not all: $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] remote script execution
Scenario: Server 1 is a LAMP webserver Server 2 is an email server I have a php script on server 2 that creates user accounts. It works great when your logged into the server and running it from the CLI. I have a GUI on server 1 that is used to input user info into a database. Question: What I'd like to do is have server 1 call the script on server 2 and have server 2 return a variable back to server 1 to be displayed and ultimately entered into the database. If you understand my rambling above and have any insight into how to get this accomplished, it would be greatly appreciated. Thank you. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] remote script execution
Scenario: Server 1 is a web server Server 2 is an email server I have a php script on Server 2 that creates user accounts from the CLI just fine. I have a GUI on Server 1 with several forms for user data stored in a database. What I'm trying to do is have Server 1 call the script on Server 2 and have Server 2 return the UID, GID, and HOME path back to the GUI on Server 1. I have the UID,GID, and HOME parsed into a comma separated string but can't for the life of me get Server 1 to call the script or get Server 2 to return the variable. Does anyone have any insight on how to accomplish this? Any help would be appreciated. Thank you. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] remote script execution
Scenario Server 1 is a LAMP webserver. Server 2 is an email server. I have a php script on Server 2 that creates user accounts and echos the UID, GID, and HOME. It works great when your logged into Server 2 and run it from the CLI. What I'm trying to do is have my GUI on Server 1 call the script on Server 2 and have Server 2 return the variable back to Server 1 for processing. Is that possible? Any help would be appreciated. Thank you. Sean -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Linux "locate" to html script?
[snip] According to the manual, exec() "does not output anything. It simply returns the last line from the result of the command." The OP wants to display the output of 'locate' to the browser, so he should use passthru(), which displays all raw output. [/snip] Cool -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions and Logins
Please CC me - I am designing my own 'usr' class that takes care of logins. I need to know the following to finish it. --- A/ Does anybody use sessions for users who are not logged into the site, and why? B/ If a user goes from unlogged in, unidentified user to a logged in, identified user, is the first session canceled and new session started? C/ (The reverse), if a user goes from logged in, identified user to a unlogged in, unidentified user, is the first session canceled and new session started? D/ How is it possible, using PHP4+ sessions, to cancel a session a page is opened with, and starting a new session? thanks all of you. I **LOVE** using this PHP 'thang' :-) Dennis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
BOOT wrote: Thanks for all the replies. Regarding security, I use a script to ensure (hopefully LOL) that only requests from inside our network are accepted both hostnames and IP's are checked. I did find lonewolf's reply most usefull, but now I need to come up with way to make each result (a href...) and add some breaks: $items = passthru('locate whatever'); echo ""; echo $items; echo ""; ?> $output = array(); exec ( "locate whatever" $output ); And loop thru the $output array. It's all in the manual http://us4.php.net/manual/en/function.exec.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP to replace javascript
* Jack Gates <[EMAIL PROTECTED]>: > On Friday 03 September 2004 01:11 am, Sam Hobbs wrote: > > "Jack Gates" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > > Javascript can open a separate and specifically sized window from > > > a web page when a user clicks on a link that might reference a > > > note or picture etc. > > > > > > Can this be done with PHP? If yes, will someone tell me where in > > > the manual on the php.net site I can find the information to learn > > > how to do this? > > I am new to PHP also but there is some fundamental understanding of PHP > > that is likely to make things much more clear. PHP is a server-side > > facility. PHP executes before the HTML is (considered to be) complete. Then > > the HTML is sent to the client. > I knew I had seen a pop up window on a web site that I new was completely > written in PHP and driven by MySQL. The HTML output was done on the fly by > the code and database, which prompted my question. > > I went to the actual PHP script source since I have direct access to it. The > picture that was popping up when the link is picked is being done by > Javascript embedded in the source PHP script. > > Now it is a lot clearer that the window pop up can't be done with PHP. If by > chance my conclusion is wrong some one please enlighten me. Nope, you've got it right. As a server-side technology, PHP cannot make changes or affect your browser in any way. Only client-side technologies such as java/ecmascript can do that. > My objective here is to remove Javascript from my site every where that I > possibly can and to replace it with server side code or something else. The > reason for this is simply because some people are going to turn off > Javascript from their browser because of the danger that it could pose to > their local box if they visit a site with evil intent. Noble intention. I've found, in doing sites for freelance clients and at work, however, that sometimes javascript effects are what are desired -- little windows for paging through images, popup notes, etc. In these cases, I put little snippets into the source page: '(action) is only accessible if javascript is turned on.' As much as possible, however, I try and do things on the server-side, particularly where form validation is concerned. -- Matthew Weier O'Phinney | mailto:[EMAIL PROTECTED] Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Correct headers for I.E. to open PDF?
> I have searched the net, and found tons of developers with different > solutions to this problem, none of which I have found to work. > > What should the headers be for a client to download a PDF document and > have it open using adobe i.e. pluggin?? > > Here is code I am using, it works on some versions of I.E., but not all: > > > $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; > > $filesize = filesize($pdfdoc); > header("Pragma: "); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); > header("Content-type: application/pdf"); > header("Content-Length: ".$filesize); > header("Content-Disposition: inline; filename=FILE.pdf"); > header("Content-Transfer-Encoding: binary"); > header("Accept-Ranges: bytes"); > > readfile($pdfdoc); > exit(); > > > Why isn't it working? > > Thanks, > > -Paul > If you attempting this over a secure connection (which I assume is why you're having so much trouble) I.E. can be pretty gay. If it is over a secure connection, it has to do with I.E. not being able to write to cache or something. I forgot -- I ran into this a while back. If it's not over a secure connection, I.E. is still gay. :-) Try this: header('Content-Type: application/pdf'); header('Content-Length: '.$filesize); header('Content-Disposition: inline; filename=FILE.pdf'); header("Cache-Control: private"); header("Pragma: public"); readfile($pdfdoc); exit(); When all else fails - force a download: if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) && strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'],'MSIE')) header('Content-Type: application/force-download'); else header('Content-Type: application/octet-stream'); header('Content-Length: '.$filesize); header('Content-Disposition: inline; filename=FILE.pdf'); header("Cache-Control: private"); header("Pragma: public"); Jim Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Fetch & Process
From: "Zoran" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 03, 2004 12:35 PM Subject: [PHP] Web Fetch & Process Hi How can I parse HTML page which I fetched by PHP so some part of text would be replaced by other text. For example, if I have bold text on HTML page (Some text) how can I manage that all bold text on that page is replaced by some other text. Also, I managed to delete all HTML code from page (with this code $data[0] = preg_replace("/([<])+([^>])+([.])*([>])+/i","", $data[0]); but also would like to delete all chars except numbers from page, can this be done? Regards. Zoran Your first question: To replace certain elements take a look at preg_replace() http://us4.php.net/manual/en/function.preg-replace.php Example: $foo = 'stuff silly stuff more stuff'; echo preg_replace('/\(.*)\<\/b\>/', "$1 lookie now", $foo); Your second question: You could just use strip_tags() http://us4.php.net/manual/en/function.strip-tags.php Your last question: To delete everything but numbers you could $content = preg_replace('/[^\d]/','', $content); Hope that helps Jim Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Correct headers for I.E. to open PDF?
> $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; > > $filesize = filesize($pdfdoc); > header("Pragma: "); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); > header("Content-type: application/pdf"); > header("Content-Length: ".$filesize); > header("Content-Disposition: inline; filename=FILE.pdf"); > header("Content-Transfer-Encoding: binary"); > header("Accept-Ranges: bytes"); > > readfile($pdfdoc); > exit(); > > Why isn't it working? IE can seems to ignore these headers some times (I think it might have something to do with the .php extension). I have had success creating the file and saving it with .pdf as the extension then redirecting to that file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP to replace javascript
On Friday 03 September 2004 01:11 am, Sam Hobbs wrote: > "Jack Gates" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > Javascript can open a separate and specifically sized window from a web > > page > > when a user clicks on a link that might reference a note or picture etc. > > > > Can this be done with PHP? If yes, will someone tell me where in the > > manual > > on the php.net site I can find the information to learn how to do this? > > > > I have been looking through the manual on the site but without knowing > > the name or names of what I am looking for it is real hard to find it. > > I am new to PHP also but there is some fundamental understanding of PHP > that is likely to make things much more clear. PHP is a server-side > facility. PHP executes before the HTML is (considered to be) complete. Then > the HTML is sent to the client. By the time that the user clicks on the > page, PHP is totally gone (for the purposes of the page). This concept is > quite easy to explain and to understand, yet you are likely to spend many, > many hours of reading before you read enough to understand this. In other > words, I am sure you can understand it, but this is the type of concept > that documentation seldom makes clear. > > You can, instead, put resize code (using PHP or nearly any language) in the > page that shows the image. This is also a more object-oriented solution. Thanks for the response, it makes sense. I already understand that PHP is server side code and Javascript is client side code. Last night I was tired when I sent this. I knew I had seen a pop up window on a web site that I new was completely written in PHP and driven by MySQL. The HTML output was done on the fly by the code and database, which prompted my question. I went to the actual PHP script source since I have direct access to it. The picture that was popping up when the link is picked is being done by Javascript embedded in the source PHP script. Now it is a lot clearer that the window pop up can't be done with PHP. If by chance my conclusion is wrong some one please enlighten me. My objective here is to remove Javascript from my site every where that I possibly can and to replace it with server side code or something else. The reason for this is simply because some people are going to turn off Javascript from their browser because of the danger that it could pose to their local box if they visit a site with evil intent. -- Jack "Rhino" Gates, Registered Linux user #342662 Morning Star Communications, www.morningstarcom.net Web Hosting, Site Design, Domain Registration, VMware Workstation Software and GSX Server Software -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
Aww, I answered this one already too... I thought I beat everyone in as well, but maybe the list is still slow?? Passthru() is better then exec() in this case, since he wants everything from locate, I couldn't get the explode to work on my system because it didn't catch the "\n" character very well, or I messed up in the code somewhere. What would the explode look like for this: "; echo $items[0]; echo ""; ?> - Original Message - From: Ben Ramsey <[EMAIL PROTECTED]> Date: Friday, September 3, 2004 2:44 pm Subject: Re: [PHP] PHP Linux "locate" to html script? > According to the manual, exec() "does not output anything. It > simply > returns the last line from the result of the command." The OP > wants to > display the output of 'locate' to the browser, so he should use > passthru(), which displays all raw output. > > Jay Blanchard wrote: > > [snip] > > Does anyone have a script that can be used to call linux's locate > > command > > and display the results in a browser? > > > > I don't think it would be that hard and will make an effort today... > > [/snip] > > > > exec("locate foo"); > > -- > Regards, > Ben Ramsey > http://benramsey.com > > --- > http://www.phpcommunity.org/ > Open Source, Open Community > Visit for more information or to join the movement. > --- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
Thanks for all the replies. Regarding security, I use a script to ensure (hopefully LOL) that only requests from inside our network are accepted both hostnames and IP's are checked. I did find lonewolf's reply most usefull, but now I need to come up with way to make each result (a href...) and add some breaks: "; echo $items; echo ""; ?> "Jay Blanchard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... [/snip] exec("locate foo"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
On Fri, 2004-09-03 at 12:46, BOOT wrote: > Does anyone have a script that can be used to call linux's locate command > and display the results in a browser? -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Correct headers for I.E. to open PDF?
I have searched the net, and found tons of developers with different solutions to this problem, none of which I have found to work. What should the headers be for a client to download a PDF document and have it open using adobe i.e. pluggin?? Here is code I am using, it works on some versions of I.E., but not all: $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; $filesize = filesize($pdfdoc); header("Pragma: "); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Content-type: application/pdf"); header("Content-Length: ".$filesize); header("Content-Disposition: inline; filename=FILE.pdf"); header("Content-Transfer-Encoding: binary"); header("Accept-Ranges: bytes"); readfile($pdfdoc); exit(); Why isn't it working? Thanks, -Paul
Re: [PHP] PHP Linux "locate" to html script?
I assume you mean locating something on the server, as this would be a serious breech of security otherwise. anyways, bickticks will run shell comand line programs and return the output.. ie print `locate myFile'`; jason "BOOT" <[EMAIL PROTECTED]> wrote: > > Does anyone have a script that can be used to call linux's locate command > and display the results in a browser? > > I don't think it would be that hard and will make an effort today... > > > Thanks! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Linux "locate" to html script?
Great thanks... now I just work on a form and a hrefs -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: September 3, 2004 1:49 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] PHP Linux "locate" to html script? "; echo $items; echo ""; ?> - Original Message - From: BOOT <[EMAIL PROTECTED]> Date: Friday, September 3, 2004 1:46 pm Subject: [PHP] PHP Linux "locate" to html script? > Does anyone have a script that can be used to call linux's locate > commandand display the results in a browser? > > I don't think it would be that hard and will make an effort today... > > > Thanks! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Linux "locate" to html script?
[snip] Thanks but that's no good if there are multiple results! ... Does anyone have a script that can be used to call linux's locate command and display the results in a browser? ... [/snip] exec("locate foo"); [/snip] So you want something like while(bar == exec("locate foo")) barArray[] = looped value } Then $glorp = exec("locate foo"); Then parse glorp. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
"; echo $items; echo ""; ?> - Original Message - From: BOOT <[EMAIL PROTECTED]> Date: Friday, September 3, 2004 1:46 pm Subject: [PHP] PHP Linux "locate" to html script? > Does anyone have a script that can be used to call linux's locate > commandand display the results in a browser? > > I don't think it would be that hard and will make an effort today... > > > Thanks! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
According to the manual, exec() "does not output anything. It simply returns the last line from the result of the command." The OP wants to display the output of 'locate' to the browser, so he should use passthru(), which displays all raw output. Jay Blanchard wrote: [snip] Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... [/snip] exec("locate foo"); -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Linux "locate" to html script?
Thanks but that's no good if there are multiple results! -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: September 3, 2004 1:40 PM To: BOOT; [EMAIL PROTECTED] Subject: RE: [PHP] PHP Linux "locate" to html script? [snip] Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... [/snip] exec("locate foo"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Linux "locate" to html script?
[snip] Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... [/snip] exec("locate foo"); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Linux "locate" to html script?
Have you taken a look at the passthru() function? http://www.php.net/passthru Boot wrote: Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... -- Regards, Ben Ramsey http://benramsey.com --- http://www.phpcommunity.org/ Open Source, Open Community Visit for more information or to join the movement. --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Linux "locate" to html script?
BOOT wrote: Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... Thanks! http://us4.php.net/manual/en/function.exec.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how can I get the fileversion?
Pedro Irán Méndez Pérez wrote: Hello everybody, I am a new in this list, and I can´t find the form of read from file his file version, I am working with php 4.3.2, Apache 1.3.x, Win32 (XP). Can you help me?? PD. Sorry for my english, but I am Mexican :) = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez Hi Pedro, Not that I don't want to help you, but with our language differences, I'm not sure I know what you're asking. On this page, there is a Spanish PHP Mailing list which may be of more help to you. Good luck! http://us4.php.net/mailing-lists.php -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] I need to execute PHP scripts from Apache/mod_php using the owner of scripts as user/group for execution.
Luis Miguel González Fernández wrote: I need to execute PHP scripts from Apache/mod_php using the owner of scripts as user/group for execution. I have included the 'User' and 'Group' directives into the virtualhost declaration in my httpd.conf but scripts keep on executing with user/group from Apache. Urgent help needed. Thanks. Qkidamon. http://www.google.com/search?hl=en&ie=UTF-8&q=suexec&btnG=Google+Search -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Linux "locate" to html script?
Does anyone have a script that can be used to call linux's locate command and display the results in a browser? I don't think it would be that hard and will make an effort today... Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web Fetch & Process
Hi How can I parse HTML page which I fetched by PHP so some part of text would be replaced by other text. For example, if I have bold text on HTML page (Some text) how can I manage that all bold text on that page is replaced by some other text. Also, I managed to delete all HTML code from page (with this code $data[0] = preg_replace("/([<])+([^>])+([.])*([>])+/i","", $data[0]); but also would like to delete all chars except numbers from page, can this be done? Regards. Zoran
[PHP] how can I get the fileversion?
Hello everybody, I am a new in this list, and I can´t find the form of read from file his file version, I am working with php 4.3.2, Apache 1.3.x, Win32 (XP). Can you help me?? PD. Sorry for my english, but I am Mexican :) = "¿Acaso se olvidará la mujer de su bebé, y dejará de compadecerse del hijo de su vientre? Aunque ellas se olviden, yo no me olvidaré de ti" Isa 40:27 = Atte Pedro Irán Méndez Pérez -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How can i force PHP scripts been executed using their owner user/group with Apache and PHP loaded as module ?
How can i force PHP scripts been executed using their owner user/group with Apache and PHP loaded as module ? Now my scripts use Apache`s user/group (wwwrun/www in my ditribution). I've included User an Group directives in the virtualhost configuration. I need any kind of help refered to this issue. Thanks. Miguel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I need to execute PHP scripts from Apache/mod_php using the owner of scripts as user/group for execution.
I need to execute PHP scripts from Apache/mod_php using the owner of scripts as user/group for execution. I have included the 'User' and 'Group' directives into the virtualhost declaration in my httpd.conf but scripts keep on executing with user/group from Apache. Urgent help needed. Thanks. Qkidamon. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions Problems
--- Jason Davidson <[EMAIL PROTECTED]> wrote: > Read up on 'named sessions' > > I think that may be your solution Interesting... here's a link to php.net. I assume this is what you're talking about... Looks promising. http://us4.php.net/manual/en/function.session-name.php > > jason > > Mark <[EMAIL PROTECTED]> wrote: > > > > > > --- Octavio Herrera <[EMAIL PROTECTED]> wrote: > > > > > No, I do not store two items with the same key, I just open > another > > > session > > > in other page and it just overwrite session data of a previous > > > session > > > > This is because (I believe) you can't open two cookie-based > sessions > > with two browser windows and expect to have two separate > sessions. > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > > > > = > > Mark Weinstock > > [EMAIL PROTECTED] > > *** > > You can't demand something as a "right" unless you are willing to > fight to death > > to defend everyone else's right to the same thing. > > *** > > > > > > > > ___ > > Do you Yahoo!? > > Win 1 of 4,000 free domain names from Yahoo! Enter now. > > http://promotions.yahoo.com/goldrush > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
> > It is the same thing than pear, but most of extensions are written with > > C in order to increase performance. Increases in performance aren't the only reason, but it is a reason. > > tidy is a php extension (PECL), for example. Yes. > > Php extensions are all that is not in the php core. Not true. In the future there are hopes of moving all PHP extensions to PECL and simply bundling the latest stable release of a extension from PECL as part of the main PHP distribution. For instance, Tidy is a part of the standard PHP 5.0 distribution although it lives in PECL. John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions Problems
Read up on 'named sessions' I think that may be your solution jason Mark <[EMAIL PROTECTED]> wrote: > > > --- Octavio Herrera <[EMAIL PROTECTED]> wrote: > > > No, I do not store two items with the same key, I just open another > > session > > in other page and it just overwrite session data of a previous > > session > > This is because (I believe) you can't open two cookie-based sessions > with two browser windows and expect to have two separate sessions. > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > = > Mark Weinstock > [EMAIL PROTECTED] > *** > You can't demand something as a "right" unless you are willing to fight to death > to defend everyone else's right to the same thing. > *** > > > > ___ > Do you Yahoo!? > Win 1 of 4,000 free domain names from Yahoo! Enter now. > http://promotions.yahoo.com/goldrush > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need direction on PHP-CLI MUD Server
> Unfortunately, since they are coming in through a socket and not actual > telnet/ssh I don't think $fp=fopen("/dev/stdin", "r"); works? Isn't that > only for terminal based input? > > Donald Myers oops... forgot this: http://www.php.net/manual/en/ref.pcntl.php Jim Grill > > > on 9/2/04 10:31 AM, Jim Grill at [EMAIL PROTECTED] wrote: > > >> Hello, I have been banging my head trying to figure out how to design a > > MUD > >> Server using PHP-CLI as the server and PHP-CLI as the "command" language. > >> (telnet front end at this point) > >> > >> but > >> > >> The real problem is full interaction with the user in those external > >> commands (php-cli scripts) to send and read data. > >> > >> > >> A. How do I create a input method to connect the external PHP script to > > the > >> Server's Socket? > >> > >> B. Since the PHP-CLI script never ends how can I send the first echo "You > >> have..."? > >> D Myers > >> > > > > I hope I'm understanding what you're asking. If you need to interact with > > the user via stdin you can use this function to capture user input: > > > > function read() > > { > > $fp=fopen("/dev/stdin", "r"); > > $input=fgets($fp, 255); > > fclose($fp); > > > > return $input; > > } > > > > Your code flow could look something like: > > > do { > > print "what's your name?\n"; > > $name = read(); > > } while (empty($name)); > > > > print "Hello $name!\n"; > > sleep(1); > > > > do { > > print "What is your jedi name?\n"; > > $jediName = read(); > > } while (empty($jediName)); > > > > print "Hello $name AKA $jediName\n\n"; > > > > function read() > > { > > $fp=fopen("/dev/stdin", "r"); > > $input=fgets($fp, 255); > > fclose($fp); > > > > return trim($input); > > } > > ?> > > > > I hope that gets you started in the right direction. Sounds like a fun > > project. > > > > Jim Grill > > Web-1 Hosting, LP > > http://www.web-1hosting.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List of Users
On Friday 03 September 2004 22:56, Jesus wrote: > I wish to know how I can list my email user I used imap to control the > individual mailbox information but i need to adminitratiton propurse list > all the user but i cant find a function to do this Because there are no generic methods to get the list of (mail) users. It totally depends on your mail system. Refer to your mail system's docs. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The seam you meant to rip out is invariably the other one -- Murphy's Laws of Sewing n4 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need direction on PHP-CLI MUD Server
> Unfortunately, since they are coming in through a socket and not actual > telnet/ssh I don't think $fp=fopen("/dev/stdin", "r"); works? Isn't that > only for terminal based input? > > Donald Myers Have you tried it? Every process will have access to its own STDIN and STDOUT. since your MUD server runs constantly you will have a stateful environment, so keeping track of who's who should be possible. This is purely guess work :-) but I think it should work. Perhaps there's some way to fork?? I dunno. STDIN is there. I guess it's just a matter figuring out how to access it. Good luck! Let me know how it goes. If you want to send me some source code off-list I'd be happy to give it a whirl. It might be better to solve off-list and post the solution on-list since the code is probably huge. Jim Grill > > > on 9/2/04 10:31 AM, Jim Grill at [EMAIL PROTECTED] wrote: > > >> Hello, I have been banging my head trying to figure out how to design a > > MUD > >> Server using PHP-CLI as the server and PHP-CLI as the "command" language. > >> (telnet front end at this point) > >> > >> but > >> > >> The real problem is full interaction with the user in those external > >> commands (php-cli scripts) to send and read data. > >> > >> > >> A. How do I create a input method to connect the external PHP script to > > the > >> Server's Socket? > >> > >> B. Since the PHP-CLI script never ends how can I send the first echo "You > >> have..."? > >> D Myers > >> > > > > I hope I'm understanding what you're asking. If you need to interact with > > the user via stdin you can use this function to capture user input: > > > > function read() > > { > > $fp=fopen("/dev/stdin", "r"); > > $input=fgets($fp, 255); > > fclose($fp); > > > > return $input; > > } > > > > Your code flow could look something like: > > > do { > > print "what's your name?\n"; > > $name = read(); > > } while (empty($name)); > > > > print "Hello $name!\n"; > > sleep(1); > > > > do { > > print "What is your jedi name?\n"; > > $jediName = read(); > > } while (empty($jediName)); > > > > print "Hello $name AKA $jediName\n\n"; > > > > function read() > > { > > $fp=fopen("/dev/stdin", "r"); > > $input=fgets($fp, 255); > > fclose($fp); > > > > return trim($input); > > } > > ?> > > > > I hope that gets you started in the right direction. Sounds like a fun > > project. > > > > Jim Grill > > Web-1 Hosting, LP > > http://www.web-1hosting.net > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cardservice lphp won't create array
You'll need to be generally familiar with Cardservice's lphp class to answer this one: I'm properly setting the $myorder array (as verified by outputting it with a while loop) - but upon executing the next step: $charge_result = $mylphp->curl_process($myorder); I then attempt to display the full results with this: while (list($key, $value) = each($charge_result)) { echo htmlspecialchars($key) . " = " . htmlspecialchars($value) . "\n"; } But I get: Warning: Variable passed to each() is not an array or object It appears that somehow lphp is not creating the results array that it's supposed to. I am properly including the lphp.php file, and I've verified that curl is turned on. Anyone have a clue, or is there any more info I need to provide? TIA, - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uppercase sentences
> Hi all, > > I'm working with a bunch of users who hardly ever use correct > punctuation in their submitted content. I realise there's very little > I can do, but I'm trying to do *something* to make things a little more > presentable. At the very least, ensuring that all "sentences" begin > with a capital letter (english) would be a great start. > > Has any one come across a library of "punctuation cleaners" or > something like that? This might help you some. $ucSentance = ucfirst($sentance); Jim Grill > > --- > Justin French > http://indent.com.au > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] bcompiler
Helo! I' m just in trouble with bcompiler. I want to compile a new bcompiler.so and this is the result: Any suggestions? /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2336: error: `zend_uchar' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2336: error: parse error before ')' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2337: error: parse error before "TSRMLS_CC" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2338: error: parse error before "TSRMLS_CC" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2339: error: `zend_uint' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2339: error: parse error before ')' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2340: error: parse error before ')' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2341: error: parse error before ')' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: `zval' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: parse error before "myretval" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: `sendval' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: `function_table' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: `myretval' undeclared (first use in this function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2357: error: parse error before "TSRMLS_CC" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c: At top level: /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2358: error: parse error before "for" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2363: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2363: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2363: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2364: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2364: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2364: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2365: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2365: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2365: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2366: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2366: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2366: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2367: error: `exists' used prior to declaration /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2367: error: `zoa' undeclared here (not in a function) /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2367: warning: data definition has no type or storage class /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2368: error: parse error before '{' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2368: error: parse error before "char" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2368: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2368: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2371: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2371: error: parse error before "char" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2373: error: parse error before '->' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2373: warning: data definition has no type or storage class /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2374: error: parse error before '->' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2375: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2375: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2375: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2376: error: parse error before '*' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2376: error: parse error before '(' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2376: error: parse error before "size_t" /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2377: error: parse error before '->' token /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:2377: error: conflicting types for `apc_serialize_string' /opt/lampp/lib/php/extensions/bcompiler/bcompiler.c:1472: error: previous declaration of `apc_serialize_string' /opt/lampp/lib/php/extensions/b
Re: [PHP] Sessions Problems
--- Octavio Herrera <[EMAIL PROTECTED]> wrote: > No, I do not store two items with the same key, I just open another > session > in other page and it just overwrite session data of a previous > session This is because (I believe) you can't open two cookie-based sessions with two browser windows and expect to have two separate sessions. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Is a PECL a black whole? OT
[snip] black whole? [/snip] As in, "Is PECL the wholeness of black?" or "Is PECL all that is black?" *snicker* It just struck me funny, but everyone knew that you meant "black hole". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP to replace javascript
--- Jack Gates <[EMAIL PROTECTED]> wrote: > Greetings, > > This is my first post here and I am still new to PHP and learning. > I just > joined this list last night. > > Javascript can open a separate and specifically sized window from a > web page > when a user clicks on a link that might reference a note or picture > etc. > > Can this be done with PHP? If yes, will someone tell me where in > the manual > on the php.net site I can find the information to learn how to do > this? > > I have been looking through the manual on the site but without > knowing the > name or names of what I am looking for it is real hard to find it. > Since PHP is a server-side language, it can't really tell the browser to do anything. However you can generate javascript from your PHP code (if necessary) to open (and close) browser windows. Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
On Fri, 2004-09-03 at 10:29, Dave Restall - System Administrator,,, wrote: > > It took me a while to find an explanation of what a PECL is. I kept reading > > comments about things being moved to a PECL but I saw nothing about what is > > in a PECL or how to get anything out of a (the?) PECL. As far as I knew, > > there is a danger of all of PHP being in a PECL. > > > > I could not (and cannot) find an explanation of a PECL when I start by going > > to the main php.net page and looking for one. So I searched for "PECL" and > > got a few results; one result is for vpopmail: > > Welcome to the club. I sent a similar email about this a few days ago > and nobody replied. I was looking for documentation on the fileinfo PECL > module which is recommended instead of mime_content_type, simple stuff like > what arguments does it take etc. There is also a lack of documentation > for how to install and run and USE PECL modules which is worrying > especially if as you say a lot of PHP is going down the PECL path. > > To me PECL looks like a major own goal. > > Cue the flames for this being a PHP list and not a PECL list. This is a "general" PHP list. That means everything and anything PHP. Since PECL is part of PHP I don't think flames would be in order :) And at the very least it's not another off topic MySQL, IIS, or Apache thread *grin*. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] List of Users
Hi I wish to know how I can list my email user I used imap to control the individual mailbox information but i need to adminitratiton propurse list all the user but i cant find a function to do this
Re: [PHP] Sessions Problems
Octavio Herrera wrote: No, I do not store two items with the same key, I just open another session in other page and it just overwrite session data of a previous session hi, again this does not provide enough information,you will need to more clearly state the problem please are you using cookies, are you usuing two browser windows in the same machine? etc etc. btw since you have trimmed all of the previous messages, people would now lose track of the thread. you will be better of starting a new thread instead of posting a reply to this message. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
* Thus wrote Sam Hobbs: > It took me a while to find an explanation of what a PECL is. I kept reading > comments about things being moved to a PECL but I saw nothing about what is > in a PECL or how to get anything out of a (the?) PECL. As far as I knew, > there is a danger of all of PHP being in a PECL. There is documentation on the way for what to do with these PECL extension on how to install and upgrade them. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
Frédéric Hardy wrote: What is PECL ? PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions. The packaging and distribution system used by PECL is shared with its sister, PEAR. ... Is it clear ? It is the same thing than pear, but most of extensions are written with C in order to increase performance. tidy is a php extension (PECL), for example. Php extensions are all that is not in the php core. Fred. Sam Hobbs wrote: It took me a while to find an explanation of what a PECL is. I kept reading comments about things being moved to a PECL but I saw nothing about what is in a PECL or how to get anything out of a (the?) PECL. As far as I knew, there is a danger of all of PHP being in a PECL. I could not (and cannot) find an explanation of a PECL when I start by going to the main php.net page and looking for one. So I searched for "PECL" and got a few results; one result is for vpopmail: http://us4.php.net/vpopmail From that page I clicked on the link for the PECL and then modified the address for the page to get to the pecl.php.net page. Now when I search, I do see in the results the "PHP.net: A Tourist's Guide" page. That appears to be a very useful page. And now that I know to look for it, I do see a link to that page from the main PHP page. So people should be able to find an explnation of what a PECL is, but I just want to say that it might help to make it easier for new people to find the "PHP.net: A Tourist's Guide" page. Perhaps a link to it could be put into the box on the left under "What is PHP?". A link to PECL should have been included -> http://pecl.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] paradox ? Bug ?
* Thus wrote Daniel Schierbeck: > I think this basically sums up the problems of the current handling of > existence-checking in overloaded objects: We have an object that has > user-defined methods for getting and setting object properties (__get() > and __set(), respectively). These methods get and set the properties in > a private array (private: can only be access from within the object > itself). Example (mostly stolen from php.net): The issue of isset() on __get and __set, will most likely be fixed with 5.1. Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting $_POST variables back
[snip] NOW: The question arises: where does the browser store this info, and can I get it back from there on the page that got called via the href html? I would like to avoid some rather unnecessary server side selects to retrieve the previous page. [/snip] The browser really doesn't store the information. The only, truly, safe and consistent (read: between different browsers) way to do this is to commit the information to a database or file and use a cookie variable or session variable to ID the user so that a query can be issued against the data for retrieval. So your wish for a client-side solution may not be granted, unless you want to commit each and every variable to a session. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
> It took me a while to find an explanation of what a PECL is. I kept reading > comments about things being moved to a PECL but I saw nothing about what is > in a PECL or how to get anything out of a (the?) PECL. As far as I knew, > there is a danger of all of PHP being in a PECL. > > I could not (and cannot) find an explanation of a PECL when I start by going > to the main php.net page and looking for one. So I searched for "PECL" and > got a few results; one result is for vpopmail: Welcome to the club. I sent a similar email about this a few days ago and nobody replied. I was looking for documentation on the fileinfo PECL module which is recommended instead of mime_content_type, simple stuff like what arguments does it take etc. There is also a lack of documentation for how to install and run and USE PECL modules which is worrying especially if as you say a lot of PHP is going down the PECL path. To me PECL looks like a major own goal. Cue the flames for this being a PHP list and not a PECL list. TTFN Dave php/2004-09-03.tx [EMAIL PROTECTED] php-general ++ | Dave Restall, IIRC Limited, PO Box 46, Skelton, Cleveland, TS12 2GT. | | Tel. 0845 10 80 151Mob. +44 (0) 7973 831245 Int. +44 (0) 1287 653003 | | email : [EMAIL PROTECTED] [EMAIL PROTECTED] Web : http://www.iirc.net | ++ | I don't want people to love me. It makes for obligations. | | -- Jean Anouilh| ++ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Is a PECL a black whole?
What is PECL ? PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions. The packaging and distribution system used by PECL is shared with its sister, PEAR. ... Is it clear ? It is the same thing than pear, but most of extensions are written with C in order to increase performance. tidy is a php extension (PECL), for example. Php extensions are all that is not in the php core. Fred. Sam Hobbs wrote: It took me a while to find an explanation of what a PECL is. I kept reading comments about things being moved to a PECL but I saw nothing about what is in a PECL or how to get anything out of a (the?) PECL. As far as I knew, there is a danger of all of PHP being in a PECL. I could not (and cannot) find an explanation of a PECL when I start by going to the main php.net page and looking for one. So I searched for "PECL" and got a few results; one result is for vpopmail: http://us4.php.net/vpopmail From that page I clicked on the link for the PECL and then modified the address for the page to get to the pecl.php.net page. Now when I search, I do see in the results the "PHP.net: A Tourist's Guide" page. That appears to be a very useful page. And now that I know to look for it, I do see a link to that page from the main PHP page. So people should be able to find an explnation of what a PECL is, but I just want to say that it might help to make it easier for new people to find the "PHP.net: A Tourist's Guide" page. Perhaps a link to it could be put into the box on the left under "What is PHP?". -- === Frederic HARDYEmail: [EMAIL PROTECTED] HEXANET SARL URL: http://www.hexanet.fr/ ZAC Les CharmillesTel: +33 (0)3 26 79 30 05 3, allée Thierry Sabine Direct: +33 (0)3 26 61 77 84 BP 202 - 51686 REIMS CEDEX 2 FRANCE === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] paradox ? Bug ?
I think this basically sums up the problems of the current handling of existence-checking in overloaded objects: We have an object that has user-defined methods for getting and setting object properties (__get() and __set(), respectively). These methods get and set the properties in a private array (private: can only be access from within the object itself). Example (mostly stolen from php.net): class Foo { // This array holds the properties private $elem = array(); // This method is automatically called when an // undefined (or inaccessible, as $array) property is // called. The name of the called property is the only // argument. public function __get ($prop) { if (isset($this->elem[$prop])) { return $this->elem[$prop]; } else { trigger_error("Oooops", E_USER_WARNING); } } // Same as before, but is called when setting a // property public function __set ($prop, $val) { $this->elem[$prop] = $val; } } // Instantiate the class $foo = new Foo(); // Check if $foo->bar ($foo->elem['bar']) is set if (isset($foo->bar)) { echo "\$bar is set\n"; } else { echo "\$bar is not set\n"; } // Set $foo->bar to 'foobar' $foo->bar = 'foobar'; // Print the value of $foo->bar echo $foo->bar, "\n"; // foobar // Check if $foo->bar ($foo->elem['bar']) is set if (isset($foo->bar)) { echo "\$bar is set\n"; } else { echo "\$bar is not set\n"; } ?> Now, since we access the properties of $foo in a 'virtual' manner - meaning $foo->bar doesn't really exist, it's actually $foo->elem['bar'] (if it were public, that is) - we can assume that we can check for property existance in the same 'virtual' way, right? Wrong. If we could, the above would output this: $bar is not set foobar $bar is set Yet it returns: $bar is not set foobar $bar is not set If we want to check whether or not $bar exists in $foo, we have to add a method to the Foo class: public function isSet ($prop) { if (isset($this->elem[$prop])) { return TRUE; } else { return FALSE; } } Which is rather dumb, considering that the intention of isset() is to check whether or not a variable exists! So far there has been two suggestions as to what can be done: 1. Change isset so that it automatically detects overloaded properties 2. Let the user define a custom __isSet() method, similar to the one above, that is called each time a property of the class is checked with isset() Maybe there's some other angles/ideas/suggestions? -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Call to undefined function imagettftext()
Paul Reinheimer wrote: While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). The PHP Manual states that the function is available in PHP 5 (http://www.php.net/manual/en/function.imagettftext.php), and I have compiled with GD support. What am I missing? './configure' '--with-mysql=/usr/local/mysql' '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png' '--with-zlib-dir=/usr/local/zlib-1.2.1' '--enable-gd-native-ttf' '--with-ttf' thanks paul turning them on in php.ini? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] paradox ? Bug ?
Frédéric Hardy wrote: Marek Kilimajer wrote: > See recent discusion on this list about this behavior. You can find it in the archives if you look for __isset. I know, I am the author of this recent discussion. Current discussion is an "extension". isset($foo['bar']) tests for existance of $foo['bar'], however, you created $foo->array['bar'] in you __set() method. It's the same as before - isset() does not call __get(). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting $_POST variables back
Hi there, I am not sure if that is a common request, so I will post it here without checking the archives . ;-) I have a page which has its details from the $_POST array (ID, etc). On it there is a small link about people, this is done via href link in html. This link takes you to another page displaying info about people. What I want is to get back to the previous page without having to hit F5 again ("The session is up"). Obviously I cannot use js's history.back(-1) because the previous page needs the $_POST stuff. The interesting thing is now, if I do use history.back then after hitting F5 I get to the previous screen again (with my old $_POST) variables. NOW: The question arises: where does the browser store this info, and can I get it back from there on the page that got called via the href html? I would like to avoid some rather unnecessary server side selects to retrieve the previous page. Thanks Thomas
[PHP] Is a PECL a black whole?
It took me a while to find an explanation of what a PECL is. I kept reading comments about things being moved to a PECL but I saw nothing about what is in a PECL or how to get anything out of a (the?) PECL. As far as I knew, there is a danger of all of PHP being in a PECL. I could not (and cannot) find an explanation of a PECL when I start by going to the main php.net page and looking for one. So I searched for "PECL" and got a few results; one result is for vpopmail: http://us4.php.net/vpopmail >From that page I clicked on the link for the PECL and then modified the address for the page to get to the pecl.php.net page. Now when I search, I do see in the results the "PHP.net: A Tourist's Guide" page. That appears to be a very useful page. And now that I know to look for it, I do see a link to that page from the main PHP page. So people should be able to find an explnation of what a PECL is, but I just want to say that it might help to make it easier for new people to find the "PHP.net: A Tourist's Guide" page. Perhaps a link to it could be put into the box on the left under "What is PHP?". -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions Problems
No, I do not store two items with the same key, I just open another session in other page and it just overwrite session data of a previous session -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File Transfer
Marek Kilimajer wrote: raditha dissanayake wrote: Syed Ghouse wrote: Hi All i have to transfer files from one server to another server thru php program.will anybody tell me how to do it? PHP is not the way to do it! use SCP you don't have to write a single line of code. Don't look at FTP. even though the FTP rcf talks about transfering from one server to another i don't think any servers have implemented that part of the RFC not to mention the clients. One of the servers would act as a client. So it would not be server to server transfer. yikes. how did i overlook that :-( Anyway, be carefull with ftp, passwords are send in plaintext. Executing scp from php is a better choise. Marek -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regex for Validating URL
> Just to be pedantic, that would be pedantry ;) ! Is this thread ever going to die? Or would that be dye? ;) alex hogan * The contents of this e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom it is addressed. The views stated herein do not necessarily represent the view of the company. If you are not the intended recipient of this e-mail you may not copy, forward, disclose, or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error please e-mail the sender. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] List Slow?
raditha dissanayake wrote: John Nichel wrote: Is the list about two hours behind in delivering email today for everyone, or is it just me? Of course, if it is just me, I'll have to wait two hours to find out. ;) The servers are probably clogged wiht mysql questions and flames at people who point out that mysql is off topic for this list. Those damn MySQL questions. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call to undefined function imagettftext()
While working with some CAPTCHA stuff I get the following error: Fatal error: Call to undefined function imagettftext(). The PHP Manual states that the function is available in PHP 5 (http://www.php.net/manual/en/function.imagettftext.php), and I have compiled with GD support. What am I missing? './configure' '--with-mysql=/usr/local/mysql' '--with-apxs=/etc/httpd/bin/apxs' '--with-gd' '--with-png' '--with-zlib-dir=/usr/local/zlib-1.2.1' '--enable-gd-native-ttf' '--with-ttf' thanks paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] paradox ? Bug ?
Marek Kilimajer wrote: > See recent discusion on this list about this behavior. You can find it in the archives if you look for __isset. I know, I am the author of this recent discussion. Current discussion is an "extension". > > echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); > > should give you this fatal error: > > Fatal error: Cannot access private property foo::$array in ... > Yes. I am agree with you. Add a public property in foo class and replace isset($foo->array) by your public property. Fred. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP5] paradox ? Bug ?
Well alright, then I ought to read the suggested sources. Thanks for the advice. Anyway, doesn't it cause trouble to have $array as a private member? Frédéric hardy wrote: Moreover, $foo['bar'] = 'bar' work perfectly... Fred. Frédéric Hardy wrote: WRONG ! Read the manual about __set() and __get(). And read http://www.php.net/~helly/php/ext/spl/index.html about arrayAccess. Php 5 allow you to "overloading" property dynamicaly with __set() and __get(). And you can access an object like an array with arrayAccess interface. There is no nonsense in my code. Fred. Daniel Kullik wrote: Hello Frédéric. This is neither a bug nor a paradox. The code you've posted just contains some nonsense. $foo['bar'] = 'bar'; cannot work since $foo is an object and not an array. And even $foo->bar = 'bar'; cannot work because there is no property $bar. Frédéric hardy wrote: Hello - I think there is a bug or a paradox in the php 5 object model implementation. This is an example : class foo implements arrayAccess { private $array = array(); function __construct() {} function __get($key) { return $this->offsetGet($key); } function __set($key, $value) { $this->offsetSet($key, $value); } function offsetExists($key) { return isset($this->array[$key]); } function offsetGet($key) { return $this->array[$key]; } function offsetSet($key, $value) { $this->array[$key] = $value; } function offsetUnset($key) { unset($this->array[$key]; } } $foo = new foo(); echo (isset($foo['bar']) == true ? 'set' : 'not set'); $foo['bar'] = 'bar'; echo (isset($foo['bar']) == true ? 'set' : 'not set'); echo $foo['bar']; #Expected result : # not set # set # bar #Real result # not set # set # bar # !! GREAT !! #Now, the same thing with __get() and __set() unset($foo); $foo = new foo(); echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); echo (isset($foo->bar) == true ? 'bar is set' : 'bar is not set'); $foo->bar = 'bar'; echo (isset($foo['bar']) == true ? 'bar is set' : 'bar is not set'); echo $foo->bar; #Expected result : # array is set # bar is not set # bar is set # bar #Real result # array is set # Ok ! # bar is not set # Ok ! # bar is not set # PROBLEM PROBLEM # bar # !! NOT GREAT !! ?> It is very strange. isset() does not return the good value on property wich was set with __set() !! But isset() return the good value on property wich was set in the class !! And isset() return the good value on value wich was set with offsetSet() method !! It is a paradox ! I think that isset MUST return the same value in all case. What do you think of ? Fred. Warning : the php code may be wrong (parse error...), i can not validate it in php5 currently -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] literal dates
On 03 September 2004 06:46, Justin French wrote: > If I use strtotime(), I'm handed back a GMT timestamp, > whereas I need a > *local* timestamp. No such thing as a *local* timestamp. UNIX timestamps are in GMT by definition -- it's the functions that work with them that do the timezone adjustments. (Compare mktime(12,0,0,9,1,2004) and gmmktime(12,0,0,9,1,2004), for example.) > Am I missing something here, I do I really need to know the > GMT offset > of every event? My opinion on that would be a "Yes", if you're storing events that can take place in multiple timezones. Your only other option, which would effectively give you your "local timestamp", is to treat every date/time entered as if it were GMT, and always use the gm*() functions (or force-add a "GMT" marker to strings passed to strtotime()). That way, no timezone adjustments are ever done, and any one user sees times as originally entered -- but you can't do cross-timezone comparisons because they're not timezone adjusted. Oh, and you probably still need to do manual tracking of DST. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] keep page information
and how could I do that? thanks in advance. "Ligaya Turmelle" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Session variables maybe > > Respectfully, > Ligaya Turmelle > > > > devil_online wrote: > > Hi have this code, that I print two or more things ate a diferente time, and > > the page refreshs after 10 seconds. > > > > > > > > > > > > > $hour = 21; > > $minute = 06; > > if(date('H')==$hour AND date('i')==$minute) > > { echo "hi how are you."; } > > $hour = 21; > > $minute = 07; > > if(date('H')==$hour AND date('i')==$minute) > > { echo "are you fine?"; } > > ?> > > > > however it is possible to keep in the page the information that was printed? > > > > thanks > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP5] paradox ? Bug ?
Moreover, $foo['bar'] = 'bar' work perfectly... Fred. Frédéric Hardy wrote: WRONG ! Read the manual about __set() and __get(). And read http://www.php.net/~helly/php/ext/spl/index.html about arrayAccess. Php 5 allow you to "overloading" property dynamicaly with __set() and __get(). And you can access an object like an array with arrayAccess interface. There is no nonsense in my code. Fred. Daniel Kullik wrote: Hello Frédéric. This is neither a bug nor a paradox. The code you've posted just contains some nonsense. $foo['bar'] = 'bar'; cannot work since $foo is an object and not an array. And even $foo->bar = 'bar'; cannot work because there is no property $bar. Frédéric hardy wrote: Hello - I think there is a bug or a paradox in the php 5 object model implementation. This is an example : class foo implements arrayAccess { private $array = array(); function __construct() {} function __get($key) { return $this->offsetGet($key); } function __set($key, $value) { $this->offsetSet($key, $value); } function offsetExists($key) { return isset($this->array[$key]); } function offsetGet($key) { return $this->array[$key]; } function offsetSet($key, $value) { $this->array[$key] = $value; } function offsetUnset($key) { unset($this->array[$key]; } } $foo = new foo(); echo (isset($foo['bar']) == true ? 'set' : 'not set'); $foo['bar'] = 'bar'; echo (isset($foo['bar']) == true ? 'set' : 'not set'); echo $foo['bar']; #Expected result : # not set # set # bar #Real result # not set # set # bar # !! GREAT !! #Now, the same thing with __get() and __set() unset($foo); $foo = new foo(); echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); echo (isset($foo->bar) == true ? 'bar is set' : 'bar is not set'); $foo->bar = 'bar'; echo (isset($foo['bar']) == true ? 'bar is set' : 'bar is not set'); echo $foo->bar; #Expected result : # array is set # bar is not set # bar is set # bar #Real result # array is set # Ok ! # bar is not set # Ok ! # bar is not set # PROBLEM PROBLEM # bar # !! NOT GREAT !! ?> It is very strange. isset() does not return the good value on property wich was set with __set() !! But isset() return the good value on property wich was set in the class !! And isset() return the good value on value wich was set with offsetSet() method !! It is a paradox ! I think that isset MUST return the same value in all case. What do you think of ? Fred. Warning : the php code may be wrong (parse error...), i can not validate it in php5 currently -- === Frederic HARDYEmail: [EMAIL PROTECTED] HEXANET SARL URL: http://www.hexanet.fr/ ZAC Les CharmillesTel: +33 (0)3 26 79 30 05 3, allée Thierry Sabine Direct: +33 (0)3 26 61 77 84 BP 202 - 51686 REIMS CEDEX 2 FRANCE === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP5] paradox ? Bug ?
Frédéric Hardy wrote: Hello - I think there is a bug or a paradox in the php 5 object model implementation. This is an example : class foo implements arrayAccess { private $array = array(); function __construct() {} function __get($key) { return $this->offsetGet($key); } function __set($key, $value) { $this->offsetSet($key, $value); } function offsetExists($key) { return isset($this->array[$key]); } function offsetGet($key) { return $this->array[$key]; } function offsetSet($key, $value) { $this->array[$key] = $value; } function offsetUnset($key) { unset($this->array[$key]; } } $foo = new foo(); echo (isset($foo['bar']) == true ? 'set' : 'not set'); $foo['bar'] = 'bar'; echo (isset($foo['bar']) == true ? 'set' : 'not set'); echo $foo['bar']; #Expected result : # not set # set # bar #Real result # not set # set # bar # !! GREAT !! #Now, the same thing with __get() and __set() unset($foo); $foo = new foo(); echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); echo (isset($foo->bar) == true ? 'bar is set' : 'bar is not set'); $foo->bar = 'bar'; echo (isset($foo['bar']) == true ? 'bar is set' : 'bar is not set'); echo $foo->bar; #Expected result : # array is set # bar is not set # bar is set # bar #Real result # array is set # Ok ! # bar is not set # Ok ! # bar is not set # PROBLEM PROBLEM # bar # !! NOT GREAT !! ?> It is very strange. isset() does not return the good value on property wich was set with __set() !! But isset() return the good value on property wich was set in the class !! And isset() return the good value on value wich was set with offsetSet() method !! It is a paradox ! I think that isset MUST return the same value in all case. What do you think of ? Fred. See recent discusion on this list about this behavior. You can find it in the archives if you look for __isset. Anyways, line echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); should give you this fatal error: Fatal error: Cannot access private property foo::$array in ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Popup with recent IE updates
"Lester Caine" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > So don't know what goes wrong, but were running Apache 2.0.50, PHP5.0.0 on > XP-SP1 and probably style sheets were going wrong. Switch back to W2k SP3 > and all is fine (SP4 screws up various other network apps) so we stay with > that until Linux is acceptable :) I think the problem is not that IE (as you said elsewhere) is crap. Probably it is your assumtion that it is crap that caused you to avoid adequate diagnosis of the problem. You sure did not provide an adequate description of the problem, which is a very likely cause of not getting a response (from Microsoft). In particular, XP SP2 does have popup blocking capability that works by showing a small window at the top of a page. This is similar to what you described, but if what you were encountering was the XP SP2 popup blocker, then you sure did not understand the problem. If you do not describe a problem well, then it is impossible to get useful help. If your pages use popups then XP SP2 will block them at the client end unless the client's owner chooses to see them. This probably is upsetting for you, but don't blame Microsoft for simply doing what is wanted by most of their customers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: [PHP5] paradox ? Bug ?
WRONG ! Read the manual about __set() and __get(). And read http://www.php.net/~helly/php/ext/spl/index.html about arrayAccess. Php 5 allow you to "overloading" property dynamicaly with __set() and __get(). And you can access an object like an array with arrayAccess interface. There is no nonsense in my code. Fred. Daniel Kullik wrote: Hello Frédéric. This is neither a bug nor a paradox. The code you've posted just contains some nonsense. $foo['bar'] = 'bar'; cannot work since $foo is an object and not an array. And even $foo->bar = 'bar'; cannot work because there is no property $bar. Frédéric hardy wrote: Hello - I think there is a bug or a paradox in the php 5 object model implementation. This is an example : class foo implements arrayAccess { private $array = array(); function __construct() {} function __get($key) { return $this->offsetGet($key); } function __set($key, $value) { $this->offsetSet($key, $value); } function offsetExists($key) { return isset($this->array[$key]); } function offsetGet($key) { return $this->array[$key]; } function offsetSet($key, $value) { $this->array[$key] = $value; } function offsetUnset($key) { unset($this->array[$key]; } } $foo = new foo(); echo (isset($foo['bar']) == true ? 'set' : 'not set'); $foo['bar'] = 'bar'; echo (isset($foo['bar']) == true ? 'set' : 'not set'); echo $foo['bar']; #Expected result : # not set # set # bar #Real result # not set # set # bar # !! GREAT !! #Now, the same thing with __get() and __set() unset($foo); $foo = new foo(); echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); echo (isset($foo->bar) == true ? 'bar is set' : 'bar is not set'); $foo->bar = 'bar'; echo (isset($foo['bar']) == true ? 'bar is set' : 'bar is not set'); echo $foo->bar; #Expected result : # array is set # bar is not set # bar is set # bar #Real result # array is set # Ok ! # bar is not set # Ok ! # bar is not set # PROBLEM PROBLEM # bar # !! NOT GREAT !! ?> It is very strange. isset() does not return the good value on property wich was set with __set() !! But isset() return the good value on property wich was set in the class !! And isset() return the good value on value wich was set with offsetSet() method !! It is a paradox ! I think that isset MUST return the same value in all case. What do you think of ? Fred. Warning : the php code may be wrong (parse error...), i can not validate it in php5 currently -- === Frederic HARDYEmail: [EMAIL PROTECTED] HEXANET SARL URL: http://www.hexanet.fr/ ZAC Les CharmillesTel: +33 (0)3 26 79 30 05 3, allée Thierry Sabine Direct: +33 (0)3 26 61 77 84 BP 202 - 51686 REIMS CEDEX 2 FRANCE === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Regex for Validating URL
On 02 September 2004 19:41, Nick Wilson wrote: > You know guys? I think you all take this a bit too seriously, > perdanticness (is there such a word?) Just to be pedantic, that would be pedantry ;) ! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP5] paradox ? Bug ?
Hello Frédéric. This is neither a bug nor a paradox. The code you've posted just contains some nonsense. $foo['bar'] = 'bar'; cannot work since $foo is an object and not an array. And even $foo->bar = 'bar'; cannot work because there is no property $bar. Frédéric hardy wrote: Hello - I think there is a bug or a paradox in the php 5 object model implementation. This is an example : class foo implements arrayAccess { private $array = array(); function __construct() {} function __get($key) { return $this->offsetGet($key); } function __set($key, $value) { $this->offsetSet($key, $value); } function offsetExists($key) { return isset($this->array[$key]); } function offsetGet($key) { return $this->array[$key]; } function offsetSet($key, $value) { $this->array[$key] = $value; } function offsetUnset($key) { unset($this->array[$key]; } } $foo = new foo(); echo (isset($foo['bar']) == true ? 'set' : 'not set'); $foo['bar'] = 'bar'; echo (isset($foo['bar']) == true ? 'set' : 'not set'); echo $foo['bar']; #Expected result : # not set # set # bar #Real result # not set # set # bar # !! GREAT !! #Now, the same thing with __get() and __set() unset($foo); $foo = new foo(); echo (isset($foo->array) == true ? 'array is set' : 'array is not set'); echo (isset($foo->bar) == true ? 'bar is set' : 'bar is not set'); $foo->bar = 'bar'; echo (isset($foo['bar']) == true ? 'bar is set' : 'bar is not set'); echo $foo->bar; #Expected result : # array is set # bar is not set # bar is set # bar #Real result # array is set # Ok ! # bar is not set # Ok ! # bar is not set # PROBLEM PROBLEM # bar # !! NOT GREAT !! ?> It is very strange. isset() does not return the good value on property wich was set with __set() !! But isset() return the good value on property wich was set in the class !! And isset() return the good value on value wich was set with offsetSet() method !! It is a paradox ! I think that isset MUST return the same value in all case. What do you think of ? Fred. Warning : the php code may be wrong (parse error...), i can not validate it in php5 currently -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php