[PHP] Re: Shifting banner on re-display

2004-11-13 Thread M. Sokolewicz
such things never have anything to do with PHP, and everything to do with the browser and/or HTML source code. So... either consider it a browser bug, or a bug in your HTML (I'd guess #1, and if you're using IE, then you can't do anything about it) - Tul Andre Dubuc wrote: Hi, I have a very ann

[PHP] Re: PHP file permission

2004-11-14 Thread M. Sokolewicz
depends on what you need it for Jerry Swanson wrote: What is the optimal PHP file permission? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: File Handing Windows / Linux

2004-11-14 Thread M. Sokolewicz
Steve Vernon wrote: Hiya! I am trying to make some code which gets a handle to a directory, but has different code for my localhost (Windows) and for online (Linux server). Basically, I want either of the below lines. Say if the first fails, it must be on Linux and then it uses the line below.

Re: [PHP] copy function?

2004-11-16 Thread Matt M.
> I have a button which I want to add a function to, so that when it is > clicked, the data from one will be copied to another > > Which event handler of the button should I use and hoe should I construct > the function? onclick. This is not really a php question. do some googleing for javasc

[PHP] Re: http header script to stimluate upload with drag and drop??

2004-11-16 Thread M. Sokolewicz
Scott Fletcher wrote: Hi! I wonder is is it possible to have an http header that would stimluate headers don't "stimulate". They are simple "messages", a bit of text with no real meaning until the browser/server/whatever gives it meaning locally to itself. files/folders upload via dragging o

[PHP] Re: splitting string

2004-11-16 Thread M. Sokolewicz
Afan Pasalic wrote: I create a string from other strings: $string = $string1."\n".$string2."\n".$string3."\n".$string4."\n".$string5; and then store it in DB. But, I can't figure out how to split them back? Tried: $string_back = explode('\n', $string); $string_back = explode('', $string); $string_

Re: [PHP] splitting string

2004-11-16 Thread M. Sokolewicz
Afan Pasalic wrote: Chris W. Parker wrote: Yes. $string = "$string1|$string2|$string3|$string4|$string5"; $string_back = explode("|", $string); Ok, I'm going to change the code and use pipes :) Thanks to all of you.! -afan please explain... WHY is that better? -- PHP General Mailing List (http://

Re: [PHP] Sorting...

2004-11-17 Thread Matt M.
> array ( > 20040310, Title, Author > 20041115, Title, Author > 20040513, Title, Author > ) > > where each array element is 1 line from the csv. When I go to print it > out, Im going to explode each by , and then print it out the way I like. > > BUT, I want to sor

[PHP] Re: How to assure that php.ini is being obeyed?

2004-11-17 Thread M. Sokolewicz
Sebastian Mendel wrote: Llc Mailit wrote: My problem: To upload large files. Although /etc/php.ini on my Linux server specifies upload_max_filesize = 8M post_max_size = 8M only files smaller than 512 kB are uploaded, while larger files fail with message "File contains no data" Everything happens a

Re: [PHP] How do I get referer in php?

2004-11-17 Thread M. Sokolewicz
Chris W. Parker wrote: Brent Clements on Wednesday, November 17, 2004 11:55 AM said: Let's say I have a page at another site that links to a php script on my server. Is there anyway to get the referrer to the php script using php? Yes, and more. echo "",print_r(

Re: [PHP] How do I get referer in php?

2004-11-17 Thread M. Sokolewicz
John Holmes wrote: M. Sokolewicz wrote: Chris W. Parker wrote: echo "",print_r($_SERVER),""; why are you echoing the result of print_r ?! The result is a boolean true or false. the actual output ON SCREEN is done from WITHIN the function automatically. Echoing the result

[PHP] Re: Simple coding question

2004-11-19 Thread M. Sokolewicz
$var = ($_GET['var'] ? $_GET['var'] : 'value'); Octavian Rasnita wrote: Hi all, Please tell me which is the shortest method for writing the following code: $var = $_GET['var'] || 'value'; I want the program to put the value "value" in the variable $var if the array element 'var' is not defined or i

[PHP] Re: Sort $_FILE['userfile']['name'] by ascending abc order...

2004-11-19 Thread M. Sokolewicz
Scott Fletcher wrote: Um, let's see, what would be the way to go in sorting the dual array --snip-- $_FILES['userfile']['name'] $_FILES['userfile']['type'] $_FILES['userfile']['size'] $_FILES['userfile']['tmp_name'] $_FILES['userfile']['error'] --snip-- where $_FILES['userfile']['name'] would be i

[PHP] Re: Class for determining word count, ignoring HTML?

2004-11-20 Thread M. Sokolewicz
Murray @ Planetthoughtful wrote: Hi All, Just wondering if anyone knows of a class that can perform a word count of text in a string that ignores HTML? IE, something that would correctly determine that the following string is 6 words long: " This string is six words long. " If suc

Re: [PHP] help with html through php

2004-11-21 Thread M. Sokolewicz
Rens Admiraal wrote: Hi Todd, Maybe I can show you a technique which is real helpful to me... You can make a HTML file which you use as template, and add some standard strings (character chains) to it... Like [TIME], or [ACTIVE_USER]... When you open the HTML document in your browser, you can se

Re: [PHP] Tabs or Spaces?

2004-11-21 Thread M. Sokolewicz
Jon-Eirik Pettersen wrote: Daniel Schierbeck wrote: Hello there! There seems to be some tendency towards using spaces instead of tabs when indenting PHP code - personally i can't come up with any reason not to use tabs. I was just wondering if any of you freakees had some sort of explanation...

Re: [PHP] Tabs or Spaces?

2004-11-21 Thread M. Sokolewicz
Chris Shiflett wrote: --- Ryan King <[EMAIL PROTECTED]> wrote: However, when indenting with 3 spaces instead of a single tab, then your code-size WILL increase, and will include 3x more "space content" than it used to :) Who cares? Just to point out the obvious, if you're not using a compiler cach

[PHP] Re: Lost Variables

2004-11-23 Thread M. Sokolewicz
Monique Verrier wrote: First -- thank you for reading my post. I am using the general strategy suggested by Jay (thanks, Jay) to process my form in another procedure. It's listed below. In my processStuff.php program, I use the following code: $attributes = array(); $attributes = array_merge($att

Re: [PHP] Random number generation and phpBB search IDs

2004-11-27 Thread M. Sokolewicz
Gordon McKeown wrote: Apologies, my mail client was supposed to line-wrap that for me - Hi, I'm currently experiencing a problem with a phpBB board that appears to be due to the way random number generation works in PHP. I have posted on serveral phpBB boards and have received no answers, s

[PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
Octavian Rasnita wrote: Hi all, I have tried the following script: $val = 100; if (is_int($val)) { echo $val; } else { echo "$val is not an integer\n"; } The answer is: 100 is not an integer. Why does this happen? I use PHP 5. Isn't PHP able to work with values like 10 billion? Do I

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
should be fine ;) - Tul Octavian Rasnita wrote: Ok, I understand. But what can I do if I want to print big numbers like 123 billion? (but real numbers, not those written with the "E" letter in them? Is this possible with PHP or I need to do it with another language? Thank you. Teddy

Re: [PHP] Re: Bad PHP error

2004-11-27 Thread M. Sokolewicz
you might want to try using number_format() to change the format back to "integer likeness" Bao Ruixian wrote: Hello, Octavian Rasnita wrote: This prints: 1E+012 and... not 1 as it should. I tried the above example, and I got what you want, i.e. 1. My environment is W

Re: [PHP] How to ensure cookies are turned on.

2004-11-29 Thread M. Sokolewicz
Marek Kilimajer wrote: Gary Reimer wrote: Hello; I’m working on a website that uses sessions as an integral part of the site. If cookies are not turned on in the browser, my site will not work. I’ve been searching unsuccessfully to find the way to determine if the browser has cookies enabled. I

Re: [PHP] PHP and Frames?

2004-11-29 Thread M. Sokolewicz
Jake McHenry wrote: - Original Message - From: "Chris W. Parker" <[EMAIL PROTECTED]> To: "Jake McHenry" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 29, 2004 6:26 PM Subject: RE: [PHP] PHP and Frames? Jake McHenry on Monday, November 29, 200

[PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread M. Sokolewicz
[EMAIL PROTECTED] wrote: Hi. We use linux as default development system. Does anyboy know about a linux based php editor with autocompletion? Must be open source free software (free as in speech, not beer). We like quanta and kate, but there is no autocompletion. Does anyone know about a php IDE?

Re: [PHP] Re: php editor or php IDE for linux with autocompletion

2004-11-30 Thread M. Sokolewicz
Christophe Chisogne wrote: M. Sokolewicz wrote: I prefer vim, which does have auto-completion, as an add-on. Interesting. Where can this add-on be found? (google/vim.org/debian.org, I guess, but...) wouldn't call it an IDE... =/ Yes, but so usefull when edition html tags Ex "ct>&

Re: [PHP] Errors

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

Re: [PHP] Custom Open Tags

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

Re: [PHP] Custom Open Tags

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

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

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

[PHP] Re: Browsing while downloading?

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

Re: [PHP] Text Parser

2004-12-02 Thread M. Sokolewicz
Richard Davey wrote: Hello Pablo, Thursday, December 2, 2004, 3:12:09 PM, you wrote: PDM> I´m receiving this: "house , ball , door , roof , floor" PDM> And I want to obtain this: "'house','ball','door','roof','floor'"

Re: [PHP] How to Add a Module

2004-12-03 Thread M. Sokolewicz
Nick Peters wrote: Richard Lynch wrote: Nick Peters wrote: i currently have a apache and php installed perfectly on my box (slackware 10). However, i have the need to use mcrypt. I have mcrypt all compiled and installed, but how do i add the module to my php install? I have searched a few places o

Re: [PHP] How to Add a Module

2004-12-03 Thread M. Sokolewicz
Nick Peters wrote: M. Sokolewicz wrote: Nick Peters wrote: Richard Lynch wrote: Nick Peters wrote: i currently have a apache and php installed perfectly on my box (slackware 10). However, i have the need to use mcrypt. I have mcrypt all compiled and installed, but how do i add the module to my

[PHP] Re: executeing another files code

2004-12-04 Thread M. Sokolewicz
Ryan A wrote: Hey all, Heres my problem, I have this written in "email.fff" # Start file ## Hi $firstname $lastname, We have recieved your request for support. We will get back to you shortly. Regards, $sitename P.S below is the message you submitted: $message # End

Re: [PHP] executeing another files code

2004-12-04 Thread M. Sokolewicz
Marek Kilimajer wrote: Ryan A wrote: Hey all, Heres my problem, I have this written in "email.fff" # Start file ## Hi $firstname $lastname, We have recieved your request for support. We will get back to you shortly. Regards, $sitename P.S below is the message you submitted: $mes

Re: [PHP] executeing another files code

2004-12-04 Thread M. Sokolewicz
Marek Kilimajer wrote: M. Sokolewicz wrote: Marek Kilimajer wrote: Ryan A wrote: Hey all, Heres my problem, I have this written in "email.fff" # Start file ## Hi $firstname $lastname, We have recieved your request for support. We will get back to you shortly. Regards,

[PHP] Re: Regex Parsing

2004-12-05 Thread M. Sokolewicz
[EMAIL PROTECTED] wrote: I wish to improve upon my regular expression skills. I am creating a journal object that allows me to post my journals online, while at the same time maintaining nine different levels of privacy. For example, if I give a user Level 3 access, then they would be able to see

[PHP] Re: Regex Parsing

2004-12-05 Thread M. Sokolewicz
it to only get the first [/LEVEL1] rather than going to the bottom and getting the second? I've always wondered how to tell it to get the first, rather than the last... Thanks in advance! U means it'll become UNgreedy (means it ends at the first occurence instead of the last), m means

[PHP] Re: Why it doesnt work

2004-12-10 Thread M. Sokolewicz
register_globals? :) Aalee wrote: Hi ive tried this script and it doesnt seem to work for me. I have typed exactly the same username and password in the script..it keeps on asking for the username and password..pls help...cud this be due to a setting in the php or apache server...am using php 4.3 a

Re: [PHP] full http request

2004-12-10 Thread M. Sokolewicz
Raditha Dissanayake wrote: Mirek Novak wrote: Hello people, is it possible to see full http request as it has arrived on server? I mean including all headers and etc. There is an extension for firefox that gives you the headers that are sent by the browser. At the other end the $_SERVER variable

Re: [PHP] Removing a return character

2004-12-10 Thread M. Sokolewicz
John Nichel wrote: Greg Donald wrote: On Fri, 10 Dec 2004 10:10:20 -, Shaun <[EMAIL PROTECTED]> wrote: I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing

Re: [PHP] I need to pass vars to external cgi script ?

2004-12-11 Thread M. Sokolewicz
TECTED] Sent: 11 December 2004 15:26 To: Dave Carrera; [EMAIL PROTECTED] Subject: Re: [PHP] I need to pass vars to external cgi script ? From: "Dave Carrera" <[EMAIL PROTECTED]> I need to send some vars to a cgi script. The script url is like this http://www.example.com/cgi-bin/s

[PHP] Re: How can I fix that

2004-12-13 Thread M. Sokolewicz
Aalee wrote: Hi there everyone... I did a form to add data to a database and it works fine. Once the data is entered its gives a thankyou message. But the problem is, if I refresh this thankyou page, the data is entered again into the database. Why is it doing so. I couldnt think of a way to fix it

[PHP] Re: STUMPED: path/style vars in Windows with IIS

2004-12-13 Thread M. Sokolewicz
Ck wrote: Hello. I am trying to get path/style variables working in windows with IIS on a hosted environment. What I mean by path/style variables is the following: Say I have a script "test.php" that can be accessed via: http://mydomain/controller.php ...I want to pass variables to it like: http:

[PHP] Re: getimagesize() for image resources

2004-12-13 Thread M. Sokolewicz
Greg Donald wrote: Does anyone know a way to get the size of an an image while it exists as an image resource? getimagesize() appears to work on image files, but not image resources. I need something that works on image resources like those created with the PHP imagecreatefrom* functions. I real

Re: [PHP] session newbyness...

2004-12-13 Thread M. Sokolewicz
Greg Donald wrote: On Mon, 13 Dec 2004 14:09:02 -0800, Tony Di Croce <[EMAIL PROTECTED]> wrote: I just started using PHP a week or so ago... And everything is coming along great... Awesome, welcome to the club. :) But I have some general question about sessions... Actually, about PHP's built in

Re: [PHP] Loops

2004-12-14 Thread M. Sokolewicz
Gareth Williams wrote: $result = mysql_query("SELECT name, description FROM table"); while ($row = mysql_fetch_assoc($result)) { echo "{$row['name']}$row['description']"; that will throw errors. echo "{$row['name']}{$row['description']}"; would work, just like all of the following would also: e

Re: [PHP] bargraph gd not working

2004-12-14 Thread M. Sokolewicz
x27;m trying to run a simple bar graph demo found it on phpbuilder site. When I run it I get nothing but an x in the top left corner of my web page(no errors nothing). GD is uncommented in my php.ini, ext dir set and I have verified that GD is installed through php -m,phpinfo() , and gd_info(). Can

Re: [PHP] Loops

2004-12-14 Thread M. Sokolewicz
Richard Davey wrote: Hello Steve, Tuesday, December 14, 2004, 3:52:26 PM, you wrote: SM> I would like to loop the multiple variables rather than put all the SM> variables into a single variable with an array. I can not figure out how to SM> do this. I assume you have placed the MySQL query and chec

Re: [PHP] smtp server

2004-12-16 Thread M. Sokolewicz
Jason Wong wrote: On Thursday 16 December 2004 23:00, Mike wrote: If you're on any of the *nix'es, it's hard to go wrong with sendmail. I think you mean it's hard not to go wrong with sendmail ;-) no, that means it's easy to go wrong with sendmail... I think Mike did mean that it's hard to go wr

Re: [PHP] in_array w/statement

2004-12-16 Thread Matt M.
> reason it seems to always be true, ... something i'm doing wrong? btw, i > cannot add the in_array to the statement because if the $buddylist is empty > it will generate errors because of the empty implode. you could add the is_array() check. > $buddylist = preg_split('/( )+/', trim($userinfo['

[PHP] Re: upload file warning

2004-12-16 Thread M. Sokolewicz
Yangshiqi wrote: I got a php waring when I upload my file: Warning: MAX_FILE_SIZE of 20 bytes exceeded - file [imgpath=mz-n10.pdf] not saved in Unknown on line 0 that seems like a very descriptive warning to me... In the form I write like these: yes... this is where you did put it.

[PHP] Re: Problem with loose typing

2004-12-17 Thread M. Sokolewicz
Chris Boget wrote: Consider the following: function test() { static $i = 0; $i++; $retval = ( $i <= 10 ) ? $i : ''; return $retval; } while( $bob = test()) { echo $bob . ''; } while(false !== ($bob = test())) { echo $bob . ''; } You would expect the while loop

Re: [PHP] Problem with loose typing

2004-12-17 Thread Matt M.
> You would expect the while loop to go on forever just looking > at the above code. However, what's happening is that when the > empty string is getting returned due to $i being > 10, the while > loop is resolving FALSE when $bob is set to the value of the > empty string. > Is there any way that

Re: [PHP] Loops

2004-12-14 Thread M. Sokolewicz
Richard Lynch wrote: Steve Marquez wrote: Greetings. I am trying to display looped information from a MySQL database in a PHP file. Loop $name (witht a br />) then $description End of loop I would like to loop the multiple variables rather than put all the variables into a single variable with an a

Re: [PHP] fopen/fpassthur

2004-12-14 Thread Matt M.
> Hi all, > I have created a download manger to handle files, when a user clicks a link > the file is sent though fopen() and fpassthru() you could try http://us3.php.net/readfile -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: counting chars..

2004-12-16 Thread M. Sokolewicz
Louie Miranda wrote: echo $display; ?> i know this is wrong, but how can i count chars used here? strlen() -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Delete files from the server

2004-12-16 Thread Matt M.
> I have uploaded some pictures and thumbnails using a PHP form into a > particular directory. I would like to be able to select the name of the > picture and then chose to delete that picture and its thumbnail from the > server using another form. try the manual my man http://us2.php.net/unlink

Re: [PHP] PHP parse Excel and Access files

2004-12-20 Thread Matt M.
> How to read and get data from Excel Files and Access Files. > Can you post me articles and tutorials on the web-sites that explain > the basic concept to create an interface for PHP and this files-type. > Thanks so much to all. I am pretty sure that you an set up odbc connections to access acces

Re: [PHP] convert hidden form to get url

2004-12-20 Thread Matt M.
> Anyone got any suggestions on the best way to convert the snippet of code > below (which I'm dynamically collecting from another website) to a get url > (i.e. > http://www.somewebsite.co.uk/Availability?NUM_OF_ADTS=1&CABIN=E&B1_DAY=27 ) > > http://www.somewebsite.co.uk/Availability.cgi"; method=

Re: [PHP] convert hidden form to get url

2004-12-20 Thread Matt M.
> Sorry for not been clear. The snippet of html is code I am getting > dynamically using curl from another website. I want to then convert that > html code into a url like > http://www.somewebsite.co.uk/Availability?NUM_OF_ADTS=1&CABIN=E&B1_DAY=27. you need something to parse the html, I found th

Re: [PHP] first letter

2004-12-20 Thread Matt M.
> $name = "John"; > > how can i echo the first letter only so the result on the browser will be "J" echo $name{0}; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Help wth coding

2004-12-21 Thread M. Sokolewicz
Karl James wrote: Team I am trying to teach myself php through a book I got at the store. Its kinda rough with limited programming experience. I was wondering if you could take a look at my code and tell me or write the code so it Will work and make comments in it so I know what I did wrong. Here

[PHP] Re: Writing new code vs. re-writing someone else's code

2004-12-21 Thread M. Sokolewicz
W Eakin wrote: Hello, This question could be seen as a general programming question, but because PHP is what I know best, I'll ask it here. A good friend of mine is the person who got me more interested in programming as a career. She's a professional COBOL programmer, and works for a large

[PHP] Re: email form results

2004-12-21 Thread M. Sokolewicz
Ken Bolton wrote: Is there a simple way to send the results of a form to an email address? I have created a form with multiple categories of radio boxes and I have created a response PHP file that will give the user a confirmation. I'm just not sure how to send the results through email. I've check

Re: [PHP] How to set register_globals=off in the script?

2004-12-21 Thread Matt M.
> I know that "register_globals = on" is not secure. But one program > requires to use register_globals=on. So in php.ini register_globals is > set to on. > > I have PHP 5.1, is it possible in the code set register_globals=off > for specific scripts. > > So I want to keep PHP register_globals=on

Re: [PHP] Destroying session data

2004-12-23 Thread Matt M.
> I have multiple pages on a website that uses sessions ($_SESSION) to > store the data. However, I noticed that in the C:\Windows\Temp > directory, all the session variables/data files are stored there from > previous (and current) sessions. what version of php are you using? this might be comin

Re: [PHP] help in reversing an array

2004-12-25 Thread M. Sokolewicz
Mike wrote: I am having some trouble reversing the order of an array. [snip] Which function amongst the available should I use? rsort() is what you're looking for. http://us2.php.net/manual/en/function.rsort.php -M what's wrong with array_reverse()? http://www.php.net/manual/en/func

[PHP] Re: PHP based Apache admin tool?

2004-12-27 Thread M. Sokolewicz
Brian Dunning wrote: Is there any such thing as a PHP based GUI tool for administering Apache? I've searched high & low and found nothing. - Brian administering what exactly? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Matt M.
is what comes out in the html or is it ? can you upload any files at all? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: COM Bug in PHP 4.3.10

2004-12-30 Thread M. Sokolewicz
as stated in news://news.php.net:119/[EMAIL PROTECTED] (internals) the status of this is still unknown. The PHP Development Team is working on it however, and my guess is that it will be fixed for 4.3.11 (due for beta in January) - Tul Tohar Trabinovitch wrote: Hi, I need to know when will

[PHP] Re: PHP :: SSH2 ??

2005-01-01 Thread M. Sokolewicz
Pari Purna Chand Nannapaneni wrote: Can anybody give me a small example on using ssh2 functions ( http://pecl.php.net/package/ssh2 ). I want to execute a command on the remote machine and want to get the ouput into a phpvariable. Here is my php code ... $connection = ssh2_connect('127.0.0.1',

Re: [PHP] phpMyAdmin w/ winXP - IIS w/PHP 4.3 w/mysql 4.1.8

2005-01-01 Thread M. Sokolewicz
Donny Simonton wrote: The problem is not with phpmyadmin, the problem is with php. If you install 4.3 of php it will not work with mysql 4.1.8 or any version mysql 4.1 or 5.0. It will only work if you turn on the short passwords option in 4.1. I've not tried it on 5.0 lately. You can get it inst

[PHP] Re: critique this code please

2005-01-02 Thread M. Sokolewicz
Sebastian wrote: i have this small function for a template system (if you want to call it that ;) my idea was having something simple to separate html code from php and i think using something like smarty is too big for me and i really dont have time to learn to use it. so i have this code here: ht

Re: [PHP] Session ID in query string

2005-01-04 Thread M. Sokolewicz
Richard Lynch wrote: Sandy Keathley wrote: Using PHP 4.3.9, we have these settings: session.use_cookies = 1 session.use_only_cookies = 1 session.use_trans_sid = 0 (verified by a display of phpinfo() ) with the goal of preventing URLs with session IDs appended. That works fine, but when a page is v

[PHP] Re: Regular help

2005-01-05 Thread M. Sokolewicz
preg_match_all('/"(.+)"/U', $string, $result); UroÅ Gruber wrote: Hello! I'm pulling my hair so please help. I need correct regular expression to get string between " but if I use 2 pair of " must also work "this is" "some kind" "of a test" matches would be this is some kind of a test I hope somebo

[PHP] Re: Pagination Optimization

2005-01-07 Thread M. Sokolewicz
first of all, you're running 4 queries here. 4 queries is a lot! Especially when you don't need more than 2 ;) the problem here is that your queries are pretty "unknown" to this function. Although it does a nice result for that unknowing, there's a few minor things that make it faster. First of

Re: [PHP] Re: Pagination Optimization

2005-01-08 Thread M. Sokolewicz
instead do: /* $this->total_pages = 1; $this->pages_before = 0; $this->pages_after = 0; */ } else { return null; } return $results; } === Regards, Bruno B B Ma

[PHP] Re: PHP any Mysql connection- new b

2005-01-08 Thread M. Sokolewicz
php 3.0???! man, you seriously need to think about upgrading :| PHP 3 is seriously outdated - tul Babu wrote: Hi all, I am using php 3.0 and mysql and win xp. i want to add users to database through php page. adduser.php Real Name: Username: Password: when i enter the fileds

Re: [PHP] How do I start at a specific position in an array? Is there

2005-01-09 Thread M. Sokolewicz
Tr wrote: Brent Clements wrote / napísal (a): I know this is a simple question because I could easily write a loop to move to the specific position in the array, but I want to know is there a function to move the array pointer position to a specific position in the array? Thanks, Brent next($ar

Re: [PHP] How do I start at a specific position in an array? Is there

2005-01-09 Thread M. Sokolewicz
Thomas Goyne wrote: On Sun, 09 Jan 2005 15:59:43 +0100, M. Sokolewicz <[EMAIL PROTECTED]> wrote: that's not a SPECIFIC place in the array, that's just current, next and previous. AFAIK there is no way to explicitly set the internal pointer of the array to a spcified place. I

[PHP] Re: problem with 'setcookie'

2005-01-09 Thread M. Sokolewicz
Andrew Maxwell wrote: I am running the latest version of XAMPP from apachefriends.org, when i try to set an authenticating cookie it doesnt make the cookie. It doesnt give me any errors or anything. I was looking through the PHP.ini file and it didnt have anything about the setcookie function. Can

Re: [PHP] Website and Mozilla/Firefox

2005-01-10 Thread M. Sokolewicz
Lester Caine wrote: John Holmes wrote: > I switched from using the us2.php.net mirror to the us4.php.net mirror and things were fine. That has been 'knobled' now. At least now I know I'm not going mad ;) it's because of an issue with the JS scripts. Just have to wait and see if anyone gets to fi

Re: [PHP] Website and Mozilla/Firefox

2005-01-10 Thread M. Sokolewicz
M. Sokolewicz wrote: Lester Caine wrote: John Holmes wrote: > I switched from using the us2.php.net mirror to the us4.php.net mirror and things were fine. That has been 'knobled' now. At least now I know I'm not going mad ;) it's because of an issue with the JS scripts. Ju

Re: [PHP] Error in foreach?

2005-01-10 Thread Matt M.
> This is in response to the following line: > > foreach ($_GET as $key => $value) is $_GET an array? when in doubt, print it out try: print_r($_GET) or even check is_array($_GET) might be an earlier version of php http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.get

[PHP] Re: Functions in replacement string of eregi_replace

2005-01-11 Thread M. Sokolewicz
Ville Mattila wrote: Hi there! I'm looking for a workaround to carry out a feature similar to that I could use any PHP function inside the replacement string in eregi_replace (or ereg_replace). I have a set of HTML code with some -headers. Now I should convert all HTML headers to uppercase stri

[PHP] Re: Get name of extending class with static method call

2005-01-11 Thread M. Sokolewicz
try using __CLASS__ Torsten Roehr wrote: Hi list, in PHP4 it was possible to get the name of the calling class with debug_bcktrace(). Unfortunately this behaviour has been changed in PHP5. I didn't find a solution in the archives. Is there *any* way to get the name of the calling class?: class Car

[PHP] Re: client information

2005-01-11 Thread M. Sokolewicz
Bruno Santos wrote: Hello all. I have a problem that i hope to solve with php. i know that, using $_SERVER['xxx'] is possible to find some information about the client who is accessing the script. what i need to know if its possible to find out more information about the client, like in linux

Re: [PHP] Re: Get name of extending class with static method call

2005-01-11 Thread M. Sokolewicz
Daniel Schierbeck wrote: Christopher Fulton wrote: This should work for you then(maybe...i don't have php5 on my system, so it may not, but i think it would. http://us4.php.net/manual/en/function.get-class.php class Car { function drive() { return get_class($this);

[PHP] Re: use of curly braces with string interpolation.

2005-01-12 Thread M. Sokolewicz
Jochem Maas wrote: hi guys, [[ I original posted this to php-internals because I figured that php-general would not know the answer _ it had to do with intended use of functionality (I couldn't find anything on the web about) and I figured that the guys who wrote/write php would be best equipped

Re: [PHP] Re: Get name of extending class with static method call

2005-01-12 Thread M. Sokolewicz
Torsten Roehr wrote: "Morten Rønseth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, I just tried the example code at http://www.zend.com/lists/php-dev/200307/msg00244.html using PHP 5.0.3 The backtrace doesn't see class b at all, all references to it have vanished into thin air. I

[PHP] Re: quicker arrays as func args?

2005-01-13 Thread M. Sokolewicz
Justin French wrote: Hi all, Pretty sure this can't be done, but thought I'd ask any way... I have a function where the 3rd argument is an array.. function foo($a,$b,$c) { echo $a.$b; print_r($c); } Obviously the function does more than that, but anyway, I want the calls to this function t

[PHP] Re: How to compile a script into executable file

2005-01-13 Thread M. Sokolewicz
Kioto wrote: Hi all and sorry for my ignorance. I have used the Bcompiler to compiler a script into .exe file to distribuited on Windows System but i don't have any result. Can you explain how to realize with a simple example ? not. PHP scripts don't need to be compiled. They're interpreted instead

Re: [PHP] delete part of array

2005-01-13 Thread M. Sokolewicz
that only works for numerical indices. However, if you're sure that neither null values, nor false values are supposed to be present in the array, (that means, they MIGHT be, but should be removed anyway; or just not be there at all,) then you could try array_filter with no callback-argument :)

[PHP] Re: sending attachment by email - can't find a bug?

2005-01-15 Thread pete M
You need to post some code #are you using phpMailer - makes emails a doddle http://phpmailer.sourceforge.net/ Afan Pasalic wrote: I have a form and once the form is submitted, php code build csv file with entered information and store it on server in temp file. Then send this file as an atta

[PHP] Re: Delay at first use of OpenSSL functions

2005-01-18 Thread M. Sokolewicz
didn't you read what wez said? they're gathering entropy... you *can't* (and shouldn't want to) prevent that. Vladas Shukevichus wrote: Hello, Gents, When I use any OpenSSL encryption/decryption function (like openssl_seal, openssl_open, openssl_public_encrypt, openssl_private_decrypt, etc.) it t

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread M. Sokolewicz
asking for is the current local time (UTC in your instance) given an input date in PST OK, I see some logic in that - now how to work around it? try print date('Y-m-d H:i:s', strtotime('now') -0800)."\n"; That definitely won't work; -0800 will be interpreted as an

Re: [PHP] strtotime time zone trouble

2005-01-18 Thread M. Sokolewicz
at you are asking for is the current local time (UTC in your instance) given an input date in PST OK, I see some logic in that - now how to work around it? try print date('Y-m-d H:i:s', strtotime('now') -0800)."\n"; sorry, wrong language, you need echo "full date

[PHP] Re: Delay at first use of OpenSSL functions

2005-01-18 Thread M. Sokolewicz
ry? If it can use the same entrophy for many functions, why it need to gather it every time when script run? 18.01.2005 17:24:28 "M. Sokolewicz" <[EMAIL PROTECTED]> wrote in message <[EMAIL PROTECTED]> didn't you read what wez said? they're gathering entropy... you *c

<    4   5   6   7   8   9   10   11   12   13   >