Re: [PHP] ?= was born when?
Hi Toby! On Thu, 11 Jan 2001, Toby Butzon wrote: Manual suggests 3.0.3, but I can't find any proof of it in the changelogs... it is not in 3.0.12 for sure. So probably from later (I guess 3.0.15). -- teodor -- 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-CVS] AW: [PHP-CVS-DAILY] cvs: php4 / NEWS
UNSUBSCRIBE -- PHP CVS 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] fetch html-page without file()
Hi! Something strange: A script, that uses file("http://xyz.com") does work on one sever! Then I copied it to another server (physically more far away from the server from which I fetch the html-page with file()) - same PHP ... Now file() returns always an empty string (about in 1 try out of 1000 it is successful - I tested it!!) Is there another method, to fetch a html-page? PHP runs in safe mode - so '$source=`lynx -source http://xyz.com/`' won't work! thanks witty -- Sent through GMX FreeMail - http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-CVS] cvs: php4 /pear Makefile.in
tuupola Fri Jan 12 01:13:56 2001 EDT Modified files: /php4/pear Makefile.in Log: PR: Submitted by: Reviewed by: Obtained from: Added Image_Remote class. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.60 php4/pear/Makefile.in:1.61 --- php4/pear/Makefile.in:1.60 Thu Jan 11 10:38:26 2001 +++ php4/pear/Makefile.in Fri Jan 12 01:13:55 2001 @@ -18,6 +18,7 @@ DB \ File \ HTML \ + Image \ Log \ Mail \ Math \ @@ -51,6 +52,7 @@ File/SearchReplace.php \ HTML/Form.php \ HTTP.php \ + Image/Remote.php \ Log.php \ Log/composite.php \ Log/file.php \ -- PHP CVS 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] mixing HTML and PHP code
You know what's annoying? This (yes, it happens) : echo ("table bgcolor=\"#ff\""); echo ("tr"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Name :"); $name = 'johnny'; printf("%s %s %s","b","$name","/b"); echo ("/td"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Title :"); $title = 'smith'; printf("%s %s %s","b","$title","/b"); echo("/td"); echo("/tr"); echo("/table"); Coding standards are being created (via PEAR) and a few recent articles exist but point is we're teaching differently, everywhere. PHP is loose as a goose! print 'foo'; print("foo"); print "foo"; printf("%s","foo"); ... all being taught, all being read, all being (mis)used. Am looking forward to the in-progress PEAR Standards, which can partially be seen here : http://marc.theaimsgroup.com/?l=php-pearm=97603413001842w=2 Once this comes about we'll start teaching _GOOD_ coding techniques and after awhile many more will become pretty little coders writing (and copying) pretty little recognizable scripts. Looking forward to it. Looking forward to picking up a PHP book and seeing concepts shown through standards and not through the authors preferred style at the moment. This is especially true regarding articles/tutorials. Learn the standards first! Then you may be free to roam about the isles. Go here, be sure to sift through the user comments : Best Practices: PHP Coding Style : http://phpbuilder.com/columns/tim20010101.php3 Smart Architectures in PHP : http://phpbuilder.com/columns/tim20001010.php3 A few humble thoughts. Happily yours, Philip On Fri, 12 Jan 2001, Alexander Wagner wrote: Alex Black wrote: echo "input type=\"text\" name=\"hello\" size=\"20\" value=\"$value\"" starts to make you insane. If it is done wrong spread over the whole project hidden between lines of PHP-code, it sure does. speaking as an html author, and a lover of php, _please_: input type="text" name="hello" size="20" value="?=$value?" it makes the code useable. No. input type="text" name="hello" size="20" value="{value}" makes the code usable, and your HTML can even be edited with a graphical HTML-editor. There is no reason to mix up HTML and PHP, except for very small projects. regards Wagner -- Sanity is calming, but madness is more interesting. -- 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] Question
Hi all, Is there a way in PHP to get the size of a directory? (so I can see how much disk space my users are using in their home directory). Can someone also tell me what the PHP General list is exactly. Is it run by PHP folk only? Can I subscribe to this list somewhere and maybe help someone else out for a change? Thanks, Gareth Davies Progressive Business Services Ltd +44 (0) 1274 889592 Office +44 (0) 1274 889656 Fax +44 (0) 7970 733851 Mobile (24 Hour)
Re: [PHP] mixing HTML and PHP code
On Friday 12 January 2001 00:26, [EMAIL PROTECTED] wrote: echo "html"; echo "head"; echo "title$title/title"; echo "link rel='stylesheet' type='text/css' [...] if ($time_to_write_the_web_page) { // write the web page. echo " html head title$title/title "; One reason why I don't like the "echo" route: I lose the syntax highlighting for the HTML that way. String constants should be highlighted as, well, string constants normally, but when they contain HTML code that's just plain ugly. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) Pretty cool, the kind of power information technology puts in our hands these days. - Securityfocus on probing 3600 hosts for known problems in 3 weeks -- 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] Question
you'll have to compute the sum of filesizes of all the files in their directory. At least on NT, filesize on directory returns 0. At 12:08 12.1. 2001, Gareth Davies wrote the following: -- Hi all, Is there a way in PHP to get the size of a directory? (so I can see how much disk space my users are using in their home directory). Can someone also tell me what the PHP General list is exactly. Is it run by PHP folk only? Can I subscribe to this list somewhere and maybe help someone else out for a change? Thanks, Gareth Davies Progressive Business Services Ltd +44 (0) 1274 889592 Office +44 (0) 1274 889656 Fax +44 (0) 7970 733851 Mobile (24 Hour) --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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-CVS] cvs: php4 /ext/curl curl.c php_curl.h
sterlingFri Jan 12 02:49:39 2001 EDT Modified files: /php4/ext/curl php_curl.h curl.c Log: Make daniel's changes work in ZTS mode... Index: php4/ext/curl/php_curl.h diff -u php4/ext/curl/php_curl.h:1.15 php4/ext/curl/php_curl.h:1.16 --- php4/ext/curl/php_curl.h:1.15 Fri Jan 12 02:26:29 2001 +++ php4/ext/curl/php_curl.hFri Jan 12 02:49:38 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_curl.h,v 1.15 2001/01/12 10:26:29 dbeu Exp $ */ +/* $Id: php_curl.h,v 1.16 2001/01/12 10:49:38 sterling Exp $ */ #ifndef _PHP_CURL_H #define _PHP_CURL_H @@ -58,16 +58,6 @@ CURL *cp; zend_llist to_free; } php_curl; - - - -#ifdef ZTS -#define CURLG(v) (curl_globals-v) -#define CURLLS_FETCH() php_curl_globals *curl_globals = ts_resource(curl_globals_id) -#else -#define CURLG(v) (curl_globals.v) -#define CURLLS_FETCH() -#endif #else Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.34 php4/ext/curl/curl.c:1.35 --- php4/ext/curl/curl.c:1.34 Wed Jan 3 08:07:55 2001 +++ php4/ext/curl/curl.cFri Jan 12 02:49:38 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: curl.c,v 1.34 2001/01/03 16:07:55 sniper Exp $ */ +/* $Id: curl.c,v 1.35 2001/01/12 10:49:38 sterling Exp $ */ #include "php.h" @@ -48,12 +48,6 @@ #include "ext/standard/file.h" #include "php_curl.h" -#ifdef ZTS -int curl_globals_id; -#else -php_curl_globals curl_globals; -#endif - static int le_curl; static void _php_curl_close(zend_rsrc_list_entry *rsrc); @@ -315,7 +309,7 @@ urlstr = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url)); curl_easy_setopt(curl_handle-cp, CURLOPT_URL, urlstr); - zend_llist_add_element(curl_handle-to_free,urlstr); + zend_llist_add_element(curl_handle-to_free, urlstr); } curl_easy_setopt(curl_handle-cp, CURLOPT_NOPROGRESS, 1); @@ -383,7 +377,7 @@ copystr = estrndup(Z_STRVAL_PP(curl_value), Z_STRLEN_PP(curl_value)); ret = curl_easy_setopt(curl_handle-cp, option, copystr); - zend_llist_add_element(curl_handle-to_free,copystr); + zend_llist_add_element(curl_handle-to_free, +copystr); } break; -- PHP CVS 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] Question
Is there a way in PHP to get the size of a directory? (so I can see how much disk space my users are using in their home directory). Maybe a system call to 'du' if you're on a unix/Linux system? Simon -- 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] Question
Guess you can run `du -s /one/folder` which outputs disk usage summary for that folder. (Not on Win) -J -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: 12. januar 2001 12:19 To: Gareth Davies; PHP List Subject: Re: [PHP] Question you'll have to compute the sum of filesizes of all the files in their directory. At least on NT, filesize on directory returns 0. At 12:08 12.1. 2001, Gareth Davies wrote the following: -- Hi all, Is there a way in PHP to get the size of a directory? (so I can see how much disk space my users are using in their home directory). Can someone also tell me what the PHP General list is exactly. Is it run by PHP folk only? Can I subscribe to this list somewhere and maybe help someone else out for a change? Thanks, Gareth Davies Progressive Business Services Ltd +44 (0) 1274 889592 Office +44 (0) 1274 889656 Fax +44 (0) 7970 733851 Mobile (24 Hour) --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] Layout Manager
Hi, has anybody of you ever thought of a Layout Manager for PHP, somewhat like Java's Swing Layout Managers? If so, design hints are very much welcome. Thanks in advice! Ulf -- Ulf Wendel, NetUSE AG Siemenswall, D-24107 Kiel Tel: +49 431 386 436 00, Fax: +49 431 386 435 99 -- 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] Lost connection to MySQL server during query
To answer my own question and for anyone else that gets stuck with this, configuring with: --with-mysql=/usr/local/mysql (or whatever your mysql installation path is) instead of just --with-mysql seems to fix it for me. Cheers, Tim. On Thu, 11 Jan 2001, Tim Colles wrote: Can anyone help with this. Got Apache 1.3.14, PHP 4.0.3pl1 and MySQL 3.22.32 happily installed. All seems to work fine, yet I keep getting these error messages when doing queries through PHP scripts (seems to work okay doing the same queries from the mysql prompt though). I tried the phpMyAdmin and bookmarker applications from the php projects page and although both work fine they have the exact same problem, you can always get the queries to go through eventually if you keep reloading the relevant php page until it loads without error - so there is nothing syntactically wrong with the query or with php/mysql being able to handle it. No large amounts of data are being handled and response times are in seconds (or less). Theres an example output of the error when it fails on bookmarker (reload the page a few times and there are usually different errors but eventually it will work correctly without any errors) at the end of this message. I looked at FAQ and mail archives from a number of sources and found a number of other people that have an identical error to this, but there is never any answer to the question (there are some suggestions that a common thread is running on Solaris 2.6 which I am and that it might be to do with error lookup). It seems there is a very fundamental problem with MySQL here which means it is useless on this platform - does anyone have it working on 2.6? Any help appreciated - otherwise I have to go look at postgresql :( Cheers, Tim. Some sample error messages - note that although it appears to be complaining about the SQL in some of these - the SQL actually runs fine under mysql and if you reload the same page repeatedly it eventually works without error. These are from bookmarker, but the problem is the same for phpmyadmin so its not the applications themselves: Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select val from active_sessions where sid = '84aedf088024b988ff849922ea8c4b31' and name = 'bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: cannot use database timctest Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: update active_sessions set val='Ymtfc2VzczokdGhpcy0+aW4gPSAnMSc7ICR0aGlzLT5wdCA9IGFycmF5KCk7ICR0aGlzLT5wdFsnYXV0aCddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfbXNnJ10gPSAnMSc7ICR0aGlzLT5wdFsnc2Vzc193YXJuX21zZyddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfZXJyb3JfbXNnJ10gPSAnMSc7ICRHTE9CQUxTWydhdXRoJ10gPSBuZXcgYmtfY3JfYXV0aDsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aCA9IGFycmF5KCk7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3VpZCddID0gJ25vYm9keSc7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3Blcm0nXSA9ICcnOyAkR0xPQkFMU1snYXV0aCddLT5hdXRoWydleHAnXSA9ICcyMTQ3NDgzNjQ3JzsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aFsncmVmcmVzaCddID0gJzIxNDc0ODM2NDcnOyAkR0xPQkFMU1snc2Vzc19tc2cnXSA9ICcnOyAkR0xPQkFMU1snc2Vzc193YXJuX21zZyddID0gJyc7ICRHTE9CQUxTWydzZXNzX2Vycm9yX21zZyddID0gJyc7IA==', changed='2001062415' where sid='84aedf088024b988ff849922ea8c4b31' and name='bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select sum(total_public_bookmarks) as total_public from auth_user where username != '' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select category.name as category_name, bookmark.category_id, subcategory.name as subcategory_name, bookmark.subcategory_id, bookmark.id, bookmark.url, bookmark.name as bookmark_name, bookmark.ldesc, bookmark.keywords, rating.name as rating_name, bookmark.rating_id, bookmark.username from bookmark, category, subcategory, rating where ( bookmark.category_id = category.id and category.username = bookmark.username and bookmark.subcategory_id = subcategory.id and subcategory.username = bookmark.username and bookmark.rating_id = rating.id and rating.username = bookmark.username ) and ( bookmark.username = '' or bookmark.public_f='Y' ) order by category.name, subcategory.name, bookmark.name, bookmark.id Database Error Number: 2013 Message: Lost connection to MySQL server during query SQL Stmt:
[PHP] Urgent: Special Characters
Hi all, I have a problem while converting the string into upper case by using the strtoupper function. I want to convert the string which has some special characters in it. For example, med vnlig hlsning, Antnio etc. There are lots of strings / words with some special characters in it. It cannot be listed. As I want to convert them into upper case, I tried. strtoupper(hlsning), it's just converting it as: HLSNING and then writes onto the database. But I want that special character - ' ' also to be converted into upper case and then onto the database. How do I get rid of this problem and convert into upper case ?. PLS. HELP ME. Thanks in advance. ~ Karthick -- 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 Digest 12 Jan 2001 11:58:38 -0000 Issue 450
php-general Digest 12 Jan 2001 11:58:38 - Issue 450 Topics (messages 34157 through 34234): Re: include path confusion 34157 by: Randy Recomend Book 34158 by: Carlos Lora Re: Dynamic 'left menu's' on site: Like a windows explorersystem??? 34159 by: Josh G 34161 by: Jason Murray 34164 by: DanO Re: Replace a space with _ 34160 by: Philip Olson Re: ik 34162 by: Jerry Lake Re: ?= was born when? 34163 by: Toby Butzon 34179 by: Philip Olson 34188 by: Alex Black 34213 by: Richard Lynch 34220 by: Teodor Cimpoesu Re: mixing HTML and PHP code 34165 by: Alex Black 34167 by: Chris Lee 34168 by: Jason Murray 34169 by: DanO 34170 by: Jason Murray 34171 by: Ignacio Vazquez-Abrams 34173 by: Jason Murray 34180 by: Alex Black 34183 by: Maxim Maletsky 34186 by: Alex Black 34187 by: Alex Black 34192 by: Jade Ohlhauser 34193 by: Tim Zickus 34194 by: Josh G 34195 by: Jason Murray 34197 by: Maxim Maletsky 34203 by: burk.pobox.com 34218 by: Alexander Wagner 34224 by: Philip Olson 34228 by: Christian Reiniger Session Help (transparent sid's) 34166 by: Jamie Burns Session File not being deleted 34172 by: Samantha Savvakis 34175 by: Jonathan Sharp 34222 by: Bryne Jørg Vidar APC - new cache on the block 34174 by: Monte Ohrt PDF error with pdf_open_png 34176 by: Jared Howard 34177 by: Ignacio Vazquez-Abrams 34189 by: Chris Lee 34196 by: Jared Howard includes 34178 by: Dan Phoenix 34182 by: Alex Black 34185 by: Maxim Maletsky :: MySql and PHP Book 34181 by: Ray Iftikhar 34184 by: Philip Olson 34199 by: Neil Zanella Dir Help PLEASE 34190 by: Chris 34216 by: Philip Olson where does "MAKE INSTALL" put PHP things? 34191 by: Derek Sivers please help - urgent! - email attachments 34198 by: Sefton 34201 by: lists.www.mulga.com.au 34205 by: Jason Murray 34206 by: Jason Murray MYSQL start an auto_increment at a certain number 34200 by: Jared Howard 34215 by: Hsieh, Wen-Yang APC Alternative PHP Cache Release Announcement 34202 by: George Schlossnagle 34204 by: Josh G Limit image height/width on upload 34207 by: David Smith 34208 by: Jason Murray Re: Funny running PHP4 on Apache, Windows 95 34209 by: Patrick Dunford Size of Image 34210 by: Statbat 34211 by: Jason Murray Re: BIG site names using PHP? 34212 by: Chris Adams Re: Performance question 34214 by: Chris Adams apache+php4 error .. 34217 by: Naresh Chafekar Re: Shopping Cart Schema - Sessions 34219 by: Teodor Cimpoesu Re: serialized respresentations of variables 34221 by: Hsieh, Wen-Yang fetch html-page without file() 34223 by: mailing_list.gmx.at 34225 by: Teodor Cimpoesu PHP Installation on W2K 34226 by: Niel Zeeman Question 34227 by: Gareth Davies 34229 by: Cynic 34230 by: Simon Robson 34231 by: Bryne Jørg Vidar Layout Manager 34232 by: Ulf Wendel Re: Lost connection to MySQL server during query 34233 by: Tim Colles Urgent: Special Characters 34234 by: TV Karthick Kumar Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Thursday, January 11, 2001, 11:03:31 AM, you wrote: BC Using PHP 3.0.18, every, single time I've used something like: BC include('../farmers/underwear.php'); BC It works as expected. BC I'm half alseep. I see what you're saying. I suppose if you did: BC include('corn.php'); BC It's going to try each path. Ie. ".:/include:/usr/src" BC ./corn.php BC (if not in .) /include/corn.php BC (if not in /include) /usr/src/corn.php BC (if not in /usr/src) Error. BC And I *suspect* that even if you use ../corn.php, it's going to try BC the include paths in the same way. BC ../corn.php is equivalent to ./../corn.php There's the real confusion I'm having. If you use ../corn.php it *appears* to then try ./include/../corn.php then /usr/src/../corn.php then error, whether the file was in any of those directories or not (since those aren't valid directory references). However, I see some includes I use with the extra path work and some don't. I just wish they would document this so I knew for sure. BC -Brian BC -- BC Like punning, programming is a play on words. Hello there, I am new to PHP what would bookm would you recomend? Any help is appreciated. Carlos I've got one you guys
[PHP] Re: Special Characters
Thanks a million for your mail. It's very helpful for me. This is fine. But can I use this for all the Special Characters. I mean, this should NOT be working only with one language or so. I want this to be working with all the Special Characters and Languages available in this world. Pls. give me more info on this. Thanks, ~ Karthick You wrote a swedish sentence :-) U can use strtr to exchange characters in a string, based on a list of chars to be changed, like: ? $string = "Vnlig hlsning Andr"; $newstring = strtoupper(strtr( $string, "", "" )); echo $newstring; ? Probably -Original Message- From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]] Sent: 12. januar 2001 13:20 To: Bryne Jrg Vidar Subject: Re: [PHP] Urgent - Special Characters Hi Can you write me in English ?. It seems that you are helping me. But I want to get it in English. PLEASE HELP ME. Thanks, ~ Karthick - Original Message - From: Bryne Jrg Vidar [EMAIL PROTECTED] To: TV Karthick Kumar [EMAIL PROTECTED] Sent: Friday, January 12, 2001 12:06 PM Subject: RE: [PHP] Urgent - Special Characters Hva med en rask lsning: strtr( "Vnlig", "", "" ) -Original Message- From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]] Sent: 12. januar 2001 13:02 To: [EMAIL PROTECTED] Subject: [PHP] Urgent - Special Characters Hi all, I have a problem while converting the string into upper case by using the strtoupper function. I want to convert the string which has some special characters in it. For example, med vnlig hlsning, Antnio etc. There are lots of strings / words with some special characters in it. It cannot be listed. As I want to convert them into upper case, I tried.strtoupper(hlsning), it's just converting it as: HLSNING and then writes onto the database. But I want that special character - ' ' also to be converted into upper case and then onto the database. How do I get rid of this problem and convert into upper case ?. PLS. HELP ME. Thanks in advance. ~ Karthick -- 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] apache+php4 error ..
I would try copying it to your "C:\Program Files\Apache Group\Apache\modules\" folder then change your LoadModule line to: LoadModule php4_module modules/php4apache.dll Or if you want to keep it there try this: LoadModule php4_module "c:/php4/sapi/php4apache.dll" ^ ^ John "Naresh Chafekar" [EMAIL PROTECTED] on 01/12/2001 01:58:50 AM To: [EMAIL PROTECTED] cc: Subject: [PHP] apache+php4 error .. I have windows98, apache 1.3.14, php4. After adding following line in httpd.conf file # for the apache module #LoadModule php4_module c:/php4/sapi/php4apache.dll I get following error while starting apache (which works fine otherwise) Cannot load c:/php4/sapi/php4apache.dll into server: (1157) One of the library f iles needed to run this application cannot be found: Can someone please help me fix this ? Thanks, Naresh. = Naresh Chafekar __ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.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-CVS] cvs: php4 /ext/ircg ircg.c
sas Fri Jan 12 06:51:13 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Add a format string which allows us to implement a transaction-like JS interface for large joins (many changes, one commit). Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.17 php4/ext/ircg/ircg.c:1.18 --- php4/ext/ircg/ircg.c:1.17 Fri Jan 12 06:27:27 2001 +++ php4/ext/ircg/ircg.cFri Jan 12 06:51:12 2001 @@ -45,6 +45,7 @@ FMT_MSG_TOPIC, FMT_MSG_ERROR, FMT_MSG_FATAL_ERROR, + FMT_MSG_JOIN_LIST_END, NO_FMTS }; @@ -86,7 +87,8 @@ "%t was kicked by %f from %c (%m)br /", "%f changes topic on %c to %mbr /", "Error: %mbr /", - "Fatal Error: %mbr /" + "Fatal Error: %mbr /", + "" }; #define MSG(conn, type) \ @@ -383,6 +385,11 @@ "", m); msg_send(conn, m); } + + m.len = 0; + format_msg(MSG(conn, FMT_MSG_JOIN_LIST_END), channel, NULL, NULL, + "", m); + msg_send(conn, m); } static void new_topic(irconn_t *ircc, const char *channel, smart_str *who, smart_str *topic, void *dummy) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem with Exec()
Hello list, I'm having a problem with Exec and Sendmail, on PHP-4 running under Apache 1.3.14 on Windows NT. When I go to a DOS prompt and enter d:\sendmail\sendmail -t -messagefile=d:\sendmail\msg.txt it works fine. When I have any of the lines exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); $foo = exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); $foo = exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); all that happens is my PHP script times out. If I remove this line, everything works fine. I'm sure I'm missing something simple but I'm *very* tired. Any ideas? Cheers Jon -- 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] apple-macintosh
He is installing on OS X Server, which has been out for a year. Poster: Try http://www.xclave.com/ for more info on PHP/MySQL on OS X S. If you get the PHP/MySQL/Apache source they should compile out of the box on OS X Server. Michael On Thursday, January 11, 2001, at 06:25 PM, Alex Black wrote: eh? on OS X? what is your (pardon, insane) justification for having pressure to get a piece of software on a yet-to-be-released operating system? go download freeBSD it works! OSX is just beta... -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 From: [EMAIL PROTECTED] (MacTrom) Newsgroups: php.general Date: 11 Jan 2001 11:06:26 -0800 Subject: Re: [PHP] apple-macintosh I've downloaded the MySql package from Lightyear, and also an OSX version from NuSphere to an OSX server for my client. UNFortunately, the Lightyear tar refuses to unpack (it is meant to be dropped onto the Desktop and the OSX server doesn't have a Desktop folder) and the NuSphere installs fine except that it fails to find libpthread.A.??lib (I'm not at the server and not sure of the extension). So then setting up the grant table fails and MySql won't run. We are in critical mode to get MySql up and running on this, and I could use some help/direction. Terry From: Terry Romine [EMAIL PROTECTED] Date: Thu, 11 Jan 2001 03:37:19 -0600 To: terry romine [EMAIL PROTECTED] Subject: FW: [PHP] apple-macintosh From: lou [EMAIL PROTECTED] Date: Thu, 28 Dec 2000 09:33:47 -0800 To: EaTrom [EMAIL PROTECTED], Jerry [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP] apple-macintosh http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X I would presume that PHP would be usable under OS X -- Terry -- 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] GD graphics extension question
Title: Blank GD config problem, Windows problem, browserOptionsissue, or something else? I can't seem to figure this one out. (I'mstill newbie to php, trying to learn on myWin98 pc at home. ) * * * * * * * GD is properly showing up on the phpinfo page as enabled. But when I click on several different test files (one from Weblogs, and one a test file for a particular class of graphs), the result is either: a)the Windows download dialog boxlaunches for some reason (this happenedfor two different test graphic files, one being the Weblogs testfile posted on their site) OR b) the following2 errors occur (this happened fora particular graphics class test page): "Warning: Could not find/open font in classcoxcomb.php on line 462 " "Warning: Cannot add header information - headers already sent by (output started at classcoxcomb.php:462) in classcoxcomb.php on line 153 PNG IHDRhðy}?PLTEÿ ÿÿÿðððîîîÝÝÝÌÌÌ333f ...etc " Most oddly, at one point after hitting the refresh button, the Weblogs test graphic all of a suddenDID appear. So I clicked refresh once again immediately(because I couldn't finally believe my eyes!) and, heck,once again the download dialog box launched, rather thanthe graphic appearing again. Now that was weird. Does anyone have a clue what I am doing wrong? [Three weeks now trying to figure this out on my own. I have (hopefully very carefully) checked all the windows archive mentions of"GD"and have perused same at other php forums. Nothing has yet hinted at my partcular GD goofup. By way ofproof ofnewbieness, let me note for amusement sake thatmuch of those 2 weeks wasspent figuring out why php wouldhang every timeI uncommented the php_gd.dll. Naturallythe cause wasa boneheadtypo donewhen typingmyextensions directory path inphp.ini--- i.e., I forgot to include the subdirectory name "/extensions" at the end of the extensions address on my pc--the extensions pathin php.ini should have been c:/mystuff/php/extensions rather than c:/mystuff/php i hate that].
[PHP-CVS] cvs: php4 /ext/ircg ircg.c
sas Fri Jan 12 07:27:54 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Add a hook for signaling "you're gone" to the client on channel part Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.18 php4/ext/ircg/ircg.c:1.19 --- php4/ext/ircg/ircg.c:1.18 Fri Jan 12 06:51:12 2001 +++ php4/ext/ircg/ircg.cFri Jan 12 07:27:53 2001 @@ -46,6 +46,7 @@ FMT_MSG_ERROR, FMT_MSG_FATAL_ERROR, FMT_MSG_JOIN_LIST_END, + FMT_MSG_SELF_PART, NO_FMTS }; @@ -88,6 +89,7 @@ "%f changes topic on %c to %mbr /", "Error: %mbr /", "Fatal Error: %mbr /", + "", "" }; @@ -402,6 +404,15 @@ smart_str_free_ex(m, 1); } +static void part_handler(irconn_t *ircc, const char *channel, void *dummy) +{ + php_irconn_t *conn = dummy; + static smart_str m; + + format_msg(MSG(conn, FMT_MSG_SELF_PART), channel, NULL, NULL, "", m); + msg_send(conn, m); +} + static void user_leave(irconn_t *ircc, const char *channel, smart_str *user, void *dummy) { php_irconn_t *conn = dummy; @@ -487,7 +498,7 @@ if (!conn) RETURN_FALSE; - irc_join(conn-conn, Z_STRVAL_PP(p2), NULL, NULL, user_add, user_leave, user_kick, new_topic, conn); + irc_join(conn-conn, Z_STRVAL_PP(p2), NULL, part_handler, user_add, +user_leave, user_kick, new_topic, conn); RETVAL_TRUE; } -- PHP CVS 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-CVS] cvs: php4 /ext/ircg ircg.c
sas Fri Jan 12 07:45:34 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: Encode HTML entities by default Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.19 php4/ext/ircg/ircg.c:1.20 --- php4/ext/ircg/ircg.c:1.19 Fri Jan 12 07:27:53 2001 +++ php4/ext/ircg/ircg.cFri Jan 12 07:45:34 2001 @@ -19,6 +19,7 @@ #include "php.h" #include "php_ini.h" #include "php_ircg.h" +#include "ext/standard/html.h" #include "ext/standard/php_smart_str.h" #include "ext/standard/info.h" @@ -244,6 +245,7 @@ char c; int mode = 0; static smart_str new_msg; + smart_str encoded_msg = {0}; if (fmt[0] == '\0') { result-len = 0; @@ -253,6 +255,8 @@ if (msg) { new_msg.len = 0; mirc_color(msg, new_msg); + encoded_msg.c = php_escape_html_entities(new_msg.c, new_msg.len, + encoded_msg.len, 1, 1); } for (p = fmt; (c = *p); p++) { @@ -281,7 +285,7 @@ smart_str_appends_ex(result, from, 1); break; case 'm': - smart_str_append_ex(result, new_msg, 1); + smart_str_append_ex(result, encoded_msg, 1); break; default: smart_str_appendc_ex(result, '%', 1); @@ -291,6 +295,8 @@ break; } } + + smart_str_free(encoded_msg); smart_str_0(result); } -- PHP CVS 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-CVS] cvs: php4 /ext/ircg ircg.c
sas Fri Jan 12 08:42:10 2001 EDT Modified files: /php4/ext/ircg ircg.c Log: We never want to appand to the result string, so set len to 0 initially. Index: php4/ext/ircg/ircg.c diff -u php4/ext/ircg/ircg.c:1.20 php4/ext/ircg/ircg.c:1.21 --- php4/ext/ircg/ircg.c:1.20 Fri Jan 12 07:45:34 2001 +++ php4/ext/ircg/ircg.cFri Jan 12 08:42:09 2001 @@ -247,8 +247,8 @@ static smart_str new_msg; smart_str encoded_msg = {0}; + result-len = 0; if (fmt[0] == '\0') { - result-len = 0; return; } -- PHP CVS 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] mixing HTML and PHP code
On Fri, 12 Jan 2001, MR wrote: Philip Olson ... You know what's annoying? This (yes, it happens) : echo ("table bgcolor=\"#ff\""); echo ("tr"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Name :"); $name = 'johnny'; printf("%s %s %s","b","$name","/b"); echo ("/td"); echo ("td bgcolor=\"#ee\" width=\"300\""); print("Title :"); $title = 'smith'; printf("%s %s %s","b","$title","/b"); echo("/td"); echo("/tr"); echo("/table"); I'd suggest: echo "table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : "; $name = 'johnny'; echo "B$name/B /td td bgcolor='#ee' width='300' Title : "; $title = 'smith'; echo"B$title/B /td /tr /table"); This way, the code IS readable, for small-medium size echoing. I on the other hand suggest something like this: ? $name = 'Johnny'; $title= 'Smith'; ? table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : B?=$name?/B /td td bgcolor='#ee' width='300' Title : B?=$title?/B /td /tr /table or this: ? $name = 'Johnny'; $title= 'Smith'; echo " table bgcolor='#ff' tr td bgcolor='ee' width='300' Name : B $name /B /td td bgcolor='#ee' width='300' Title : B $title /B /td /tr /table"; ? I think is better (when possible) to format the data and then put it on their way :) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows | | WorldNet Internet Maringa - PR - Brasil | what evil lurks in the | | E-Mail: [EMAIL PROTECTED] | Heart of Men!" | | [EMAIL PROTECTED] | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ This e-mail message is 100% Microsoft free! /"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \ -- 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] Question about phpinfo() and XML
phpinfo reports that XML is 'active' but i thought xml was a client side language? what does it have to do with the server? thanks! - Noah -- 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] money data type cause problem in connection to Mssql7.0
Hi, I have got a problem that I canot connect to mssql 7.0 tables with PHP if it contains field in "money" data type. When I change the "monty" type to interger or other types, everything fine. The fact is that I have to use "money" data type. Can somebody help me please? Thanks in advance. Michael Luk This message was sent using i-Office Webmail - Powered by i-Server. For more information visit http://www.i-serverbox.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] newbie
Hi everyone, My name's Kenneth Zink and I'm a newbie here. I just started working with PHP on Wednesday, but with the help of John Guynn, I think I'm getting the hang of it pretty quickly. I joined the list so that I have more resources available to me as I continue learning how to program in PHP. My main website that I work on right now is www.s-series.org . please check it out and let me know what you think. BTW, if you know of a good PHP based classifieds script, please let me know, because I want to get away from the CGI based classifieds that we currently have. Thanks. Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094 '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!! http://www.s-series.org/htm/windstorm/project-windstorm.htm '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!! http://www.s-series.org/htm/firestorm/firestorm.htm Racing by the Grace of God!! -- 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] upload _ safe_mode
Hi! There are a few more options these days and php4.0.5 will be even friendlier safe mode file uploading (so I hear from reliable sources.) Through some discussion in #php , this use was proposed (by onki) : $tmp_name = $HTTP_POST_FILES["userfile"]["tmp_name"]; move_uploaded_file ($tmp_name, "/home/httpd/html/upload/example.zip"); chmod("/home/httpd/html/upload/example.zip", 0644); And it worked! move_uploaded_file is the key here. Haven't personally tried it as the safe mode server I have access to is 4.0.2 and it is a .3 function. What I do/have done is get/got a script called chuid from here : http://www.srparish.net/scripts/ It must be installed by sysadmin. Then, users do something like this : ... input type="file" name="file" ... passthru ("chuid $file 1033"); @copy("$file", "/path/to/uploads/$file_name") or die ("could not copy file $file_name"); Something like that. The above is the users uid which can be echo'd in shell like this : echo $UID Regards, Philip Olson http://www.cornado.com/ be outside the box. On Fri, 12 Jan 2001, andreas (@work) wrote: hi, we are hosting sites on a cobalt raq we installed php4.04 ( safe_mode) how can we owners of the site allow uploads ! is there a way to set upload_temp_dir on a site basis if yes how thank you andreas -- 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-CVS] cvs: php4 /ext/domxml php_domxml.c
sniper Fri Jan 12 08:49:07 2001 EDT Modified files: /php4/ext/domxmlphp_domxml.c Log: - Fixed a possible crash bug in xmltree(). # PR: #7052 Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.24 php4/ext/domxml/php_domxml.c:1.25 --- php4/ext/domxml/php_domxml.c:1.24 Fri Jan 5 06:34:15 2001 +++ php4/ext/domxml/php_domxml.cFri Jan 12 08:49:06 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_domxml.c,v 1.24 2001/01/05 14:34:15 andi Exp $ */ +/* $Id: php_domxml.c,v 1.25 2001/01/12 16:49:06 sniper Exp $ */ #include "php.h" @@ -1406,8 +1406,10 @@ zend_hash_next_index_insert((*children)-value.ht, child, sizeof(zval *), NULL); /* Add name, content and type as properties */ - add_property_stringl(child, "name", (char *) last-name, strlen(last-name), 1); - add_property_long(child, "type", last-type); + if(last-name) + add_property_stringl(child, "name", (char *) last-name, +strlen(last-name), 1); + if(last-type) + add_property_long(child, "type", last-type); content = xmlNodeGetContent(last); if(content) add_property_stringl(child, "content", (char *) content, strlen(content), 1); -- PHP CVS 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] apache+php4 error ..
This solved the problem. Thanks. Naresh. --- Belltree [EMAIL PROTECTED] wrote: Naresh Chafekar£¬Hello£¡ You must copy php4ts.dll to windows/system folder. Belltree ÔÚ 01-1-11 23:58:00 you wrote£º I have windows98, apache 1.3.14, php4. After adding following line in httpd.conf file # for the apache module #LoadModule php4_module c:/php4/sapi/php4apache.dll I get following error while starting apache (which works fine otherwise) Cannot load c:/php4/sapi/php4apache.dll into server: (1157) One of the library f iles needed to run this application cannot be found: Can someone please help me fix this ? Thanks, Naresh. = Naresh Chafekar __ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.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] = Naresh Chafekar __ Do You Yahoo!? Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free! http://photos.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: APC Cache and eval()
Haven't tried it. My guess is that it doesn't work, but could be made to. -- 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] mixing HTML and PHP code
that may work for you, but it created a lot of overhead in your applications, and anyone that doesn't know about you special "html api" will be screwed... by all means use whatever techniques you like in-house, but that would be completely useless to someone in the "outside world" -alex (comments) (include files) (page specific variables) html(); head($title); head_css('stylesheet.css'); head_script('script.js); x('head'); body($style) table(0, 0, 0, '100%', '', BLACK); tr('top'); td(); image('fire.jpg'); x('td'); x('tr'); x('table'); x('body'); x('html'); -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 -- 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: APC Cache and eval()
No idea. :) Haven't tried it. I'll check and write back to the list. Michael Kimsal wrote: You mean 'eval' doesn't work at all, or doing an 'eval' on a particular file? George Schlossnagle wrote: Haven't tried it. My guess is that it doesn't work, but could be made to. -- 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] mixing HTML and PHP code
Coding standards are being created (via PEAR) and a few recent articles exist but point is we're teaching differently, everywhere. PHP is loose as a goose! print 'foo'; print("foo"); print "foo"; printf("%s","foo"); ... all being taught, all being read, all being (mis)used. ! http://www.binarycloud.com/code_standard.html Am looking forward to the in-progress PEAR Standards, which can partially be seen here : http://marc.theaimsgroup.com/?l=php-pearm=97603413001842w=2 Once this comes about we'll start teaching _GOOD_ coding techniques and after awhile many more will become pretty little coders writing (and copying) pretty little recognizable scripts. Looking forward to it. Looking forward to picking up a PHP book and seeing concepts shown through standards and not through the authors preferred style at the moment. This is especially true regarding articles/tutorials. Learn the standards first! Then you may be free to roam about the isles. absolutely :) Go here, be sure to sift through the user comments : Best Practices: PHP Coding Style : http://phpbuilder.com/columns/tim20010101.php3 Smart Architectures in PHP : http://phpbuilder.com/columns/tim20001010.php3 A few humble thoughts. Happily yours, Philip On Fri, 12 Jan 2001, Alexander Wagner wrote: Alex Black wrote: echo "input type=\"text\" name=\"hello\" size=\"20\" value=\"$value\"" starts to make you insane. If it is done wrong spread over the whole project hidden between lines of PHP-code, it sure does. speaking as an html author, and a lover of php, _please_: input type="text" name="hello" size="20" value="?=$value?" it makes the code useable. No. input type="text" name="hello" size="20" value="{value}" makes the code usable, and your HTML can even be edited with a graphical HTML-editor. There is no reason to mix up HTML and PHP, except for very small projects. regards Wagner -- Sanity is calming, but madness is more interesting. -- 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]
Re: [PHP] Re: APC Cache and eval()
Guess I should look at the code/try it out before I respond to things. :) eval()'d code works fine, though it won't be cached (the file calling it will be of course, but no eval()'d bit won't be.) Michael Kimsal wrote: You mean 'eval' doesn't work at all, or doing an 'eval' on a particular file? George Schlossnagle wrote: Haven't tried it. My guess is that it doesn't work, but could be made to. -- 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] mixing HTML and PHP code
or more like : table bgcolor="#ff" tr td bgcolor="#ee" width="300" Name : b?php $name = 'johnny'; echo $name; ?/b /td td bgcolor="#ee" width="300" Title : b?php $title = 'smith'; echo $title; ?/b /td /tr /table yes, uhhzakkly :) --- Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. heh. now come on... that's not supposed to be true (noink) _a -- 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] mixing HTML and PHP code
Alex Black wrote: input type="text" name="hello" size="20" value="{value}" and the problem with that, is you're not paring tons of html through a search-replace function, which also created unnecessary overheead, and You have a point here. Template-systems are slow. forces you (once again) to make a spec that says "here's how this template system works) There are "standard"-template-systems like FastTemplates or PHPLIB templates. part of the point was for _PHP_ to be embedded html, in my opinion your It was created that way. It still is possible. Is can be quite handy, sometimes (or often, depends on what you do). That doesn't mean you have to use it. example above takes the "don't mix logic with markup" much too far: I don't think I crossed a border here. When execution-speed doesn't matter that much (wich often is the case), there is only one rule: Get it done as fast and reusable as possible. Code that uses templates tends to be very reusable, at least it is VERY easy to change the design. And if the design is done by a designer who doesn't know PHP, it may also be done faster. input type="text" name="hello" size="20" value="?=$value?" is really not that much harder to write. With a HTML-editor? It probably would HTML-encode this, so you end up with lt;=$valuegt; html people can ignore it, almost php can find their code, and those that know both can reap the benefits. what about loops? Templates can do loops, with so called "blocks". Your system can't. Not whithout mixing PHP and HTML in a way that will make a designer throw hardware at you. etc... you start building your own little template language constructs, which is dumb because php already has them! There are clean (but slow) template-solutions out there. Maybe this will change some day. Anyway, from a designers point of view, your system is far messier (especially with loops) than templates. But faster, both for you to write and to execute for PHP. Well, this is a world of tradeoffs. Wagner -- One maniac alone can do what 20 together cannot -- 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] advise (MyCart)
I'm currently working on an installation of rosenet's MyCart and I am curious if anyone has used this cart and modified it to include product options, size color etc.. my intended end product is an online ordering system for a pizza place, so essentially my options will be pizza sizes and toppings, if anyone has any ideas on how to go about what I'm trying I'd appreciate it. Jerry Lake -- 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 vars with recursive form
How can I correctly register session vars on a recursive form? If I call a page repeatedly using: FORM ACTION="?php echo $PHP_SELF ?" METHOD="POST" The earlier variables keep getting lost. How can I register the session variables correctly? Each subsequent page should set its own variable while remembering all those previously set. Right now the top of the page says: --- session_start(); $thevals=array(alpha,beta,gamma,delta,epsilon); while (list($key, $val) = each($thevals)) { if (!session_is_registered($val) ) { session_register("$val"); } } -- thanks, bill -- 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] session vars with recursive form
This is probably due to the fact that form values don't override session values... this is a feature, not a bug. (imagine if i could do: http://www.yourdomain.com/highsecurity.php?user=admin and magically become admin... very broken security) -jm -Original Message- From: bill [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 11:25 AM To: [EMAIL PROTECTED] Subject: [PHP] session vars with recursive form How can I correctly register session vars on a recursive form? If I call a page repeatedly using: FORM ACTION="?php echo $PHP_SELF ?" METHOD="POST" The earlier variables keep getting lost. How can I register the session variables correctly? Each subsequent page should set its own variable while remembering all those previously set. Right now the top of the page says: --- session_start(); $thevals=array(alpha,beta,gamma,delta,epsilon); while (list($key, $val) = each($thevals)) { if (!session_is_registered($val) ) { session_register("$val"); } } -- thanks, bill -- 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] mixing HTML and PHP code
http://www.binarycloud.com/code_standard.html http://marc.theaimsgroup.com/?l=php-pearm=97603413001842w=2 Best Practices: PHP Coding Style : http://phpbuilder.com/columns/tim20010101.php3 Smart Architectures in PHP : http://phpbuilder.com/columns/tim20001010.php3 These are all just opinions, none of these are official Php style guidelines, so there's no real reason to follow them. - Mark -- 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] ?= was born when?
In article Pine.BSF.4.10.10101112007430.77660-10@localhost, [EMAIL PROTECTED] wrote: when was ?= 'enabled' in php? 4.0.0 ? 4.0, although it actually existed for php 3 a long time ago for a short while and was then removed. http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.3r2=1.4 http://cvs.php.net/viewcvs.cgi/php3/language-scanner.lex.diff?r1=1.6r2=1.7 jim -- 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] mixing HTML and PHP code
that may work for you, but it created a lot of overhead in your applications, and anyone that doesn't know about you special "html api" will be screwed... That I prefer to call it "investment" instead of overhead because it has given us a system we vastly prefer. by all means use whatever techniques you like in-house, but that would be completely useless to someone in the "outside world" That's fine. I just wanted to show people how we did it. I don't expect this to be useful in a all situations. In our experience PHP programmers who work with us don't have any problem figuring out how our system works. Without knowing anything about our system tell me you can't look at that code and "get it" Jade (comments) (include files) (page specific variables) html(); head($title); head_css('stylesheet.css'); head_script('script.js); x('head'); body($style) table(0, 0, 0, '100%', '', BLACK); tr('top'); td(); image('fire.jpg'); x('td'); x('tr'); x('table'); x('body'); x('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]
[PHP] odbc_* - MyODBC - MySQL
Just curious. I tried accessing MySQL through ODBC using a system DSN (MyODBC driver ver. myodbc-2.50.36-nt.zip) and a script as simple as this one crashes Apache at the odbc_fetch_row() call. I actually don't know much about ODBC related stuff inside PHP... or generally, for that matter, so I don't know whether this is unsupported, or whether a more stable state is possible / desirable. $conn = odbc_connect( $dsn , $usr , $pwd ); $res = odbc_tables( $conn ) ; while( $r = odbc_fetch_row( $res ) ) { for( $i = 0 ; $i count( $r ) ; $i++ ) { echo $r[ $i ] , '|' ; } echo "\n" ; } Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] Forms with Field Arrays and JavaScript
Hi! I was wondering if someone knows, or can think of a way to go around this problem i have. The thing is i am working with a form with a field array. Each field is something like: input name="myfields[]" type="text" When i receive the posted data, I can access the "myfields" array. This is fine. The problem is within my form i have client JavaScript code to validate the form data. But I can't make reference to a form object called myfields[] or myfields[5] or just myfields. The property name of the javascript object is set to "myfields[]", but reference to myfields[][5] or document.myform.fields["myfields[]"] doesn't work either. Any suggestions will be greatly appreciated. Thanks in advance. -- 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-CVS] cvs: php4 /ext/standard http_fopen_wrapper.c
venaas Fri Jan 12 12:49:25 2001 EDT Modified files: /php4/ext/standard http_fopen_wrapper.c Log: Follows redirects again, and $http_response_header now contains all headers with an empty string as delimiter @- Made fopen() of HTTP URL follow redirects, $http_response_header will @ contain all headers with empty string as delimiter (Stig Venaas) Index: php4/ext/standard/http_fopen_wrapper.c diff -u php4/ext/standard/http_fopen_wrapper.c:1.3 php4/ext/standard/http_fopen_wrapper.c:1.4 --- php4/ext/standard/http_fopen_wrapper.c:1.3 Fri Oct 27 18:31:56 2000 +++ php4/ext/standard/http_fopen_wrapper.c Fri Jan 12 12:49:25 2001 @@ -17,7 +17,7 @@ | Hartmut Holzgraefe [EMAIL PROTECTED] | +--+ */ -/* $Id: http_fopen_wrapper.c,v 1.3 2000/10/28 01:31:56 zeev Exp $ */ +/* $Id: http_fopen_wrapper.c,v 1.4 2001/01/12 20:49:25 venaas Exp $ */ #include "php.h" #include "php_globals.h" @@ -263,26 +263,40 @@ } } } - { - ELS_FETCH(); - zend_hash_update(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) response_header, sizeof(zval *), NULL); - } if (!reqok) { SOCK_FCLOSE(*socketd); *socketd = 0; free_url(resource); -#if 0 if (location[0] != '\0') { - return php_fopen_url_wrapper(location, mode, options, issock, socketd, opened_path); + zval **response_header_new, *entry, **entryp; + + fp = php_fopen_url_wrap_http(location, mode, options, issock, +socketd, opened_path); + ELS_FETCH(); + if (zend_hash_find(EG(active_symbol_table), +"http_response_header", sizeof("http_response_header"), (void **) +response_header_new) == SUCCESS) { + entryp = entry; + MAKE_STD_ZVAL(entry); + ZVAL_EMPTY_STRING(entry); + +zend_hash_next_index_insert(Z_ARRVAL_P(response_header), entryp, sizeof(zval *), +NULL); + +zend_hash_internal_pointer_reset(Z_ARRVAL_PP(response_header_new)); + while +(zend_hash_get_current_data(Z_ARRVAL_PP(response_header_new), (void **)entryp) == +SUCCESS) { + zval_add_ref(entryp); + +zend_hash_next_index_insert(Z_ARRVAL_P(response_header), entryp, sizeof(zval *), +NULL); + +zend_hash_move_forward(Z_ARRVAL_PP(response_header_new)); + } + } + goto out; } else { - return NULL; + fp = NULL; + goto out; } -#else - return NULL; -#endif } free_url(resource); *issock = 1; + out: + { + ELS_FETCH(); + ZEND_SET_SYMBOL(EG(active_symbol_table), "http_response_header", +response_header); + } return (fp); } -- PHP CVS 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] on style (was mixing PHP and HTML code)
i do think that the code standard has some good elements to it, but it goes too far to specify a 4-space indent and to specify no spaces within if (condition) statements. I don't think it goes too far (I think it should be 3 spaces tho), but until the php guys publish some official style guidelines, I'll do it my own way. -- 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] CodeCharge
Does anyone know if CodeCharge create SQL dump files as well as the code, or do you have to create them for your specific needs? Jerry Lake -- 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] mixing HTML and PHP code
Alex Black ... input type="text" name="hello" size="20" value="?=$value?" is really not that much harder to write. html people can ignore it, php can find their code, and those that know both can reap the benefits. what about loops? You mean that this code ? connect_to_database(); parse_query(); execute_query(); echo "TABLE"; while (fetch_row_from_query()) { $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row(); echo "TRTD $output /TDTD $more_output /TD/TR"; } echo "/TABLE"; ? would be better if it were written this way? : ? connect_to_database(); parse_query(); execute_query(); ? TABLE ? while (fetch_row_from_query()) : ? ?$output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TRTD?=$output?/TDTD?=$more_output?/TD/TR ? endwhile; ? /TABLE I _personally_ prefer the upper implementation, as all my web developing team (that is, only me :-) know both PHP and HTML and don't like the code to be *plagued* of ? ? ? ? ? ? as in above example. -- 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] mixing HTML and PHP code
I think you missed something: ? connect_to_database(); parse_query(); execute_query(); ? TABLE ? while (fetch_row_from_query()){ $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TR TD?echo $output?/TD TD?echo $more_output?/TD /TR ?}? /TABLE tell me that's not easier on your eyes :) Another nice thing about doing it this way is you can work with a web designer who uses a visual tool like dreamweaver. On Fri, 12 Jan 2001 22:10:08 +0100, MR ([EMAIL PROTECTED]) wrote: Alex Black ... input type="text" name="hello" size="20" value="?=$value?" is really not that much harder to write. html people can ignore it, php can find their code, and those that know both can reap the benefits. what about loops? You mean that this code ? connect_to_database(); parse_query(); execute_query(); echo "TABLE"; while (fetch_row_from_query()) { $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row(); echo "TRTD $output /TDTD $more_output /TD/TR"; } echo "/TABLE"; ? would be better if it were written this way? : ? connect_to_database(); parse_query(); execute_query(); ? TABLE ? while (fetch_row_from_query()) : ? ?$output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TRTD?=$output?/TDTD?=$more_output?/TD/TR ? endwhile; ? /TABLE I _personally_ prefer the upper implementation, as all my web developing team (that is, only me :-) know both PHP and HTML and don't like the code to be *plagued* of ? ? ? ? ? ? as in above example. -- 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: php-list- [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 do I store a pic?
How do I store a jpg within a table? I want for a user to be able to pull a jpg from either their HD and store it in a table with some other information for a classifieds section. That way when the ad is deleted, the picture goes with it instead of remaining on my HD. Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094 '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!! http://www.s-series.org/htm/windstorm/project-windstorm.htm '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!! http://www.s-series.org/htm/firestorm/firestorm.htm Racing by the Grace of God!! -- 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] mixing HTML and PHP code
In Dreamtime, we'd just have a template that looks like this: table {:each:output} tr td{output}/tdtd{more_output}/td /tr {:next:more_output} {:end} /table Even a pot-smoking mac-using hippie web designer can understand that. :-) And it's readable in Dreamweaver or GoLive or any of those visual HTML tools. For Dreamweaver I added a little custom definition that makes a nice icon wherever it sees a template tag in the HTML file. ...and our PHP geeks just stuff a results array into the template. Too easy. - Tim http://www.phptemplates.org TABLE ? while (fetch_row_from_query()){ $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TR TD?echo $output?/TD TD?echo $more_output?/TD /TR ?}? /TABLE -- 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] APC cache and Solaris
Hi Monte, I saw your post on php-general. I don't have access to a Solaris7 box, but to get the shm version to compile under Solaris8, just make the following change to apc_sem.c: 17:10:57(root@bp6) diff apc_sem.c apc_sem.c.new 33c33 #ifdef APC_HOST_LINUX --- #ifndef APC_HOST_BSD The mmap version seems to compile straight out of the box. Let me know if you have any other problems. This change will be incorporated into the first bug-fix release, which should be out in a couple days. George Monte Ohrt wrote: It works for me now... last night I was downloading it to windows, then ftp'ing it to my linux box... something wasn't working right. Thanks Monte George Schlossnagle wrote: Hi. Hmmm... unzips fine for me. I've attached a freshly tarred copy. Monte Ohrt wrote: Hey guys, this tgz archive seems to be incomplete.. one messed up file called "GORY_DETAILS" -- $_ = 'George Schlossnagle'; s#.#(ord$')-(ord$)+((index($_,$')-$)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print join('',(map chr$_,reverse map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/); Name: apc-1.0.tgz apc-1.0.tgzType: unspecified type (application/octet-stream) Encoding: base64 -- Monte Ohrt [EMAIL PROTECTED] http://www.ispi.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.4pl1 as CGI
I am trying to compile PHP 4.0.4pl1 as a CGI on my FreeBSD 3.4-STABLE box and I seem to be having problems for some reason. My configure line reads: /'^'\ ( o o ) --oOOO--(_)--OOOo Devin Atencio ArosNet Systems Administration .oooO EMail: [EMAIL PROTECTED] ( ) Oooo. \ (( )- \_)) / (_/ -- 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] regex
yes At 23:54 12.1. 2001, Jerry Lake wrote the following: -- is it possible with regex to change one or more text characters followed by a space into the same characters followed by a tab? Jerry Lake -- 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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-CVS] cvs: php4 /ext/ldap ldap.c
venaas Fri Jan 12 14:08:26 2001 EDT Modified files: /php4/ext/ldap ldap.c Log: Added parallel search when given array of link identifiers @- Made ldap_list(), ldap_read() and ldap_search() do parallel search when @ first parameter is an array of link identifiers (Stig Venaas) Index: php4/ext/ldap/ldap.c diff -u php4/ext/ldap/ldap.c:1.78 php4/ext/ldap/ldap.c:1.79 --- php4/ext/ldap/ldap.c:1.78 Mon Jan 8 10:31:59 2001 +++ php4/ext/ldap/ldap.cFri Jan 12 14:08:26 2001 @@ -23,7 +23,7 @@ */ -/* $Id: ldap.c,v 1.78 2001/01/08 18:31:59 eschmid Exp $ */ +/* $Id: ldap.c,v 1.79 2001/01/12 22:08:26 venaas Exp $ */ #define IS_EXT_MODULE #include "php.h" @@ -235,7 +235,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "LDAP Support", "enabled" ); - php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.78 2001/01/08 18:31:59 eschmid Exp $" ); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c,v 1.79 2001/01/12 +22:08:26 venaas Exp $" ); php_info_print_table_row(2, "Total Links", maxl ); #ifdef LDAP_API_VERSION snprintf(ldapapiversion, 31, "%d", LDAP_API_VERSION); @@ -576,6 +576,37 @@ /* }}} */ +static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref) +{ + /* sizelimit */ + if (sizelimit -1) { +#if ( LDAP_API_VERSION = 2004 ) || HAVE_NSLDAP + ldap_set_option(ldap, LDAP_OPT_SIZELIMIT, sizelimit); +#else + ldap-ld_sizelimit = sizelimit; +#endif + } + + /* timelimit */ + if (timelimit -1) { +#if ( LDAP_API_VERSION = 2004 ) || HAVE_NSLDAP + ldap_set_option(ldap, LDAP_OPT_TIMELIMIT, timelimit); +#else + ldap-ld_timelimit = timelimit; +#endif + } + + /* deref */ + if (deref -1) { +#if ( LDAP_API_VERSION = 2004 ) || HAVE_NSLDAP + ldap_set_option(ldap, LDAP_OPT_DEREF, deref); +#else + ldap-ld_deref = deref; +#endif + } +} + + static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope) { pval **link, **base_dn, **filter, **attrs, **attr, **attrsonly, **sizelimit, **timelimit, **deref; @@ -586,7 +617,7 @@ int ldap_sizelimit = -1; int ldap_timelimit = -1; int ldap_deref = -1; - LDAPMessage *ldap_result; + LDAPMessage *ldap_res; int num_attribs = 0; int i, errno; int myargcount = ZEND_NUM_ARGS(); @@ -639,10 +670,14 @@ ldap_attrs[num_attribs] = NULL; case 3 : - convert_to_string_ex(base_dn); convert_to_string_ex(filter); - ldap_base_dn = (*base_dn)-value.str.val; ldap_filter = (*filter)-value.str.val; + + /* parallel search? */ + if (Z_TYPE_PP(link) != IS_ARRAY) { + convert_to_string_ex(base_dn); + ldap_base_dn = Z_STRVAL_PP(base_dn); + } break; default: @@ -650,6 +685,93 @@ break; } + /* parallel search? */ + if (Z_TYPE_PP(link) == IS_ARRAY) { + int i, nlinks, nbases, *rcs; + LDAP **links; + zval **entry; + + nlinks = zend_hash_num_elements(Z_ARRVAL_PP(link)); + if (nlinks == 0) { + php_error(E_WARNING, "LDAP: No links in link array"); + if (ldap_attrs != NULL) { + efree(ldap_attrs); + } + RETURN_FALSE; + } + + if (Z_TYPE_PP(base_dn) == IS_ARRAY) { + nbases = zend_hash_num_elements(Z_ARRVAL_PP(base_dn)); + if (nbases != nlinks) { + php_error(E_WARNING, "LDAP: Base must either be a +string, or an array with the same number of elements as the links array"); + if (ldap_attrs != NULL) { + efree(ldap_attrs); + } + RETURN_FALSE; + } + zend_hash_internal_pointer_reset(Z_ARRVAL_PP(base_dn)); + } else { + nbases = 0; /* this means string, not array */ + convert_to_string_ex(base_dn); + ldap_base_dn = Z_STRLEN_PP(base_dn) 1 ? NULL : +Z_STRVAL_PP(base_dn); + } + + links = emalloc(nlinks * sizeof(*links)); + rcs = emalloc(nlinks * sizeof(*rcs)); + + zend_hash_internal_pointer_reset(Z_ARRVAL_PP(link)); + for (i=0; inlinks; i++) { +
[PHP] Sessions
Hello, I was going to use sessions to save a logged in variable so if the user logged in with a username and password I checked for the session variable and if it existed then I could continue. Is there a way for the loggedin session variable to automatically be destroyed after 5 minutes for example? If not what would be another way I could implement the above. thanks, Randy -- 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] regex
At 02:54 PM 1/12/01 , Jerry Lake wrote: is it possible with regex to change one or more text characters followed by a space into the same characters followed by a tab? Jerry Lake For example - $NewString = ereg_replace("([[:alpha:]]+) ", "\\1".chr(9), $String); This will convert a sequence of one or more alphabetic characters followed by one space to the same set of characters followed by a tab (that's the chr(9) part). If you want to match only a specific set of text characters - say, a, e, i, o and u - then you can use $NewString = eregi_replace("([aeiou]+) ", "\\1".chr(9), $String); Notice i used eregi_replace() instead of ereg_replace(); the 'i' means case INsensitive. Of course, there are other ways of doing this with preg_replace and str_replace, both of which are faster than ereg_replace (str_replace is the fastest); I happen to use ereg becaouse I'm most familiar with it, since it came along before the preg_ functions. As always, you can check out the docs: http://www.php.net/ereg_replace http://www.php.net/eregi_replace http://www.php.net/str_replace http://www.php.net/preg_replace -steve (The usual off-the-top-of-my-head-untested-code-snippet caveats apply) ++ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] (530)754-9127 | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-- Gort, Klaatu barada nikto! --+
RE: [PHP] regex
I have a small phone directory bust the name listings are combined for example Schwartz Bob Amelia 555-1212Oxford Scirkin Bill555-1213Brooks I need to add a tab or a comma after the lastname so I can have as a separate field when I dump it into MySQL and there is about 3500 records and I'd hate to have to do it by hand any ideas? Jerry Lake- [EMAIL PROTECTED] -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:25 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] regex depends. is the set of strings preceeding the space limited and known, or is it something like [^abc]{3,12} ? At 00:13 13.1. 2001, Jerry Lake wrote the following: -- and how would I go about that? Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:10 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: Re: [PHP] regex yes At 23:54 12.1. 2001, Jerry Lake wrote the following: -- is it possible with regex to change one or more text characters followed by a space into the same characters followed by a tab? Jerry Lake -- 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] Script execution Speed
depends on the underlying FS - you might find yourself bitten by disk hits that could've been avoided... How about writing a small test suite and benching the server? At 00:29 13.1. 2001, Randy Johnson wrote the following: -- Is it faster and more efficient to have smaller scripts that only do one specific thing when it is executed or can I have a script perform to different tasks based on a variable sent to it? It will be a high user website so I am thinking that the smaller the script the better? Am I right? Randy -- 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] Simple form not passing variables, Why??
The code below does not work. What could be causing this?? php pages do come up, and I can retrieve SQL data. The header seems okay: test.php?name=Bob and if I define a variable on the same page I can use it. Please enter user name here: FORM INPUT TYPE=text NAME=name INPUT TYPE=submit VALUE=Submit /FORMBR you typed: ? echo ($name); ? Linux 2.2.14 PHP/4.0.3pl1 './configure' '--without-gd' '--with-apxs' '--with-mysql=/usr' '--with-pgsql' '--with-imap' Ideas?? __ Do You Yahoo!? Yahoo! Photos - Share your holiday photos online! http://photos.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] regex
Bolgrihn Michael555-5566142 Hillyer St Oxford Bollenbach Gary V 555-5078315 Freedom Rd Oxford Bonaguidi Daniel555-5155N4663 10th Av Montello Bonnett Agatha John 555-5363547 Fawn Ct Oxford Bonnett Bernard Norma 555-4360116 E Ormsby St Oxford Bonnett Bob Eleanor 555-5627527 Fern Av Oxford Here is a sample from the listing there are numbers in the address as well. $NewString = ereg_replace("([[:alpha:]]+) ", "\\1".",", $test); that works to an extent, except that it adds the comma after every word that is followed by one space and not just the first occurance Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:41 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] regex looks like you need to find all the spaces _before_ the _first_ digit on the row, and _after_ the _last_ digit on the row. does that fit your data? are there no other numbers than the telephone ones? At 00:29 13.1. 2001, Jerry Lake wrote the following: -- I have a small phone directory bust the name listings are combined for example Schwartz Bob Amelia 555-1212Oxford Scirkin Bill555-1213Brooks I need to add a tab or a comma after the lastname so I can have as a separate field when I dump it into MySQL and there is about 3500 records and I'd hate to have to do it by hand any ideas? Jerry Lake- [EMAIL PROTECTED] -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:25 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] regex depends. is the set of strings preceeding the space limited and known, or is it something like [^abc]{3,12} ? At 00:13 13.1. 2001, Jerry Lake wrote the following: -- and how would I go about that? Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:10 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: Re: [PHP] regex yes At 23:54 12.1. 2001, Jerry Lake wrote the following: -- is it possible with regex to change one or more text characters followed by a space into the same characters followed by a tab? Jerry Lake -- 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] mixing HTML and PHP code
? connect_to_database(); parse_query(); execute_query(); echo "TABLE"; while (fetch_row_from_query()) { $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row(); echo "TRTD $output /TDTD $more_output /TD/TR"; } echo "/TABLE"; ? Well, this may be a bit specific, but that is probably part of your problem. You have no structure associated with your application design: what are you doing making a connection to a database on the same page you spit out the results from? You should be including a wrapper file, and calling a function which talks to the database. Also, all of that logic should be in a file that is separate from the markup _anyway_ ? connect_to_database(); parse_query(); execute_query(); ? TABLE ? while (fetch_row_from_query()) : ? ?$output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TRTD?=$output?/TDTD?=$more_output?/TD/TR ? endwhile; ? /TABLE table ? function html_table_row($output, $more_output) { ? tr td valign="middle" bgcolor="#CC"?=$output?/td td valign="middle" bgcolor="#CC"?=$more_output?/td /tr ? } ? /table I _personally_ prefer the upper implementation, as all my web developing team (that is, only me :-) know both PHP and HTML and don't like the code to be *plagued* of ? ? ? ? ? ? as in above example. I digress. _alex -- 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] mixing HTML and PHP code
table {:each:output} tr td{output}/tdtd{more_output}/td /tr {:next:more_output} {:end} /table Even a pot-smoking mac-using hippie web designer can understand that. :-) And it's readable in Dreamweaver or GoLive or any of those visual HTML tools. For Dreamweaver I added a little custom definition that makes a nice icon wherever it sees a template tag in the HTML file. Speaking as a not-pot-smoking mac-using only partially hippie web designer: why bother with creating your own syntax? why not just explain some _super_basic_ php syntax to the "html dude" and have him do the code himself? also, dreamweaver nicely ignores ? ? etc. -a ...and our PHP geeks just stuff a results array into the template. Too easy. - Tim http://www.phptemplates.org TABLE ? while (fetch_row_from_query()){ $output = data_from_fetched_row(); $more_output = more_data_from_fetched_row();? TR TD?echo $output?/TD TD?echo $more_output?/TD /TR ?}? /TABLE -- 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] apple-macintosh
pardon. sorry original poster. rhapsody... I had completely forgotten it exists :) -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 From: [EMAIL PROTECTED] (Michael Stearne) Newsgroups: php.general Date: 12 Jan 2001 08:18:44 -0800 Subject: Re: [PHP] apple-macintosh He is installing on OS X Server, which has been out for a year. Poster: Try http://www.xclave.com/ for more info on PHP/MySQL on OS X S. If you get the PHP/MySQL/Apache source they should compile out of the box on OS X Server. Michael On Thursday, January 11, 2001, at 06:25 PM, Alex Black wrote: eh? on OS X? what is your (pardon, insane) justification for having pressure to get a piece of software on a yet-to-be-released operating system? go download freeBSD it works! OSX is just beta... -a -- Alex Black, Head Monkey [EMAIL PROTECTED] The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522 From: [EMAIL PROTECTED] (MacTrom) Newsgroups: php.general Date: 11 Jan 2001 11:06:26 -0800 Subject: Re: [PHP] apple-macintosh I've downloaded the MySql package from Lightyear, and also an OSX version from NuSphere to an OSX server for my client. UNFortunately, the Lightyear tar refuses to unpack (it is meant to be dropped onto the Desktop and the OSX server doesn't have a Desktop folder) and the NuSphere installs fine except that it fails to find libpthread.A.??lib (I'm not at the server and not sure of the extension). So then setting up the grant table fails and MySql won't run. We are in critical mode to get MySql up and running on this, and I could use some help/direction. Terry From: Terry Romine [EMAIL PROTECTED] Date: Thu, 11 Jan 2001 03:37:19 -0600 To: terry romine [EMAIL PROTECTED] Subject: FW: [PHP] apple-macintosh From: lou [EMAIL PROTECTED] Date: Thu, 28 Dec 2000 09:33:47 -0800 To: EaTrom [EMAIL PROTECTED], Jerry [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: [PHP] apple-macintosh http://homepage.mac.com/LightyearDesign/MacOSX/Packages/ Apache 1.3.12 compiled with PHP4 Support and mysql for Mac OS X I would presume that PHP would be usable under OS X -- Terry -- 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 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 store a pic?
Kenneth, I store the path to the image in the table. I am unsure if you can actually write an image to a table. When the item is deleted, I run an "exec" command to remove the actual file. Here's some snippets: The actual html to create the upload file text box within a form: INPUT type="file" name="picture" size=30 This is the code for the page that is called using the form action. I added a timestamp to the filename to avoid anyone accidentially overwriting a file. (and hacking - you know a picture of a naked lady where a picture of a garden rack is supposed to be): // Creates the image file with a timestamp $timestamp = time(); $image= $timestamp.$picture_name; exec("mv $picture /path/to/your/directory/$image"); The "exec" command is what you really want to pay attenetion to. Also, this example is assuming you are running Linux and MySQL. This is the delete routine that removes the file and the record from the table: //Remove File from server $sol_1 = "SELECT * FROM featured WHERE image = '$sell_record'"; $sol_result = myself_query($sol_1, $connection) or die ("SQL_RESULT"); $row = myself_fetch_array($sol_result) or die ("Couldn't execute $sol_1"); $image = $row["image"]; exec("rm $picture /path/to/your/directory/'$image'"); Please note that you must use the actual path to the directory, not the httpd path. I hope this helps you. Let me know. Shane - Original Message - From: "Kenneth R Zink II" [EMAIL PROTECTED] To: "PHP" [EMAIL PROTECTED] Sent: Friday, January 12, 2001 4:35 PM Subject: [PHP] How do I store a pic? How do I store a jpg within a table? I want for a user to be able to pull a jpg from either their HD and store it in a table with some other information for a classifieds section. That way when the ad is deleted, the picture goes with it instead of remaining on my HD. Kenneth R Zink II [EMAIL PROTECTED]ICQ# 5095094 '87 2.8L TBI GMC S-15 Ext. Cab (Hurricane) ...524 in the works !!! http://www.s-series.org/htm/windstorm/project-windstorm.htm '85 3.4L Carbed Chevy S-10 Blazer (FireStorm) ...Soon to be 3.4L SFI DIS !!! http://www.s-series.org/htm/firestorm/firestorm.htm Racing by the Grace of God!! -- 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-CVS] cvs: php4 /pear/XML Render.php
metallicFri Jan 12 15:01:19 2001 EDT Added files: /php4/pear/XML Render.php Log: Adding Render.php, which helps render documents from XML files. Index: php4/pear/XML/Render.php +++ php4/pear/XML/Render.php ?php /* vim: set expandtab tabstop=4 shiftwidth=4; */ // +-+ // | PHP version 4.0| // +-+ // | Copyright (c) 1997-2001 The PHP Group | // +-+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at| // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to| // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +-+ // | Authors: Sean Grimes [EMAIL PROTECTED]| // +-+ /** * Render class for rendering HTML. This class inherits * everything from XML_Parser, taking the variables that * were parsed and rendering the file appropriatly. * * @author Sean Grimes [EMAIL PROTECTED] */ class XML_Render extends XML_Parser { function Render_HTML() { } function _Render_HTML() { } function Open($file) { $fpointer = fopen($file, "w+"); } -- PHP CVS 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 Digest 13 Jan 2001 00:13:41 -0000 Issue 451
php-general Digest 13 Jan 2001 00:13:41 - Issue 451 Topics (messages 34235 through 34330): Urgent - Special Characters 34235 by: TV Karthick Kumar Re: Question 34236 by: Johan Holst Nielsen 34238 by: Cynic 34240 by: Johan Holst Nielsen Re: Urgent: Special Characters 34237 by: Cynic strange error 34239 by: Leon Mergen, BlazeNetwork 34241 by: Pavel Jartsev Re: Special Characters 34242 by: TV Karthick Kumar 34243 by: lists.www.mulga.com.au 34244 by: TV Karthick Kumar 34328 by: Alex Black Re: Limit image height/width on upload 34245 by: joe.jwebmedia.com Re: apache+php4 error .. 34246 by: John Meyerhofer 34271 by: Naresh Chafekar 34273 by: Naresh Chafekar Re: Session Help (transparent sid's) 34247 by: Pickup, Jordan upload _ safe_mode 34248 by: andreas \(.work\) 34270 by: Philip Olson Re: APC Alternative PHP Cache Release Announcement 34249 by: Michael Kimsal 34255 by: Monte Ohrt Problem with Exec() 34250 by: Jon Haworth Re: mixing HTML and PHP code 34251 by: MR 34256 by: MR 34257 by: Hrishi 34258 by: Antonio S. Martins Jr. 34276 by: Alex Black 34277 by: Alex Black 34279 by: Alex Black 34281 by: Alex Black 34283 by: Alexander Wagner 34287 by: Mark Maggelet 34290 by: Jade Ohlhauser 34291 by: MR 34297 by: MR 34298 by: Mark Maggelet 34300 by: Tim Zickus 34319 by: Alex Black 34320 by: Alex Black 34321 by: Alex Black 34324 by: Alex Black 34325 by: Alex Black Re: apple-macintosh 34252 by: Michael Stearne 34327 by: Alex Black GD graphics extension question 34253 by: Paul Trapnell IFX_CONNECT function 34254 by: Riccardo Vitella Is there a function to subtract dates 34259 by: Matthew Brealey 34261 by: Rasmus Lerdorf Sorting an array 34260 by: Matthew Brealey 34263 by: Monte Ohrt Question about phpinfo() and XML 34262 by: Noah Spitzer-Williams 34275 by: Moritz Petersen money data type cause problem in connection to Mssql7.0 34264 by: michael.smartemail.net 34266 by: Joe Stump Looking for a freeware PHP/MySQL classifieds script 34265 by: John Guynn 34267 by: Joe Stump 34269 by: John Guynn newbie 34268 by: Kenneth R Zink II PHP mungin $xx when returned from a DB. 34272 by: Cameron Watters -- List Subscriptions 34282 by: Cameron Watters -- List Subscriptions Re: APC Cache and eval() 34274 by: George Schlossnagle 34278 by: George Schlossnagle 34280 by: George Schlossnagle advise (MyCart) 34284 by: Jerry Lake session vars with recursive form 34285 by: bill 34286 by: Javier Muniz 34289 by: bill Re: ?= was born when? 34288 by: Jim Winstead on style (was mixing PHP and HTML code) 34292 by: DanO 34295 by: Mark Maggelet 34322 by: Alex Black odbc_* - MyODBC - MySQL 34293 by: Cynic Forms with Field Arrays and JavaScript 34294 by: Diego Fulgueira CodeCharge 34296 by: Jerry Lake How do I store a pic? 34299 by: Kenneth R Zink II 34329 by: Shane McBride WinHelp Documentation Uploaded 34301 by: Derick Rethans APC cache and Solaris 34302 by: George Schlossnagle mysql php4.04 and safe_mode 34303 by: andreas \(.work\) PHP 4.0.4pl1 as CGI 34304 by: Devin Atencio 34305 by: Devin Atencio HTTP_REFERER not giving proper results 34306 by: Chakravarthy K Sannedhi regex 34307 by: Jerry Lake 34308 by: Cynic 34310 by: Jerry Lake 34311 by: Cynic 34312 by: Steve Edberg 34314 by: Jerry Lake 34317 by: Cynic 34323 by: Jerry Lake Sessions 34309 by: Randy Johnson Script execution Speed 34313 by: Randy Johnson 34315 by: Cynic 34326 by: Alex Black Simple form not passing variables, Why?? 34316 by: jeff fitzmyers 34318 by: Cynic Templates 34330 by: PeterOblivion.aol.com Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Hi all, I have a problem while converting the string into upper case by using the strtoupper function. I want to convert the string which has some special characters in it. For example, med vnlig hlsning, Antnio etc. There are lots of strings / words with some special characters in it. It cannot be listed. As I want to convert them into upper case, I tried.strtoupper(hlsning), it's just converting it as:
[PHP] Templates
I looked around the web for templates and founf FastTemplates. Not exactly what i was looking for thoug lets say I have $file = "111" and there is a template "template.txt" and it contains "file #$file is blahlah" how can I make that a template? 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]
Re: [PHP] Dir Help PLEASE
? $value = substr($HTTP_HOST,0,strpos($HTTP_HOST,".")); if ($value == "sub") { include("sub/index.php"); } if ($value == "blabla") { include("blabla/index.php"); } if ($value == "andsoon") { include("andsoon/index.php"); } print "and so on .. there are more options for this"; print "remember that dns must set on * for www .."; ? -- If it can be dreamt, it can be build "Chris" [EMAIL PROTECTED] wrote in message 001f01c07c3b$fc965840$8a1412d1@chris">news:001f01c07c3b$fc965840$8a1412d1@chris... 2 things, first how do I give something the filepath of a folder that proceeded it? Also, how can I set up subdomains like sub.domain.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] APC bugfix release 1.0.2
This version fixes at least one show-stopper bug: * default values for class member data would cause the webserver to abort And there is a possible fix for the BC math library problems that some people have reported. APC now compiles on Solaris 8. Due to the severity of the class-related bug fixed in this version, APC v1.0 is now deprecated. We encourage you to download the new version from http://apc.communityconnect.com/download.html Thanks! Dan -- 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] regex
try this: $s = file( 'mylisting.txt' ); $r = "\\1\t\\2\t\\3" ; $p = '~^(.*)\040+(?=\d)(\d+-\d+)(?=\d)\040+(.*)$~Ui' ; you might want to limit the possible appearance of the phone numbers more strictly. At 00:44 13.1. 2001, Jerry Lake wrote the following: -- Bolgrihn Michael555-5566142 Hillyer St Oxford Bollenbach Gary V 555-5078315 Freedom Rd Oxford Bonaguidi Daniel555-5155N4663 10th Av Montello Bonnett Agatha John 555-5363547 Fawn Ct Oxford Bonnett Bernard Norma 555-4360116 E Ormsby St Oxford Bonnett Bob Eleanor 555-5627527 Fern Av Oxford Here is a sample from the listing there are numbers in the address as well. $NewString = ereg_replace("([[:alpha:]]+) ", "\\1".",", $test); that works to an extent, except that it adds the comma after every word that is followed by one space and not just the first occurance Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:41 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] regex looks like you need to find all the spaces _before_ the _first_ digit on the row, and _after_ the _last_ digit on the row. does that fit your data? are there no other numbers than the telephone ones? At 00:29 13.1. 2001, Jerry Lake wrote the following: -- I have a small phone directory bust the name listings are combined for example Schwartz Bob Amelia 555-1212Oxford Scirkin Bill555-1213Brooks I need to add a tab or a comma after the lastname so I can have as a separate field when I dump it into MySQL and there is about 3500 records and I'd hate to have to do it by hand any ideas? Jerry Lake- [EMAIL PROTECTED] -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:25 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: RE: [PHP] regex depends. is the set of strings preceeding the space limited and known, or is it something like [^abc]{3,12} ? At 00:13 13.1. 2001, Jerry Lake wrote the following: -- and how would I go about that? Jerry Lake -Original Message- From: Cynic [mailto:[EMAIL PROTECTED]] Sent: Friday, January 12, 2001 3:10 PM To: Jerry Lake; [EMAIL PROTECTED] Subject: Re: [PHP] regex yes At 23:54 12.1. 2001, Jerry Lake wrote the following: -- is it possible with regex to change one or more text characters followed by a space into the same characters followed by a tab? Jerry Lake -- 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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [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] --end of quote-- Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
Re: [PHP] mixing HTML and PHP code
Alex Black wrote: part of the point was for _PHP_ to be embedded html, in my opinion your It was created that way. It still is possible. Is can be quite handy, sometimes (or often, depends on what you do). That doesn't mean you have to use it. I'm not implying that there are rules etched in stone somewhere, but I am trying to prove a point, because I see many people making the "echo" mistake, which makes their otherwise great code much less useful. I have to admit that I generally prefer echo because it doesn't break the indentation of the PHP-code, and, uhm, I just don't like your way. It seems to be the other way around with you. EOT? BTW, this doesn't mean I _like_ echo. Code that uses templates tends to be very reusable, at least it is VERY easy to change the design. And if the design is done by a designer who doesn't know PHP, it may also be done faster. The code I have to maintain (single-handedly when it comes to html) for even very large stuff inside of binarycloud is pretty simple. Seems like we just have different needs here. Maybe if you have a badang-crap html editor :) Try using emacs, BBEdit, HomeSite, or any of the other quality editors out there. lol, ever seen a designer using emacs? my system does loops with php code. it is very important to note that that code need not be embeddedin the same file as the markup. for example, I need a "style" for an individual record coming out of a database. so I make that html, put a little function "tag" around it" ? fucntion hello($stuff) { ? font color="#99"b?=$stuff?/b/font ? } ? This is extremely ugly PHP with some readable HTML embedded. Since I tend to find HTML ugly as well... Never mind. That is an intentionally simplistic example, but you can obviously see that if a php coder tells the html coder "that bit of html is going to be looped for as many records as we get out of the database - they html coder should think accordingly. After all, we really aren't talking about "rocket science". Believe me, if you don't completely seperate logic and markup, most designers won't be able to edit your design freely without quite a bit of learning. I'm sure designers become more comfortable with "pure" HTML as it is found in templates. Well, our code runs a few sites now, all of which have completely different layouts. I mean, it would't be easy for a designer to change not only the look but also number and position of navbars on a site with your system, would it? Without touching your codebase (so that all your sites run the same code, they would become unmaintainable otherwise). Well, even if it wouldn't be that much of a problem, it still is easier with templates. As you admitted, doing it with templates is cleaner, on the HTML part. This can be important, if when you change layout often and have to work with designers. Of course, execution times are pretty slow (or worse, depending on complexity). As I said, a world of tradeoffs. Can we agree on that? Wagner -- One maniac alone can do what 20 together cannot -- 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] mixing HTML and PHP code
Alex Black wrote: Speaking as a not-pot-smoking mac-using only partially hippie web designer: why bother with creating your own syntax? why not just explain some _super_basic_ php syntax to the "html dude" and have him do the code himself? also, dreamweaver nicely ignores ? ? Actually, we (still) use this approach as well. But it certainly isn't as flexible as templates are. We (or our designers, to be exact) had more problems with this technique. With templates, changes on the layouts just ran smoother. regards Wagner -- One maniac alone can do what 20 together cannot -- 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] Problem with Exec()
First, make sure that sendmail is something the iUSR_machinename can run -- Just because you logged in as you can run it doesn't mean that the user that Apache/PHP is running as can run it. Next, forget about that goofy DOS backslash thing. Just use "/" for your paths. Finally, add the optional arguments to exec() exec("d:/sendmail/sendmail.exe -t -messagefile=d:/sendmail/msg.txt", $results, $error); while (list(,$line) = each($results)){ echo $line, "BR\n"; } if ($error){ echo "OS Error $error. Usually path/permissions.BR\n": } - Original Message - From: Jon Haworth [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, January 12, 2001 10:13 AM Subject: [PHP] Problem with Exec() Hello list, I'm having a problem with Exec and Sendmail, on PHP-4 running under Apache 1.3.14 on Windows NT. When I go to a DOS prompt and enter d:\sendmail\sendmail -t -messagefile=d:\sendmail\msg.txt it works fine. When I have any of the lines exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); $foo = exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); $foo = exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); all that happens is my PHP script times out. If I remove this line, everything works fine. I'm sure I'm missing something simple but I'm *very* tired. Any ideas? Cheers Jon -- 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] Problem with Exec()
It should also be noted that the system interaction functions (namely, passthru(), exec(), system() and popen()) are broken/incorrectly implemented, actually, its windows that's incorrectly implemented, but be that as it may, the functions do not work with windows). To the original poster: Use PHP's built-in mail() function instead, don't fork out to sendmail, actually, better yet, use linux :-). -Sterling Richard Lynch wrote: First, make sure that sendmail is something the iUSR_machinename can run -- Just because you logged in as you can run it doesn't mean that the user that Apache/PHP is running as can run it. Next, forget about that goofy DOS backslash thing. Just use "/" for your paths. Finally, add the optional arguments to exec() exec("d:/sendmail/sendmail.exe -t -messagefile=d:/sendmail/msg.txt", $results, $error); while (list(,$line) = each($results)){ echo $line, "BR\n"; } if ($error){ echo "OS Error $error. Usually path/permissions.BR\n": } - Original Message - From: Jon Haworth [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, January 12, 2001 10:13 AM Subject: [PHP] Problem with Exec() Hello list, I'm having a problem with Exec and Sendmail, on PHP-4 running under Apache 1.3.14 on Windows NT. When I go to a DOS prompt and enter d:\sendmail\sendmail -t -messagefile=d:\sendmail\msg.txt it works fine. When I have any of the lines exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); $foo = exec ("d:\sendmail\sendmail.exe -t -messagefile=d:\sendmail\msg.txt"); $foo = exec ("d:\\sendmail\\sendmail.exe -t -messagefile=d:\\sendmail\\msg.txt"); all that happens is my PHP script times out. If I remove this line, everything works fine. I'm sure I'm missing something simple but I'm *very* tired. Any ideas? Cheers Jon -- 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] ereg works in .php, not in .inc
Friends-- I have a script that processes another script for display. I change all variables named similar to "$Help1x1" to Help: The following line accomplishes this readily when used in a .php suffixed script when called directly from browser. $content = ereg_replace ("[\$]Help[0-9]x[a-z]? =", "STRONGHelp:/STRONG", $content); However, if I instead call a .php script that includes an .inc with this command, it doesn't work. If important, the entire script is below. Sometimes, the last two str_replace lines also fail from .inc. Is this something simple that I'm missing? Best, Ted ?php $fp = fopen("/usr/local/apache/php/Level1Questions.inc", "r"); $content = fread($fp, 10); $content = str_replace ("//", "", $content); $content = str_replace ("?php", "", $content); $content = str_replace ("?", "", $content); $content = str_replace ("**", "BRBR", $content); $content = str_replace ("Question:", "STRONGQuestion:/STRONG", $content); $content = str_replace ("Answer:", "STRONGAnswer:/STRONG", $content); $content = str_replace ("Answers:", "STRONGAnswers:/STRONG", $content); $content = str_replace ("@@@", "/STRONG/P", $content); $content = str_replace ("@@", "P align=centerSTRONG", $content); $content = str_replace ("++", "HR", $content); $content = ereg_replace ("[\$]Help[0-9]x[a-z]? =", "STRONGHelp:/STRONG", $content); $content = ereg_replace ("[\$]BigHelp[0-9]x[0-9] =", "STRONGTEXT:/STRONG", $content); echo "$content"; ? _ Ted Goranson Fusecap and Sirius-Beta, Virginia Beach USA 757/426-6704 [EMAIL PROTECTED] Symmetry Conference: http://www.isis-s.unsw.edu.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problem building php 3.0.18
Howdy- I'm having a slight problem when attempting to build php 3.0.18 First of all I'd like to say the rpm spec file I inherited for this is a mess- I may clean it up (likely start from scratch...), but the spec file I'm using isn't the issue. mod_php builds just dandy- but I get bad linking errors when attempting to build the calendar.so and crypt.so modules. here's the problem: cd dl ./setup make 'CFLAGS=-I/usr/include/apache -I. -I../' calendar.so crypt.so gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/calendar.o calendar/calendar.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/dow.o calendar/dow.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/french.o calendar/french.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/gregor.o calendar/gregor.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/jewish.o calendar/jewish.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/julian.o calendar/julian.c gcc -I/usr/include/apache -I. -I../ -DCOMPILE_DL=1 -c -o calendar/easter.o calendar/easter.c ld -o calendar.so calendar/calendar.o calendar/dow.o calendar/french.o calendar/gregor.o calendar/jewish.o calendar/julian.o calendar/easter.o ld: warning: cannot find entry symbol _start; defaulting to 08048080 calendar/calendar.o: In function `cal_jdtogreg': calendar/calendar.o(.text+0x29): undefined reference to `getParameters' calendar/calendar.o(.text+0x42): undefined reference to `convert_to_long' yada (more errors of same) This spec file is known to build php-3.0.16 no problem. The spec file build 3.0.18 if I comment out the attempts to build calendar.so and crypt.so- including all the other *so modules (mysql.so, pgsql.so, gd.so, yada yada) Issue happens on both glibc 2.2 (red hat 7.0) and glibc 2.1.3 (rh 6.2) Compiler on both is gcc 2.95.3, ld on RH7 is gnu ld 2.10.90 (not sure on rh6) Anyone know what the issue is? my spec file can be viewed at http://24.5.29.77/SPECS/mod_php3.spec if anyone cares to take a look. (NOTE- in that spec file, I currently have the problem areas commented out so it would build.) -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior Developer -- 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] Months...Problem..
try using the date_* functions in mysql its somewhere in the manual reference section, date and time functions. --- Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. - Original Message - From: "Dhaval Desai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 13, 2001 12:41 PM Subject: [PHP] Months...Problem.. Hiee! I am having a problem with months...count in a mysql database.. See what I want is 1st column will have the current date.. 2nd column will add 7 to the current date and store it. This will be for all the 12 months.. So I want the things to happen automatically..I mean one script which will check the months and automatically show output in html page where one columns as : Date when entry was made. Second Column Date when it expires = [Date when entry was made + 7] I really got confused..with this one..Coz When I get current date for the month of January as 30, the expire date becomes... 37. LOL [not logical,,perhaps bad programming on my part]; Help me out please.. Thanx! Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.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]
Re: [PHP] Months...Problem..
ok, here DATE_ADD(date,INTERVAL expr type) and here http://www.mysql.com/doc/D/a/Date_and_time_functions.html --- Yeah, there are more important things in life than money, but they won't go out with you if you don't have any. - Original Message - From: "Dhaval Desai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 13, 2001 12:41 PM Subject: [PHP] Months...Problem.. Hiee! I am having a problem with months...count in a mysql database.. See what I want is 1st column will have the current date.. 2nd column will add 7 to the current date and store it. This will be for all the 12 months.. So I want the things to happen automatically..I mean one script which will check the months and automatically show output in html page where one columns as : Date when entry was made. Second Column Date when it expires = [Date when entry was made + 7] I really got confused..with this one..Coz When I get current date for the month of January as 30, the expire date becomes... 37. LOL [not logical,,perhaps bad programming on my part]; Help me out please.. Thanx! Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.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]