[PHP] setcookie question
I need to create a cookie that is accessible from more than 1 application, but on the same server. What would be the proper syntax? What I tried was setcookie ("myCookie","$cookie_value",$timeToExpire,'/'); Right or wrong or impossible? Should I not have used the "/"? Thanks. -- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ PHP KISSQ v1.0 Stock Quote http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP scirpt needed
I'm trying to not reinvent the wheel. Can you all recommend a good script, or class, that will read a given directory, list the folder and/or files and create hyperlinks, allow you to then recursively, upon selection, read a given folder? There will be no editing. It's strictly for selecting and subsequent processing. Thanks. -- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Search a flat file.
Use the explode() function based on the colon. Then parse the 2nd array element for the username that you want. If matched, display all elements in that array row. Conversely you could use the implode() to reassemble the array row. (Assume $file_row is the row name that you have assigned) /* your code to loop through the file goes here */ $your_array = explode(":",$file_row); /* remember that arrays start with element 0 */ if ($your_array[1]) == "some name" { /* routine to display entire row */ } /* continue processing loop */ -- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Tom Ray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to be able to search a flat file line by line looking for data > such as a username then display all the information in that line. Is > there some way to search the following format: > > record1:username:info:info:info > record2:username:info:info:info > record3:username:info:info:info > > > So if someone submits the username in record two for the search I want > it to stop at record two and then display that information... > > any suggestions? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Function needed
I am in need of a function/script that will take a directory and search all filenames, recursively down, for a given file. Can anyone point me to a source? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Function needed
This resricts to *nix and can be disallowed due to security constraints, but thanks anyway. I just wrote my own PHP routine. -- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Chris Hewitt" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > $result=`ls -R | grep 'expression' ./`; > > HTH > Chris > > Jason Wong wrote: > > >On Sunday 09 June 2002 17:17, Austin Marshall wrote: > > > >>Gaylen Fraley wrote: > >> > >>>I am in need of a function/script that will take a directory and search > >>>all filenames, recursively down, for a given file. Can anyone point me > >>>to a source? Thanks. > >>> > >>$result=`grep -r 'expression' ./`; > >> > > > >This searches for strings within a file. > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] KISGB (PHP Guest Book) for PHPNuke!
Just a short announcement for those that have been requesting a port of KISGB to PHPNuke. I have a beta up and running at http://gaylenandmargie.com/nuke/html (A work in progress). Thanks! -- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Including images from Internet
Obviously, including an image from another page can be accomplished with an HTML tag. However, it seems that there are some inherent issues with doing this. How do you keep someone from linking a hi-res image and causing your browser to take forever to return, if you're on a dial-up? Is there someway that PHP can determine the size, via an fopen("http://a.c.com";) call or a socket? Or am I totally off base with the need/approach? I'm not looking to pilfer here. I want to allow people to leave a link to their image and then display their picture, as opposed to an icon that links to their picture. Since there may be several different ones on a page, I would expect that you'd have to pre-assemble your page and use PHP to determine size, validity, etc., if that is possible? Is this possible or do the pictures need to exist on the server? Thanks, -- Gaylen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP GuestBook - KISGB (Keep It Simple Guestbook) Version 3.0 Released
I have released version 3.0 of my KISGB. KISGB is a PHP guestbook program that does not require sessions, cookies, or an rdbms. Can be Public or Private through HTTP Authentication. Automated install script, fully customizable, clean, and fast. Separate multiple logging capabilty for tracking anything! Includes web-based password protected Admin functionality, along with email notification, greeting, ip logging, ip banning, bad word filter, smileys, allowable html tags in comments, next/previous, etc. Themes for controlling appearance that allow for background colors, images, animations, etc. Language support for Dutch, English, French, German, Polish, Portuguese, Spanish, and Surinam. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.0 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] A compress function?
With all the wonderful String functions in PHP, I haven't been able to find a str_compress(). Is there such an animal? Let's say I have a string like this: $myString = First_word <30 spaces> second_word <10 spaces> etc... I need to do one of two things. Either compress the multiple spaces to one and then use explode to break the string on a single space, or can someone explain another way to break $myString into only those pieces that contain usable text w/o spaces? Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: A compress function?
Not even close. I'm after a function to compress multiples of the same character to one instance, as in my stated example, 30 spaces to 1 space, not compressing the string. Emil offered a good substitute. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "George Nicolae" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > take a look at http://www.php.net/manual/en/function.bzcompress.php > > -- > > > Best regards, > George Nicolae > IT Manager > ___ > X-Playin - Professional Web Design > www.x-playin.f2s.com > > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > With all the wonderful String functions in PHP, I haven't been able to > find > > a str_compress(). Is there such an animal? Let's say I have a string > like > > this: > > > > $myString = First_word <30 spaces> second_word <10 spaces> etc... > > > > I need to do one of two things. Either compress the multiple spaces to > one > > and then use explode to break the string on a single space, or can someone > > explain another way to break $myString into only those pieces that > contain > > usable text w/o spaces? > > > > Thanks! > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > Home http://www.gaylenandmargie.com/ > > PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] CGI and HTTP Authentication
Is there any work around for using HTTP Authentication and PHP installed as CGI? I know how to make the detection, I'm hoping (probably in vain) that there is some way to make the two work. Thanks. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI and HTTP Authentication
Thanks :). I thought I had figured out a way to determine if it was a CGI or module. But it didn't work. Is there a reliable way? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Brian Clark" <[EMAIL PROTECTED]> wrote in message 20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede... > * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]: > > > Is there any work around for using HTTP Authentication and PHP installed as > > CGI? I know how to make the detection, I'm hoping (probably in vain) that > > there is some way to make the two work. Thanks. > > AFAIK, no, unless you use .htaccess based stuff. You may be able to use > an admin page to add users and write out the .htaccess file(s). Might be > possible.. > > -- > Brian Clark | Avoiding the general public since 1805! > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI and HTTP Authentication
Just for curiosity, can HTTP Authentication be disabled in any other way, if PHP is installed as a module? In other words, is there any other reason why the authentication might not work (under *nix), not IIS? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thanks :). I thought I had figured out a way to determine if it was a CGI > or module. But it didn't work. Is there a reliable way? > > -- > Gaylen > [EMAIL PROTECTED] > Home http://www.gaylenandmargie.com/ > PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > "Brian Clark" <[EMAIL PROTECTED]> wrote in message > 20020105042749.GK17616@ganymede">news:20020105042749.GK17616@ganymede... > > * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 04. 2002 21:26]: > > > > > Is there any work around for using HTTP Authentication and PHP installed > as > > > CGI? I know how to make the detection, I'm hoping (probably in vain) > that > > > there is some way to make the two work. Thanks. > > > > AFAIK, no, unless you use .htaccess based stuff. You may be able to use > > an admin page to add users and write out the .htaccess file(s). Might be > > possible.. > > > > -- > > Brian Clark | Avoiding the general public since 1805! > > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > > (E)ight (M)egabytes (A)nd (C)ontinually (S)wapping. > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI and HTTP Authentication
But is there a PHP variable that holds the Server API? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Brian Clark" <[EMAIL PROTECTED]> wrote in message 20020105061814.GL17616@ganymede">news:20020105061814.GL17616@ganymede... > * Gaylen Fraley ([EMAIL PROTECTED]) [Jan 05. 2002 00:22]: > > > Thanks :). I thought I had figured out a way to determine if it was a CGI > > or module. But it didn't work. Is there a reliable way? > > Yes, stick into a .php file and load it into your > browser. Beside "Server API" it'll either say Apache or CGI. > > -- > Brian Clark | Avoiding the general public since 1805! > Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8 > This page intentionally left unblank. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] phpinfo() question
When you run phpinfo(), the first line of detail has the OS version. What variable produces this? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Another php data gathering question
Is there any way, through PHP, to get the: server uptime processor type number of cpu's I'm trying to find a compatable solution for both win32 and *nix. Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] preg_replace help
I have need to be able to replace text within a string to turn it into a link. In other words, I might have a phrase lik: "blah, blah, blah, please visit my site at www.mysite.com. blah, blah,blah". I need to have the string converted to "blah, blah, blah, please visit my site at http://www.mysite.com. blah, blah,blah". The link might have more than 3 sections and won't necessarily end in .com (.net,.com.nl, etc.). Here is what I have been testing (then I get stuck): $myLink = "Please visit my web site at www.mysite.com. You will be glad you did!"; $repLink = preg_replace("/(www.)/i","http://\\1",$myLink); which yields Please visit my web site at http://www.mysite.com. You will be glad you did! What I would need is Please visit my web site at http://www.mysite.com>www.mysite.com. You will be glad you did! To be truthful, pattern matching is giving me migraines! Programming has always been natural to me (32 years of it), but this challenge (eregi, preg_match,etc.) is making me crazy! Can someone recommend a good tutorial or book on this subject? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: preg_replace help
First of all, thanks to everyone who replied! I have several good suggestions. Here is one that seems to work pretty well, to cover a multitude of situations: $msg = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])","\\1://\\2\\3", $msg); The only problem is that if a correctly formatted link is already in the text, then this routine tries to add an additional href and it gets all messed up. Is there any way that I can use this algorithm and logically tell it not to do the replace if the anchor tags are already in place? I can't just search for an anchor tag because there can be several in the text. Example: $myLink = "http://www.mytest.com\"; target=\"_n\">Testing"; echo makeLink($myLink); Creates $msg = http://www.mytest.com"; target="_blank">http://www.mytest.com" target="_n">Testing Any suggestions? "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have need to be able to replace text within a string to turn it into a > link. In other words, I might have a phrase lik: > > "blah, blah, blah, please visit my site at www.mysite.com. blah, > blah,blah". > > I need to have the string converted to "blah, blah, blah, please visit my > site at http://www.mysite.com. blah, blah,blah". The link might have more > than 3 sections and won't necessarily end in .com (.net,.com.nl, etc.). > > Here is what I have been testing (then I get stuck): > $myLink = "Please visit my web site at www.mysite.com. You will be glad you > did!"; > $repLink = preg_replace("/(www.)/i","http://\\1",$myLink); > > which yields > Please visit my web site at http://www.mysite.com. You will be glad > you did! > > What I would need is > Please visit my web site at href=http://www.mysite.com>www.mysite.com. You will be glad you did! > > To be truthful, pattern matching is giving me migraines! Programming has > always been natural to me (32 years of it), but this challenge (eregi, > preg_match,etc.) is making me crazy! Can someone recommend a good tutorial > or book on this subject? > > Thanks! > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] KISGB Version 3.1 Released - PHP Guest Book
Version 3.1 of my Keep It Simple Guest Book (KISGB) has just been released. Many major and minor enhancements. Please visit my web site for details! -- Gaylen [EMAIL PROTECTED] PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Mysterious />
For some (yet) unknown reason, when some text is being entered into a form, a mysterious /> is being appended. It's almost as if some XML functionality is bein added w/o my intention. For example, I might echo "" and the html source will show . I might have an end anchor tag that comes out />. Any clues? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mysterious />
Those are real examples. The /> gets appended when I use preg_replace and/or str_replace, as far as I can determine. And it's not every time. I'll try to replicate it. I've been working with code to strip it out and I need to get back to point zero. If I can get the code back, I will post it. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "James Cox" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > can you give an example? > > eg, is XHTML correct, however /> isn't correct at all :) > > Thanks, > > James Cox > -- > James Cox :: [EMAIL PROTECTED] > Please CC me when replying to my messages on lists. > Was I helpful? http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/ > > > -Original Message- > > From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] > > Sent: Friday, January 18, 2002 10:49 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Mysterious /> > > > > > > For some (yet) unknown reason, when some text is being entered > > into a form, > > a mysterious /> is being appended. It's almost as if some XML > > functionality > > is bein added w/o my intention. For example, I might echo "" and the > > html source will show . I might have an end anchor tag that > > comes out />. > > > > Any clues? > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > Home http://www.gaylenandmargie.com/ > > PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mysterious />
Solved a part of this. The nl2br (which I am using) converts "\n" to XHTML compliancy . I'm still trying to replicate the other. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Those are real examples. The /> gets appended when I use preg_replace > and/or str_replace, as far as I can determine. And it's not every time. > I'll try to replicate it. I've been working with code to strip it out and I > need to get back to point zero. If I can get the code back, I will post it. > > -- > Gaylen > [EMAIL PROTECTED] > Home http://www.gaylenandmargie.com/ > PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > "James Cox" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > can you give an example? > > > > eg, is XHTML correct, however /> isn't correct at all :) > > > > Thanks, > > > > James Cox > > -- > > James Cox :: [EMAIL PROTECTED] > > Please CC me when replying to my messages on lists. > > Was I helpful? > http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/ > > > > > -Original Message- > > > From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] > > > Sent: Friday, January 18, 2002 10:49 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] Mysterious /> > > > > > > > > > For some (yet) unknown reason, when some text is being entered > > > into a form, > > > a mysterious /> is being appended. It's almost as if some XML > > > functionality > > > is bein added w/o my intention. For example, I might echo "" and > the > > > html source will show . I might have an end anchor tag that > > > comes out />. > > > > > > Any clues? > > > > > > -- > > > Gaylen > > > [EMAIL PROTECTED] > > > Home http://www.gaylenandmargie.com/ > > > PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > > > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Variable referencing/substitution
How can this be done? If I have the name of a variable that is stored in an array, how do I use the stored value to represent the actual variable? Example: $variable = "old value"; $vNames[1] = '$variable'; //literal $variable I want to say $vNames[1] = "new value"; /and have $variable actually change. How? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Date & time
To correct the time, try this: "; $time = $time + (7*60*60); echo "adjusted time = ".date("Y/m/d H:i:s",$time).""; ?> -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v3.22 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Torkil Johnsen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello... > > I have a field in my mysql database containing date&time on the format > -MM-DD HH:MM:SS (24-hour format) > > Now. I want to output this as follows: DD.MM.YY at HH:MM:SS > Currently I do this by this function: > > function convert_datetime($in){ > $return = substr($in,8,2) . "." . substr($in,5,2) . "." . substr($in,2,2) . > " at " . substr($in,11,8); > return $return; > } > > Is there a better way? Either with mysql or php? > Now. Another problem. Since my webserver is in the states, and I live in > Norway, I get a 7 hour time difference. > > So when I do date("Y-m-d H:i:s") I get a time that is 7 hours wrong. > Any idea as to how I can correct this to be 7 hours later (that is: 12 in > server time is really 19 where I live) in an easy way? > > THanks in advance, > Torkil > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Checkboxe problem
I have a form with 1 checkbox and have coded it like this: When the form is submitted, $HTTP_POST_VARS[private] only exists IF checkbox is checked. It doesn't exist otherwise, which is causing a problem because there are several other elements before and after. What happens is the value AFTER "private" is actually populating "private" if "private" is empty (not checked). I am, no doubt, missing something small, but critical here. Can someone point out the error of my ways and explain how to get the checkbox key/value pair into the post vars array when the value is not checked? TIA, -- Gaylen PHP KISGB v3.22 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Patch 4.0.6 to 4.1.1
I was just getting ready to upgrade to 4.1.1 when I saw the patch that will do this. I have never applied one of these before and I was hoping for an explanation as to how you do this? Thanks. -- Gaylen PHP KISGB v4.00 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Header calling HTTP Authenticate issue
The following code returns a 404 error on a friends host site. The environment is Apache/1.3.23 (Unix) mod_layout/3.0.4 PHP/4.1.1 rus/PL30.11 running under FreeBSD as2.centre.ru 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Other scripts work just fine from the same directory, so I know php is installed and working. Has anyone else had an issue like this? If so, what could be the problem? Thanks. -- Gaylen PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Fixing the PHP security hole
Just for my own edification and understanding, do you (technically) have to do the configure since you haven't changed the configuration? "Girish Nath" <[EMAIL PROTECTED]> wrote in message 002901c1c115$c4608b60$0a0a@AERIS...">news:002901c1c115$c4608b60$0a0a@AERIS...; > Hi > > Unpack and copy the patch diff to the php4.0.6/main source directory, then > use : > > patch rfc1867.c rfc1867.c.diff-4.0.6 > > then the usual configure, make, make install. > > Regards > > > Girish > -- > www.girishnath.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Threads and PHP
Is it possible to use threads to perform an operation while another takes place with PHP? I have a situation where a process calls the mail() function and then must wait until that completes before going on to the next step. What I would like to happen is that the mail() function is handled by its own thread and the next screen refreshes immediately as the next screen is not dependent on the success/failure of the mail() call. Possible? -- Gaylen PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cursor focus
This is not a php question. It is a JavaScript issue. You need to add this code to the bottom of your page: document.forms[0].text_box_name.focus(); -- Gaylen PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > This is really a newbie question, but here goes. > > I am running PHP4 with Apache on Redhat 6.2. > > I am sure I read this somewheres, but can't find it again. When I open a > webpage in a small password application that I wrote, the cursor is not on > the first text box I need to fill in, I need to click on the text box to > begin typing. How do I get the cursor to "focus" on this text box? > > Many thanks in advance > > Ralph > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cursor focus
Well, unless you've disabled JavaScript in your browser, you are running it. -- Gaylen PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED].; > I am not running Javascript, just PHP/HTML... > THe particular script I am having problems with has several decision points > and includes which I think is confusing the placement of the cursor > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED].; > > This is not a php question. It is a JavaScript issue. You need to add > this > > code to the bottom of your page: > > > > > > document.forms[0].text_box_name.focus(); > > > > > > -- > > Gaylen > > PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > > > "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED].; > > > This is really a newbie question, but here goes. > > > > > > I am running PHP4 with Apache on Redhat 6.2. > > > > > > I am sure I read this somewheres, but can't find it again. When I open a > > > webpage in a small password application that I wrote, the cursor is not > on > > > the first text box I need to fill in, I need to click on the text box to > > > begin typing. How do I get the cursor to "focus" on this text box? > > > > > > Many thanks in advance > > > > > > Ralph > > > > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Hi can we write a form inside td element of a table?
This is an HTML question and not a php question. The answer is yes. -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Balaji Ankem" <[EMAIL PROTECTED]> wrote in message 000201c1c98c$dd246980$[EMAIL PROTECTED]">news:000201c1c98c$dd246980$[EMAIL PROTECTED]... > Hi, > can we give a form element as td inside table element? > > Thanks in advance > Balaji > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Making a simple borderless pop up window with a "Close" button
As noted before and on their website, it only works in IE. -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Qartis" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > If you want a popup window that lacks a border entirely, check out > chromeless windows at www.microbians.com > > > > "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message > 000f01c1cf3f$5321d520$c900a8c0@d8d0l7">news:000f01c1cf3f$5321d520$c900a8c0@d8d0l7... > > Hello friends. > > > > I am making a database website where I need to add a small help button for > > every field on the form. Whenever the user clicks the small help button, I > > wish to show a titleless popup window containing the help text and a > "close" > > button. Can someone help me with the php script for this. > > > > Thanks > > Denis > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Version 4.2 changes
Where can I find the changes coming in 4.2? -- Gaylen PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] KISGB Version 4.0.4 Released - PHP Guestbook
Version 4.0.4 of my Keep It Simple Guest Book (KISGB) has been released. Please refer to the history docs for changes. -- Gaylen PHP KISGB v4.0.4 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session control issue
I am experiencing a problem of trying to run several variants of the same code and keep the sessions separate. Here is the scenario. I am launching all of this from a CMS. So, the CMS displays a page that has 3 links on it. Link 1 is version A of an application, Link 2 version B, etc. The three links are all the same application but different builds, in essence. They all have the same session control code. They each launch a new window, but the session variables are staying in the pool for each link, which is not acceptable. When I call Link1 and then I call Link2, they need to have an independent pool (session). I have tried to unregister, destroy, unset, to no avail. Is there a way, or am I out of luck? Hard coding is not an option, as the code has to be standard across all platforms and releases. -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v2.1 Guestbook http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I NEED HELP WITH PWS AND W98
I've been running Apache on 98SE (I agree - DON'T ASK!) for most of this year without ny issues at all. Win98needs reboots a few times a week, but it's not Apache's problem. I also run PHP4.0.6 and 4.0.8-dev and MySQL 3.23.43 and they all work and play well together. Just to keep my sanity, I also run a linux server too :). It helps me knowing that computers aren't supposed to have to be rebooted to keep them stable! -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v2.1 Guestbook http://www.gaylenandmargie.com/phpwebsite "Richard S. Crawford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Getting PHP to work with Apache is pretty simple. The documentation is easy to read. I would agree with trying Apache on your Win98 box; but be warned that the current Apache release is only supposed to be stable on NT platforms. Since I have win2k it's not an issue for me, but it might now work on Windows 98. At 08:54 AM 10/24/2001, Chris Hayes wrote: >hi Nicolas, >pws is not so great. if you are still in the beginning phase >you may consider to use the free Apache server. It has a >version for windows, very stable. >You just need to make some changes to the configuration file to >make php work. btw you do not need to compile php if you >download the right version! (don't download 'source' but maybe >they call it 'binary' or whatever). > >There are even packets on the internet which include working >combinations of apache + php4 + mysql (mysql= free very popular >web database). Just do a search on a search engine. >There are also instruction pages on how to make php work on >apache (you need to change two or three lines in a >configuration file). > >good luck. >Chris Sliante, Richard S. Crawford http://www.mossroot.com mailto:[EMAIL PROTECTED] AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: authentication help
Here would be one of many ways. This assumes that login.php and index.php are in the same directory. login.php User Password -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v2.1 Guestbook http://www.gaylenandmargie.com/phpwebsite "Norman Zhang" <[EMAIL PROTECTED]> wrote in message 001701c15cd8$a7acb710$[EMAIL PROTECTED]">news:001701c15cd8$a7acb710$[EMAIL PROTECTED]... > Hi, > > Would someone please give me a few pointers on how to generate a simple PHP > to check for user's name and password before directing to a directory? > > e.g., I have a index.php with a form where I have action="login.php". How > would I write login.php to check username and password if I have them hard > coded in login.php and if authentication fails the user is directed back to > index.php? Is this safe? > > Regards, > Norman > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Where is my php.ini?
Ok. I've installed php on linux and all is well! Been running for weeks now. Problem is, I never had to set up my php.ini . Got curious and am wondering where it is. Locate php.ini yields one in the pear/tests directory, but that's not it. Suggestions? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini?
7.2 and I compiled PHP 4.0.6 myself. When I run phpinfo, it shows the configuration file path = /usr/local/lib/php.ini . there is no php.ini in the file. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite "Jim Lucas" <[EMAIL PROTECTED]> wrote in message 00bc01c1632b$b84bbf40$[EMAIL PROTECTED]">news:00bc01c1632b$b84bbf40$[EMAIL PROTECTED]... > most of my installs, Redhat linux 7.0 and 7.1, have placed the php.ini file > in the /etc/php.ini location. what version of linux are you using? > > Jim > - Original Message - > From: "Gaylen Fraley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, November 01, 2001 3:16 PM > Subject: [PHP] Where is my php.ini? > > > > Ok. I've installed php on linux and all is well! Been running for weeks > > now. Problem is, I never had to set up my php.ini . Got curious and am > > wondering where it is. Locate php.ini yields one in the pear/tests > > directory, but that's not it. Suggestions? > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > Home http://www.gaylenandmargie.com > > PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Where is my php.ini? - FORGET IT!
Sorry! I had a senior moment.! I have it. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.21 Guestbook http://64.133.20.82/phpwebsite "Meir Kriheli" <[EMAIL PROTECTED]> wrote in message 20011101233857.HRNC958.fep2@there">news:20011101233857.HRNC958.fep2@there... > On Friday 02 November 2001 01:16, Gaylen Fraley wrote: > > Ok. I've installed php on linux and all is well! Been running for weeks > > now. Problem is, I never had to set up my php.ini . Got curious and am > > wondering where it is. Locate php.ini yields one in the pear/tests > > directory, but that's not it. Suggestions? > > If you don't have one, PHP will use defaults. In PHP's source directory > there's a file called php.ini-dist (or something similar) you can copy it to > where PHP expects to find it and rename it to php.ini. > > To find out where you should copy it create a php file containing phpinfo() > in it and access it with your browser. Examine the output to see where the > ini is expected (you can define this while running configure during the build > process) > > -- > Meir Kriheli -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Recompiling under new kernel
I've updated the linux kernel and just noticed that phpinfo (obviously) still only knows about the system info under the previous kernel. In order to bring the information up to date, do I have to recompile from scratch, or is there an easier way? I seem to remember reading that if I don't want to change any configuration options that I can short step the ./configure command. Can anyone shed some light on this? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Controlling length of table data
This is really a combination html/php question, I believe. The problem is that I have a table that displays a field of text that can be several hundred bytes long. If, however, someone holds down a key and produces 500 letter 'x' the table data then distorts the table! Since the length of the data needs to be several hundred bytes, is there someway to either control the table data width so that the length of a non breaking string of characters will not distort the table, or is there a php string function to break the sentence into words and then I'd have to build some logic to test the length? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Reading a web page as a text string
You could do something like this: $ip = "10.030.88.24"; //example $url = "http://www.arin.net/cgi-bin/whois.pl?queryinput=$ip";; $fp = @fopen($url, 'r') or die("Cannot Open"); Then, parse the $fp with fgets, or something to find the string you are after. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite "Michael J. Seely" <[EMAIL PROTECTED]> wrote in message news:a04320401b81a0a4cd323@[208.37.135.187]... > HI Folks, > > How can I read a html page as a text file? > > I saw a demo of someone doing this on a Mac using AppleScript. The > example sent a zip code as a variable attached to the remote site > url. This resulted in a web page being sent back with the city and > state info included. He then read the page as a text string, parsed > out the city and state info and used it. > > How could this be done with PHP? > > I think the sending the url and zip code variable could easily be > done with a . How do you read the html page that is > returned? > > Any ideas. Thanks. > -- > > _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ > Michael Seely 408-777-9949 > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Need regular match help - possibly
I need a routine that will allow me to trap multiple and/or line feed characters and convert them to a constant number. As an example, let's say that you have text that has 10 carriage returns and/or line feeds. I want to limit this to 3. So, I need to be able to parse the line to detect the multiple control characters and convert the string to 3. So if the string looked something like: This is \n\n\n\n\n\n\n\n\n\n a test. I would want it converted to This is \n\n\n a test. Conceivably, it could be This is a test. I would want it converted to This is a test. I know I could write a do/while loop, but I was wondering if there is a way using eregi_replace or something along that line? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Need regular match help - possibly
Thanks. According to the manual, the is for XHTML compliance. This changed in 4.0.5. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.3 Guestbook http://www.gaylenandmargie.com/phpwebsite "Liljim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Thinking about it, this would probably be even better: > > $string = preg_replace("/(\n|){3,}/i", "\\1\\1\\1", $string); > > This: > $string = "This is a > \n\n\n\n\n\n\n\n\n\n\ntest\nTesting\nTesting\n\n123< > br>Some more testingAnd > a little > more > Even more."; > > Then outputs as this: > > This is a > > > test > Testing > Testing > > 123Some more testingAnd a little > moreEven more. > > when echo'd with nl2br() > > As a side note, does anyone know what's with the tag changing to />? That's the way I've always used the line break tag for wml pages, but > hadn't realised that it's being written that way for standard html now. Is > this a change in spec? > > James > > "Liljim" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Hello Gaylen, > > > > try this: > > > > $string = preg_replace("/\n{3,}/", "\n\n\n", $string); > > > > James > > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I need a routine that will allow me to trap multiple and/or line > feed > > > characters and convert them to a constant number. As an example, let's > > say > > > that you have text that has 10 carriage returns and/or line feeds. I > want > > > to limit this to 3. So, I need to be able to parse the line to detect > the > > > multiple control characters and convert the string to 3. So if the > string > > > looked something like: > > > > > > This is \n\n\n\n\n\n\n\n\n\n a test. > > > > > > I would want it converted to > > > > > > This is \n\n\n a test. > > > > > > > > > Conceivably, it could be > > > > > > This is a test. > > > > > > I would want it converted to > > > > > > This is a test. > > > > > > > > > I know I could write a do/while loop, but I was wondering if there is a > > way > > > using eregi_replace or something along that line? > > > > > > Thanks! > > > > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: relative paths
You've answered your own question. If document-root is set to /usr/web/htdocs then require("/somefile") will expect to find "somefile" in document-root. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite "Mitja Pagon" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > I want to know if there is a way to include(require) a file using a path > relative to web server root. > > I'm aware of the fact that you can specify include path, but I believe that > this is not the best solution, since applications written that way aren't > easily portable. > > What I'm looking for is something similar to what "/" does in HTML paths and > SSI include directives. > > Thanks, > > Mitja Pagon > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session woes
I have a friend who is using an ISP that uses php4.0.3pl1 . It appears that session_register is not working between pages. In script A, the session var gets registered and shows registered using session_is_registered('testvar'); However, when script B is called, a session-start is issued and testvar is not registered. Running the identical code, but not with his ISP, under 4.06, it works perfectly. Are there known issues? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.5 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] KISGB (Keep It Simple Guest Book) v2.6 released
Version 2.6 of my Guest book is released! Description: A PHP (version 4.x) guestbook program that does not require an rdbms. Can be Public or Private through HTTP Authentication. Automated install script, fully customizable, clean, and fast. Separate multiple logging capabilty for tracking anything! Includes web-based password protected Admin functionality, along with email notification, greeting, ip logging, ip banning, bad word filter, smileys, allowable html tags in comments, next/previous, etc. Themes for controlling appearance that allow for background colors, images, animations, etc. Language support for Dutch, English, French, German, Polish, Portuguese, Spanish, and Surinam. -- Gaylen [EMAIL PROTECTED] PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Which dyndns?
I'm having to switch from static IP to dynamic :). I've finally gotten the Earthlink DSL (dynamic IP) up and running. Now I need to get the service to keep my domain name in sync with my dynamic ip. On the short list are: TZO EasyDNS DNS2Go DynDNS Is there a better choice? I will need ports 21,22,23, and 80 for sure. Possibly others. 1 linux box and 1 windoze box. What would be the best choice and what kind of fee would I be needing? Your experiences please! Please reply directly to me as I can't get newsgroups at work. Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: session woes
No, it still doesn't work. I believe it's a documented issue with that release. it was fixed in 4.0.4dev. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite "Yasuo Ohgaki" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Gaylen Fraley wrote: > > > I have a friend who is using an ISP that uses php4.0.3pl1 . It appears that > > session_register is not working between pages. In script A, the session var > > gets registered and shows registered using session_is_registered('testvar'); > > However, when script B is called, a session-start is issued and testvar is > > not registered. Running the identical code, but not with his ISP, under > > 4.06, it works perfectly. Are there known issues? > > > > If you can trun off register_globals, set it to OFF. > register_glogals=Off is recommended setting BTW. > > Use $HTTP_SESSION_VARS. Do not use session_register(), just set value to > $HTTP_SESSON_VARS. Do not use session_unregister(), just unset() > $HTTP_SESSION_VARS. > > -- > Yasuo Ohgaki > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHPWebSite software broken after 4.1.0 install?
Is anyone else experiencing this? Login to admin.php. PHPWS accespts the login and password. However, when I click on any link, like Edit Web Page, it kicks up a blank screen where it should be the web page data. If I try to edit a main page announcement, it just kicks me back to the admin login screens. Am I alone, or are others experiencing this? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Need PHP 4.0.3pl1
This build is not on php.net. I need both the linux source and the windows binary for testing. Does anyone know where I can obtain these? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Simple Question
strip_slashes() -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite "Tom Ray" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a quick question that I haven't been able to find the answer to > yet. I've made a couple of guest books via PHP but the biggest problem > I'm having is if any one inputs a ' or " or anything like that, the > output in the book shows the stupid \ for the escape. So the word > "Tom's" looks like "Tom\'s" Is there anyway for me to handle those > characters so the backslash doesn't appear in the output? > > Thanks, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Simple Question
Nope. fatfingered :) stripslashes() is correct! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite "Martin Towell" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Gaylen is prob right - I didn't check me syntax :( > > -Original Message- > From: Tom Ray [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 13, 2001 3:11 PM > To: Gaylen Fraley > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Simple Question > > > oh no, Iv'e gotten two answers... > > stripslashes() and strip_slashes() > > which one? which one?! > > Gaylen Fraley wrote: > > >strip_slashes() > > > >-- > >Gaylen > >[EMAIL PROTECTED] > >Home http://www.gaylenandmargie.com > >PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite > > > >"Tom Ray" <[EMAIL PROTECTED]> wrote in message > >[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > >>I have a quick question that I haven't been able to find the answer to > >>yet. I've made a couple of guest books via PHP but the biggest problem > >>I'm having is if any one inputs a ' or " or anything like that, the > >>output in the book shows the stupid \ for the escape. So the word > >>"Tom's" looks like "Tom\'s" Is there anyway for me to handle those > >>characters so the backslash doesn't appear in the output? > >> > >>Thanks, > >>Tom > >> > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: php4apache.dll please !!!!
Assuming your php folder is php, /php/sapi -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Rick" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi guys , could you tell me please , Where I can find the php4apache.dll ? Thanks , Ricardo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Brain dead - need help!
DUH! I had tried that and it didn't work, so I panicked and posted! Come to find out, I had a typo. I am so red thanks! BTW, to the others who answered privately that it's automatically there - Not if register_globals is set to OFF, which is what I am using. But thanks for responding! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Jack Dempsey" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > use a phpinfo() in one of your pages...that'll show you various places to get > your data... > btw, php does have the $HTTP_GET_VARS that'll have what you want... > > jack > > Gaylen Fraley wrote: > > > I know that I know the answer - it's just buried in the recesses of my mind > > .. > > > > PHP has the various $HTTP_*_VARS arrays. Is there one to get the > > formliteral pairs from the hyperlinks, as in > href="somepage.php?var1=test">? I want to extract the $var1 value pair. I > > know I can do this through javascript, but I want somepage.php to parse and > > use the variable/value. If there is not an array, then what is the simplest > > way? > > > > Thanks! > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > Home http://www.gaylenandmargie.com/ > > PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Opinions, please
A security question, concerning PHP and overall best practice. I have an application that is used by users that have no control over what version of PHP is on their server. Some versions do not support sessions. So, I am attempting to modify the code to accommodate this and minimize, if not eliminate, the risk of a break-in. Basically, index.php (pageA) can call admin.php (pageB). pageB accepts a userid and password ($user/$pass). At this point, these are form variables that will be passed, via $HTTP_POST_VARS. pageB calls pageC, which verifies the user/pass against a security file. If validated, then pageC is accessed. If not, user is kicked out. No problem so far and no variables have been exposed. But, from pageC, you can go down several paths. Now to the question/opinion. How do I validate, w/o sessions, that pageD or pageE has been entered from pageC and not forged? I can pass the user/pass via a hidden field on the form of pageC, but that exposes it. Philosophically, this may not be a problem, since the user has to go through pageC to get to the other ones anyway. Use referer? That seems like that could easily be forged. Your thoughts? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Brain dead - need help!
I know that I know the answer - it's just buried in the recesses of my mind .. PHP has the various $HTTP_*_VARS arrays. Is there one to get the formliteral pairs from the hyperlinks, as in ? I want to extract the $var1 value pair. I know I can do this through javascript, but I want somepage.php to parse and use the variable/value. If there is not an array, then what is the simplest way? Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Help with permissions/ownership
I'll try to be both concise and precise with this. I have some PHP code like this: if (!rename($path_to_file,$path_to_file_BACKUP)) die("$unable_to_access_file_msg $path_to_file_BACKUP"); $buffersize = round(filesize($path_to_file_BACKUP)*1.5); $fp_in = fopen("$path_to_file_BACKUP","r") or die("$unable_to_access_file_msg $path_to_file_BACKUP"); $fp = fopen("$path_to_file",'a') or die("$unable_to_access_file_msg $path_to_file"); set_file_buffer($fp,$buffersize); fwrite($fp,"hello") or die("HELP!"); fclose($fp); This works, sort of. It dies with HELP! The rename happens exactly as required. However, when PHP creates the $fp file, the owner and permissions are different. I can chmod the permissions, through PHP (chmod($path_to_file,0777) , but I can't seem to change the owner, using chown (it says it is not allowed). The original file, before being renamed and the directory are 0777. After the rename, the old file is still 0777, but the new file ($fp) is 0644. It appears that the new owner is the root directory for the server document (in this case 1792=www), instead of the group. As an example, before the rename, the owner is 1444 as is the group. When $fp is created, the owner is now 1792 but the group is still 1444 (user name of the ftp account). On most systems, this seems to work ok. But on some linux systems, it fails due to the ownership. The PHP program cannot write to the new file. I'm hoping that I'm overlooking some minor/major factor here, that someone will/can point out. How does PHP, or is it the server, get ownership? I hope this make sense. Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: $GLOBALS array
Why aren't you using the $_POST or $HTTP_POST_VARS array? -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Philip Maciver" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Does anyone know if it is possible to use the > > 'global $varName' > > function with the '$GLOBALS' array itself. > > I have been having some trouble with this. I have decieded to switch of register_globals in the php.ini file (seeing as > it is now deprecated in version 4.1.0) > I know that register_globals is still supported, but I would like to get used to not using it. > But anyway, the problem I am having is that when I post data from a form to another page the data is not available > globally, so I wrote a method to register them globally, it looks like this > > function globaliseVars($varArray) { > global $GLOBALS; > > while (list($varName,$var) = each($varArray)) { > $GLOBALS[trim($varName)] = trim($var); > } > } > > But doing 'global $GLOBALS' doesn't seem to make it refer to the actual '$GLOBALS' array, the only time it did work was > when I place something into the '$GLOBALS' array on the page that calls the function. So > > /** > * This doesn't work > */ > globaliseVars($HTTP_POST_VARS); > > > /** > * But this does > */ > $GLOBALS["ANYTHING"] = "anything"; > globaliseVars($HTTP_POST_VARS); > > If anyone could help me with this problem please could they get in touch, because its driving me crazy. > > Thanks! > > == > Philip MacIver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP and permissions/ownership
I'll try to be both concise and precise with this. I have some PHP code like this: if (!rename($path_to_file,$path_to_file_BACKUP)) die("$unable_to_access_file_msg $path_to_file_BACKUP"); $buffersize = round(filesize($path_to_file_BACKUP)*1.5); $fp_in = fopen("$path_to_file_BACKUP","r") or die("$unable_to_access_file_msg $path_to_file_BACKUP"); $fp = fopen("$path_to_file",'a') or die("$unable_to_access_file_msg $path_to_file"); set_file_buffer($fp,$buffersize); fwrite($fp,"hello") or die("HELP!"); fclose($fp); This works, sort of. It dies with HELP! The rename happens exactly as required. However, when PHP creates the $fp file, the owner and permissions are different. I can chmod the permissions, through PHP (chmod($path_to_file,0777) , but I can't seem to change the owner, using chown (it says it is not allowed). The original file, before being renamed and the directory are 0777. After the rename, the old file is still 0777, but the new file ($fp) is 0644. It appears that the new owner is the root directory for the server document (in this case 1792=www), instead of the group. As an example, before the rename, the owner is 1444 as is the group. When $fp is created, the owner is now 1792 but the group is still 1444 (user name of the ftp account). On most systems, this seems to work ok. But on some linux systems, it fails due to the ownership. The PHP program cannot write to the new file. I'm hoping that I'm overlooking some minor/major factor here, that someone will/can point out. How does PHP, or is it the server, get ownership? I hope this make sense. Thanks! -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Sessions
By design. Try accessing $HTTP_SESSION_VARS instead. That should work. In other words, if you were accessing a session variable by $session_var, now use $HTTP_SESSION_VARS['session_var']. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com/ PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/ "Philip Maciver" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Since turning of register_globals in the php.ini file, sessions don't seem to be working any more, does anyone know why? > > == > Philip MacIver -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP installed - MySql Server can't connect
PHP install went perfectly. phpinfo shows MySql installed. But, when I try to start Mysql, I get: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) What and why? Please reply to my e-mail address if you can help. Thanks! -- Gaylen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RPM Install #6 still doesn't work
Ok. I've been in this industry for 32 years. I've loved O/S2, hated windoz and been intrigued with *nix. So, I have a successful web site and server under windoz/php/mysql and I decide to venture into RedHat Linux because I have heard some great things about it. I get 7.0 and install it, virgin. Apache and PHP work, but I was never able to get MySQL working, except from a command line. So, after abut 17 hours of frustration, I get 7.1 . Apache is the only thing that works. I was able to get PHP working when I did an install from scratch (tarball). But, it seems as if the RPM should work. I still could not get MySQL working working. It consistently gives an error 2002 / socket problem. Right now I have a virgin Apache and PHP4 and MySwl install from the RPM (7.1) and php will not work. As far as I can tell, I have modified my httpd.config in all the right places. Please, could someone who has a working install from the 7.1 RPM package, please post their httpd.conf lines that pertain to getting php to work? Also, if their is a library that I need to move around, please advise that too. Thanks. The MySQL problem would be a nice caveat if someone knows how to fix that too :) Regards, -- Gaylen [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] phpinfo - mysql - windows
I've just installed mysql 3.23.39 binary under windows. However, when I run phpinfo it shows 3.23.32 . When I run mysqladmin version, it shows 3.23.39 . Why the conflict? Thanks. -- Gaylen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: phpinfo - mysql - windows
That's what I figured. Problem is I don't use the compiled version in windoz. I compile my own under Linux, but not windows. BUMMER! -- Gaylen "Henrik Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > [EMAIL PROTECTED] (Gaylen Fraley) wrote: > > > I've just installed mysql 3.23.39 binary under windows. However, when I run > > phpinfo it shows 3.23.32 . When I run mysqladmin version, it shows 3.23.39 > > . Why the conflict? Thanks. > > I think the version you get from phpinfo is the version of the bundeld > mysql client. To upgrade this recompile php and specify a mysql source dir. > > -- > Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Why no color in graphic?
I'm simply trying to resize an image, which is working - sortof. It resizes properly, but it loses it's color. Why, and how do I correct it? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Readline and/or split by line break
http://www.php.net/manual/en/function.file.php "Karl J. Stubsjoen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > GlacierHello, > I'm reading a file into memory and I'd like to split each of the individual > lines into an array. How would I do this? > Thanks, > > Karl J. Stubsjoen > www.iexcelinlife.com > [EMAIL PROTECTED] > Phone: 602.447 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Content Management Systems
Have you tried http://www.hotscripts.com/PHP/Scripts_and_Programs/Content_Management/ -- Gaylen "Ralph Guzman" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I am looking for new alternatives in web development and maintenance. > Anybody have any suggestions or comments on any open source/commercial > PHP+mySQL based CMS programs? > > Thanks. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Any good gif/jpg processing tool for PHP??
PHP does exactly that. Look in the manual for the Image functions. -- "Diego Fulgueira Pastor" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am sure many of you have had this same problem. I want all uploaded images > to my site (gifs and jpg) to be resized "on the fly" so that all have the > same width and height. Does anyone knows about a tool (free, if possible) > that can do this under Win2k, IIS 5.0 and that can be used with PHP 4.0? A > php extension (dll) would be great. If it works only for one format (gif or > jpg) is fine. > Thanks in advance for any tip. > > Cheers, Diego. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I HAVE A PROBLEM HERE...
There is a maximum length that a link with variable pairs can pass. It escapes me right now, but it isn't too large. Are you passing more than just this one variable? If so, just as a test, try only passing php_self and see if it makes it. -- "Joshman" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > the php file wont submit to the next file (which is th same file actually: > $PHP_SELF ) because the variable is too big for some reason aparently, evn > though i have other variables larger than that particular one... > > -Josh > > "Rm" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Problem isn't size, you may have a syntax > > error...perhaps if you give more detail, submit the > > variable to what? What do you mean it won't let you? > > > > rm > > > > > > --- Joshman <[EMAIL PROTECTED]> wrote: > > > Supposively all php variables arent suppose to have > > > size limits, for > > > example, I have a php file with a variable the about > > > the size of 40 bytes, > > > but it wont let me submit the variable for some > > > stupid reason, somebody tell > > > me what parameter I have to set to the variable so > > > it WILL work.. and/or why > > > it is not working the way php.net says it should. > > > thanks.. > > > > > > -Josh > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > __ > > Do You Yahoo!? > > Make international calls for as low as $.04/minute with Yahoo! Messenger > > http://phonecard.yahoo.com/ > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php and java
I'm trying to get java support working with php and the jvm loads the first time and then I have to start and stop the server to get it to load again. In other words it's erring out and saying it can't load the jvm. I have followed the instructions at www.phpbuilder.com exactly and can't seem to get it to work, other than one time inbetween starts. Suggestions? I am running php under windows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Extract email address from string
I need to parse a string and extract only the email address. What is the best way to do this? i.e. $string = "Please send all email to [EMAIL PROTECTED] with a subject line of Test."; $email_addr would be equal to [EMAIL PROTECTED] . Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: ImageCopyResampled() versus ImageCopyResized()
I use it all the time and it is MUCH better. -- Gaylen "Dgoddard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Has anyone out there used ImageCopyResampled()? This function was added in > PHP 4.0.6 and requires GD 2.0.1 or later. So I haven't been able to try it > out yed. > > I'm just wondering if it will deliver better image quality when you use it > to render a shrunk-version of a graphic than ImageCopyResized(), which has > been available for some time. > > Thanks, > > -D > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Load testing
LoadRunner is excellent. -- Gaylen "Andrew Brampton" <[EMAIL PROTECTED]> wrote in message 077301c13558$f62c5820$0100a8c0@andrew">news:077301c13558$f62c5820$0100a8c0@andrew... Hi, I'm looking for a app that I can run across my network that will load test my webserver & pages... Something like a program that will open 100 pages at once and tell me the response times or error occuring etc... Does anyone know of such a app? Thanks Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: newbie ? :)
Have you contacted Mercury yet? Try them or try the linux.redhat.misc newsgroup. -- Gaylen "Caleb Carvalho" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > hello all, > > i am trying to install Loadrunner for in linux, > > am not sure where is my LD_LIBRARY_PATH > linux rhat7.1 can some pls point me out > > many thanks, > > kind regards > caleb > > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: include problem
Provide an absolute path to the file, like /path/path1/incl.txt instead of a URL. <[EMAIL PROTECTED]> wrote in message 003701c13854$50ecf780$0100a8c0@pentium333">news:003701c13854$50ecf780$0100a8c0@pentium333... Hi I have a little Problem with include.I want to include a txt file in every php file on the server but some php files are in other directories and dont include this txt file. Example : Url for the txt file : www.domain.com/include/incl.txt So www.domain.com/index2.php includes the txt file correctly but www.domain.com/shop/shop.php dont do this. In the include command i used the serverpath to the txt file. So what should i do ? Thanks for support ! chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Seperating a textarea into 3 different variables
Is this under Windows? If so, it's probably passing \r\n : carriage return/line feed. Check for both. -- Gaylen "Richard Kurth" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have a problem I am trying to set up a credit card form for worldpay > > And in the address field that I have to send to them it has to go in > a textarea > > So when you fill this in it would look like this > > address > city > state > > Now this works fine for sending them the data but when the data is > sent back it is also in this format > address > city > state > > I need to separate it into Address, city, state so it is 3 different > variables > > I have tried > $saddress=explode (" ",$address); > $address1=$saddress[0]; > $city=$saddress[1]; > $state=$saddress[2]; > > is the the new line character > > I have also tried /n and /s but none of these work > > When I echo the $address to the screen it shows as address city state > but when I vew the code from the browser it shows it as > address > city > state > > So I assume that it is passing a new line character > > Does anybody have a solution for this > > > > > > > > > > > > > Best regards, > Richard > mailto:[EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Is it acceptable to post GPL software releases here?
Is it acceptable to post announcements of software (PHP scripts) that one wishes to make public here? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] New PHP Guest Book Program
** I asked a few of the regulars here and found no objections to this posting ** I am making available a Guest Book program that I have written. My KISGB (Keep It Simple Guest Book) is a guest book program that does not require an rdbms. Fully customizable, clean, and fast. Includes web-based password protected Admin functionality, along with email notification, greeting, ip logging, etc. IE 4.x and higher has no problems with the displaying. I am still working with some idiosyncrasies with NN 4.7x If you are interested in demoing it, please goto http://www.gaylenandmargie.com/publicscripts Thanks, -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Probem with Rename() and linux
I am attempting to use the rename() function and am receiving the following error: Warning: Rename failed (Permission denied) in /usr/local/apache/htdocs/mydir/myfile.php on line 7 The files all have a mod of 777 . My application can update the same file w/o any problem, it's only when attempting to use rename. Is there something else I need to do? It's as if delete is not allowed by httpd, although as root I can. This does work in windows, so I know the syntax is correct. Thanks. -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: \n not working
If you are trying to use \n for a new line in HTML code, it will not work. In other words echo "Hello\nWorld instead. Also, be sure that you are using double quotes instead of single quotes. Single quoted text is literally interpreted. -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts "Alpherjo" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am just learning PHP. I have it installed on my Win 2000 IIS to practice, > and after I save PHP files in my wwwroot folder, I go ahead and access my > practice pages through IE via my full (universal) server address. However, > the \n code (to start a new line) never works. Any ideas? > Thanks! > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Problem with Rename() and linux - update
It is the delete (unlink) portion that the page cannot execute. So, I assume this is a setting in my server conf? Apache is running as nobody, but nobody is not a valid user on my linux server. Is that the problem? If so, is the normal prcatice to have a user like 'web' and give all rights to that user? Alternatively I could do a copy and truncate to accomplish the same task, but this seems too laborious. Thoughts? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am attempting to use the rename() function and am receiving the following > error: > > Warning: Rename failed (Permission denied) in > /usr/local/apache/htdocs/mydir/myfile.php on line 7 > > The files all have a mod of 777 . My application can update the same file > w/o any problem, it's only when attempting to use rename. Is there > something else I need to do? It's as if delete is not allowed by httpd, > although as root I can. This does work in windows, so I know the syntax is > correct. > > Thanks. > > -- > Gaylen > [EMAIL PROTECTED] > http://www.gaylenandmargie.com > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP windows version DLLs ...
Look in your php\extensions directory. There should be a php_gd.dll . -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts "Nico_oreka" <[EMAIL PROTECTED]> wrote in message 00f401c13ef3$80ed60a0$0100a8c0@p2333">news:00f401c13ef3$80ed60a0$0100a8c0@p2333... Does someone know where i can get various extension DLLs for 'Zend' PHP 4 for windows ? I can't find any on the net !!! I'm specialy lookin for the 'GD' dll extension thanx. (°-Nayco, //\[EMAIL PROTECTED] v_/_ http://nayco.free.fr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Problem with Rename() and linux - update
That's what I suspected and yes, that does work. However, it causes problems with session handling variables since 'www' doesn't own the 'tmp' file, etc. Thanks though for confirming what I suspected. Any other thoughts from anyone? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts "Chris Schneck" <[EMAIL PROTECTED]> wrote in message 003d01c13ef8$84435020$[EMAIL PROTECTED]">news:003d01c13ef8$84435020$[EMAIL PROTECTED]... > Although this is a little OT, I dont remember any online tutorials that > helped me and this is a fairly lengthy explanation. In your httpd.conf (this > is how i did it you can find your own way im sure) set the apache user to be > www and the group to www. Apache now knows to run as that user, but your > linux box doesnt know that user which seems to be the root of your problem. > Now you have to edit the file '/etc/passwd' and add a line like > 'www:x:105:105:www::' then edit your '/etc/group' file and a dd a line like > 'www::105:'. > Restart your Apache server. > Now your Apache server is ready to run as user www group www. Any Directory > of Files that Apache is going to be working with should be chown'ed to > www.www > > Remember not to 'adduser' to accomplish this, you dont want anyone actually > logging in as www :) Hope this helped a little. > > > From: "Gaylen Fraley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, September 16, 2001 2:07 PM > Subject: [PHP] Re: Problem with Rename() and linux - update > > > > It is the delete (unlink) portion that the page cannot execute. So, I > > assume this is a setting in my server conf? Apache is running as nobody, > > but nobody is not a valid user on my linux server. Is that the problem? > If > > so, is the normal prcatice to have a user like 'web' and give all rights > to > > that user? Alternatively I could do a copy and truncate to accomplish the > > same task, but this seems too laborious. Thoughts? > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > http://www.gaylenandmargie.com > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I am attempting to use the rename() function and am receiving the > > following > > > error: > > > > > > Warning: Rename failed (Permission denied) in > > > /usr/local/apache/htdocs/mydir/myfile.php on line 7 > > > > > > The files all have a mod of 777 . My application can update the same > file > > > w/o any problem, it's only when attempting to use rename. Is there > > > something else I need to do? It's as if delete is not allowed by httpd, > > > although as root I can. This does work in windows, so I know the syntax > > is > > > correct. > > > > > > Thanks. > > > > > > -- > > > Gaylen > > > [EMAIL PROTECTED] > > > http://www.gaylenandmargie.com > > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with Rename() and linux - SOLVED but....
I figured out another way to solve this. But, I need to know the downside, if any. I chmod the directory to 2777 and leave Apache as is. Obviously this opens the directory up to danger if someone hacks in. Comments? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts "Chris Schneck" <[EMAIL PROTECTED]> wrote in message 003d01c13ef8$84435020$[EMAIL PROTECTED]">news:003d01c13ef8$84435020$[EMAIL PROTECTED]... > Although this is a little OT, I dont remember any online tutorials that > helped me and this is a fairly lengthy explanation. In your httpd.conf (this > is how i did it you can find your own way im sure) set the apache user to be > www and the group to www. Apache now knows to run as that user, but your > linux box doesnt know that user which seems to be the root of your problem. > Now you have to edit the file '/etc/passwd' and add a line like > 'www:x:105:105:www::' then edit your '/etc/group' file and a dd a line like > 'www::105:'. > Restart your Apache server. > Now your Apache server is ready to run as user www group www. Any Directory > of Files that Apache is going to be working with should be chown'ed to > www.www > > Remember not to 'adduser' to accomplish this, you dont want anyone actually > logging in as www :) Hope this helped a little. > > > From: "Gaylen Fraley" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, September 16, 2001 2:07 PM > Subject: [PHP] Re: Problem with Rename() and linux - update > > > > It is the delete (unlink) portion that the page cannot execute. So, I > > assume this is a setting in my server conf? Apache is running as nobody, > > but nobody is not a valid user on my linux server. Is that the problem? > If > > so, is the normal prcatice to have a user like 'web' and give all rights > to > > that user? Alternatively I could do a copy and truncate to accomplish the > > same task, but this seems too laborious. Thoughts? > > > > -- > > Gaylen > > [EMAIL PROTECTED] > > http://www.gaylenandmargie.com > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > I am attempting to use the rename() function and am receiving the > > following > > > error: > > > > > > Warning: Rename failed (Permission denied) in > > > /usr/local/apache/htdocs/mydir/myfile.php on line 7 > > > > > > The files all have a mod of 777 . My application can update the same > file > > > w/o any problem, it's only when attempting to use rename. Is there > > > something else I need to do? It's as if delete is not allowed by httpd, > > > although as root I can. This does work in windows, so I know the syntax > > is > > > correct. > > > > > > Thanks. > > > > > > -- > > > Gaylen > > > [EMAIL PROTECTED] > > > http://www.gaylenandmargie.com > > > PHP KISGB v1.01 Guestbook http://www.gaylenandmargie.com/publicscripts > > > > > > > > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Applying the memory-limit patch
I've looked for instructions on this but have been unable to find them. How do you apply the memory-limit patch for 4.0.6 on Windows? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.1 Guestbook http://www.gaylenandmargie.com/publicscripts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] nimda, etc.
Are you sure about that? I am trying his script and I just had an "attack" and I watched the traffic through my firewall software. It dropped off immediately, i.e. showed no activity. I was expecting to see somekind of a persistant connection, but It doesn't seem to be there. I tested it myself and got the same results. My browser just sat there spinning, but there was no traffic in and out of my site. -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Sean Straw / Pse" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > At 13:48 2001-09-21 -0700, Bill Rausch wrote: > > sleep( 300 ); > > > >I felt that if nothing else I could slow the worm down a little by > >wasting its time before it races off to the next potential target. > >Does what I'm doing make any sense or am I all confused? > > I do like the concept behind the sleep idea, but this is going to tie up > acesses to *YOUR* server, which means you're literally setting yourself up > for a DoS. I doubt that was a design goal. > > I think setting up a script which hands off the vitising IP address to your > firewall and stealths the requests would be much better. If I could get an > answer to a cache implementation question I posted here this morning, I'd > be moving along to providing such a facility to those interested... > > FTR, the implementation I have in place right now is invoked via a > rewriterule in apache, so I don't log 404 errors. > > --- > Please DO NOT carbon me on list replies. I'll get my copy from the list. > > Sean B. Straw / Professional Software Engineering > Post Box 2395 / San Rafael, CA 94912-2395 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Sort Question (Again)
When you do $list = sort($list) you are assigning a boolean true/false to the success/failure of the sort to $list (on the left hand side of the equals sign). What I think you really want is: $list = file('list_main.txt'); sort($list); Regards, -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Jeff Oien" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > This didn't get answered before. I'm trying to sort an array but it > won't work. > $list = file('list_main.txt'); > $list = sort($list); > If I print $list it gives me 1 and print $list[0] is nothing. The list_main.txt > looks something like this: > ABC > DEFG > HIJ > etc. > > Jeff Oien -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Checking if session has been started
Why not populate a session variable, in the page that starts the session, like : session_start(); session_register("valid_session"); $valid_session = true; Then in the page that you need to check, like: if ($session_valid) { // Do something since a session is already running } -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Alexander Skwar" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi I need to run some code if a session has been started. However, to do this, I need to figure out IF the session has been started at all. How can I do this? Is checking for the count of elements in HTTP_SESSION_VARS the only reliable way of doing this? Like so? Thanks, Alexander Skwar -- How to quote: http://learn.to/quote (german) http://quote.6x.to (english) Homepage: http://www.digitalprojects.com | http://www.iso-top.de iso-top.de - Die günstige Art an Linux Distributionen zu kommen Uptime: 3 days 3 hours 9 minutes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Script for a private mail system
Try http://www.hotscripts.com/PHP/Scripts_and_Programs/Email_Systems/ . -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Tom Nickels" <[EMAIL PROTECTED]> wrote in message 005401c14383$59de4440$149696c8@ws10">news:005401c14383$59de4440$149696c8@ws10... Hi, does anybody knows or have a php script for a private mail system within one website (mailboxes for sending private messages in a dating site) Thanks Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Why this error to this newsgroup?
Every message that I post to news.php.net gets posted, but I receive this email: This is the Postfix program at host mail.aaz-netmarketing.com. I'm sorry to have to inform you that the message returned below could not be delivered to one or more destinations. For further assistance, please send mail to If you do so, please include this problem report. You can delete your own text from the message returned below. The Postfix program <[EMAIL PROTECTED]>: can't create user output file. Command output: procmail: Error while writing to "/var/spool/mail/dtt" -- This just started, I believe, this week. Is there some kind of an auto-responder that isn't working correctly? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Search in Progress
You don't need layers. Just have a js routine that sends 2 different location statements, i.e. parent.resultsframe.location = "javascript:'document.write(loading...');"; // then start your search code here -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Rm" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > to my knowledge what you're talking about is done > through html layers and javascript...I've seen it done > at other siteshttp://www.anywho.com/rl.html uses > this process. > > rm > > > > > > --- Alexis Antonakis <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I am developing a simple site, in PHP4, which has > > three frames on it. > > > > The first gives you the search options and the > > second two, the results. > > > > What I was wondering was, while the database is > > being searched, is it > > possible to display some text in the 'results' frame > > stating that the search > > is in progress? > > > > > > I also have another site which I would like do this > > on, however this one, > > rather than using frames, uses tables, and it is > > only when the entire set of > > data for each table has been retrieved that the page > > is actually displayed. > > > > Any suggestions would be most appreciated > > Alexis > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > > __ > Do You Yahoo!? > Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: error message
You forgit the $ sign. Should be if(!$submit) -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Peter" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > I was wondering does anyone know what this particular error message means: > > Warning: Use of undefined constant submit - assumed 'submit' in > /usr/local/apache/htdocs/mm2/mymarket/privatedirectory/db/newthread.php on > line 110 > > But I already defined submit button as shown in the php script here: > > > > But for some reason when it goes to line 110 as shown just below, it says > that it is undefined: > > if(!submit) { > > if(validate_input($name, $email, $subject, $message) == 0) { > > > What should I check for? > > Thanks. > > Peter > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] KISGB - PHP Guestbook
Since I originally announced this guestbook app here and so many have downloaded it (thanks!), I need to let you know that I recommend getting the latest copy. I have done quite a bit of work, even up to the sending of this. There were a couple of warning messages that were appearing and there have been some Netscape display issues (browser wars!). In any event, I will not flood the ng with more announcements, but this really was the easiest way as opposed to sending out dozens of e-mails. Thanks for your indulgence and your support! -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: NONE
Why not just use the PHP function array_multisort ? -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Tero Tielinen" <[EMAIL PROTECTED]> wrote in message 1103_1001260674@hunajapuristin">news:1103_1001260674@hunajapuristin... > Hello! > > Firs of all, sorry about my bad english. > > I have a broblem, which i've tried to solve about two days now. > > I have an two-dimenssional array like this: > > $array[0]["id"] = 2; > $array[1]["id"] = 3; > $array[2]["id"] = 4; > $array[3]["id"] = 5; > $array[4]["id"] = 6; > $array[5]["id"] = 7; > $array[6]["id"] = 8; > $array[7]["id"] = 9; > $array[8]["id"] = 10; > > $array[0]["kat_id"] = 1; > $array[1]["kat_id"] = 1; > $array[2]["kat_id"] = 1; > > $array[3]["kat_id"] = 3; > $array[4]["kat_id"] = 3; > $array[5]["kat_id"] = 3; > > $array[6]["kat_id"] = 4; > $array[7]["kat_id"] = 4; > $array[8]["kat_id"] = 1; > > I want to sort the array by using the "id" and "kat_id" values. I've > tried loop like this (among many others): > > for($i = 0; $i < sizeof($array); $i++) > { >$father = $array[$i]["id"]; >for($j = $i; $j < sizeof($array); $j++) >{ > if($father == $array[$j]["kat_id]) > { > return_array[] = $father; > return_array[] = $array[$j][$id]; > } > else > { > return_array[] = $father; > } >} > > } > > The loop dont't work. And i now the broblem in theorrtical level. The loop should test does the latter value in if-part ($array[$j][$id]) have any child values, but i just can't > get it to work. I want the result array, in this case, to look like this: > > $array[0]["kat_id"] = 1; > $array[1]["kat_id"] = 1; > $array[3]["kat_id"] = 3; > $array[4]["kat_id"] = 3; > $array[6]["kat_id"] = 4; > $array[7]["kat_id"] = 4; > $array[5]["kat_id"] = 3; > $array[8]["kat_id"] = 1; > > > Can anybody help me? > > Thanks, > > Tero > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Language translation
What is the most accepted method for translating an application from one language to another? Is it done by a table that does a search and replace, i.e. one-to-one translation? Or does one actually translate the code verbatim? Is there a white paper somewhere? Thanks, -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Javascript document variable names for complex forms
Try var myvar = opener.parent.top.document.form.var.value -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "M" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello people. > > First , let me thanks all of you who answered my mime-mail question > (special Richard Lynch). > > Next question (probably not for proper list, but I couldn't get answer, > so please sorry me). > > I have http frame page (classical 'top', 'left' and 'center' frames), > then 'center' frame opens new window. From this new windows, I need > access some 'top' document variable names-values. I tried all possible > combinations, but couldn solve this. > > Examples: > > (from into new-window, child of 'center' frame) > > var myvar = parent.top.document.form.var.value > var myvar = top.document.form.var.value > var myvar = parent.parent.top.document.form.var.value > > Thanks in advance > > Miguel > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Windows question
http://www.php.net/manual/en/ref.exec.php -- Gaylen [EMAIL PROTECTED] http://www.gaylenandmargie.com PHP KISGB v1.2 Guestbook http://www.gaylenandmargie.com/publicscripts "Clint Tredway" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Can PHP kick off an exe or batch file? > IF it can, how does one go about doing so? > > Thanks, > Clint -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]