[PHP] Re: Regular Expressions - A relatively simple search...
"Mike Gifford" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > I'm trying to replace a couple of lines of code: > > $dotpos = 1 - (strlen($userfile_name) - strpos($userfile_name, '.')); > $extension = substr($userfile_name, $dotpos); > > with a simpler regular expression: > $extension = eregi_replace( "/.*", "", $userfile_name); > > However it isn't working.. > > What I'd like to do is to find the extension of a file name and place that in a variable. So in > '/home/mike/test.txt', I want to have the statement return 'txt' > > Any help would be appreciated.. > > Mike > -- > Mike Gifford, OpenConcept Consulting, http://openconcept.ca > Offering everything your organization needs for an effective web site. > Abolish Nuclear Weapons Now!: http://pgs.ca/petition/ > It is a miracle that curiosity survives formal education. - A Einstein > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP regexp powerful?
Are they powerful? Well they are compatible with PERL's Regular expressions...you should use the 'preg_' functions... Check the manual anyway...: http://www.php.net/manual/en/ref.pcre.php "Jeff Lewis" <[EMAIL PROTECTED]> wrote in message 009201c13704$b20abe90$76a1a8c0@LEWISJCIT">news:009201c13704$b20abe90$76a1a8c0@LEWISJCIT... I have a lot of scripts written in perl here and have been using PHP a lot now. I am wondering if PHPs regexps are powerful or not. I will show a small section of this code below that I clean up witht he perl scripts. It cleans it almost right up but take a look :) And YES there is actually information we use in this file :) Jeff ***BATCHJobBATCH_384,SubmittedbyPRDM ANOPERonNodeKWRB***%SET-W-NOTSET,err ormodifyingKWRB$DKA0:-CLI-E-IVDEVTYPE,invaliddevicetype-specifyamailboxdevic e$log*o=="logoff/full"needtohavecapabilities$tologout$iff$mode().eqs."INTERA CTIVE"thenprdmenu$logout/full$hellosystemKWRtakes0Hellosystem,haveaniceday$ setverify$znewdate$6sep01$heading$@clasNumb:1000@sort:BABYBEDDI@firs:6sep01L 9BC11758KWRN2N1V4$Diag1135247V2*cbe,99 *pe*tfNEWSGO*BF*ps6*ss6.5< ss130>*la104%*cpe*cse*ih6.*boBABY,BEDDING*bb*cpd*tfNEWSGO*ps6.*ss6.5*la104%* feforcrib.In- cludesmatchingCribMo-bile.$20.578-6231.*dih*p e*lcd*add*ic*IR .6*rs.5*la3.*rab< bc>*ru*fe $@clasNumb:1000@sort:BABYBEDDI@firs:6sep01L9BA46614KWRN2N3C7$Diag1117244V2*cbe,99*pe*tfNEWSGO*BF*ps6< bc>*ss6.5*la104%*cpe*cse*ih6.*bo*comMemo:sameplaced...e-maildee< 10>BABYBEDDING.*bb< bc>*cpd*tfNEWSGO*ps6.* ss6.5*la104%*feNoah'sArk fromSears,A1condition.$50firm.743-9923.*d ih*pe*lcd*add*i c*IR.6*rs.5*la3.*rab*ru*fe $@clasNumb:1000@sort:BABYBREAS@firs:6sep01L9BB31124KWRN1B1B5$Diag1131124V1*cbe,99*pe*tfNEWSGO*BF*ps6< bc>*ss6.5*la104%*cpe*cse*ih6.*bo*comMemo:samefaxed.dee<10>BABYBREAST*bb< bc>*cpd*tfNEWSGO*ps6.* ss6.5*la104%*fepump.Gerber.Likenew.$35.Call653-3355.*dih*pe*lcd*add*ic*IR.6*rs.5 *la3.*rab*ru* fe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Grabbing dynamic pages
thanks again all, The data will be the whole web page and I have to extract out the current share pricing etc, probaly grab thier sexy chart as well (was told you can take what you want as long as you use thier guidlines which they provide apon contact) I suppose I could use imlib or gd to generate my own graphs as well joy (c: I was told by our Internet manager that the problem does lies in our protection on our border ie: firewall, once he has allowed me some access to the outside world I should be able to do this :-) I'm sure I will have plenty of questions when it comes time to parse the html (oh my god). Regards Joseph -Original Message- From: Donny Yap [mailto:[EMAIL PROTECTED]] Sent: Friday, 7 September 2001 4:55 PM To: Joseph Blythe Subject: RE: [PHP] Grabbing dynamic pages Yes, This shouldn't be too hard to do; work out what type of data it is you're grabbing from the ASX site - ie. is it just that image, or is there a form or something? You can open the page directly in PHP using fopen, Regexp will let you grab out whatever the data is... An alternative is to use strip_tags Hope that helps some, Donny > -Original Message- > From: Joseph Blythe [mailto:[EMAIL PROTECTED]] > Sent: Friday, 7 September 2001 3:14 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Grabbing dynamic pages > > > Hey all, > > I got a bit of a problem I need to be able to grab info (which has been > approved) from the Australian Stock Exchange Website (www.asx.com.au) all > they say about this in the information they sent me is: > > "To obtain your share price data you will need to get your IT department > to write a java object or a com active x object to strip out the > unnecessary > html so that you are just left with your share price information." > > LOL I am the IT department (well part of it) and I don't use or would even > recommend using these products not that there is anything wrong with them, > furthermore even if I did this does not help me very much (c: > > I was sort of wondering if there is a way to do this sort of > thing with PHP? > the only other information I have is the URL in the form of: > > http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsS > earch.jsp? > searchBy=asxCode&TimeFrame=D&asxCode=ASX > > I tried a quick test using the filesystem functions with no success, I was > sort of hoping for a 'Yes' / 'No" answer maybe if 'Yes' just a quick > explanation. > > Any help would be much much appreciated. > > Regards, > > Joseph Blythe > Web Development > > BoldFX / Binary Logic > The LOGICAL Choice! > 750 Port Road Beverley > Phone: +61 08 8244 1800 > Fax: +61 08 8244 1811 > mailto:[EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] UD4 & PhAkt Users?
PHAKT will reduce your development time, but you'll still need to customize the code. That is, unless your doing something relatively simple. You're best bet is to learn the code. That's invaluable. -john __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- On Wed, 5 Sep 2001, Vicki wrote: > I'm trying to learn PHP right now for a subscription-based site that > requires features such as user authentication and e-commerce (with a > mySQL database) I'm using Dreamweaver 4 on a Mac running OS 9 to build > the site. I'm wondering if the learning curve would be less steep if I > upgraded to UltraDev and installed PhAkt. I understand the logic behind > the code, but am having a hard time learning all the syntax (and I've > always been a lousy typist). Would UltraDev help? > > Is anybody working with UltraDev and PhAkt now, esp. on a Mac? How's it > going? Since I can't test locally with my current set-up, I also wonder > whether I can set up remote connections to my hosting company's servers > (and whether that's a pain to do) or if just uploading files and testing > that way is a viable alternative. > > My goal is to get the site up as quickly as possible. Would UD4 + PhAkt > speed things up? > > Thanks very much for any insight you can provide. > > Vicki > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ldap
Version php 4.0.6 Win32 I get : Unable to load './extensions/php_ldap.dll'. Witch dlls must be copied in /winnt/system32 (dlls are all in /php/dlls ?). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] For the RegExps gurus!
From: ~~~i LeoNid ~~ <[EMAIL PROTECTED]> Date: Thu, Sep 06, 2001 at 05:30:44PM + Message-ID: <3b97b222.78196206@localhost> Subject: Re: [PHP] For the RegExps gurus! > You can keep improving:) or you can use piece of my working (except for > $Harlem, to which i am not going:) code (I give it for free this time:) > > No /me, no ereg, no nothing - gentleMen:)-just /i (did you miss it, btw?:) If you look at the stuff you sent you'll understand why I improved it. Btw... why the h*ll do you explode() the string you're matching, while there's the /m modifier? You're making it to difficult for yourself (and others). No need for the messy solution you created... Just use RE's that are as simple as possible. It has the best performance and it reads a lot easier. -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Netscape & Cookies
then it should probably be SetCookie("bilderanzeige","\"$bilderanzeige\"",time()+3600*24*30,"/","",0); as a general rule, only numerics can get away without being surrounded in quotes - Original Message - From: "Jochen Kaechelin" <[EMAIL PROTECTED]> To: "PHP General List" <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 2:43 AM Subject: RE: [PHP] Netscape & Cookies > > > SetCookie("bilderanzeige",$bilderanzeige,time()+3600*24*30,"/","",0); > > > Works fine in IE and Opera! > > > Could anyone help, please! > > > > What's in $bilderanzeige? > > > $bilderanzeige = "ja" or > $bilderanzeige = "nein" > > Jochen > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Sending Broadcast Email - will a large loop cause a crash?
Also remember PHP has a maximum execution time (normally 30 seconds) so you will need to overwrite when running the script. - Original Message - From: "Kath" <[EMAIL PROTECTED]> To: "Fotwun" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 12:39 AM Subject: Re: [PHP] Sending Broadcast Email - will a large loop cause a crash? > Whats your time frame for deployment of the email? > > You might want to stagnate it out... like loop through 100, pause for 10 > secs, do the next 100, pause, repeat. Maybe longer if you could. > > You could always have it record the number, stop it and adjust higher/lower > as required. > > Also, make sure that you are able to tell what emails are kicked back and > logged as not being received (User not found, other kind of error in > sending). > > Please let us know what happens, it would be excellent reference. > > - k > > - Original Message - > From: "Fotwun" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, September 06, 2001 7:16 PM > Subject: [PHP] Sending Broadcast Email - will a large loop cause a crash? > > > > Hi, > > > > I need to send a broadcast email to our customers (about 3,000 emails). > The > > data is being drawn for the DB, and will be personalized. Obviously, the > > code to do this is only a few lines. However, I am concerned with the load > > it will put on the system trying to loop through and mail() 3,000+ times. > > Because of the overhead I anticipate this will cause the server, I am > > planning to do it late in the evening. > > > > My concern is this... will such a loop calling mail() cause PHP/Apache/the > > box/etc to crash under normal circumstances? We have a pretty beefy box, I > > just have never tried broadcasting through PHP. Also, if there is any > > reasonable chance for such a failure, is it possible to put timed pauses > in, > > say half a second or so before it continues the loop. I've never heard of > > inserting pauses into the execution of PHP code, not sure if its possible. > > If it were, I would think this could combat some of the load, and prevent > > the bottleneck from building backlog until failure. > > > > Who knows, maybe this type of routine won't even make my box flinch > (P3-833, > > FreeBSD, 256 megs), that's why I'm asking ahead of time. I'd hate to see a > > crash, mainly because I'll have no idea where it left off, and will end up > > sending 2 or more emails to some people if I have to run it more than > once. > > > > Thanks. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to use environment variables in php.ini?
Hi there Is there any way to use in php.ini previously set environment variables? I mean when I set doc_root to "C:/Documents and Settings/zaruba/My Documents/My Webs" and several lines below I need to set session_save_path to "C:/Documents and Settings/zaruba/My Documents/My Webs/.sessions" is it possible to write something like this? ... session.save_path = $doc_root/.share (ofcourse it doesn't work this way, I wouldn't ask if it did :o) Yaroukh [Apache/1.3.20 (Win32) PHP/4.0.6] -- 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] ordering a query
Me again :) I have a query that orders by id#, the problem is I have 17 items and I get an output like so: 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9 So it thinks 1 and 10 are the same, and it thinks 11 is less than 2 and so on and so forth. Remedy please? (I'd rather not rename the items 01, 02, 03, 04, etc.) Thanks again. Nate
Re: [PHP] ordering a query
It is simply ordering them as type data rather than as type integer. Change your data type in the db. George, a newbie - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 9:16 AM Subject: [PHP] ordering a query Me again :) I have a query that orders by id#, the problem is I have 17 items and I get an output like so: 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9 So it thinks 1 and 10 are the same, and it thinks 11 is less than 2 and so on and so forth. Remedy please? (I'd rather not rename the items 01, 02, 03, 04, etc.) Thanks again. Nate _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ordering a query
Just to expand slightly on this answer... think back to days at school, you order works as so aardvark, abbey, accoustic, ie you compare rightmost letters, if they match then compare the next letter along until you find a difference... this is what your sort is doing. It doesn't think 1 and 10 are the same, it compares the first digit, sees they are the same and postitions based on the second digit. As george correctly says changing the column type to INT will make sure the RDBMS orders them numerically rather than alphabetically Tom, a rambler - Original Message - From: "George Pitcher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 9:00 AM Subject: Re: [PHP] ordering a query > It is simply ordering them as type data rather than as type integer. Change > your data type in the db. > > George, a newbie > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, September 07, 2001 9:16 AM > Subject: [PHP] ordering a query > > > Me again :) > > I have a query that orders by id#, the problem is I have 17 items and I get > an output like so: 1,10,11,12,13,14,15,16,17,2,3,4,5,6,7,8,9 > > So it thinks 1 and 10 are the same, and it thinks 11 is less than 2 and so > on and so forth. Remedy please? (I'd rather not rename the items 01, 02, 03, > 04, etc.) > > Thanks again. > > Nate > > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP 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] warning on Installation of PHP on windows 98
Hi, while installing php on my windows 98 machine i got the following warning this came when i execute this C:\php>php.exe -i "Unable to load dynamic library 'c:\php/mysql.dll'-one of the library files needed to run this application can not be found" (that error is java script dialog warning). Please tell me how to correct this. Thanks and regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session variables
Hi! I want to know how many users are currently online at my site. How can I get this info from php? Can I? Thank you for answer. Barno -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Session variables - Users online
put this code in the home web page $conn user online"; } else { echo"$conn users online"; } ?> and create this table in you db to hold the necesary values # # Table structure for table 'uonline' # CREATE TABLE `uonline` ( `caduc` int(15) NOT NULL default '0', `ip` varchar(40) NOT NULL default '', `file` varchar(100) NOT NULL default '', PRIMARY KEY (`caduc`), KEY `ip` (`ip`), KEY `file` (`file`) ) TYPE=MyISAM; this is working good in my site Aniceto Lopez http://www.lamundial.net download and spread our music -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: configuring curl with php
Hey Richard, you are right but I got someone that suggested an easier way to do it. tar xvzf php-4.0.5.tar.gz cd php-4.0.5 # need to make sure -lssl is before -lcrypto in configure for curl to work correctly sed 's/-lcrypto/-lssl -lcrypto/g' configure > c2 rm -f configure cp c2 configure chmod 755 configure Now I have a new problem when I configure php. I checked in the archives but it seems like I'm missing lex and have to install it. I have root access at a webhost and I know they just configured php so shouldn't lex or flex be there? Am I missing something? Well I'm going to install lex right now and see if it works. checking lex output file root... ./configure: lex: command not found configure: error: cannot find output from lex; giving up Richard Lynch wrote: > The configure program you run to configure PHP is just a text file, I think. > > So maybe just: > > Open it. > Find -lcrypto. > Insert -lssl in front of it. > Save it. > > Then run ./configure > > -- > WARNING [EMAIL PROTECTED] address is an endangered species -- Use > [EMAIL PROTECTED] > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > - Original Message - > From: Bob <[EMAIL PROTECTED]> > Newsgroups: php.general > To: <[EMAIL PROTECTED]> > Sent: Wednesday, September 05, 2001 2:53 PM > Subject: configuring curl with php > > > hi everyone > > > > i am following this page to add curl to php > > http://curl.haxx.se/libcurl/php/install.html > > > > i installed curl and knows it works (curl --version) but trying to > > configure php with curl but don't know what this means for "Build PHP > > -- Step 1" mean? i did a phpinfo() and got the configure but what do i > > do with the -lssl and -lcrypto. where does that go? > > > > ./configure --prefix=/usr --with-config-file-path=/etc --disable-debug > > --enable-pic --enable-shared --enable-inline-optimization > > --with-apxs=/usr/sbin/apxs --with-exec-dir=/usr/bin --with-regex=system > > --with-zlib --with-gdbm --with-gd --with-jpeg-dir=/usr --with-png > > --with-ttf > > --with-layout=GNU --with-openssl=/usr --enable-debugger > > --enable-safe-mode > > --enable-sockets --enable-sysvsem=shared --enable-sysvshm=shared > > --enable-track-vars --enable-magic-quotes --enable-mem-limit --enable-yp > > > > --enable-ftp --enable-wddx --without-mysql --with-imap=shared > > --without-unixODBC > > --without-oracle --without-oci8 --with-xml > > > > > > Build PHP (In php-4.0.xpl1 directory) > > == > > [1] To make -lssl comes before -lcrypto (as advised), search for > > "-lcrypto" in > > ./configure and put "-lssl" before it. > > [2] ./configure --with-mysql --with-openssl=/usr/local/ssl > > --with-curl=/usr/loca > > l/lib --with-apache=../apache_1.3.x > > (In most cases of linking problem, it should complain here in debug.log) > > > > [3] make > > [4] make install (If --with-apache option is omitted, it should generate > > php > > executable in /usr/loca/bin) > > [5] Library for modphp4 is now in apache_1.3.x/src/modules/php4 > > > > > > _ > > Do You Yahoo!? > > Get your free @yahoo.com address at http://mail.yahoo.com > > _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] use of mysql_free_result and unset
When do I have to use mysql_free_result($res). Is it good to use it with every query or only if the result is very big (what's the size of the result I shoud use mysql_free_result?). What's about the use of unset($var). Is this good to save RAM to make my script run faster? Do I have to do this also when I'm at the end of a function or is it automatically done by leaving this function if it's not set global? -- 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] how to pass authentication info to SMTP server
Hi friends, I would like to implement sending an e-mail through SMTP server. Here my SMTP server needs authentication. How to pass the username and password to SMTP server?? Thanks and regards -Balaji -- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Does PHP work with Sybase ASA?
I suppose You have ASA 6.0 or later version installed on Your machine with Linux. If it is true, then You can install Open Client for ASE 11.0.3 (it is free) and You can communicate via Open Client to ASA. It works only with ASA 6.0 and higher. Then You need to compile PHP with Sybase Open Client. You have to look into guides how to do it on PHP side and Sybase side. I'm not expert about compiling PHP but it only one config file to bulid PHP, there should be section about Sybase Open Client interface, default this is commented. It is not very dificult. If You will have problem You can ask me I will try to help You. We (not only me) had recompiled PHP 3.0/4.0 with Open Client for ASA 11.0.3/11.9.2 (all the combinations). Krzysztof Kocjan Davor Pleskina wrote: > I mean, is there in PHP support for Sybase Adaptive Server Anywhere, any > version, like for MySQL and some other databases? > > Thanks. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] --- KONKURS: Niedobre miejsca - 50 ksiazek W. Whartona do wygrania! http://szkola.interia.pl/wharton/strona.html?co=13 -- 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] Save As doesnt always work
Hello all, i tried to make the browser save a file by setting headers In this case the Browser (IE 5.5 W2K) just displays the content, http request T4 09/07 11:03:17 Server Data: GET http://iwonttell/ T4 09/07 11:03:17 Server ausgabe/auswertung.php HTTP/1.0{0D}{0A}Accept: T4 09/07 11:03:17 Server */*{0D}{0A}Accept-Language: de{0D}{0A}Authoriza T4 09/07 11:03:17 Server tion: Basic aWFdonteventhinkVtbTQy{0D}{0A}User-Ag T4 09/07 11:03:17 Server ent: Mozilla/4.0 (compatible; MSIE 5.5; Windows T4 09/07 11:03:17 ServerNT 5.0){0D}{0A}Host: www.rtl.de{0D}{0A}Proxy-C T4 09/07 11:03:17 Server onnection: Keep-Alive{0D}{0A}{0D}{0A} response T4 09/07 11:03:18 Server Data: HTTP/1.1 200 OK{0D}{0A}Date: Fri, 07 Sep 2001 0 T4 09/07 11:03:18 Server 9:03:49 GMT{0D}{0A}Server: Apache/1.3.19 (Unix) T4 09/07 11:03:18 ServerPHP/4.0.5{0D}{0A}X-Powered-By: PHP/4.0.5{0D} T4 09/07 11:03:18 Server {0A}Content-Disposition: attachment; filename=a T4 09/07 11:03:18 Server usgabe_2001-09-07{0D}{0A}Content-Description: S T4 09/07 11:03:18 Server pielerdaten IAA Special{0D}{0A}Connection: clos T4 09/07 11:03:18 Server e{0D}{0A}Content-Type: text/plain{0D}{0A}{0D} T4 09/07 11:03:18 Server {0A}2001-09-07;jens;auch;test{0A} and in this case (other Web-Server) it works (same browser) http request T4 09/07 11:06:22 Server Data: GET http://bigmama/projekte/rtl/formular/ausgab T4 09/07 11:06:22 Server e/auswertung.php HTTP/1.0{0D}{0A}Accept: image/ T4 09/07 11:06:22 Server gif, image/x-xbitmap, image/jpeg, image/pjpeg, T4 09/07 11:06:22 Server application/vnd.ms-excel, application/msword, a T4 09/07 11:06:22 Server pplication/vnd.ms-powerpoint, */*{0D}{0A}Accept T4 09/07 11:06:22 Server -Language: de{0D}{0A}Cookie: mailCookie=jens%40 T4 09/07 11:06:22 Server bigmama.rep{0D}{0A}User-Agent: Mozilla/4.0 (com T4 09/07 11:06:22 Server patible; MSIE 5.5; Windows NT 5.0){0D}{0A}Host: T4 09/07 11:06:22 Serverbigmama{0D}{0A}Proxy-Connection: Keep-Alive T4 09/07 11:06:22 Server {0D}{0A}{0D}{0A} response T4 09/07 11:06:22 Server Data: HTTP/1.1 200 OK{0D}{0A}Date: Fri, 07 Sep 2001 0 T4 09/07 11:06:22 Server 9:06:22 GMT{0D}{0A}Server: Apache/1.3.14 (Unix) T4 09/07 11:06:22 Server (SuSE/Linux) mod_throttle/3.0 mod_layout/1.0 T4 09/07 11:06:22 Server mod_fastcgi/2.2.2 mod_ssl/2.7.1 OpenSSL/0.9.6 P T4 09/07 11:06:22 Server HP/4.0.4pl1{0D}{0A}X-Powered-By: PHP/4.0.4pl1 T4 09/07 11:06:22 Server {0D}{0A}Content-Disposition: attachment; filena T4 09/07 11:06:22 Server me=ausgabe_2001-09-07{0D}{0A}Content-Descriptio T4 09/07 11:06:22 Server n: Spielerdaten IAA Special{0D}{0A}Connection: T4 09/07 11:06:22 Server close{0D}{0A}Content-Type: text/plain{0D}{0A} T4 09/07 11:06:22 Server {0D}{0A}2001-09-07;jens;test;test{0A}2001-09-07 T4 09/07 11:06:22 Server ;jens;test;test{0A}2001-09-07;jens;test;test T4 09/07 11:06:22 Server {0A}2001-09-07;jens;test;test{0A} The only difference i see is htaccess authentication on the second Server... The PHP Code used to pipe the file through the browser is $file=fopen("ausgabe_".strftime("%Y-%m-%d",$time).".csv", "r"); header("Content-type: text/plain"); header("Content-Disposition: attachment; filename="."ausgabe_".strftime("%Y-%m-%d",$time).""); header("Content-Description: Spielerdaten IAA Special"); fpassthru($file); Any ideas whats wrong here? thanks in advance -- Grüße aus dem schönen Kleve Jens Kisters rosomm et partner Agentur für neue Medien GmbH Dienstleistungszentrum am Weißen Tor - Eingang B Gocher Landstrasse 2 47551 Kleve / Bedburg-Hau Telefon: 02821 - 97856-20 Telefax: 02821 - 97856-77 [EMAIL PROTECTED] http://www.rosomm-partner.de -- 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] extending array
Hi, I want to extend an existing array. the array is $shoplist[$pid] = $units; and i want to have $ price in it too. How do I do? /Kristofer -- 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] YOUR OFFSHORE MONEY
Hello there Our company is located in the offshores, we specialise in helping our clients to setup offshore Banks, IBC's, asset protection, Bank accounts and other offshore services. We can offer you a Class I bank located in the Caribbean with a holding Swiss Trust Company with an administrative firm based in Zurich. This is a fully functional commercial bank that you can conduct business in the following areas: online banking, credit cards, financial instruments, deposit, safekeeping etc. SWIFT association with extra investment is also available. For details please email me. Regards, offshore invest The message sent by MailList Express 4.05. Unregistered Version (Download from http://Internet-Soft.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.6 + GD
Hi ! I used PHP 4.0.3pl1 with gd lib (>1.6) and used the PNG functions. Everything was ok. I have changed to PHP 4.0.6 , i installed it with gd support, but now PHP says that there are no support for PNG files... In phpinfo(), GD support is well enaled. I search the mailing lists in the archive and it seems it is a problem with this version of PHP.. Is someone succeed in resolving this problem ? Thanks ! jean-arthur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] extending array
If you wish $shoplist[$pid] have $price in it with $units, you have to make $shoplist a multidimensional array which is simpple: Try that out, it should give you the idea. You can make it even more multidimensional if you need to. Niklas -Original Message- From: Kristofer Thorssell [mailto:[EMAIL PROTECTED]] Sent: 7. syyskuuta 2001 12:55 To: Php-General (E-mail) Subject: [PHP] extending array Hi, I want to extend an existing array. the array is $shoplist[$pid] = $units; and i want to have $ price in it too. How do I do? /Kristofer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Regular Expressions - A relatively simple search...
[EMAIL PROTECTED] (Mike Gifford) writes: > Hello, > > I'm trying to replace a couple of lines of code: > > $dotpos = 1 - (strlen($userfile_name) - strpos($userfile_name, '.')); > $extension = substr($userfile_name, $dotpos); > > with a simpler regular expression: > $extension = eregi_replace( "/.*", "", $userfile_name); > > However it isn't working.. > > What I'd like to do is to find the extension of a file name and place > that in a variable. So in '/home/mike/test.txt', I want to have the > statement return 'txt' you don't need a regular expression for that... $extension = strrchr(basename($userfile_name), '.'); -robin -- 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] Warning - how serious, how to eliminate
Hello people, I've got a question regarding the follwing scripts that gives an error. When I execute the scripts below I get an warning-message: - Warning: Division by zero in ./scripts/fasen_include.php on line 47... This is the script I use. When the vars are set the value has to be added to $totaal and $weight, when not the var has to be skipped. At the end of the scripts $totaal is devided by $weight to get an average ($percentage). What can I do to eliminate the warning and is it serious? Regards, Bart #BEGIN PHP-SCRIPTS for (;;$fase[$i]) { $weight[$i] = ''; $totaal[$i] = ''; if (isset($fase[$i][f_d1_perc]) && !empty($fase[$i][f_d1_perc])) { if (isset($fase[$i][f_d1_weight]) && !empty($fase[$i][f_d1_weight])){ $weight[$i] += $fase[$i][f_d1_weight]; $totaal[$i] += ($fase[$i][f_d1_weight] * $fase[$i][f_d1_perc]); } } if (isset($fase[$i][f_d2_perc]) && !empty($fase[$i][f_d2_perc])) { if (isset($fase[$i][f_d2_weight]) && !empty($fase[$i][f_d2_weight])){ $weight[$i] += $fase[$i][f_d2_weight]; $totaal[$i] += ($fase[$i][f_d2_weight] * $fase[$i][f_d2_perc]); } } if (isset($fase[$i][f_d3_perc]) && !empty($fase[$i][f_d3_perc])) { if (isset($fase[$i][f_d3_weight]) && !empty($fase[$i][f_d3_weight])){ $weight[$i] += $fase[$i][f_d3_weight]; $totaal[$i] += ($fase[$i][f_d3_weight] * $fase[$i][f_d3_perc]); } } if (isset($fase[$i][f_d4_perc]) && !empty($fase[$i][f_d4_perc])) { if (isset($fase[$i][f_d4_weight]) && !empty($fase[$i][f_d4_weight])){ $weight[$i] += $fase[$i][f_d4_weight]; $totaal[$i] += ($fase[$i][f_d4_weight] * $fase[$i][f_d4_perc]); } } if (isset($fase[$i][f_d5_perc]) && !empty($fase[$i][f_d5_perc])) { if (isset($fase[$i][f_d5_weight]) && !empty($fase[$i][f_d5_weight])){ $weight[$i] += $fase[$i][f_d5_weight]; $totaal[$i] += ($fase[$i][f_d5_weight] * $fase[$i][f_d5_perc]); } } $percentage[$i] = $totaal[$i] / $weight[$i]; $percentage[$i] = number_format($percentage[$i],1, ',', ' '); #END PHP-SCRIPTS -- 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] How to pass variables to php functions from url's?
I need to solve the following problem, but I can't figure out how: Let's assume we have a server called www.test.com When a user access http://www.test.com/path/username, I want a php script to execute, as if the url entered was http://www.test.com/path.php?value=username. I'm running PHP 4.0.6 on Apache 1.3.20. I've looked at both PHP and Apache documentation about this, but i havent found any information or examples on how this could be solved, so I'm asking the question here in hope for help. Thanks! /Martin Lindhe -- 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] Error Handler
Hi, Does anyone know why the custom error handler (set_error_handler) doesn't catch all errors? Some still falls through to PHP's standard error handler. Bug? (PHP/4.0.4pl1) -- Thanks, Tais M. Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Warning - how serious, how to eliminate
ichange that line to if($weight[$i]) $percentage[$i] = $totaal[$i] / $weight[$i]; All tho this does mean that if $weight[$i] is zero then $percentage will be as well HTH, Tom - Original Message - From: "Bart Verbeek" <[EMAIL PROTECTED]> To: "Php-General" <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 11:36 AM Subject: [PHP] Warning - how serious, how to eliminate > Hello people, > > I've got a question regarding the follwing scripts that gives an error. > When I execute the scripts below I get an warning-message: > > - Warning: Division by zero in ./scripts/fasen_include.php on line 47... > > This is the script I use. > When the vars are set the value has to be added to $totaal and $weight, when > not the var has to be skipped. > At the end of the scripts $totaal is devided by $weight to get an average > ($percentage). > What can I do to eliminate the warning and is it serious? > Regards, > > Bart > > #BEGIN PHP-SCRIPTS > for (;;$fase[$i]) { > $weight[$i] = ''; > $totaal[$i] = ''; > > if (isset($fase[$i][f_d1_perc]) && !empty($fase[$i][f_d1_perc])) { > if (isset($fase[$i][f_d1_weight]) && !empty($fase[$i][f_d1_weight])){ > $weight[$i] += $fase[$i][f_d1_weight]; > $totaal[$i] += ($fase[$i][f_d1_weight] * $fase[$i][f_d1_perc]); > } > } > if (isset($fase[$i][f_d2_perc]) && !empty($fase[$i][f_d2_perc])) { > if (isset($fase[$i][f_d2_weight]) && !empty($fase[$i][f_d2_weight])){ > $weight[$i] += $fase[$i][f_d2_weight]; > $totaal[$i] += ($fase[$i][f_d2_weight] * $fase[$i][f_d2_perc]); > } > } > if (isset($fase[$i][f_d3_perc]) && !empty($fase[$i][f_d3_perc])) { > if (isset($fase[$i][f_d3_weight]) && !empty($fase[$i][f_d3_weight])){ > $weight[$i] += $fase[$i][f_d3_weight]; > $totaal[$i] += ($fase[$i][f_d3_weight] * $fase[$i][f_d3_perc]); > } > } > if (isset($fase[$i][f_d4_perc]) && !empty($fase[$i][f_d4_perc])) { > if (isset($fase[$i][f_d4_weight]) && !empty($fase[$i][f_d4_weight])){ > $weight[$i] += $fase[$i][f_d4_weight]; > $totaal[$i] += ($fase[$i][f_d4_weight] * $fase[$i][f_d4_perc]); > } > } > if (isset($fase[$i][f_d5_perc]) && !empty($fase[$i][f_d5_perc])) { > if (isset($fase[$i][f_d5_weight]) && !empty($fase[$i][f_d5_weight])){ > $weight[$i] += $fase[$i][f_d5_weight]; > $totaal[$i] += ($fase[$i][f_d5_weight] * $fase[$i][f_d5_perc]); > } > } > $percentage[$i] = $totaal[$i] / $weight[$i]; > $percentage[$i] = number_format($percentage[$i],1, ',', ' '); > #END PHP-SCRIPTS > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to pass variables to php functions from url's?
Try method=GET in Your form to submit if You want to url be like url?var=value. Or php function header( 'Location: ' .rul . 'var=value' ); That's all You need I hope. Sorry but Your question is not good explained. Krzysztof Kocjan Martin Lindhe wrote: > I need to solve the following problem, but I can't figure out how: > > Let's assume we have a server called www.test.com > When a user access http://www.test.com/path/username, > I want a php script to execute, as if the url entered was > http://www.test.com/path.php?value=username. > > I'm running PHP 4.0.6 on Apache 1.3.20. > I've looked at both PHP and Apache documentation about this, but > i havent found any information or examples on how this could be solved, > so I'm asking the question here in hope for help. > > Thanks! > > /Martin Lindhe > > -- > 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] --- KONKURS: Niedobre miejsca - 50 ksiazek W. Whartona do wygrania! http://szkola.interia.pl/wharton/strona.html?co=13 -- 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]
SV: [PHP] How to pass variables to php functions from url's?
> Try method=GET in Your form to submit if You want to url be like > url?var=value. Or php function header( 'Location: ' .rul . > 'var=value' ); No, i'm not using a form, and i cant execute any php scripts whatsoever if there are no php script specified to execute. > That's all You need I hope. Sorry but Your question is not > good explained. Please read my mail again, I tried to described my problem as good as possible. > Martin Lindhe wrote: > > > I need to solve the following problem, but I can't figure out how: > > > > Let's assume we have a server called www.test.com > > When a user access http://www.test.com/path/username, > > I want a php script to execute, as if the url entered was > > http://www.test.com/path.php?value=username. > > > > I'm running PHP 4.0.6 on Apache 1.3.20. > > I've looked at both PHP and Apache documentation about this, but > > i havent found any information or examples on how this > could be solved, > > so I'm asking the question here in hope for help. > > > > Thanks! > > > > /Martin Lindhe -- 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] URGENT: imap_fetchbody CRLF trouble
Hy there, I've got serious problems with the imap_fetchbody function and need help urgent. When using $atty = imap_fetchbody($mbox, $i, $b, FT_INTERNAL); to fetch a base64 encoded attachment, imap_fetchbody replaces CRLF although it shouldn't. I did RTFM and it says: --- snap --- FT_INTERNAL - The return string is in "internal" format, without any attempt to canonicalize CRLF. --- snap --- Well... obviously this doesn't work. Is there any way i can get this to work? I need the CRLF's to get to their original CR state. Otherwise my whole project will fail :o( Greets, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How to pass variables to php functions from url's?
Hi Martin, Take a look at the Apache mod_rewrite docs. http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html I added this to my httpd.conf: ---snip--- RewriteEngine on RewriteCond %{HTTP_HOST}^nu\.osd\.dk$ RewriteRule ^.*$http://www.osd.dk/main.php?m=nu [R=301,L] ---snip--- If a user types the URL "nu.osd.dk" it will call http://www.osd.dk/main.php?m=nu. -- Tais M. Hansen "Martin Lindhe" <[EMAIL PROTECTED]> wrote in message 831D8A28AF18D5119EAA00E018C5B81C23BA08@MAIL1">news:831D8A28AF18D5119EAA00E018C5B81C23BA08@MAIL1... > I need to solve the following problem, but I can't figure out how: > Let's assume we have a server called www.test.com > When a user access http://www.test.com/path/username, > I want a php script to execute, as if the url entered was > http://www.test.com/path.php?value=username. > I'm running PHP 4.0.6 on Apache 1.3.20. > Thanks! > /Martin Lindhe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How to pass variables to php functions from url's?
Note: The example I wrote is only 3 lines, each starting with RewriteX! Beware of unintended line breaks caused by newsposting. :) -- Tais M. Hansen " Tais M. Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > ---snip--- > RewriteEngine on > RewriteCond %{HTTP_HOST}^nu\.osd\.dk$ > RewriteRule ^.*$http://www.osd.dk/main.php?m=nu > [R=301,L] > ---snip--- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: How to pass variables to php functions from url's?
> Hi Martin, > > Take a look at the Apache mod_rewrite docs. > > http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html Thanks alot! I made a similar solution which works RewriteEngine on RewriteRule "^/x/(.*)" "http://www.server2.com/users/$1"; takes www.server1.com/x/martin to www.server2.com/users/martin Great! I'm also wondering wether i can hide this redirect, as of now the redirected url is shown to the user, but i want this redirect to be unknown, so user is visually on same server. I figure i can solve this with a little script & a frame or something, but it's not a good solution, is it possible to do in any other way? /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Releasing Your Code
On Thursday 06 September 2001 23:20, James wrote: > 1) Have you released full or partial code to any of your projects? Yep. http://lgdc.sunsite.dk/ (http://lgdc.sunsite.dk/source/ for the code) > 2) What kind of program was it (web mail, groupware, bulletin board, > website template etc)? Website "template" (~450kB PHP code / html templates) > 3) Why did you (not) release it? I can only profit from a release (yesterday e.g. I got a good suggestion for improvement) > 4) What kind of license did you use? GPL? LGPL? BSD? Your own mini > one? No license? GPL. Sometimes BSD/MIT > 5) Code Questions: > a) What did you do before release? What kind of quality checks did you > do to the PHP code? Make it work :) > b) What about commenting? Came with time. Still isn't as widely commented as it should be, but that'll improve. > c) Code grouping and logic? (Like grouping like functions and classes > together) Sure. I want to be able to maintain the thing after all. > d) What about any hack jobs you did? Did you clean them up totally or > just polish them a little or just release as is? Thats probably the Any hack jobs that are used are also releaed. With time they are replaced with cleaner solutions, and sometimes new hack jobs appear. > 6) What kind of feedback have you gotten? Good (People > applauding/thanking you)? Bad (People calling you a jerk and hoping > your first born falls in a well and they make a horrible TV movie about > it?)? All just complaints about the quality of it? Good suggestions > (I think it would be better if here you...)? Any wild suggestions (I > think your web mail application should also do taxes for each employee, > in addition to doing our internal message board)? Few so far. Nothing negative, some good suggestions / constructive critivism. bug reports. > 7) What kind of input do you accept from the user? Code > replacement/feature additions? Anything except flames > 8) Do you still do your own updates to it or is it "abandonware"? I still spend much time on it > a) What kind of updates? Security fixes? Bug fixes? Minor feature > upgrades? Major feature upgrades? Complete overhauls? Yes :) > 9) How customized is your PHP app to the end user? > Is it stuck saying "THIS WAS DONE BY JOHN SMITH, CODER AND LEAD > DIRECTOR" all over? Can they insert their own name to make it more > customizable and look like their own? Is it just a library backend? Very costomizable in most regards, but rather rigid in others. But the source is available after all, so everyone can customize it to her heart's content :) > 10) What is the setup of the PHP app like? > Is it like "Okay, untar it and there it is" or "Okay, untar it, edit > the config file and you are done" or "Untar it and do our little web > based configurator to finish" or "Untar it, recompile your kernel, > recompile Apache, PHP and MySQL, sell your immortal soul to your > neighbor for $1.50 and walk on your hands for 2 weeks"? Spend 1-2 weeks understanding it and "harassing" me with questions (there are no real docs so far) > 11) MySQL Question: When having people install your PHP app and it > needs its own MySQL database with custom table structure, what is the > best instructions to tell idiots how to do it? Give 'em a sql script to execute. mysqldump --add-drop-table --no-data dbname >dbname.sql -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) Results 1 - 10 of about 201,000,000. Search took 0.08 seconds - http://www.google.com/search?q=e -- 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] newbie ? :)
hello all, i am trying to install Loadrunner for in linux, am not sure where is my LD_LIBRARY_PATH linux rhat7.1 can some pls point me out many thanks, kind regards caleb _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session.auto_start = 1
Hi there I have set "session.auto_start" to "1", but without "Session_Start()" the session handling doesn't work. But I think it definetely should - am I wrong? /:o) Or what else should I change in PHP.INI to make this work properly. Bye Yaroukh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
I think I remember doing it a while ago. But I think you need to use mod_alias instead. Take a look here: http://httpd.apache.org/docs-2.0/mod/mod_alias.html#redirect The Redirect/RedirectMatch/RedirectTemp might do it. -- Tais M. Hansen "Martin Lindhe" <[EMAIL PROTECTED]> wrote in message 831D8A28AF18D5119EAA00E018C5B81C23BA0F@MAIL1">news:831D8A28AF18D5119EAA00E018C5B81C23BA0F@MAIL1... > Great! I'm also wondering wether i can hide this redirect, as of > now the redirected url is shown to the user, but i want this > redirect to be unknown, so user is visually on same server. > I figure i can solve this with a little script & a frame or something, > but it's not a good solution, is it possible to do in any other way? > /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: How to pass variables to php functions from url's?
> I think I remember doing it a while ago. But I think you need to use > mod_alias instead. Take a look here: > > http://httpd.apache.org/docs-2.0/mod/mod_alias.html#redirect > > The Redirect/RedirectMatch/RedirectTemp might do it. > RedirectMatch permanent "^/x/(.*)" http://www.test.com/y/test.php?val=$1"; seems to work somewhat equal to the RewriteRule, it also visibly show the redirect url. Thanks anyway /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.0.6 + GD
As far as I can tell, it's a bug. I posted it on here and the only reply I got was from someone having the same problem. I logged it as a bug and then wasn't able to add more information as I hadn't set a password when I first entered the bug. Then I emailed trying to be able to change it and heard nothing back :) Jeff > -Original Message- > From: Jean-Arthur Silve [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 07, 2001 6:07 AM > To: [EMAIL PROTECTED] > Subject: [PHP] PHP 4.0.6 + GD > > > Hi ! > > I used PHP 4.0.3pl1 with gd lib (>1.6) and used the PNG functions. > Everything was ok. > > I have changed to PHP 4.0.6 , i installed it with gd support, but now PHP > says that there are no support for PNG files... > In phpinfo(), GD support is well enaled. > > I search the mailing lists in the archive and it seems it is a > problem with > this version of PHP.. > > Is someone succeed in resolving this problem ? > > Thanks ! > > jean-arthur > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
[EMAIL PROTECTED] (Martin Lindhe) writes: > > Hi Martin, > > > > Take a look at the Apache mod_rewrite docs. > > > > http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html > > > Thanks alot! > I made a similar solution which works > > RewriteEngine on > RewriteRule "^/x/(.*)""http://www.server2.com/users/$1"; > > takes www.server1.com/x/martin to www.server2.com/users/martin > > Great! I'm also wondering wether i can hide this redirect, as of > now the redirected url is shown to the user useful link: http://www.apache.org/docs-2.0/misc/rewriteguide.html RewriteEngine on RewriteRule ^/x/(.*)http://www.server2.com/users/$1 [P] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.0.6 + GD
> As far as I can tell, it's a bug. I posted it on here and the only reply I > got was from someone having the same problem. I logged it as a bug and then > wasn't able to add more information as I hadn't set a password when I first > entered the bug. Then I emailed trying to be able to change it and heard > nothing back :) --with-png-dir=../libpng-1.0.12 Forgetting that? http://database.sourceforge.net/Installing_apache_with_gd_zlib_png_jpg_tiff_pdf_support.html ^ Give that a shot. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: How to pass variables to php functions from url's?
>useful link: http://www.apache.org/docs-2.0/misc/rewriteguide.html > >RewriteEngine on >RewriteRule ^/x/(.*)http://www.server2.com/users/$1 [P] Hm, what does the [P] do? I played around a bit and figured that a [T] does the trick for me, thanks! /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
I think if you use "RedirectMatch temp ..." it'll work... -tais "Martin Lindhe" <[EMAIL PROTECTED]> wrote in message 831D8A28AF18D5119EAA00E018C5B81C23BA11@MAIL1">news:831D8A28AF18D5119EAA00E018C5B81C23BA11@MAIL1... > > I think I remember doing it a while ago. But I think you need to use > > mod_alias instead. Take a look here: > > http://httpd.apache.org/docs-2.0/mod/mod_alias.html#redirect > > The Redirect/RedirectMatch/RedirectTemp might do it. > RedirectMatch permanent "^/x/(.*)" http://www.test.com/y/test.php?val=$1"; > seems to work somewhat equal to the RewriteRule, it also visibly show > the redirect url. Thanks anyway > /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
AFAIR it's [P]ermanent and [T]emporary... But I could be wrong!! -tais "Martin Lindhe" <[EMAIL PROTECTED]> wrote in message 831D8A28AF18D5119EAA00E018C5B81C23BA13@MAIL1">news:831D8A28AF18D5119EAA00E018C5B81C23BA13@MAIL1... > >useful link: http://www.apache.org/docs-2.0/misc/rewriteguide.html > >RewriteEngine on > >RewriteRule ^/x/(.*)http://www.server2.com/users/$1 [P] > Hm, what does the [P] do? I played around a bit and figured that > a [T] does the trick for me, thanks! > /Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
I am wrong! ;) " Tais M. Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > AFAIR it's [P]ermanent and [T]emporary... But I could be wrong!! > -tais -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] a bug???
hi, i'm recently observing a strange behaviour of php when using a combination of ob_start() and ignore_user_abort() in the same page, php hangs (after the script is executed) and is unable to create/write to /destroy sessions!! i'm observing this on my win98 machine with apache 1.20 and php 4.06 as .exe; if i remove one of the above functions everything returns to normal... everything works fine on my linux machine; has anybody experienced something similar? regards; Hassan El Forkani http://www.warmafrica.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] gd-library
hi! How can I find out if gd-library is installed on my server and if not, how can I install it please email me if you want to help me. TIA, gert. email: [EMAIL PROTECTED] http://www.mellak.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] code troble
Hi I'm having trobles with this code. Can you take a look at it? Parse error: parse error in C:/XITAMI/webpages/index.php on line 34 is the error msg. thanx Example 2.01 "; echo "Iznos na Vasem racunu je $vrednost dolara"; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: How to pass variables to php functions from url's?
This is what they mean: (from http://www.apache.org/docs-2.0/mod/mod_rewrite.html) *** 'proxy|P' (force proxy) This flag forces the substitution part to be internally forced as a proxy request and immediately (i.e., rewriting rule processing stops here) put through the proxy module. You have to make sure that the substitution string is a valid URI (e.g., typically starting with http://hostname) which can be handled by the Apache proxy module. If not you get an error from the proxy module. Use this flag to achieve a more powerful implementation of the ProxyPass directive, to map some remote stuff into the namespace of the local server. Notice: To use this functionality make sure you have the proxy module compiled into your Apache server program. If you don't know please check whether mod_proxy.c is part of the ``httpd -l'' output. If yes, this functionality is available to mod_rewrite. If not, then you first have to rebuild the ``httpd'' program with mod_proxy enabled. *** 'type|T=MIME-type' (force MIME type) Force the MIME-type of the target file to be MIME-type. For instance, this can be used to simulate the mod_alias directive ScriptAlias which internally forces all files inside the mapped directory to have a MIME type of ``application/x-httpd-cgi''. *** " Tais M. Hansen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > AFAIR it's [P]ermanent and [T]emporary... But I could be wrong!! > -tais -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to pass variables to php functions from url's?
> > > Let's assume we have a server called www.test.com > > > When a user access http://www.test.com/path/username, > > > I want a php script to execute, as if the url entered was > > > http://www.test.com/path.php?value=username. > > > > > > I'm running PHP 4.0.6 on Apache 1.3.20. Step 1: Rename "path.php" to "path" Step 2: Add this to your Apache conf file: ForceType application/x-httpd-php This causes "path" to be executed as a PHP script even though it does not have a .php extension. Step 3: Add this to your "path" php script: // $PATH_INFO = the rest of the URI after dmb/ // remove anything other than letters, numbers, dots, underscores, // and dashes, and put into an array // for example "trading/toptraders" will be an array consisting // of "trading" ($args[1]) and "toptraders" ($args[2]). The / is discarded. ereg("(^[-_.\/a-zA-Z0-9]*$)", $PATH_INFO, $arg); $args = split( "/", $arg[1]); Hope this helps. Doug Granzow [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP complains when using similar_text() as documented.
On Thu, Sep 06, 2001 at 11:04:09PM -0500, Peter Hutnick wrote: > http://www.php.net/manual/en/function.similar-text.php states that the third > argument should be a reference. PHP 4.0.6 complains "Warning: Call-time > pass-by-reference has been deprecated - argument passed by value;" etc. > > But that percentage (double) is only available this way . . . > > Where am I going wrong? This might have something to do with it. From the php.ini: allow_call_time_pass_reference = Off ; whether to enable the ability to force arguments to be ; passed by reference at function-call time. This method ; is deprecated, and is likely to be unsupported in future ; versions of PHP/Zend. The encouraged method of specifying ; which arguments should be passed by reference is in the ; function declaration. You're encouraged to try and ; turn this option Off, and make sure your scripts work ; properly with it, to ensure they will work with future ; versions of the language (you will receive a warning ; each time you use this feature, and the argument will ; be passed by value instead of by reference). -- Jason Stechschulte [EMAIL PROTECTED] -- If you want to see useful Perl examples, we can certainly arrange to have comp.lang.misc flooded with them, but I don't think that would help the advance of civilization. :-) -- Larry Wall in <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] code troble
I just gave a very quick look... so maybe there are some things that I've overlooked. But I hope this solves your problem... > > > Example 2.01 > > > > if (emty(provera)) {pokazi();} I'd use $ here :) if (empty ($provera)) ... ^ ^ > else {obrada();} > ?> > function pokazi() { > global $PHP_SELF; > ?> > > > ^ ^ > ^ ^ > > } > ?> > function obrada() { > global $ime; > global $vrednost; Did you check whether or not $ime and $vrednost are defined/set at all? (isset ($ime) or !empty ($ime)) > if ($ime == "Nikola" && $vrednost == 100){ > echo "Zdravo $ime "; > echo "Iznos na Vasem racunu je $vrednost dolara"; > } > ?> > > -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] code troble
Well... I've already found something I overlooked. You call emty() io empty(); see below... > > > > > > Example 2.01 > > > > > > > > > > if (emty(provera)) {pokazi();} ^^ ^^ Here you forgot the 'p' in emPty() > > I'd use $ here :) > if (empty ($provera)) ... > ^ > ^ > > > else {obrada();} > > ?> > > > function pokazi() { > > global $PHP_SELF; > > ?> > > > > > > > > If I were you I'd close the input-tag :) > > ^ > ^ > > > > and again... > > ^ > ^ > > > > > > > } > > ?> > > > function obrada() { > > > global $ime; > > global $vrednost; > > Did you check whether or not $ime and $vrednost are defined/set at > all? (isset ($ime) or !empty ($ime)) > > > if ($ime == "Nikola" && $vrednost == 100){ > > echo "Zdravo $ime "; > > echo "Iznos na Vasem racunu je $vrednost dolara"; > > } > > ?> > > > > -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Problems with Sessions?
On the first page of a session, PHP attempts to set a PHPSESSID cookie. It won't get that cookie back until you reload the page or load another page, so it has no way of knowing on the first page whether or not the browser accepted the cookie. So, it adds the PHPSESSID string to all of your local links in order to maintain the session. When you load another page during the same session and your browser sends the cookie back, PHP sees that cookies are working, so it no longer modifies your links. If you want to disable this behavior, you can add this line to your php.ini file: session.use_trans_sid = 0 This will cause sessions to not work on browsers where cookies are disabled. Doug Granzow [EMAIL PROTECTED] "Tim" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > When I first browse to a site on my LAN, I get links with URLs that look > like this: > > chat/?PHPSESSID=f3d149f79f5196bd709fb3c256dbb3d8 > > after a refresh, the whoe PHPSESSID goes away. > > Wondered if there was some setting in php.ini that I've overlooked? > > I'm running PHP4 with Apache on an Unstable Debian box. > > Any help would be appreciated :-) > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] code troble
R&Ze soundex(emty) = soundex(empty) maybe someday parser will consider that ;) "* R&Ze:" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Well... I've already found something I overlooked. You call emty() > io empty(); see below... > > > > > > > > > > > Example 2.01 > > > > > > > > > > > > > > > > if (emty(provera)) {pokazi();} > ^^ > ^^ > Here you forgot the 'p' in emPty() > > > > > I'd use $ here :) > > if (empty ($provera)) ... > >^ > >^ > > > > > else {obrada();} > > > ?> > > > > > function pokazi() { > > > global $PHP_SELF; > > > ?> > > > > > > > > > > > > > > If I were you I'd close the input-tag :) > > > > ^ > > ^ > > > > > > > > and again... > > > > ^ > > ^ > > > > > > > > > > > > } > > > ?> > > > > > function obrada() { > > > > > global $ime; > > > global $vrednost; > > > > Did you check whether or not $ime and $vrednost are defined/set at > > all? (isset ($ime) or !empty ($ime)) > > > > > if ($ime == "Nikola" && $vrednost == 100){ > > > echo "Zdravo $ime "; > > > echo "Iznos na Vasem racunu je $vrednost dolara"; > > > } > > > ?> > > > > > > > > -- > > * R&zE: > > > -- > -- Renze Munnik > -- DataLink BV > -- > -- E: [EMAIL PROTECTED] > -- W: +31 23 5326162 > -- F: +31 23 5322144 > -- M: +31 6 21811143 > -- > -- Stationsplein 82 > -- 2011 LM HAARLEM > -- Netherlands > -- > -- http://www.datalink.nl > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mysql timestamp field
The timestamp data type is a special MySQL type that automatically updates whenever you add or update a row in a table. If you want timestamp to work when you add a row but not when you update a row, you need to write your update statements like this: UPDATE tbl_name SET vartochange="newvalue", t_stamp=t_stamp WHERE ... The "t_stamp=t_stamp" will cause t_stamp to not change to now(). Doug Granzow [EMAIL PROTECTED] "Mesut Tunga" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > I need an update on my table. but I have a timestamp field called > t_stamp. When I update a field other than t_stamp field, t_stamp field > also updates to now(). I need it not to update and saves its value. > > How should I do this? > > Regards > Mesut Tunga... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: mysql_fetch_array
<[EMAIL PROTECTED]> wrote in message 001001c136af$7c649db0$[EMAIL PROTECTED]">news:001001c136af$7c649db0$[EMAIL PROTECTED]... >Can someone tell me what i'm doing wrong here? > >while($myrow<>mysql_fetch_array($result2)) > I would guess that you actually want that line to read: while($myrow=mysql_fetch_array($result2)) Doug Granzow [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: code troble
You don't have a closing } for function obrada(). When the line number of the parse error is the last line of the file, I've found it is almost *always* due to a missing brace, paren, or quote somewhere in the file. Doug Granzow [EMAIL PROTECTED] "Nikola Veber" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi > I'm having trobles with this code. Can you take a look at it? > Parse error: parse error in C:/XITAMI/webpages/index.php on line 34 is the > error msg. > > thanx > > > > Example 2.01 > > > > if (emty(provera)) {pokazi();} > else {obrada();} > ?> > function pokazi() { > global $PHP_SELF; > ?> > > > > } > ?> > function obrada() { > global $ime; > global $vrednost; > if ($ime == "Nikola" && $vrednost == 100){ > echo "Zdravo $ime "; > echo "Iznos na Vasem racunu je $vrednost dolara"; > } > ?> > > > > -- 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] Don't Leave Any Tracks Behind...
FFA Posting Engine..This email address was used to post to our site ! Removal Instructions at the bottom of this page ! Don't Leave Any Tracks Behind... WARNING: Your Computer tracks all of your internet activity and all of the actions performed on it... If your computer is not secure,anyone can find out what you have been doing on the internet ! ARE YOU AND YOUR COMPUTER SAFE FROM POTENTIAL PROBLEM ? CLEAN YOUR TRACKS with Clean Browser ! it permantly cleans your computer, getting rid of cookies, cache, history, browser settings, Auto Fill Forms, index.dat file and more ! MAINTAIN YOUR PRIVACY ! CLICK HERE ! site: cleanbrowser url: http://www.cleanbrowser.com/ft=sb435/ site: isupercharger url: http://www.isupercharger.com/ft=sb435/ site: softwarebucks url: http://www.softwarebucks.com/ref=sb435/ Probably the Best Source of Internet Marketing Resources on the net ! Join Free !...Take a Test Drive ! Check it out : http//hop.clickbank.net/hop.cgi?overscaig/ysopro Thank you . Sincerely , john wild * NOTE: You are receiving this message because you visited our "HIGH TRAFFIC" FFA page , and posting your link at http://thelinkpost.cjb.net and you agreed to receive our mailings ! if this is not the case, or you wish to remove yourself from list, PLEASE follow a link below and remove your email address ! http://bulklite.com/remove.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] code troble
You also seem to be missing a closing }. please check all braces before posting to a list... - Original Message - From: "Nikola Veber" <[EMAIL PROTECTED]> To: "php forum" <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 1:29 PM Subject: [PHP] code troble > Hi > I'm having trobles with this code. Can you take a look at it? > Parse error: parse error in C:/XITAMI/webpages/index.php on line 34 is the > error msg. > > thanx > > > > Example 2.01 > > > > if (emty(provera)) {pokazi();} > else {obrada();} > ?> > function pokazi() { > global $PHP_SELF; > ?> > > > > } > ?> > function obrada() { > global $ime; > global $vrednost; > if ($ime == "Nikola" && $vrednost == 100){ > echo "Zdravo $ime "; > echo "Iznos na Vasem racunu je $vrednost dolara"; > } > ?> > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Suggesting a file name.
I wrote a small script to generate an image file containing a version number for use in some web apps we are coding at work. The problem is, that with an up-to-date version of IE, the image shows up and can only be saved as a BMP. Older versions don't display it, but prompt for download and save it correctly. No problems in Mozilla (or presumably in Netscape 4.7x either). Here's the script: - - - - - TRS/i3100 Version Image Generator Web App Version Image Generator Product: TRS i3100 Font Style: Bold Version: " maxlength="9"/> - - - - - What do I need to do so it will save properly in ALL versions of IE? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP 4.0.6 + GD on Windows
Hi speedboy, I see that you know the GD software and probably you have some good experience on that. What do you know about to compile PHP406+GD on windows? Greetings Atte. Ignacio Estrada F. Centro Nacional de Control de Energia Area de Control Occidental 025+6463, 025+6464, 025+6469 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP complains when using similar_text() as documented.
> On Thu, Sep 06, 2001 at 11:04:09PM -0500, Peter Hutnick wrote: >> http://www.php.net/manual/en/function.similar-text.php states that the >> third argument should be a reference. PHP 4.0.6 complains "Warning: >> Call-time pass-by-reference has been deprecated - argument passed by >> value;" etc. >> >> But that percentage (double) is only available this way . . . >> >> Where am I going wrong? > > This might have something to do with it. From the php.ini: > > allow_call_time_pass_reference = Off > ; whether to enable the ability to force arguments to be ; passed > by reference at function-call time. This method ; is deprecated, > and is likely to be unsupported in future Yes, sorry, I am aware of this. Does this mean that similar_text is deprecated by etension? Is there maybe a FAQ on the whole pass-by-reference issue? -Peter PS: still appriciate CCs, thanks. -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: Image manipulation
Adam Plocher wrote: > First of all, is there anyway I could have my script take a full size image > and crop out a chunk of it to be used as a thumbnail - or just simply shrink > the image down to be used as a thumbnail? ImageCopyResized, requires GD. > Also, is there anyway to convert misc image types (gif, bmp, png, etc) into > a jpeg? between png and jpeg with gd at least. for everything else, ImageMagick -- PHP Developer, home: http://www.moijk.net | work: http://www.coretrek.com ImageSY: Get image height | http://www.php.net/manual/en/function.imagesy.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]
[PHP] Re: Suggesting a file name.
"Theodore Brinkman" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I wrote a small script to generate an image file containing a version number > for use in some web apps we are coding at work. The problem is, that with > an up-to-date version of IE, the image shows up and can only be saved as a > BMP. Older versions don't display it, but prompt for download and save it > correctly. No problems in Mozilla (or presumably in Netscape 4.7x either). > Try: header("Content-Disposition: filename=$filename"); / Franklin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: how to pass authentication info to SMTP server
"Balaji Ankem" <[EMAIL PROTECTED]> wrote in message 01bc01c137e0$280b0f60$[EMAIL PROTECTED]">news:01bc01c137e0$280b0f60$[EMAIL PROTECTED]... > Hi friends, > I would like to implement sending an e-mail through SMTP server. > > Here my SMTP server needs authentication. > > How to pass the username and password to SMTP server?? > Do something similar: $username = "foo"; $password = "bar"; $fp = fsockopen ($hostname, 110, $errno, $errstr, 30) or die("could not connect"); fwrite($fp, "USER ".$username."\r\n"); fwrite($fp, "PASS ".$password."\r\n"); For more info about the protocol, take a look here: http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1939.html / franklin -- 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]
Fw: [PHP] Re: Suggesting a file name.
This really doesn't work well to say the least... I've had endless problems with it, and basically just using headers there is no great way to to it. The best solution I found is to use the mod_rewrite module in apache to map a url onto the script. - Original Message - From: "Franklin van Velthuizen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 4:02 PM Subject: [PHP] Re: Suggesting a file name. > > "Theodore Brinkman" <[EMAIL PROTECTED]> wrote in > message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I wrote a small script to generate an image file containing a version > number > > for use in some web apps we are coding at work. The problem is, that with > > an up-to-date version of IE, the image shows up and can only be saved as a > > BMP. Older versions don't display it, but prompt for download and save it > > correctly. No problems in Mozilla (or presumably in Netscape 4.7x > either). > > > > Try: > header("Content-Disposition: filename=$filename"); > > / Franklin > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] GD
I just installed PHP 4.0.6. 1) Do I have to down load GD (graphics library) and install it sperately or is it in 4.0.6 already? 2) Do I have to run anything special during configuration? 3) Do I have to completely re-install PHP and Apache? Thanks, Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: newbie looking to sync access with MySQL
Tom, Every man and his dog seems to have an Access database they want to view on the web. What I usually do for them is : a) Tell them to save the data from Access as a text file, comma separated. (It's a standard Access option). b) Give them a web page where they can upload it, (From the customer's point of view the uploads are a manual exercise which doesn't >sound very sexy, and it would probably take them 3-4 minutes every time. The good thing is that it's all pretty easy, and they should be able to get their most junior member of staff to do it. They also get the comfort of knowing if anything went wrong. If that's not acceptable, it's more tricky. In principle you could use an ODBC interface to their Access database to establish a live connection to it and suck up the data that way, but it's fiddly and much less reliable than a boring old upload. Another option would be to execute the extract and transfer of the data via a batch job running on their platform. But, personally, I would hate to have to support that kind of activity. The bottom line as far as I'm concerned is that if they insist on holding important information on a MS platform, they can expect a) not to have a seamless operation, b) to have to watch out for problems themselves! Once they see how easy an extract/upload is they probably won't mind anyway. Tom Beidler wrote: > > I have a potential customer that just called and would like to create a web > site that would display secure info for their clients. Currently his > employees are using a flat Access database to add, edit and delete records > and he would like to keep it that way. > > Normally I would create a web manager for them to add, edit and delete the > MySQL database. Is there an easy, reliable way to sync up Access with MySQL. > Maybe a nightly script that could upload the contents of Access to MySQL. > > Would it be easier to start with ASP and SQL Server? > > Thanks, > Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php includes === Dreamweaver library items
Robert, Well, I bet you're getting tired of this thread! So just a few closing remarks: a) Nested Loops - Yup, they're not so common that we can't just fudge about with a bit of embedded html. b) Luggage - I may yet agree with you about the advantages of two neatly packed bags! c) An awkward DreamWeaver/php solution - It seems I'm close to achieving what I set out, it may be functional, but it's not particularly elegant,thats for sure. Here's how it goes : For the Dreamweaver user: - the files on the site targetted by urls are .php templates which remain fully Dreamweaver editable/previewable and link-testable. All the html is in those files. The designer can include any number of Dreamweaver library items and change their names at any time as they like. - the Dreamweaver library files must be synced with the server along with the .php templates, style sheets etc. Provided the designers do that, all pages are guaranteed to have the library code in the current master (server) copy, which can be edited by any means. Designers have to watch out for master copies changing either because of the activity of other designers or programmers of course. For the php programmer: - the main body of php code (queries etc.) is in a per page include, i.e. the "template" reads the code instead of the code reading the template! (That's so the designers can check the links are ok). - the include of the code is added to the top of the designer's template in a php tag. - in the html of the template the progammer adds/checks tags for the php data and control structures i.e. for data or Example of myvar. for repeating or conditional blocks you need start and end tags or at the start and at the end of the block. There are no restrictions on the php you can embed, you can have includes of any depth, functions, whatever. - you can also, if you want, add php to library items without restriction. Noone of that seems to be too bad, but the one special and really horrid extra on each page is to force the substitution of includes for library items. It seems (but I haven't tested it fully), that the code to "top and tail " the actual template html is this : IMMEDIATELY PRIOR TO ACTUAL TEMPLATE HTML/PHP eval(dream_sub(strrev(substr(strrev(substr(<< TEMPLATE HTML/PHP etc. IMMEDIATELY AFTER ACTUAL TEMPLATE HTML/PHP where dream_sub is something like this: - function dream_sub($string) { return(preg_replace('/.*?/' ,'',$string); } (Beware, the regular expression is wrong, I'm still trying to get it to work, ereg_replace was fine but too greedy so I had to switch to preg) That's it. It's not too much code and it is the same every single time, but ugly or what! It could be a bit prettier, but as it's always going to be horrible, I'm tempted to leave it looking horrible, so noone's under any illusions! What we're actually doing is turning the whole of the template html/php into a string via the "heredoc" but while fooling Dreamweaver that we closed the php tags. We strip out the php/comment tags which fool Dreamweaver with a strrev and substr's to save having to store the text and then fooling about, (that could be changed). Then having picked up the template contents we substitute any Dreamweaver library item tags by an include of whatever the library name was. Just in case we have nested library items (I don't know if that's possible with Dreamweaver), we make sure we recursively substitute any library items in the library item files themselves as we bring them in. (That's why we have the dream_sub/implode/file stuff instead of a plain include). I reckon this should work (when I get the b regular expression working!). It should also work reasonably well with any other html editors that respect php tags, and if they have library functionality it shouldn't be too hard to adapt dream_sub for an appropriate effect. At the end of the day, this all seems to be spoiling the Dreamweavers far too much. I've even gone back to calling the pages .php rather than leaving them extensionless, just so that their stupid desktops don't get too confused! So my urls are going to be uglier but I guess it at least means that php gets some credit on the sites! Anyway, it's been very interesting to hear your ideas, and don't be surprised if I give up and switch to FastTemplate! George Robert V. Zwink wrote: > > George Whiffen, > > a) Nested Loops > One problem that I see is that if I have nested loops: > > > {LOOP1_VARIABLE} > > {LOOP2_VARIABLE} > > > > I can assign values and get the predicted result, but if I try to use the > fastTemplate method clear_dynamic("loop2") I do not get the predicted > result. The above situation is rather uncommon, and I work around it by > including HTML code into the php page, and assigning the result to a > fasttemplate v
Re: [PHP] Re: newbie looking to sync access with MySQL
Thanks for that helpful email george, it's something I've been looking at as well. In a situation I'm tackling now I've rewritten the core part of the access such that it is dependant upon data recieved from the server, rather than the server being dependant upon data from access. So far it appears to be working much better, but I would be interested to know your opinions. Tom - Original Message - From: "George Whiffen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 5:10 PM Subject: [PHP] Re: newbie looking to sync access with MySQL > Tom, > > Every man and his dog seems to have an Access database they want to view > on the web. > > What I usually do for them is : > > a) Tell them to save the data from Access as a text file, comma separated. (It's > a standard Access option). > > b) Give them a web page where they can upload it, ( discussed in the php manual). > > c) Parse the file using parsecsv and store away the bits you want in MySQL. If you > get them to leave the field names on the first line of the file (another standard > Access option), you can do a quick check that all the fields are there and in > the expected place, before you put the data into MySQL. > > d) Serve the web pages from MySQL. > > e) You may still need your Web Data Administration. There's often missing data > that you need for sensible web pages e.g. categories, more user friendly descriptions > of codes etc. > > > >From the customer's point of view the uploads are a manual exercise which doesn't sound > very sexy, and it would probably take them 3-4 minutes every time. > The good thing is that it's all pretty easy, and they should be able to get their > most junior member of staff to do it. They also get the comfort of knowing if anything > went wrong. > > If that's not acceptable, it's more tricky. In principle you could use an > ODBC interface to their Access database to establish a live connection to it > and suck up the data that way, but it's fiddly and much less reliable than > a boring old upload. > > Another option would be to execute the extract and transfer of the data via a batch > job running on their platform. But, personally, I would hate to have to support > that kind of activity. > > The bottom line as far as I'm concerned is that if they insist on holding important > information on a MS platform, they can expect a) not to have a seamless operation, > b) to have to watch out for problems themselves! Once they see how easy an extract/upload > is they probably won't mind anyway. > > Tom Beidler wrote: > > > > I have a potential customer that just called and would like to create a web > > site that would display secure info for their clients. Currently his > > employees are using a flat Access database to add, edit and delete records > > and he would like to keep it that way. > > > > Normally I would create a web manager for them to add, edit and delete the > > MySQL database. Is there an easy, reliable way to sync up Access with MySQL. > > Maybe a nightly script that could upload the contents of Access to MySQL. > > > > Would it be easier to start with ASP and SQL Server? > > > > Thanks, > > Tom > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] GD
At 10:06 Uhr -0500 07.09.2001, Joseph Bannon wrote: >I just installed PHP 4.0.6. > >1) Do I have to down load GD (graphics library) and install it sperately or >is it in 4.0.6 already? >2) Do I have to run anything special during configuration? >3) Do I have to completely re-install PHP and Apache? > >Thanks, > >Joseph Hi Joseph, You have to download GD from http://www.boutell.com/gd/ make sure you have zlib, libjpeg, libpng, and (if you need it) freetype if not compile and install them all... then configure php with #./configure \ --with-gd= \ --with-zlib= \ --with-jpeg-dir= \ --with-png-dir= \ --with-tiff-dir= \ --with-freetype-dir= #make #make install then you will have to restart apache Best regards, Sebastian Wenleder -- 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] C-style parameterized macros
Hello, I have noticed that PHP can be used to define constants but not parametrized macros, a feature is is currently lacking. It is possible to use arrays instead with the only disadvantage that array values can be reassigned. I guess this is not a real concern. Does anyone know if parameterized macros will be implemented in future PHP releases? Thanks, Neil -- 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] How do I find out what version of GD I'm running?
with phpinfo it just says GD 1.6 or above. This is on a webhoster. How do I find out what version they're actually running? I tried asking but they're useless... - seb -Original Message- From: Sebastian Wenleder [mailto:[EMAIL PROTECTED]] Sent: 07 September 2001 16:36 To: Joseph Bannon; PHP (E-mail) Subject: Re: [PHP] GD At 10:06 Uhr -0500 07.09.2001, Joseph Bannon wrote: >I just installed PHP 4.0.6. > >1) Do I have to down load GD (graphics library) and install it sperately or >is it in 4.0.6 already? >2) Do I have to run anything special during configuration? >3) Do I have to completely re-install PHP and Apache? > >Thanks, > >Joseph Hi Joseph, You have to download GD from http://www.boutell.com/gd/ make sure you have zlib, libjpeg, libpng, and (if you need it) freetype if not compile and install them all... then configure php with #./configure \ --with-gd= \ --with-zlib= \ --with-jpeg-dir= \ --with-png-dir= \ --with-tiff-dir= \ --with-freetype-dir= #make #make install then you will have to restart apache Best regards, Sebastian Wenleder -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001 -- 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] clear contents?
Hi everone... I'm having a little problem. The code below pops up a password dialog box where the user types in a username and a password to be able to proceed. However, if the user does not close the browser and goes back to the link, which they pops up the diolog box again and they don't have to type in there username and password again. They are remembered. I would like it so that the user has to type in there username and password any and every time that the diolog box is called on. Doe anyone know how to do this? I tried to clear the contents of PHP_AUTH_USER and PHP_AUTH_PW at the top of the page but that just messed things up. Can someone please help 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]
RE: [PHP] GD
What is FreeType? J -Original Message- From: Sebastian Wenleder [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 10:36 AM To: Joseph Bannon; PHP (E-mail) Subject: Re: [PHP] GD At 10:06 Uhr -0500 07.09.2001, Joseph Bannon wrote: >I just installed PHP 4.0.6. > >1) Do I have to down load GD (graphics library) and install it sperately or >is it in 4.0.6 already? >2) Do I have to run anything special during configuration? >3) Do I have to completely re-install PHP and Apache? > >Thanks, > >Joseph Hi Joseph, You have to download GD from http://www.boutell.com/gd/ make sure you have zlib, libjpeg, libpng, and (if you need it) freetype if not compile and install them all... then configure php with #./configure \ --with-gd= \ --with-zlib= \ --with-jpeg-dir= \ --with-png-dir= \ --with-tiff-dir= \ --with-freetype-dir= #make #make install then you will have to restart apache Best regards, Sebastian Wenleder -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] urlencode
Hi, I need to know wich is the best way to send variables through an URL,that if the variables are of the string type, and what if the variable has spaces like $string='this is a test'. I have read about the use of urlencode(), but I have a strange behaviour using this function, sometimes it work and sometimes not. for an example I send the variable $user='user 1', and in the url there appears user=user+1 (which I think is correct) but when I read the variable in the php page it displays user+1 (doesn´t it has to return to user '1'?). Thanks --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/01 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How do I find out what version of GD I'm running?
Run this function: phpinfo ([int what]) Check the manual for further details. Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is -- -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: 7. september 2001 15:55 To: PHP (E-mail) Subject: [PHP] How do I find out what version of GD I'm running? with phpinfo it just says GD 1.6 or above. This is on a webhoster. How do I find out what version they're actually running? I tried asking but they're useless... - seb -Original Message- From: Sebastian Wenleder [mailto:[EMAIL PROTECTED]] Sent: 07 September 2001 16:36 To: Joseph Bannon; PHP (E-mail) Subject: Re: [PHP] GD At 10:06 Uhr -0500 07.09.2001, Joseph Bannon wrote: >I just installed PHP 4.0.6. > >1) Do I have to down load GD (graphics library) and install it >sperately or is it in 4.0.6 already? >2) Do I have to run anything special during configuration? >3) Do I have to completely re-install PHP and Apache? > >Thanks, > >Joseph Hi Joseph, You have to download GD from http://www.boutell.com/gd/ make sure you have zlib, libjpeg, libpng, and (if you need it) freetype if not compile and install them all... then configure php with #./configure \ --with-gd= \ --with-zlib= \ --with-jpeg-dir= \ --with-png-dir= \ --with-tiff-dir= \ --with-freetype-dir= #make #make install then you will have to restart apache Best regards, Sebastian Wenleder -- 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] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] ereg_replace - How do I stop it being "greedy"?
Hi, I've got a problem with regular expression syntax with ereg_replace: ereg_replace(':start:(.*):end:','this is \\1',':start: first :end: middle :start: last :end:'); returns - this is first :end: middle :start: last but I want - this is first middle this is last The problem seems to be that ereg_replace is being greedy on the match and matching as much as it can instead of just finding the first match, handling that and then going on to the next match. I can get it to work with preg_replace i.e. preg_replace(':start:(.*?):end:','this \\1',':start first :end: middle :start: last :end:') returns - this is first middle this is last But my actual string is on multiple lines, and preg_replace doesn't seem to continue trying to match on the next line, whereas ereg_replace happily treats newlines just like any other character. So how do I stop ereg_replace being greedy or alternatively get preg_replace to treat multiple lines as a single source string? George -- 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] network connections
i've got a command-line php script that i've been using to deliver large amounts of e-mail. originally it relied on mail() to deliver the messages but i could easily overload sendmail and bring the box (redhat 7.1) to a crawl. so i am now using the various network functions to speak smtp directly from the script. i seem to be having a problem with an excessive number of tcp connections that eventually brings down the machine. i have attempted a semi-multi-threaded approach by spawning off additional copies of the script to deliver more mail simultaneously. so i might have 100 copies of the script running at the same time. and this was after dumping a million messages into my mysql-based mail queue. things may run okay for a few hours...maybe even a day...but then doing a netstat shows over 10k tcp connections. and the only way i've found to fix the problem is to reboot the machine. thinking that i was attempting too many connections at the same time, i throttled down the number of threads to 25. this slowed down my mail delivery of course. and it allowed the machine to stay up longer. but i eventually ran into the same problem after maybe two or three weeks. just before it died, i was showing over 30k tcp connections. are they any known issues in the php networking code that would cause this to happen? as far as i know, i should never have more than 25 tcp connections open. but i'm not sure if they are not being closed properly or what. -- -jr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ereg_replace - How do I stop it being "greedy"?
look into the s modifier...it makes a dot match a newline as well, where normally it wouldn't jack -Original Message- From: George Whiffen [mailto:[EMAIL PROTECTED]] Sent: Friday, September 07, 2001 1:09 PM To: [EMAIL PROTECTED] Subject: [PHP] ereg_replace - How do I stop it being "greedy"? Hi, I've got a problem with regular expression syntax with ereg_replace: ereg_replace(':start:(.*):end:','this is \\1',':start: first :end: middle :start: last :end:'); returns - this is first :end: middle :start: last but I want - this is first middle this is last The problem seems to be that ereg_replace is being greedy on the match and matching as much as it can instead of just finding the first match, handling that and then going on to the next match. I can get it to work with preg_replace i.e. preg_replace(':start:(.*?):end:','this \\1',':start first :end: middle :start: last :end:') returns - this is first middle this is last But my actual string is on multiple lines, and preg_replace doesn't seem to continue trying to match on the next line, whereas ereg_replace happily treats newlines just like any other character. So how do I stop ereg_replace being greedy or alternatively get preg_replace to treat multiple lines as a single source string? George -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] beginner code help
Hi ! Can anyone tell me why this line returns the parse error if (strstr($name, "firstname") or strstr($ime, "lastname")){ } With this line I'd like to determine if string $name , which contains both first and last name, has earlier defined first and last name, with no difference of the order(name is first, surname last or oposite). Can anyone tell me how to compare string values in non-case sensitive way(with no difference between upper and lower case characters Name == name) -- 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] ImageGIF
ImageGif: No GIF support in this PHP build in counter.php I get this error message when I try to run this code... Header("Content-Type: image/gif"); $im = ImageCreate(500, 75); $red = ImageColorAllocate($im, 255, 0, 0); ImageFill($im, 100, 100, $red); ImageGIF($im); I installed GD. When I use phpinfo(), it says GD is enabled. What gives? Thanks, J -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ImageGIF
> ImageGif: No GIF support in this PHP build in counter.php > > I get this error message when I try to run this code... > > Header("Content-Type: image/gif"); > $im = ImageCreate(500, 75); > $red = ImageColorAllocate($im, 255, 0, 0); > ImageFill($im, 100, 100, $red); > ImageGIF($im); > > I installed GD. When I use phpinfo(), it says GD is enabled. What gives? phpinfo() also lists which image types your GD supports. Does it list GIF? Later versions do not have GIF support. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] beginner code help
There is no parse error in this code. Check the line before that one. And see stristr(), strcasecmp() and strtolower() for ways to do case independant comparisons. -Rasmus On Fri, 7 Sep 2001, Nikola Veber wrote: > Hi ! > > Can anyone tell me why this line returns the parse error > > if (strstr($name, "firstname") or strstr($ime, "lastname")){ > } > > With this line I'd like to determine if string $name , which contains both first and > last name, has earlier defined first and last name, with no difference of the > order(name is first, surname last or oposite). > Can anyone tell me how to compare string values in non-case sensitive way(with > no difference between upper and lower case characters Name == name) > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ImageGIF
No, its not listed. What do I need to do? J -Original Message- phpinfo() also lists which image types your GD supports. Does it list GIF? Later versions do not have GIF support. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ImageGIF
Install a version of GD with GIF support. > No, its not listed. What do I need to do? > > J > > > > -Original Message- > > phpinfo() also lists which image types your GD supports. Does it list > GIF? Later versions do not have GIF support. > > -Rasmus > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ereg_replace - How do I stop it being "greedy"?
Thanks Jack, preg_replace with an s modifier works a treat. I'm still curious as to how to get ereg_replace to work as well. Everything I read about regex/Posix Regular Expressions, seems to suggest that a ? should also work with ereg_replace! George Jack Dempsey wrote: > > look into the s modifier...it makes a dot match a newline as well, where > normally it wouldn't > > jack > > -Original Message- > From: George Whiffen [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 07, 2001 1:09 PM > To: [EMAIL PROTECTED] > Subject: [PHP] ereg_replace - How do I stop it being "greedy"? > > Hi, > > I've got a problem with regular expression syntax with ereg_replace: > > ereg_replace(':start:(.*):end:','this is \\1',':start: first :end: middle > :start: last :end:'); > >returns - this is first :end: middle :start: last > >but I want - this is first middle this is last > > The problem seems to be that ereg_replace is being greedy on the match and > matching as much as it > can > instead of just finding the first match, handling that and then going on to > the next match. > > I can get it to work with preg_replace i.e. > > preg_replace(':start:(.*?):end:','this \\1',':start first :end: middle > :start: last :end:') > >returns - this is first middle this is last > > But my actual string is on multiple lines, and preg_replace doesn't seem to > continue trying > to match on the next line, whereas ereg_replace happily treats newlines just > like any other > character. > > So how do I stop ereg_replace being greedy or alternatively get preg_replace > to treat multiple > lines as a single source string? > > George > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] urlencode
> for an example I send the variable $user='user 1', and in the url there > appears user=user+1 (which I think is correct) but when I read the variable > in the php page it displays user+1 (doesn´t it has to return to user '1'?). urlencodes counterpart is "urldecode" you need to decode each variable that youhave encoded -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: clear contents?
Jeremy, I don't think it's possible to do what you want, and I have tried finding a way. With your "header " you are requestion an http authentication which means the browser has to store the username and password and send them with EVERY page. Those are the rules. The only way to tell the browser to lose the username/password that I've found is to tell it that they're incorrect, (even though they are correct). But if you do that it will go and ask the user to type them in again another three times before it gives up and drops them. You'll find that most of your users will probably keep the username/password even after closing the browser and switching their computer off, which I guess is even worse as far as you're concerned. I hope I'm wrong but if you really must get them to enter username/password every time, I think you'll have to create your own login box and forget about http authentication. It might be worth posting your question to an apache newsgroup as well. Even if you're not using Apache, you should find those guys know just about everything there is to know about http authentication. Good Luck and I hope I'm wrong! George Jeremy Morano wrote: > > Hi everone... > I'm having a little problem. The code below pops up a password dialog box > where the user types in a username and a password to be able to proceed. > However, if the user does not close the browser and goes back to the link, > which they pops up the diolog box again and they don't have to type in there > username and password again. They are remembered. I would like it so that > the user has to type in there username and password any and every time that > the diolog box is called on. Doe anyone know how to do this? I tried to > clear the contents of PHP_AUTH_USER and PHP_AUTH_PW at the top of the page > but that just messed things up. Can someone please help me? > > session_start(); > session_register("PHP_AUTH_USER"); > > if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) > > // Connect to MySQL > > mysql_connect( 'l', 'c', 'c' ) > or die ( 'Unable to connect to server.' ); > > // Select database on MySQL server > > mysql_select_db( 'contact' ) > or die ( 'Unable to select database.' ); > > // Formulate the query > > $sql = "SELECT * FROM users WHERE > username = '$PHP_AUTH_USER' AND > password = '$PHP_AUTH_PW'"; > > // Execute the query and put results in $result > > $result = mysql_query( $sql ) > or die ( 'Unable to execute query.' ); > > // Get number of rows in $result. > > $num = mysql_numrows( $result ); > > if ( $num != 0 ) > > // A matching row was found - the user is authenticated. > > $auth = true; > > } > > } > > if ( ! $auth ) > > header( 'WWW-Authenticate: Basic realm="Private"' ); > header( 'HTTP/1.0 401 Unauthorized' ); > echo 'Authorization Required.'; > exit; > > } else > > session_start(); > > } > > if ($valid != "yes") { > header("Location: contact_menu.php"); > exit; > } > > ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: UD4 & PhAkt Users?
Thanks for your comments. The advice to just learn the code is both wise and simple. To complicate matters, I did download a trial version of Ultra Dev, installed PhAkt, found a JDBC driver that would work through my Mac to connect to a MySQL database, only to learn that the webhosting company won't allow such connections. So until I'm able to set up a local testing environment (an expensive and time consuming affair), UltraDev isn't an option for me. In short, your advice has been supported by my experience. Best regards, Vicki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: clear contents? - Ignore previous response
Oops!!! I didn't read your question fully. I think you CAN do what you want, if you can get some kind of cookie or and/or session variable to work to record when the user got to your page. You leave your logic as is, except that when you get a valid user you check to see if they have been on the page before via a cookie and/or session variable. If they haven't, you just go on as normal. If they have been to your page you FIRST reset the cookie/session variable to say they haven't been to the page and THEN issue your header AS IF THEY HAD THE INCORRECT USERNAME/ PASSWORD. This will force the browser to reprompt for username/password and when they come back to your page, you'll treat them as if they've never been there and let them through. e.g. using cookies (I don't use sessions so I might get the syntax wrong), if ( (! $auth) or $reprompt == 'Yes') { // Cancel the reprompt cookie("reprompt"); header( 'WWW-Authenticate: Basic realm="Private"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else // Mark them ready to be reprompted next time cookie("reprompt","Yes"); session_start(); } Sorry, George George Whiffen wrote: > > Jeremy, > > I don't think it's possible to do what you want, and I have tried finding > a way. > > With your "header " you are requestion an http authentication which means > the browser has to store the username and password and send them with EVERY page. > Those are the rules. > > The only way to tell the browser to lose the username/password that I've found is to >tell > it that they're incorrect, (even though they are correct). But if you do > that it will go and ask the user to type them in again another three times > before it gives up and drops them. > > You'll find that most of your users will probably keep the username/password > even after closing the browser and switching their computer off, which I guess > is even worse as far as you're concerned. > > I hope I'm wrong but if you really must get them to enter username/password > every time, I think you'll have to create your own login box and forget > about http authentication. > > It might be worth posting your question to an apache newsgroup as well. Even > if you're not using Apache, you should find those guys know just about everything > there is to know about http authentication. > > Good Luck and I hope I'm wrong! > > George > > Jeremy Morano wrote: > > > > Hi everone... > > I'm having a little problem. The code below pops up a password dialog box > > where the user types in a username and a password to be able to proceed. > > However, if the user does not close the browser and goes back to the link, > > which they pops up the diolog box again and they don't have to type in there > > username and password again. They are remembered. I would like it so that > > the user has to type in there username and password any and every time that > > the diolog box is called on. Doe anyone know how to do this? I tried to > > clear the contents of PHP_AUTH_USER and PHP_AUTH_PW at the top of the page > > but that just messed things up. Can someone please help me? > > > > > session_start(); > > session_register("PHP_AUTH_USER"); > > > > if (isset( $PHP_AUTH_USER ) && isset($PHP_AUTH_PW)) > > > > // Connect to MySQL > > > > mysql_connect( 'l', 'c', 'c' ) > > or die ( 'Unable to connect to server.' ); > > > > // Select database on MySQL server > > > > mysql_select_db( 'contact' ) > > or die ( 'Unable to select database.' ); > > > > // Formulate the query > > > > $sql = "SELECT * FROM users WHERE > > username = '$PHP_AUTH_USER' AND > > password = '$PHP_AUTH_PW'"; > > > > // Execute the query and put results in $result > > > > $result = mysql_query( $sql ) > > or die ( 'Unable to execute query.' ); > > > > // Get number of rows in $result. > > > > $num = mysql_numrows( $result ); > > > > if ( $num != 0 ) > > > > // A matching row was found - the user is authenticated. > > > > $auth = true; > > > > } > > > > } > > > > if ( ! $auth ) > > > > header( 'WWW-Authenticate: Basic realm="Private"' ); > > header( 'HTTP/1.0 401 Unauthorized' ); > > echo 'Authorization Required.'; > > exit; > > > > } else > > > > session_start(); > > > > } > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] For the RegExps gurus!
On Fri, 7 Sep 2001 09:39:37 +0200 impersonator of [EMAIL PROTECTED] (* R&Ze:) planted &I saw in php.general: > >From: ~~~i LeoNid ~~ <[EMAIL PROTECTED]> >Date: Thu, Sep 06, 2001 at 05:30:44PM + >Message-ID: <3b97b222.78196206@localhost> >Subject: Re: [PHP] For the RegExps gurus! > >> You can keep improving:) or you can use piece of my working (except for >> $Harlem, to which i am not going:) code (I give it for free this time:) >> >> No /me, no ereg, no nothing - gentleMen:)-just /i (did you miss it, btw?:) > > > > > >If you look at the stuff you sent you'll understand why I improved >it. > You didn't. Actually please expose - tell i tell i:). I am all ears:) >Btw... why the h*ll do you explode() the string you're matching, >while there's the /m modifier? You're making it to difficult for >yourself (and others). No need for the messy solution you created... Well. So much fuss of so little issue. I admit, It was just a quick addition for the posting without much thinking (may be just to add $Harlem variable:). You can do without exploding - and no need for other code alterations there, I believe. No need in /m either (Correct me, if I am wrong:), coz I am not checking on beginning or end of string. What other "mess" you have noticed:) >Just use RE's that are as simple as possible. It has the best >performance and it reads a lot easier. > ? RE ? Sorry, I am not a club insider:) Please, > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: How to pass variables to php functions from url's?
On Fri, 7 Sep 2001 13:28:16 +0200 impersonator of [EMAIL PROTECTED] (\ Tais M. Hansen) planted &I saw in php.general: >Hi Martin, > >Take a look at the Apache mod_rewrite docs. > >http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html > > >I added this to my httpd.conf: > Or if you don't have access to httpd.conf and/or not mod_rewrite installed, check to see if you can use .htaccess in your respective directory with adding there handler (your script) for all these files to be processed by. See Apache docs, if/how it is possible to pass params. I didn't use it myself, as my servers don't allow it, but read/lerned s/t. >---snip--- >RewriteEngine on >RewriteCond %{HTTP_HOST}^nu\.osd\.dk$ >RewriteRule ^.*$http://www.osd.dk/main.php?m=nu >[R=301,L] >---snip--- > >If a user types the URL "nu.osd.dk" it will call >http://www.osd.dk/main.php?m=nu. > > >-- >Tais M. Hansen > > > >"Martin Lindhe" <[EMAIL PROTECTED]> wrote in message >831D8A28AF18D5119EAA00E018C5B81C23BA08@MAIL1">news:831D8A28AF18D5119EAA00E018C5B81C23BA08@MAIL1... >> I need to solve the following problem, but I can't figure out how: >> Let's assume we have a server called www.test.com >> When a user access http://www.test.com/path/username, >> I want a php script to execute, as if the url entered was >> http://www.test.com/path.php?value=username. >> I'm running PHP 4.0.6 on Apache 1.3.20. >> Thanks! >> /Martin Lindhe > > i Leonid. -- 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] execute a script on access to a directory
Hi, I would like to know how i can force a PHP script to be executed everytime a certain directory is accessed, for example in http://domain.com/go/getit the presence of the /go/ directory would force a PHP script to be executed prior to any operation. Do i need to play with rewriting urls in Apache or is there any other cleaner method (that would not require rewriting URLs) to achieve this? i'd hate to have to rewrite URLs... thanks. Enrique- _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] execute a script on access to a directory
You could always add an include() for every page under the /go directory. Simplest way that I can think of. - Original Message - From: "Enrique Vadillo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 07, 2001 12:09 PM Subject: [PHP] execute a script on access to a directory > Hi, > > I would like to know how i can force a PHP script to be > executed everytime a certain directory is accessed, for > example in http://domain.com/go/getit the presence of the > /go/ directory would force a PHP script to be executed > prior to any operation. > > Do i need to play with rewriting urls in Apache or is > there any other cleaner method (that would not require > rewriting URLs) to achieve this? i'd hate to have to > rewrite URLs... > > thanks. > > Enrique- > > > _ > Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP 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] Error handling and the usage of "@"
Could someone give me an example of the sort of error handling you put in your php scripts? Cheers. Should I be preceding every command with @? Anything where this would be harmful? Just looking for some pointers really :-) - seb --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: network connections
If you're talking over a million messages, I think you need a solution that is designed specifically for handling mail. I would suggest looking into qmail (www.qmail.org) to replace sendmail on the server in question. qmail is much more efficient than sendmail in handling large amounts of mail, and it won't drag your server down. I think it's possible that some of your smtp connections are hanging for some reason or another, and PHP is not timing them out. 10,000 connections out of 1 million emails means about 1% of your connections are failing in some way -- not surprising when talking smtp. If you're talking smtp directly to remote mail server, how are you handling retries, failed mail, etc.? Again, I would suggest qmail since it would take care of all of that for you, instead of you having to reinvent the wheel. I have a script which sends out about 30,000 emails once a month, through qmail, and it is set up so that qmail automatically routes any bounces back to another script where I can update my database to reflect which users' mail is bouncing. Doug Granzow [EMAIL PROTECTED] "J.R. Lillard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i've got a command-line php script that i've been using to deliver large > amounts of e-mail. originally it relied on mail() to deliver the > messages but i could easily overload sendmail and bring the box (redhat > 7.1) to a crawl. so i am now using the various network functions to > speak smtp directly from the script. i seem to be having a problem with > an excessive number of tcp connections that eventually brings down the > machine. > > i have attempted a semi-multi-threaded approach by spawning off > additional copies of the script to deliver more mail simultaneously. so > i might have 100 copies of the script running at the same time. and > this was after dumping a million messages into my mysql-based mail > queue. things may run okay for a few hours...maybe even a day...but > then doing a netstat shows over 10k tcp connections. and the only way > i've found to fix the problem is to reboot the machine. > > thinking that i was attempting too many connections at the same time, i > throttled down the number of threads to 25. this slowed down my mail > delivery of course. and it allowed the machine to stay up longer. but > i eventually ran into the same problem after maybe two or three weeks. > just before it died, i was showing over 30k tcp connections. > > are they any known issues in the php networking code that would cause > this to happen? as far as i know, i should never have more than 25 tcp > connections open. but i'm not sure if they are not being closed > properly or what. > > -- > -jr > -- 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]