php-general Digest 5 Feb 2001 15:39:08 -0000 Issue 494 Topics (messages 38184 through 38254): Re: Learning MySQL 38184 by: Sean Cazzell 38186 by: Michael Kimsal 38191 by: Jeff Lacy Re: upload 38185 by: Sean Cazzell 38211 by: PHPBeginner.com Re:Apache and PHP 38187 by: John Hinsley Re: Pricing for PHP programming??? 38188 by: Randy Katz Re: [PHP-DB] & [PHP] .htpasswd? 38189 by: Thor Arne Madland attempt to use an empty IV with mcrypt 38190 by: twm139.its.to 38201 by: Christian Reiniger mail 38192 by: Deependra B. Tandukar 38212 by: PHPBeginner.com please help (network admin via web) 38193 by: niraj shah 38202 by: Christian Reiniger manage number of rows displayed 38194 by: Jacky.lilst 38195 by: Jacky.lilst 38203 by: Christian Reiniger 38213 by: PHPBeginner.com Re: [PHP-WIN] RE: [PHP] Re: [PHP-WIN] For My Information 38196 by: Ingo Baab Re: Session With Cookies 38197 by: Eelco de Vries email function's sender 38198 by: Michel Boucey strange Compiling Errors / PHP4.0.4pl1 38199 by: Thomas Weber Installation of PHP and Apache in RedHat 7.0 38200 by: Sami Kristeri Maisniemi Howto return multidimensional arrays from a PHP module 38204 by: Thomas Wentzel 38205 by: Soeren Staun-Pedersen 38216 by: Thomas Wentzel 38218 by: Phil Driscoll Re: Including Virtual Paths 38206 by: PHPBeginner.com Re: db paging with MS Sql 38207 by: PHPBeginner.com Re: 2 questions 38208 by: PHPBeginner.com Re: Replacing A Word in HTML page 38209 by: PHPBeginner.com Re: Email Selected Data 38210 by: PHPBeginner.com Possible bug in pg_connect (4.0.3.pl1) ? 38214 by: Evelio Martinez Re: php-general Digest 2 Feb 2001 00:51:13 -0000 Issue 487 38215 by: Tim Ward Re: Variables within functions, out? 38217 by: Tim Ward Breaking up a line and using the text? 38219 by: Sam 38226 by: jaskirat 38242 by: Steve Werby 38243 by: Christian Reiniger job search/posting software 38220 by: Chuck Barnett Character translation in IE 38221 by: Patrick Anderson 38224 by: Juan XML-DOM 38222 by: Thomas Brusa 38228 by: Peter Sabaini FDF Toolkit uncompression error 38223 by: Kurt R. Hoehn 38225 by: Kurt R. Hoehn fonts in php generated images 38227 by: Scott Poarch Is this a bug ? 38229 by: Sébastien ROZIER 38244 by: Steve Werby 38251 by: Sébastien ROZIER Java Servlet Support 38230 by: Shawn J. Wallace Which Regex library? 38231 by: Shawn J. Wallace 38232 by: johnny p. 38234 by: Shawn J. Wallace Session-variables 38233 by: spider 38237 by: Hardy Merrill HTTP post requests 38235 by: Matthew Brealey 38239 by: Vahan Yerkanian 38249 by: Matthew Brealey How to save something in a Java Applet as an IMAGE file? 38236 by: Winnie 38241 by: Phil Driscoll 38247 by: Winnie Re: One IP per Server / Cobalt RaQ4 [was 2 questions] 38238 by: Steve Werby Making a object from one class available to all objects in the calling class 38240 by: Stephen Maher 38245 by: Christian Reiniger XML -> HTML via PHP 38246 by: Brian V Bonini 38248 by: James Moore 38250 by: Steve Werby Re: Problem with Zend Encoder testdrive - Win2k 38252 by: Zeev Suraski Error on mail attachment 38253 by: Tobias Talltorp pdf question 38254 by: Conover, Ryan Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
You need to go get yourself a copy of the MySQL book from New Riders. Stay away from the O'Reilly one, it sucks. Regards, Sean
I'd second Sean's endorsement of the New Riders book. I generally am a fan of Oreilly books, but I can't figure out *what* was going on there with the Mysql book. It's actually mysql and msql covered in one book, with less docs than you can get online, from what I saw, and seemingly very little in the way of actual usage/administration/case studies. Sean Cazzell wrote: > You need to go get yourself a copy of the MySQL book from New > Riders. Stay away from the O'Reilly one, it sucks. > > Regards, > > Sean > > --
Use a mysql mailing list and search around on the net. Don't be afraid to try things. There are lots of tutorials out there, but I would ask the mailing list because they are filled with people who will help you, but you should try to help other people in the mailing list, too. Just and idea :-) Jeff ""Jeff Oien"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > What would your advice be for learning MySQL with PHP on an > Apache server? I know a little Perl and am beginning to learn PHP. > I'm more of a designer than a programmer (not enough geek genes). > I went through the tutorial at WebMonkey and have it all installed > and working, but the tutorial isn't able to go in depth about the > basic functions of MySQL. Is this something better learned from > a book? Suggestions for books and/or tutorials online would be > appreciated. > Jeff Oien, WebDesigns > http://www.webdesigns1.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] >
Hmm...well if you mean "can I upload a file from the web browser to the web server", the answer is yes. See the php manual on zend.com. http://www.zend.com/manual/ Regards, Sean
look at http://www.php.net/manual/en/features.file-upload.php there are some introduction like example on Handling of Uploaded Files... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: DragoslaV ( Paul ) [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 8:37 AM To: [EMAIL PROTECTED] Subject: [PHP] upload Importance: High Hello, How can i upload a file from a client to server ? I tryed copy() but it doesint works. Paul
"Patrick L. Olson" <[EMAIL PROTECTED]> wrote: > if I call it like http://127.0.0.1/cgi-bin/one.php > with the shebang line #!php.exe > I get the following error > No input file specified > if I call it without the shebang I get > the Internal Server Error > Error logs indicate the the #! is needed > if I call it in the web root as > http://127.0.0.1/one.php4 > it prints the code to the screen > any insight welcome > Well, I know nothing about Windows, or SSI, but if I were trying to run a php script from Apache_as_localhost I'd do: http://localhost/php_script_thingy.php Unless you're doing something a bit wierd and wonderful the script must be in your htdocs (or whatever else you've called doc root) and should be called (according to what you've told Apache) by .php. Initially I ran into a lot of problems (self-created) by putting php stuff into the cgi bin and, after upgrading to php4, by trying to call stuff as php4 (as I used to call stuff by php3). Hope this helps. -- ****************************************************************************** Marx: "Why do Anarchists only drink herbal tea?" Proudhon: "Because all proper tea is theft." ******************************************************************************
sounds like you cannot afford NOT to have a second wife! DANG! Some folk have all the luck :! On Sat, Feb 03, 2001 at 09:25:35AM +0530, [EMAIL PROTECTED] wrote: > tOn Fri, 2 Feb 2001, johnny p. wrote: > > > Hah! My wife has a formal education in graphics design. My web sites > > would look like crap without her extensive layout skills. :) I'm so > > lucky... > Ah! kindered spirit > > My wife has a formal education in Mass Communication and Public Relations > I wouldn't be in bussiness if she was not able make presentations to drum > up clients ! > > BUT we still lack a graphic designer - don't think I can afford a second > wife ;-) > > > Cheers > > Tarique > > > -- > ========================================= > B2B Application Providers > http://www.sanisoft.com > Vortal for Nagpur http://nagpurcity.net > ========================================= > > > -- > 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]
Hi, you might want to take a look at this one: http://www.thewebmasters.net/php/Htpasswd.phtml Works in both php3 and php4. Give you functions for adding/deleting/listing/renaming users + much more, in standard .htpaccess password files. I use it myself on several sites, it works great. - t.a.madland - ------------------------------- original message ---------------------------------- From: Cody Caughlan [mailto:[EMAIL PROTECTED]] Sent: 5. februar 2001 04:53 To: Victor Foitzik; php-db Subject: Re: [PHP-DB] .htpasswd? You could also run something like: system("htpasswd -b passwordilf $user $password"),,,basically get the shell to run a the htpasswd program supplied by apache. you might have to play around with the permissions to do this, so the webserver can execute the htpasswd binary. /cody caughlan Victor Foitzik wrote: > James Smith wrote: > > >Is there a way that when a user signs up for a > >user/pass on a site, to automatically update the > >.htpasswd on the site? Right now I'm running a Win2k > >Pro, with Apache installed and MySQL/PHP. > > > >Thanks, > > > >James > > The quite simpliest method is to put appropriate directives in a .htaccess > file in appropriate (e.g. to be protected) directories like this: > > AuthName "Restricted Area" > AuthUserFile /www/users/users > AuthGroupFile /www/users/groups > AuthType Basic > Require registeredusers > > Then all you have to do is to regenerate the user and the group file > according to your needs. > > Another way to do this directly with MySQL is to use the apache auth_mysql > module which allows you to store authentication data in a MySQL DB. See > http://mysql.com/downloads/contrib.html > and > http://httpd.apache.org/docs/misc/FAQ-G.html > for more info. > > HTH > Victor > > -- > PHP Database 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 Database 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]
I get the following warning when I turn on logging... Warning: attempt to use an empty IV, which is NOT recommend in /home/local/apache/htdocs/encrypt.php on line 21 Here is the code $key = "testing"; $input = "Secret data"; $encrypted_data = mcrypt_ecb (MCRYPT_DES, $key, $input, MCRYPT_ENCRYPT); print "The CypherText in DES ECB is <BR>".bin2hex ($encrypted_data)."\n<br>"; $encrypted_data = mcrypt_ecb (MCRYPT_TWOFISH, $key, $input, MCRYPT_ENCRYPT); print "The CypherText in TWOFISH ECB is <BR>".bin2hex ($encrypted_data)."\n<br>"; $encrypted_data = mcrypt_cbc (MCRYPT_TWOFISH, $key, $input, MCRYPT_ENCRYPT); print "The CypherText in TWOFISH CBC is <BR>".bin2hex ($encrypted_data)."\n<br>"; ?> How do I prevent this error? Regards Terrence
On Monday 05 February 2001 06:13, [EMAIL PROTECTED] wrote: > I get the following warning when I turn on logging... > > > Warning: attempt to use an empty IV, which is NOT recommend in > /home/local/apache/htdocs/encrypt.php on line 21 > > > Here is the code and which line is Nr. 21? > $key = "testing"; > $input = "Secret data"; > > $encrypted_data = mcrypt_ecb (MCRYPT_DES, $key, $input, > MCRYPT_ENCRYPT); > > print "The CypherText in DES ECB is <BR>".bin2hex > ($encrypted_data)."\n<br>"; > > > $encrypted_data = mcrypt_ecb (MCRYPT_TWOFISH, $key, $input, > MCRYPT_ENCRYPT); > > print "The CypherText in TWOFISH ECB is <BR>".bin2hex > ($encrypted_data)."\n<br>"; > > $encrypted_data = mcrypt_cbc (MCRYPT_TWOFISH, $key, $input, > MCRYPT_ENCRYPT); > > print "The CypherText in TWOFISH CBC is <BR>".bin2hex > ($encrypted_data)."\n<br>"; > > ?> -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 36000000 hosts for known problems in 3 weeks
Greetings! I made one script with mail <"email address">. It works in my home computer (Linux and php 4) and not working in my web server (Linux and php 4). What can be the reason? Looking forward to hearing from you. DT
Have you checked sendmail path in php.ini ? Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Deependra B. Tandukar [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 4:07 PM To: [EMAIL PROTECTED] Subject: [PHP] mail Greetings! I made one script with mail <"email address">. It works in my home computer (Linux and php 4) and not working in my web server (Linux and php 4). What can be the reason? Looking forward to hearing from you. DT -- 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]
Dear sir, I am a 20 year old student doing a research project and I would like to have network administration via web. That is I want to change IP address os the system via web, want to do dns settings and also would like to do proxy setting via web using PHP scripts. I am working on RedHat 6.2 using apache as my web server. Please guide me what to do for that? please help me because this is important module in porjetc and without this my project is not marked as complete project. Please help me. waiting for your reply, Niraj _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
On Monday 05 February 2001 08:01, niraj shah wrote: > I am a 20 year old student doing a research project and I would like to > have network administration via web. That is I want to change IP > address os the system via web, want to do dns settings and also would > like to do proxy setting via web using PHP scripts. I am working on > RedHat 6.2 using apache as my web server. Perhapy Webmin could help you? http://www.webmin.com/webmin/ -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 36000000 hosts for known problems in 3 weeks
Hi, After I run a query, how do I set the number of rows returned to display as 3 or 4 columns in a page instead of one column as usual? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself"
No sure if i get it, very inexperience user here I am. Baiscally if the number of records returns is 20 records, in stead of display all 20 recodrs in one column in a page, I would like to display that as 4 columns and each columns has 5 recodrs displayed, how can I use limit statement to do that? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Milan Mlynarcik <[EMAIL PROTECTED]> To: Jacky@lilst <[EMAIL PROTECTED]> Sent: Monday, February 05, 2001 2:03 AM Subject: Re: [PHP] manage number of rows displayed > You can use LIMIT statment in your query > > Milan Mlynarcik > ----- Original Message ----- > From: "Jacky@lilst" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 05, 2001 9:23 PM > Subject: [PHP] manage number of rows displayed > > > Hi, > After I run a query, how do I set the number of rows returned to display as > 3 or 4 columns in a page instead of one column as usual? > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for > yourself" > > >
On Monday 05 February 2001 21:23, [EMAIL PROTECTED] wrote: > After I run a query, how do I set the number of rows returned to > display as 3 or 4 columns in a page instead of one column as usual? Ok, I gather from this that you use some Utility X to query database Y (you don't do it in PHP), and now want to know how to change the settings of X. Correct? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 36000000 hosts for known problems in 3 weeks
You don't really need a LIMIT statement in here. There are still 20 Records to be shown on the page, right? The problem you have is the layout ... then juts create (in your loop) the table in such a way that each 5 records (or better say ~Num/4) will output some new thing to compose your table... or, make it be 4 different Arrays and loop them in a way to create an adeguate table ... SQL is not really helpful in here ... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Jacky@lilst [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 06, 2001 6:20 AM To: Milan Mlynarcik Cc: [EMAIL PROTECTED] Subject: Re: [PHP] manage number of rows displayed No sure if i get it, very inexperience user here I am. Baiscally if the number of records returns is 20 records, in stead of display all 20 recodrs in one column in a page, I would like to display that as 4 columns and each columns has 5 recodrs displayed, how can I use limit statement to do that? Jack [EMAIL PROTECTED] "There is nothing more rewarding than reaching the goal you set for yourself" ----- Original Message ----- From: Milan Mlynarcik <[EMAIL PROTECTED]> To: Jacky@lilst <[EMAIL PROTECTED]> Sent: Monday, February 05, 2001 2:03 AM Subject: Re: [PHP] manage number of rows displayed > You can use LIMIT statment in your query > > Milan Mlynarcik > ----- Original Message ----- > From: "Jacky@lilst" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, February 05, 2001 9:23 PM > Subject: [PHP] manage number of rows displayed > > > Hi, > After I run a query, how do I set the number of rows returned to display as > 3 or 4 columns in a page instead of one column as usual? > Jack > [EMAIL PROTECTED] > "There is nothing more rewarding than reaching the goal you set for > yourself" > > > -- 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]
> Berber-Guy, I don't believe that there is any question today that apache [on ony platform], is the best webserver you *can't* buy ;) ingo baab > > Guys, > > > > I don't believe that there is any question today that IIS5 on win2K > > is the best webserver $$$ can buy. > > > > Sincerely > > > > berber > > > > Visit http://www.weberdev.com Today!!! > > To see where PHP might take you tomorrow.
no offense for anyone at all. I was just wondering myself and threw it in the group discussion. Eelco. > I never wanted this question to be an offense for anyone. I thank you all > for your answers. > > Regards > PHPLover > > Lux <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > It's unlikely I suppose, but there's a must-have book you should look at > > if you want info on hacks, including browser hacks (Hacking Exposed: > > Network Security Secrets and Solutions, 2nd Edition). The cookie hack > > that comes to mind only works in IE or MS products (but that's only > > what, 90% of the web), but all it is is a line or so of html code that > > somebody places on their site (say in an iframe...) that sends them all > > your cookie data (if the user uses outlook, they can also just place it > > in an email). from there, they use the cookie data to pose as that > > person on various sites trying to gain sensitive info. but if you're > > already giving them the password, how much more sensitive can you get? > > > > so really, if they don't close their browser for a while, this > > possibility increases. and it may be a slim possibility, but it's > > better to be safe than sorry. > > > > later > > > > lux > > > > > Well .. I am ... nobody but the user itself can see the login and > password > > > > > > in the cookie. Unless it's on non-SSL connection and somebody is > > > > > > packet-shiffing around. Otherwise there would be no leak for somebody > else > > > > > > to get this information, is there? > > > > > > And if the user doesn't logout, the cookie is still destroyed when the > > > > > > browser is closed anyway. > > > > > > > > > > > > Eelco. > > > > > > -- > > > > John Luxford > > Simian Systems > > > > w: www.simian.ca > > e: [EMAIL PROTECTED] > > p: 204.946.5955 > > > > -- > > > > > > -- > > 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] > >
Hi ! i've the following trouble with php: Since I've set sendmail_path to /var/qmail/bin/inject in php3.ini, all emails coming from the http client come from me, i.e. my email address on our server, and not from the apache client name, http ... What's wrong in my conf ... Thanks for help ... Cordialement, Michel Boucey Administrateur Système > Société Norm@net +33 2 31 27 13 45 <
Hi, i've compiled and installed PHP4.0.4pl1 on two systems without problems, but on the third i get strange errors. The ./configure works, but at the make i get some errors like "linux/limits.h: No such file or directory", even this file is in /usr/include/. I have copied limits.h and errno.h to /usr/include/linux/ and now this works. But now i get another big fat error. I make a screenshot you find here: http://gotik.hn.org/tunix.gif The System is a standard-install of SuSE Linux 7.0 with all that required stuff, bison, flex, automake and so on. (I tried the same with PHP4.0.3 but i get the same errors.) Please help me!!! Thank you, Thomas Weber CYNOBIA Community Online Service AG Kühbachstraße 11 81543 München fon 089-78 06 0(280) fax 089-78 06 01 99 email [EMAIL PROTECTED] net http://www.CYNOBIA.de
If you have PHP 4.0 and Apache running in RedHat 7.0, you can propably solve this problem immediately, but all advices are needed. I have a beginner's problem, which is related to RedHat's unordinary way to implemt Apache and PHP. I received detailed instructions how to install both Apache and PHP, but the problem occurred when I tried to start Apache and make a simple PHP script to work in my Linux computer. First I was unable to locate 'apachectl' program to start apache. Then I finally found from RedHat 7.0 reference guide that Apache can be started by typing: './httpd start' which is located at '/etc/rc.d/init.d/' directory. The result is OK and when I type './httpd status', I receive a message "... server is running ...". However, my simple PHP script: <?php phpinfo(); ?> is not interpreted at all. Also the test cgi program of Apache is not interpreted (I do not have any idea how that is implemented). I think I installed PHP 4.0 and configured Apache's configuration file properly, but is there anyway to verify that? Should I do also something else like move the PHP script into a specified directory? How can I verify that Apache is properly installed? Regards, Sami ------------------------------------------------------------------------- Sami Maisniemi tel: +358 9 4580 854 Helsinki University of Technology mobile: +358 40 7499 088 Department of Electrical and email: [EMAIL PROTECTED] Communication Engineering [EMAIL PROTECTED] -------------------------------------------------------------------------
Hi all, I've been using array_init and add_assoc_xxx to return an array from within my PHP module... But how would I go about returning the following stucture Array (Array (Name, Type, Size)) tia T.
On Mon, 5 Feb 2001, Thomas Wentzel wrote: > Hi all, > > I've been using array_init and add_assoc_xxx to return an array from > within my PHP module... But how would I go about returning the following > stucture $a = array(1,2,3,4); $b = arrar("foo"=>1,"bar"=>2); return $a; would work, as well as return $b;
Thomas Wentzel wrote: > > Hi Søren, > > Thank you very much for your answer, but I'm afraid that it isn't that > usefull to me... I don't have the luxury of using PHP as my PHP module > is written in C!! > > T. > > Soeren Staun-Pedersen wrote: > > > > On Mon, 5 Feb 2001, Thomas Wentzel wrote: > > > > > Hi all, > > > > > > I've been using array_init and add_assoc_xxx to return an array from > > > within my PHP module... But how would I go about returning the following > > > stucture > > > > $a = array(1,2,3,4); > > $b = arrar("foo"=>1,"bar"=>2); > > > > return $a; > > > > would work, as well as > > > > return $b;
>Thomas Wentzel wrote: >> >> Hi Sren, >> >> Thank you very much for your answer, but I'm afraid that it isn't that >> usefull to me... I don't have the luxury of using PHP as my PHP module >> is written in C!! Repost your question to the php-dev list. That's where the people who know this stuff hang out. First, you might like to check the php dev archive as I think I remember this question coming up a number of times in the past. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
You can then create your own own. ... Just declare a variable called $DOCUMENT_ROOT = 'c:\the\path\to\your\web\tree\' somewhere in configuartion files of your website, or even as include_path in PHP.ini Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: James Crowley [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 2:48 AM To: PHPBeginner.com Subject: RE: [PHP] Including Virtual Paths Thanks very much! However, I've just looked that up in the help, and $DOCUMENT_ROOT only works for Apache...I'm running IIS 5 :-( Regards, - James Editor, VB Web ================== Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 ================== -----Original Message----- From: PHPBeginner.com [mailto:[EMAIL PROTECTED]] Sent: 03 February 2001 18:55 To: James Crowley; [EMAIL PROTECTED] Subject: RE: [PHP] Including Virtual Paths it's very simple : include("$DOCUMENT_ROOT/bin/header.asp"); (we are talking about the web root's full path, right ?) Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: James Crowley [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 3:45 AM To: [EMAIL PROTECTED] Subject: [PHP] Including Virtual Paths Hi, When using ASP, I frequently reference virtual path such as <!--#include virtual="/bin/header.asp"--> However, the PHP include() function doesn't seem to support this... What can I do? I don't want to have to change the reference to reflect its position in the site by adding ../ for every script. Regards, - James Editor, VB Web ================== Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 ================== -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 02 February 2001 13:02 To: [EMAIL PROTECTED] Subject: php-general Digest 2 Feb 2001 13:01:55 -0000 Issue 488 php-general Digest 2 Feb 2001 13:01:55 -0000 Issue 488 Topics (messages 37764 through 37827): Re: What version of Linux? 37764 by: Michael Hall Re: encode string with spaces 37765 by: David Robley 37768 by: David Robley Win2000 TCP/IP failure 37766 by: Toby Butzon 37827 by: Alain Fontaine Re: C++ integration with PHP 37767 by: Toby Butzon Re: contracting & consulting (was "[PHP] Pricing for PHP pr ogramming???") 37769 by: Dave VanAuken 37770 by: Ben Peter 37771 by: Maxim Maletsky 37775 by: Steve Werby 37826 by: Robin Vickery Re: Java variables - PHP varialbles 37772 by: Nold, Mark Php Database 37773 by: Vinicius Garcia Mommensohn Re: Why?? SPRINTF("SELECT sequence,prodnum,childdesc....); 37774 by: Steve Werby Re: PHP a lightweight language? 37776 by: Nold, Mark 37783 by: John Hinsley 37784 by: Josh G How do I get last inserted ID? 37777 by: Sandeep Hundal 37778 by: Maxim Maletsky 37779 by: David Robley 37821 by: Andrew Golovin Re: Pricing for PHP programming??? 37780 by: Steve Werby 37781 by: Josh G 37786 by: Josh G 37797 by: Angus Mann Re:What version of Linux? 37782 by: John Hinsley Re: Message status - undeliverable 37785 by: Josh G OT mod_rewrite says goodbye to POST vars (but interesting) 37787 by: Matt Friedman Re: 404 error checker 37788 by: Louis LeBlanc Automatic incoming mail notification 37789 by: Ankur Verma 37790 by: Josh G 37791 by: David Robley 37792 by: Ankur Verma 37793 by: Steve Werby 37802 by: Nicolas Windpassinger - Sun how do I subscribe? 37794 by: David VanHorn 37795 by: Maxim Maletsky Re: Variables within functions, out? 37796 by: Steve Werby configuring headers in mail() ... 37798 by: Maxim Maletsky PGP 37799 by: Martin Thoma 37801 by: Adrian Teasdale Mysql Question 37800 by: Giancarlo Re: Recommended Job Posting sites? Need to hire someone w/ PHP exp. 37803 by: Boaz Yahav Apache won't start after installing php4 37804 by: Frank Passek Zend IDE 37805 by: Alain Fontaine 37811 by: Andi Gutmans 37813 by: Alain Fontaine 37816 by: Zeev Suraski 37817 by: Alain Fontaine Re: reload help!!! 37806 by: Wen Ni Leong passing parameters 37807 by: Stinie Steinbach 37808 by: Alain Fontaine Could PHP connect to Perl Program 37809 by: kn4279 Re: [Q] Domxml: unlink() method? 37810 by: Peter Sabaini JavaScript, PHP and HTML 37812 by: Augusto Cesar Castoldi 37815 by: Juan 37819 by: kaab kaoutar Re: Tab character 37814 by: Martin A. Marques Re: Include " quotes inside textbox 37818 by: Christian Reiniger PHP configure commandline 37820 by: indrek siitan For My Information 37822 by: Dan Malcolm 37823 by: Jon Haworth Re: [PHP-WIN] For My Information 37824 by: Tom Mathews 37825 by: Dan Malcolm Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, 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]
It is something like: SELECT * FROM table LIMIT 0,10 and then on the next page the limit becomes 10,20 and so on .... A code ? ... hm ... not sure ... but if you get any software that does this kind of list it could give a more precise idea on what I am talking here about... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Scott Parks [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 2:43 AM To: [EMAIL PROTECTED] Subject: [PHP] db paging with MS Sql Has anyone seen a good lession or code example on paging records from MS Sql 7? Say I have 300 records and want to break them down to 10 per page using [previous | next ] and a list of page numbers at the bottom. tia -- 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]
Well, Cobalt Raq4 is not an easy-to-compile-on Server ... and 1 single IP when you get a dedicated server? no ... Get something else ... for example I know that InsideCrew.net give you 15 IP addresses for $125-$200 / month ... And they will also let you choose the OS ... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: Adrian Teasdale [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 2:48 AM To: PHP List Post Subject: [PHP] 2 questions Hi I have a couple of questions. One about hosting and the other about IP addresses. The first on the IP's......... I have been speaking to a company that I am looking at getting a dedicated server from. They ONLY do one IP address per server and use name-based hosting. I have asked for dedicated IP's, but their answer has been that all hosting companies are going to have to go to name-based hosting now. What is everyone's feeling on this? Years ago, the company I was with used name-based and I remember that the search engines did not like this On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the list use one of these and what do you think? I want to make sure that it's easy enough to compile latest php and mysql whenever I want to Thanks for any advice Ade -- 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]
a Replacement using Case-Insensitive Regular Expression. read it here : www.phph.net/eregi-replace Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: phpLover [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 3:23 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Replacing A Word in HTML page Thanks for your answerm but what does eregi_replace() do? Regards "Steve Werby" <[EMAIL PROTECTED]> wrote in message 045801c08e7f$3c4f61c0$6401a8c0@mobile">news:045801c08e7f$3c4f61c0$6401a8c0@mobile... > "phpLover" <[EMAIL PROTECTED]> wrote: > > I want to read an HTML page from another site and replace certain > characters > > with capital letters and show them in another dynamically generated web > page > > on my site. I know this is possible in Perl, but can this be done in PHP? > If > > yes, then how? > > It's definitely possible in PHP. I've done it. You probably want to use a > combination of fopen() and other file handling functions, eregi_replace() > and str_replace(). > > -- > Steve Werby > COO > 24-7 Computer Services, LLC > Tel: 804.817.2470 > http://www.247computing.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 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]
you need to have the $content line with (.) operator: for ($i=0; $i<$num_rows; $i++) { mysql_data_seek($SQLResult, $i); $array=mysql_fetch_array($SQLResult); $content .= printf("First Name: %s\nLast Name: %s\n",$array['FirstName'], $array['LastName']); } mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]"); Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, February 05, 2001 5:32 AM To: [EMAIL PROTECTED] Subject: [PHP] Email Selected Data Hi, I am selecting data using the below and trying to insert it into a mail, it does everything except send the data selected, anyone have an idea? $SQLStatement = "SELECT * FROM Orders Where Status='N' Order by OrderID"; $SQLConn = mysql_connect($host, $user, $pass); $db = mysql_select_db($dbase, $SQLConn); $SQLResult = mysql_query($SQLStatement); $num_rows=mysql_num_rows($SQLResult); for ($i=0; $i<$num_rows; $i++) { mysql_data_seek($SQLResult, $i); $array=mysql_fetch_array($SQLResult); $content=printf("First Name: %s\nLast Name: %s\n",$array['FirstName'], $array['LastName']); } mail($MAIL, "Order", $content , "From:[EMAIL PROTECTED]"); I know it is working to a degree because it prints out the data on the resulting page and sends a blank email, it just doesn`t put it in the email. TIA Ade -- 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]
Hi! under 4.0.3pl1 Why this sentence works ? $conexion2 = pg_Connect("host=$servidor user=$usuario password=$pass dbname=$bd port=$puerto"); and this one does not ? $conexion2 = pg_Connect("host=$servidor port=$puerto user=$usuario password=$pass dbname=$bd"); It issues the following message Warning: 1 is not a valid PostgreSQL link resource -- Evelio Martínez Testanet. Dept. desarrollo software. Av. Reino de Valencia, 15 - 5 46005 Valencia (Spain) Tel: +34 96 395 90 00 Fax: +34 96 316 23 19
If you want to do something like this you're better off with a while loop $x = 1; while($x < 10) { // do stuff with x if (whatever) continue; $x++; }; incremeting a while loop instead of for seems daft until you want to manipulate the incremented value within the loop. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: 02 February 2001 00:51 > To: [EMAIL PROTECTED] > Subject: php-general Digest 2 Feb 2001 00:51:13 -0000 Issue 487 > > << Message: RE: Directory Listing with PHP >> << Message: > NEWBIE QUESTION >> << Message: Re: [PHP] NEWBIE QUESTION >> > << Message: PHP and report generation >> << Message: RE: > [PHP] Symbolic link fails when User Authentication comes in > >> << Message: Performance hit with certain apache configs? > >> << Message: Setting The Font In SENDMAIL >> << Message: > Re: [PHP] Is there a 'redo' loop control function? >> << > Message: Email Attachment >> << Message: details on imap > functions. >> << Message: Re: [PHP] details on imap > functions. >> << Message: Re: [PHP] details on imap > functions. >> << Message: rephrasing: start session in > frame-index, continue in pages >> << Message: Variables > within functions, out? >> << Message: Closing Objects > "Cleaning Up" >> << Message: Re: [PHP] Closing Objects > "Cleaning Up" >> << Message: Re: [PHP] Closing Objects > "Cleaning Up" >> << Message: Why?? SPRINTF("SELECT > sequence,prodnum,childdesc....); >>
> -----Original Message----- > From: James, Yz [mailto:[EMAIL PROTECTED]] > Sent: 01 February 2001 22:22 > To: [EMAIL PROTECTED] > Subject: Variables within functions, out? > > > Hey guys. Can I firstly say, thanks to all of you who helped > me out with my > last question about importing MS Access databases into > MySQL... It helped > tons! > > However, I have another question. > > Firstly, I've strayed away from writing many of my own > functions, because > they give me the fear. But the code on the pages I am > creating has forced > me to wake up... I really sould think about cutting back on code. > > SO, anyway, to cut to the chase, my question is this: If I write a > function, which performs checks and assigns variable based on > these checks, > how do I get the assigned variables from within the function? > For example > (this is more than likely VERY wrong), something like this: > > global.inc: > > <? > > function CheckBirthday() { > global $year,$month,$day; > > if (($day) && ($month) && ($year)) { > if (checkdate($day,$month,$year) { > $birthday = "$year/$month/$day"; > } else { > $birthday = "Invalid"; > } > } > } > > ?> > the correct use of a function would be ... function CheckBirthday($year,$month,$day) { if (($day) && ($month) && ($year)) { if (checkdate($day,$month,$year) { $birthday = "$year/$month/$day"; } else { $birthday = "Invalid"; }; }; return $birthday; } this function can now be used by a calling program without the callong program needing to know anything about it's internal working. > File that would update / insert information to a MySQL database: > > <? > > // Connection details here > > require("global.inc"); > > CheckBirthday(); > > $sql = "UPDATE MyTable > SET > birthday = \"$birthday\" > WHERE id = \"$id\" > "; > > // etc > > ?> > > Even when I KNOW that I have included correct values, the > $birthday variable > never shows up outside the function. It's probably something > simple I'm > missing, as in most cases ;) > > Thanks for your patience, > > James. > > > Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
Hi all, I was wondering if it is possible to break up a line of text from a database, and split it into separate links, eg Original line Hi my name is Sam Rose Which can then be broken down into Hi My Names is Sam Rose Thanks in advance Sam
Hi, Read about ereg_replace() function in PHP. some thing like $string = ereg_replace(" ","\n",$string) should do the trick for you. HTH Jaski At 01:00 PM 2/5/01 +0000, Sam wrote: >Hi all, > >I was wondering if it is possible to break up a line of text from a >database, and split it into separate links, > >eg > >Original line > Hi my name is Sam Rose > >Which can then be broken down into > Hi > My > Names > is > Sam Rose > >Thanks in advance >Sam > >-- >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] >
"Sam" <[EMAIL PROTECTED]> wrote: > I was wondering if it is possible to break up a line of text from a > database, and split it into separate links, > Original line > Hi my name is Sam Rose > > Which can then be broken down into > Hi > My > Names > is > Sam Rose Sam, do you want to turn them into hyperlinks? If your data is really that clean explode() should do the trick, otherwise you may want to look at split(). Here's a solution using explode(). See the PHP manual for details. FYI, unless you have some way planned for grouping together words (like "Sam Rose") the PHP code will split them apart. // $string is a string pulled from a database. // explode() below splits $string into an array by splitting into array elements when encounters " " in code. // In your example, $words[0] = "Hi"; $words[1] = "My"; ...; $words[5] = "Rose"; $words = explode( " ", $string ); // Loop through array and build string $output containing hyperlinks. for ( $i = 0; $i < count( $words ); $i++ ) { $output .= "<a href='/{$words[$i]}.html'>{$words[$i]}</a>"; } // Print hyperlinks. echo $output; -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/
On Monday 05 February 2001 13:59, jaskirat wrote: > $string = ereg_replace(" ","\n",$string) simpler and faster: str_replace(), explode() and split() > >Original line > > Hi my name is Sam Rose > > > >Which can then be broken down into > > Hi > > My > > Names > > is > > Sam Rose -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov
Does anyone know of any good software for creating a job posting/search service? Thanks, Chuck
Hi, I am using php, mysql and apache on a linuxserver to create some user home pages, and I have a problem with names including special chars. If I retrieve an url including for example /photos/BendsøeMartin97.jpg everything is ok using netscape, but it doesn't display correct using IE. Apache error log reports: File does not exist: /photos/BendsøeMartin97.jpg Using netscape everything is ok and Apache access logs: GET /photos/Bends%F8eMartin97.jpg Is there a function to convert the special characters. I checked the manual, but I only found translation tables to html entities. Thanks for any help, Patrick.
use the following : string rawurlencode (string str) It translate any non standard URL ascii char into there %XX equivalent. PA> Hi, PA> I am using php, mysql and apache on a linuxserver to create some user PA> home pages, PA> and I have a problem with names including special chars. PA> If I retrieve an url including for example PA> /photos/BendsøeMartin97.jpg PA> everything is ok using netscape, but it doesn't display correct PA> using IE. PA> Apache error log reports: File does not exist: PA> /photos/BendsøeMartin97.jpg PA> Using netscape everything is ok and Apache access logs: GET PA> /photos/Bends%F8eMartin97.jpg PA> Is there a function to convert the special characters. I checked the PA> manual, but I only PA> found translation tables to html entities. PA> Thanks for any help, PA> Patrick. _______________________________________ Massuelles Jean-Baptiste([EMAIL PROTECTED]) Société A Comme... Tel : 03 80 700 702
hello I'm trying to parse and change a loaded xml-file using the DOM module. I need to remove certain nodes and append new ones. Is it really true that you can't remove a childnode while working with dom. in perl this would look somehow like this: $doc1->removeChild($tmpele); $tmpele->setOwnerDocument($doc2); $somedoc2node->appendChild($tmpele); thanx tom
On Mon, Feb 05, 2001 at 02:06:13PM +0100, Thomas Brusa wrote: > hello > I'm trying to parse and change a loaded xml-file using the DOM module. > I need to remove certain nodes and append new ones. > Is it really true that you can't remove a childnode > while working with dom. > in perl this would look somehow like this: > > $doc1->removeChild($tmpele); > $tmpele->setOwnerDocument($doc2); > $somedoc2node->appendChild($tmpele); > > thanx > tom seems to be. i asked the same question some days ago and have no direct solution so far. what i did to circumvent this is doing a xml->xml transformation (with sablotron), copying everything but the node i want to delete. the xsl looks like: -- snip -- <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="@*|*"> <xsl:copy> <xsl:apply-templates select='@*|node()[not(@id="%deleteme%")]'/> </xsl:copy> </xsl:template> </xsl:stylesheet> -- /snip -- everything but nodes with id of %deleteme% gets copied. this of course ain't very pretty but works... ru, peter. -- Peter Sabaini [EMAIL PROTECTED] NETCONOMY Onlineberatungs- und -management Gmbh & Co KG www.netconomy.net - Schoenaugasse 64, 8010 Graz Tel. +43-(0)316 875-3081.
Hello, I've downloaded the FDF toolkit from adobe (fdftk4_05_C.tar.Z) and it doesn't uncompress. I've noticed that other people are using it. Has anyone else experianced this same problem and if so what was your work around. Thank You Kurt
Hello, I've downloaded the FDF toolkit from adobe (fdftk4_05_C.tar.Z) and it doesn't uncompress. I've noticed that other people are using it. Has anyone else experianced this same problem and if so what was your work around. Thank You Kurt
Does anyone have any leads on how to get your own fonts into gifs created by PHP? The manual isn't much help (at least to me), and info seems scarce. I've got a fairly decent postcard app up at champfactory.com, but I can't get it to use the eurostyle font my client is asking for. Any help would be greatly appreciated. - - - - - - - - - - - - - - Scott Poarch GlobalHost.com - - - - - - - - - - - - - -
Hello, when I use this syntax: champs[0] is a string, which is the name of an HTML form variable. class test { var champs; function verif() { for ($i = 0; $i < count($this->champs) ; $i++) { global $$this->champs[$i][0]; $tmp = $this->champs[$i][0]; $this->champs[$i][1] = $$tmp; } } } Everything works properly, but when I use this : class test { var champs; function verif() { for ($i = 0; $i < count($this->champs) ; $i++) { global $$this->champs[$i][0]; $this->champs[$i][1] = $$this->champs[$i][0]; } } } It doesn't work ($this->champs[$i][1] is empty). My problem is : why is the global instruction working whereas the newt line isn't with this formulation (I have to use a temporary variable which I then can reference). Thanx for any help, and apologize my poor English. S. ROZIER
"Sébastien ROZIER" <[EMAIL PROTECTED]> wrote: > when I use this syntax: > champs[0] is a string, which is the name of an HTML form variable. > > class test > { > var champs; When initiating a variable you need to prefix it with "$". So the line above should be: var $champs; If it's an array you may want to initiate it like: var $champs = array(); I don't have the time to analyze your code in full right now, but hopefully this will get you started. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/
OK sorry, I did put the "$", and adding = array() is still not working.... Thanx for any help Steve Werby wrote: > "Sébastien ROZIER" <[EMAIL PROTECTED]> wrote: > >> when I use this syntax: >> champs[0] is a string, which is the name of an HTML form variable. >> >> class test >> { >> var champs; > > > When initiating a variable you need to prefix it with "$". So the line above > should be: > > var $champs; > > If it's an array you may want to initiate it like: > > var $champs = array(); > > I don't have the time to analyze your code in full right now, but hopefully > this will get you started. > > -- > Steve Werby > COO > 24-7 Computer Services, LLC > Tel: 804.817.2470 > http://www.247computing.com/ > >
Can anyone tell me exactly what using --with-servlet[=DIR] will give me? I mean, does that compile in servlet support? Are there PHP functions for executing servlets? What's the deal exactly... Shawn --- Shawn J. Wallace ([EMAIL PROTECTED]) Justweb Inc. - http://www.justweb.com (519)652-6599 or (800)343-9312
I'm getting some strange things happening using regex's where it will skip certain matches for no apparant reason. I know the regex itself is fine, it's too simple to screw up... So I noticed that there is a compile option --with-regex=TYPE Does anyone know exactly what the differences are between the php, system, and apache regex libraries? Which should I use to fix this strangeness? I'm recompiling right now with --with-regex=apache to see if that changes anything... I just don't want to break any other programs. Shawn --- Shawn J. Wallace ([EMAIL PROTECTED]) Justweb Inc. - http://www.justweb.com (519)652-6599 or (800)343-9312
What is the expression that seems to be failing? give an example, perhaps it's your code. johnny p. > -----Original Message----- > From: Shawn J. Wallace [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 05, 2001 8:09 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Which Regex library? > > > I'm getting some strange things happening using regex's where > it will skip > certain matches for no apparant reason. > > I know the regex itself is fine, it's too simple to screw up... So I > noticed that there is a compile option --with-regex=TYPE > > Does anyone know exactly what the differences are between the > php, system, > and apache regex libraries? Which should I use to fix this > strangeness? > > I'm recompiling right now with --with-regex=apache to see if > that changes > anything... I just don't want to break any other programs. > > Shawn > > --- > Shawn J. Wallace ([EMAIL PROTECTED]) > Justweb Inc. - http://www.justweb.com > (519)652-6599 or (800)343-9312 > > > -- > 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] > >
Ok, this is from memory, but.. I'm trying to pull the IP addresses of mail relays out of an email - and they are of the form [xxx.xxx.xxx.xxx], so I do something like: ereg('\[(0-9\.)*]', $email, $res) It finds some but not all of them in the email. What I really do is put that in a while statement and replace each found ip with a marker so I can repeat the regex again and again. --- Shawn J. Wallace ([EMAIL PROTECTED]) Justweb Inc. - http://www.justweb.com (519)652-6599 or (800)343-9312
Is it ok to mail questions to this list? If so; Is there something similar like the "session variables" of ASP in PHP, or do one have to use (client-side) cookies instead? /thanks/me
Look at http://www.php.net/manual/en/html/ref.session.html HTH. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com spider [[EMAIL PROTECTED]] wrote: > Is it ok to mail questions to this list? If so; > > Is there something similar like the "session variables" of ASP in PHP, > or do one have > to use (client-side) cookies instead? > > /thanks/me > > > -- > 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]
I need to do an HTTP post from a PHP script; I want to set username=xxxx. What is the correct way to do this in PHP?
Greetings, first of all you'll need to have all of your variables in one line: like this for example $vars="var1=".urlencode($var1)."&var2=".urlencode($var2); then you need to post the following $header="POST /your_script.php HTTP/1.0\r\nContent-length: ".strlen($vars)\r\n\r\n$vars\r\n\r\n"; echo $header Of course these are not the complete headers browser sends, HTH, -- Vahan Yerkanian Email: [EMAIL PROTECTED] Leading Web Developer / Designer Phone: (374) 158-2723 Web Development Department Fax: (374) 128-5082 ARMINCO Global Telecommunications http://www.arminco.com Matthew Brealey wrote: > > I need to do an HTTP post from a PHP script; I want to set username=xxxx. > > What is the correct way to do this in PHP? > > -- > 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]
I need to do an HTTP post from a PHP script; I want to set username=xxxx. What is the correct way to do this in PHP?
hi, how can i do this? i have a java applet on my site which allows users to create their own drawings. i want to provide a "Email this to me" option, which will save the applet drawing and email it to the user. is there any way i can achieve this? thanks! winnie --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01
>how can i do this? i have a java applet on my site which allows users to >create their own drawings. i want to provide a "Email this to me" option, >which will save the applet drawing and email it to the user. is there any >way i can achieve this? We have a parametric CAD system which runs as a Java applet. To save drawings, it can try to do a local save, so we have the option to 'Save via server' in which case the applet POSTs the data to a cgi program on the web server and opens up a new window to handle the response. The file can then be saved from the web browser. Check out http://www.dtonline.org/apps/object/app.exe?1&2&1&1&10&2&0 The cgi program is written in C, but an equivalent could be knocked up in PHP in a few minutes. If you really need to email the drawing, then you could get the PHP program to email the drawing as an attachment instead. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Hi Phil Thanks so much for your response, I did check out the site but the applet takes forever to load n a 56 k modem. Is it possible for me to take a look at this CGI program? If not, I would really appreciate a bit more detailed idea to POST the data to a PHP program. How to this in Java? Thanks! Winnie ""Phil Driscoll"" <[EMAIL PROTECTED]> wrote in message 001701c08f83$2caf7d40$0c800001@philsntserver">news:001701c08f83$2caf7d40$0c800001@philsntserver... > >how can i do this? i have a java applet on my site which allows users to > >create their own drawings. i want to provide a "Email this to me" option, > >which will save the applet drawing and email it to the user. is there any > >way i can achieve this? > > We have a parametric CAD system which runs as a Java applet. To save > drawings, it can try to do a local save, so we have the option to 'Save via > server' in which case the applet POSTs the data to a cgi program on the web > server and opens up a new window to handle the response. The file can then > be saved from the web browser. > > Check out > > http://www.dtonline.org/apps/object/app.exe?1&2&1&1&10&2&0 > > The cgi program is written in C, but an equivalent could be knocked up in > PHP in a few minutes. If you really need to email the drawing, then you > could get the PHP program to email the drawing as an attachment instead. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.230 / Virus Database: 111 - Release Date: 25-Jan-01
"PHPBeginner.com" <[EMAIL PROTECTED]> wrote: > Well, Cobalt Raq4 is not an easy-to-compile-on Server ... I'm just curious, what are you basing this on? Compiling Apache on it with all of the modules compiled in by default might be tricky, but in my experience compiling PHP, MySQL and anything not used directly by the GUI is rarely more difficult than compiling on any Linux box. I'm not pushing Cobalt products - that doesn't benefit me in anyway, but the RaQx servers are a solution I'd recommend to individuals if it seems like a good match based on their skills and needs - despite some of the downsides of the RaQs. > and 1 single IP when you get a dedicated server? no ... Well, it really depends what your needs are. If you can accomplish everything you need using a single IP and name-based hosting then you really don't need additional IPs. I don't believe the original poster ever stated why he would need additional IPs, even after being informed what situations would require them. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/
Hi, Can someone advise on the following. class class_y { function test() { return "test"; } } class class_x { function x { $n = new $y; } function z { $n->test(); } } I need the object of class_y available to the other objects of classx but I cant figure out how I do this. Any ideas? Regards, Steve Maher
On Monday 05 February 2001 15:52, Stephen Maher wrote: > Hi, > > Can someone advise on the following. > > class class_y > { > function test() { > return "test"; > } > } > > class class_x > { > function x { > $n = new $y; > } > > function z { > $n->test(); > } > } > > I need the object of class_y available to the other objects of classx > but I cant figure out how I do this. Any ideas? class class_x { function x { $this->n = new $y; } function z { $this->n->test(); } var n; } -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka", but "That's funny..." - Isaac Asimov
Has anyone successfully used PHP to transform XML to HTML on the fly? Can you point me to some info/tutorials. -Brian *******
IIRC sterling (with the help of lots of cherry-beer) put some docus into the CVS the otherday, checkout http://snaps.php.net/manual for the latest version of the manual with documentation for XSL functions which are now avalible in PHP. James > -----Original Message----- > From: Brian V Bonini [mailto:[EMAIL PROTECTED]] > Sent: 05 February 2001 15:17 > To: PHP Lists > Subject: [PHP] XML -> HTML via PHP > > > Has anyone successfully used PHP to > transform XML to HTML on the fly? > > Can you point me to some info/tutorials. > > -Brian > ******* > > > > -- > 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]
"Brian V Bonini" <[EMAIL PROTECTED]> wrote: > Has anyone successfully used PHP to > transform XML to HTML on the fly? Yes. > Can you point me to some info/tutorials. Try phpbuilder.com and zend.com. I know one or both had a tutorial that's easy to follow. You'll also need to have PHP compiled with XML support. -- Steve Werby COO 24-7 Computer Services, LLC Tel: 804.817.2470 http://www.247computing.com/
Carsten, This is a known limitation in the initial release of the encoder. The license file must be stored in C:\Program Files\Zend, even if your standard Program Files directory is in E:. It will be fixed in future versions. Zeev At 19:00 4/2/2001, Carsten Gehling wrote: >Downloaded the Encoder testdrive and installed it with a license file >(zend_encoder.dat). Did what the manual stated, except that I installed it >on E:\program files\zend instead of C:\program files\zend (I did modify the >install_license.reg before installing it into the registration database) > >When I run the zendenc.exe, I get a dialog stating that it cannot find the >license data. I'm able to specify it manually, but then I get another >errormessage saying "Error in saving configuration settings". > >Anyone else had this problem? > >- Carsten > > > >-- >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] -- Zeev Suraski <[EMAIL PROTECTED]> CTO & co-founder, Zend Technologies Ltd. http://www.zend.com/
I get a strange error when I am trying to send a mail with an attachment. I used the class below, but I get two error messages. 1. Unknown has generated errors and will be closed by windows... 2. CGI ERROR The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: ERROR: could not get the task list How do I fix this? I use php 4.0.3pl 1 (CGI), Win2k. <? /* * Class mime_mail * Original implementation by Sascha Schumann <[EMAIL PROTECTED]> * Modified by Tobias Ratschiller <[EMAIL PROTECTED]>: * - General code clean-up * - separate body- and from-property * - killed some mostly un-necessary stuff */ class mime_mail { var $parts; var $to; var $from; var $headers; var $subject; var $body; /* * void mime_mail() * class constructor */ function mime_mail() { $this->parts = array(); $this->to = ""; $this->from = ""; $this->subject = ""; $this->body = ""; $this->headers = ""; } /* * void add_attachment(string message, [string name], [string cty pe]) * Add an attachment to the mail object */ function add_attachment($message, $name = "", $ctype = "application/octet-stream") { $this->parts[] = array ( "ctype" => $ctype, "message" => $message, "encode" => $encode, "name" => $name ); } /* * void build_message(array part= * Build message parts of an multipart mail */ function build_message($part) { $message = $part[ "message"]; $message = chunk_split(base64_encode($message)); $encoding = "base64"; return "Content-Type: ".$part[ "ctype"]. ($part[ "name"]? "; name = \"".$part[ "name"]. "\"" : ""). "\nContent-Transfer-Encoding: $encoding\n\n$message\n"; } /* * void build_multipart() * Build a multipart mail */ function build_multipart() { $boundary = "b".md5(uniqid(time())); $multipart = "Content-Type: multipart/mixed; boundary = $boundary\n\nThis is a MIME encoded message.\n\n--$boundary"; for($i = sizeof($this->parts)-1; $i >= 0; $i--) { $multipart .= "\n".$this->build_message($this->parts[$i]). "--$boundary"; } return $multipart.= "--\n"; } /* * void send() * Send the mail (last class-function to be called) */ function send() { $mime = ""; if (!empty($this->from)) $mime .= "From: ".$this->from. "\n"; if (!empty($this->headers)) $mime .= $this->headers. "\n"; if (!empty($this->body)) $this->add_attachment($this->body, "", "text/plain"); $mime .= "MIME-Version: 1.0\n".$this->build_multipart(); mail($this->to, $this->subject, "", $mime); } }; // end of class /* * Example usage * */ $attachment = fread(fopen("images/jean.jpg", "r"), filesize("images/jean.jpg")); $mail = new mime_mail(); $mail->from = "[EMAIL PROTECTED]"; $mail->headers = "Errors-To: [EMAIL PROTECTED]"; $mail->to = "[EMAIL PROTECTED]"; $mail->subject = "Testing..."; $mail->body = "This is just a test."; $mail->add_attachment("$attachment", "images/jean.jpg", "image/jpeg"); $mail->send(); ?>
Is it possible to output to more than one pdf file at one time. Ryan