Re: [PHP] about include
Hi, Marcos You can try something like this: / web root $SiteRootDir = "/home/httpd/mydomain"; / phorum directory $PhorumDir = "/phorum"; / libraries include $SiteRootDir.$PhorumDir."/common.php"; Felipe At 08:59 1/03/01 +, Marcos wrote: hi, everytime i add include function to a script it will answer like: Warning: Failed opening 'common.php' for inclusion (include_path='/usr/local/apache/htdocs:/home/httpd/mydomain') in /home/httpd/mydomain/h24h/foro/admin/index.php on line 23 and lines 22 and 25 have: chdir("/home/httpd/mydomain/phorum/"); include "common.php"; in php.ini i have this: include_path= "/usr/local/apache/htdocs:/home/httpd/mydomain" doc_root= user_dir= /usr/local/apache/htdocs ; extension_dir = ./ enable_dl = On after this, where should i put all my php files? can i put admin php files into other directories? any suggestions will be appreciated, thanks in advance, marcos lloret [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] ___ Felipe Fernndez Perera EPSILON ERIDANI http://www.epsilon-eridani.com mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How would you have liked to have invested in Yahoo when it was still a year old?
or eBay? Well, I missed it too. Now we all have the great opportunity not only to relive it but also to help usher the real Information Highway and be rewarded for our vision and courage! Our company, Internet Architecture, Inc. will offer free web contents: true beginning applications of the Information Highway utilizing the much wider bandwidth of Digital Subscriber Line (DSL) and cable modems, supported by the latest satellite technology. These will be cutting edge technologies in virtual reality and spatial navigation applications: (1) "What if ..." situations for business and other decision making applications. This will be done in conjunction with the state of the art in artificial intelligence and virtual reality; (2) Spatial Navigation of roadways/topography/weather several miles ahead of your trip. This will be done with the help of Geopositioning and Weather Satellites; (3) floor plans and other design utilities. We have just successfully presented for the first time to a group of investors in Florida and will continue our pilgrimage as explained below to solicit financing for cutting edge technologies in virtual reality and spatial navigation applications.. Watch for the announcement in our web site for a presentation close to you. This will give you a unique opportunity to network and prospect as well. We are now presenting in the Washington, D.C./Virginia areas in February and March, 2001. We can be reached at 703-204-9698 and 321-287-7280. Attached is my recent offer of the same Multimedia presentation to individuals in key cities along my way. If you or anybody you know in your area may be interested, please respond. Or feel free to transmit this e-mail to anybody who may be interested. --- --- To: Cc: Subject: Now that my associate, the brilliant Mr. Fred Servillon, and I have given a fairly successful inaugural presentation of our company, to a group of investors in Tampa, I have decided to begin my expedition. First to the Washington, D.C. and Virginia areas per invitation of Amos and Ate Emelina Camp (Ate Emelina, my first cousin, is the eldest among the Ragaza clan), to the New York/New Jersey areas, to Chicago, to Fort Madison, Iowa, per invitation of my second cousin Johnny and his lovely wife, Dr. Cristina Rabo, and finally to the Sunnyvale/Palo Alto/Santa Clara areas. I will be leaving Florida on Saturday, January 27, 2001. Can you possibly arrange to have another such presentation in your area. It will be a multimedia presentation using MS PowerPoint superimposed against the already money-making web site http://www.internetarchitecture.com/ It will be not only educational (history of the internet, our competition Yahoo*, a new organizational concept that is similar to the internet, a bird's eye view of project development - systems planning, systems analysis, ..., etc.) but also creatively enjoyable. In Tampa we had so much fun (and boisterous, belly-aching laughter at times**) investigating various ... what if ... situations and the audience was actually actively participating in the solution and spontaneous humor! * This is a compelling story about the little train that could ... or David and GOLIATH ... check our business plan for introducing the following unproven free contents: virtual reality and spatial navigation, the real beginnings of the information highway. ** For example, one of the attendees loved the pulsating heart in the logo at the top of the menu/index on the left. When we visited the Playboy store, one of the occupants in our virtual mall, another attendee (a well known community leader here) noticed that suddenly the heart stopped beating! GOD really appears in mysterious ways?! Just below is the formal invitation we sent to the attendees of our inaugural presentation in Tampa. --- I am wholeheartedly inviting each one of you to an introductory presentation of Internet Architecture, Inc. It will be held at 10 A.M., on Saturday, January 13, 2001, at Esther Gianan's house. In consonant with the high technology nature of our business, we will arrange to have a multimedia showing using MS PowerPoint and the Internet. This will be an exciting, let alone educational, affair for the people of a great city who gave me all the opportunities to be, therefore I am: 1. Beyond Yahoo! The true beginning of the Information Highway 2. Content providers are where the big money will be made 3. Internet Growth 4. The demise of Yahoo 5. The demise of eBay 6. BUSINESS PLAN 7. For the calendar year 2000 8. For the calendar year 2001 9. Local Area Network that will house the company's domain and enterprise system 10. Financial Projection 11. PLAN for such BOLD MISSION: Build Satellite Local Branches, a new
[PHP] variable scope -- unsetting vars inside functions
When a function finishes execution does it automatically clean up its local variables or should I manually unset() them? For example: function do_something() { $local_var = 'something really big...'; return true; } Does $local_var immediately vanish from existence when do_something finishes executing? Thanks! -- Michael A. Smith [EMAIL PROTECTED] Director of Data Systems, wcities.com ICQ: 35884415 :wq -- PHP General Mailing List (http://www.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 question about running JAVA classes on PHP scripts
Hi all, I've a problem with my php.ini file, running JAVA classes... What exactly should write in php.ini? I've JDK in /usr/local/jdk and PHP in /usr/local/php Tanks
Re: [PHP] PHP single user??
Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having a very strange problem: PHP 4.0.4 on a NT 4 platform with IIS 5 is only allowing one surfer to do a DB Select. If the DB is busy with the first user, the page is not available to other users. And I have no problems with Win 2K. Am I missing something very obvious? Umm...is IIS5 not Win2k -only-? -- Rick @ DomainsBuy.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] require on compressed files
On Wednesday 28 February 2001 22:58, you wrote: I am trying to get the expected behavior of: require("filename.gz"); or require("filename.bz2"); to work properly. Why do you want to do that? If that file is just a normal include file, compression just adds unneccessary overhead. If it's some file you don't know the contents of, don't include it (that would mean executing arbitrary code on your server) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) What luck for the rulers that men do not think. - Adolf Hitler -- PHP General Mailing List (http://www.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] Newbie question about running JAVA classes on PHP scripts
Federico Ragazzoni wrote: Hi all, I've a problem with my php.ini file, running JAVA classes... What exactly should write in php.ini? I've JDK in /usr/local/jdk and PHP in /usr/local/php Would you explain us, what does (or should) php.ini have to do with JAVA? Robert -- PHP General Mailing List (http://www.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] about include
On Thursday 01 March 2001 09:59, you wrote: hi, everytime i add include function to a script it will answer like: Warning: Failed opening 'common.php' for inclusion (include_path='/usr/local/apache/htdocs:/home/httpd/mydomain') in /home/httpd/mydomain/h24h/foro/admin/index.php on line 23 and lines 22 and 25 have: chdir("/home/httpd/mydomain/phorum/"); include "common.php"; The chdir doesn't affect include () in any way. It looks for "common.php" in the include path, i.e. /usr/local/apache/htdocs/common.php or /home/httpd/mydomain/common.php Writing include ('phorum/common.php') will work in your setup -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) What luck for the rulers that men do not think. - Adolf Hitler -- PHP General Mailing List (http://www.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] including html
hi, i would like to put all the content from a html file into a php. (like working with SSI) index.php include ('info.html) is this right? regards, marcos [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] including html
Marcos wrote: index.php include ('info.html) I think readfile($inputFileName); would be a better option. -- Regards, Harshdeep Singh Jawanda. -- PHP General Mailing List (http://www.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] File type not set
I'm uploading a file to my server, and I check the mime-type and file size before saving it. For some reason I get the file size, but not the file type. $userfile_type returns nothing and $userfile_size returns the correct size. This works just fine on another server where I have the same script so the problem is not in the browser. I'm running RedHat 7.0 with PHP rpm php-4.0.4pl1-3 Bug, feature or my fault? /Fredrik -- PHP General Mailing List (http://www.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] Need Function generating integers
In article Pine.LNX.3.96.1010301102752.419D-10@localhost, [EMAIL PROTECTED] ("M. A. Ould-Beddi") wrote: I need a sequence of small integers for primary keys in mysql tables; I want php to generate them. How can I do that? A sequence of integers for the primary of a table in a mysql database Mind if I ask why you don't want to use let mysql do that by assigning "auto_increment" to the field? -- CC -- PHP General Mailing List (http://www.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: mail setup in php.ini
Hi all, I have a simple form that seems to do everything except send the mail and it's not even returing TRUE from mail() anymore. I'm pretty sure there's a problem with our smtp server since we're using our ISP's smtp to send mail from usually so I've tried setting SMTP to that outside server in the php.ini but should it be the IP address or what? This is the error I'm getting: Warning: Failed to Connect in D:\Cryptic\pages\forms\contact_form.php Thanks for your help, Mat -- PHP General Mailing List (http://www.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] iptcembed
Hi ! Anybody having a clue, about how to use iptcembed () !! And by the way the iptcparse() function dowsnot pick up the image URL .. Mathur -- PHP General Mailing List (http://www.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] get html-page
Hi! I have a php-script, that gets a HTML-Page, parses it and print some information on this page! 'file("http:// ...")' doesn't work on my server, so I use 'fsockopen($host,$port)' which works fine! Now I migratet my scripts to another free-ISP, and there both methods fail! - What can I try else? - What is the reason, why they don't work? thanks michi -- 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]
Re: [PHP] including html
On Thu, 1 Mar 2001, Marcos wrote: hi, i would like to put all the content from a html file into a php. (like working with SSI) index.php include ('info.html) is this right? regards, marcos [EMAIL PROTECTED] ?php include "page.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] images problem
i uses the following method to display an image draw from database.. set_magic_quotes_runtime(0); $query = "select diagram from $QuestTab where qns_id = '$QnsID'"; $result = @MYSQL_QUERY($query); $data = @MYSQL_RESULT($result,0, "diagram"); Header("Content-type: image/png"); print $data; set_magic_quotes_runtime(get_magic_quotes_gpc()); / i have problem getting the images size dose anyone know? i had tried almost all ways i know of.. to using images functions from the GD lib.. john -- PHP General Mailing List (http://www.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/mnogosearch php_mnogo.c
gluke Thu Mar 1 03:38:17 2001 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c Log: Added UdmFreeEnv call to mnoGoSearch link list destructor to free memory allocated for environment. Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.18 php4/ext/mnogosearch/php_mnogo.c:1.19 --- php4/ext/mnogosearch/php_mnogo.c:1.18 Fri Feb 23 02:34:49 2001 +++ php4/ext/mnogosearch/php_mnogo.cThu Mar 1 03:38:17 2001 @@ -1,5 +1,5 @@ /* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.18 2001/02/23 10:34:49 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.19 2001/03/01 11:38:17 gluke Exp $ */ /* +--+ @@ -140,6 +140,7 @@ static void _free_udm_agent(zend_rsrc_list_entry *rsrc){ UDM_AGENT * Agent = (UDM_AGENT *)rsrc-ptr; + UdmFreeEnv(Agent-Conf); UdmFreeAgent(Agent); } @@ -325,7 +326,7 @@ Env=UdmAllocEnv(); UdmEnvSetDBAddr(Env,dbaddr); UdmEnvSetDBMode(Env,dbmode); - Agent=UdmAllocAgent(Env,0,UDM_OPEN_MODE_READ); + Agent=UdmAllocAgent(Env,0,UDM_OPEN_MODE_READ); ZEND_REGISTER_RESOURCE(return_value,Agent,le_link); } -- 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] Restrict Access per IP Addresses
Thank you for the script, but it is not clear for me :-) i'm a beginner in PHP ! This script accept all range IP for every domain, but me i need to determine only a range IP for select domains. Users will be connect by my network, so they have an IP give by the network. Example (because i don't speak english very well !) : there are 3 networks, each of them have a mask : (it is not necessary to know these parameters i think !) 198.143.15.255 (255.255.255.0) 202.139.84.255 (255.255.255.128) 210.176.142.255 (255.255.255.192) When a user will connect, his IP will be between 198.143.15.0 and 198.143.15.255 or between 202.139.84.0 and 202.139.84.255 or between 210.176.142.0 and 210.176.142.255 So if someone else connect without using my network, the system disallow him and redirect in 403 Page. To resume : - Users will be accept by the system if they will use my network. - Others will be redirect in 403 Page. - So i must check there IP Addresses and authorize them or not to enter in the member area in fontion of there IP ! Thanks for every solutions ! Byebye @+ Anthony. [snip] well i have a problem, i try make an authentication per range IP Address like : from 194.195.196.0 to 194.195.196.255 but it doesn't work, except if i make an authentication for only one IP Address. I tried to make with "LOOP" and "WHILE" tag, but i got the problem everytime ! This is the last example script i made with two domains which accept only the range IP Address for each : ?php $host = getenv("REMOTE_ADDR"); $ip = range(0,255); if ($host != "194.195.196.($ip)) if ($host != "195.196.197.($ip)) [snip] Salut Anthony, you may check if an address is within a certain network/subnet, you need to compare each octet. For example: Address 192.168.11.212 Network 192.168.12.255 Mask 255.255.255.0 192 255 = 192 192 255 = 192 OK 168 255 = 168 168 255 = 168 OK 11 255 = 11 12 255 = 12 NOT WITHIN SUBNET I've put this together in this littel test form: [snip] ?php function contains_ip($network, $snmask, $address) { if (!is_array($network)) $network = explode(".", $network); if (!is_array($snmask)) $snmask = explode(".", $snmask); if (!is_array($address)) $address = explode(".", $address); for ($i=0; $i4; ++$i) { $a = $address[$i]*1; $m = $snmask[$i]*1; $n = $network[$i]*1; $m1 = $a $m; $m2 = $n $m; if (($a $m) != ($n $m)) return false; } return true; } if ($network $subnet $address) $result = contains_ip($network, $subnet, $address); ? html body ?php if (isset($result)):? h4?=$address? is?php if(!$result):? inot/i?php endif;? contained in ?=$network?, mask ?=$subnet?/h4 ?php endif;? form Enter Address: input type="text" name="address" value="?=$address?"br Enter Network: input type="text" name="network" value="?=$network?"br Enter Subnetmask: input type="text" name="subnet" value="?=$subnet?"br input type="submit" /form /body /html [snip] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] whats the message count ?
hi.. i have 2 small questions 1. is there somehting like an archive since the verry first mail here ? 2. i can order "old" mails from the script who managed this folder right ? but i need to say what number i want.. like i want number 499-550 .. so my question what number do we have actually ? (i suppose it started with one, but where are we right now?) markus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP and iPlanet on Solaris
Figured it out, it the reference for php4_execute service needs to be higher up in the file. evan -Original Message- From: Montgomery-Recht, Evan [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 9:33 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP and iPlanet on Solaris I got the latest snapshot of php to compile on solaris (4.0.4pl1 wouldn't). Anyways I edited the mime.types and obj.conf as described in the installation instructions, but right now it's trying to download the test.php file I created instead of processing. Is there anything not in the documentation that I need to add. thanks, evan -- PHP General Mailing List (http://www.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] whats the message count ?
hi, 1. http://marc.theaimsgroup.com/?l=php-general 2. will be there too i think Kees -Oorspronkelijk bericht- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Namens Markus H. Maussner Verzonden: Thursday, March 01, 2001 12:52 PM Aan: [EMAIL PROTECTED] Onderwerp: [PHP] whats the message count ? hi.. i have 2 small questions 1. is there somehting like an archive since the verry first mail here ? 2. i can order "old" mails from the script who managed this folder right ? but i need to say what number i want.. like i want number 499-550 .. so my question what number do we have actually ? (i suppose it started with one, but where are we right now?) markus -- PHP General Mailing List (http://www.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] Export Linux Users and Password's to MYSQL database
Hi All, Is there a way I can export the users in my Linux machine to a mysql database. Together with their passwords without manually entering all of them. I will appreciate any input. Thanks in advance, Joe Njeru Nairobi, Kenya. "Where the sun shines all day!!" -- PHP General Mailing List (http://www.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] found a bug with File Uploads..
after hunting a little more it appears that apache adds a 'content-type: blabla" at the start of the file. Php just copies the already corrupted file ... any clues on how to fix that ? -- Thierry TABARD Digital Sound Planet http://www.digitalsoundplanet.com ""TTT"" [EMAIL PROTECTED] wrote in message 97jdcm$9ja$[EMAIL PROTECTED]">news:97jdcm$9ja$[EMAIL PROTECTED]... Hi , in fact it doesn't do much ( at least on the couple browser I tested it) : whatever you put as a limit the file will upload ... this is a p.. in the a... because if you do the check on the server it can only be done when the upload is complete : pretty unfair to tell the user that he has no more space when he spent 20 minutes uploading a file ( we use audio files and they might be fairly big) but apart from that I recently upgraded to 4.04pl1 and I have the same problem (which didn't happen before) that is described by Dhaval , running on Linux (RHT 7.0 with plenty'o patch ... , Apache 1.3.14) ... changing the max file size doesn't do much :-( the uploaded file seems to have 'type multipart...' and other junk caracters added at the beginning of the file after the copy (which returns a success error code !!!) it seems to be a bug in 4.04pl1 help -- Thierry TABARD Digital Sound Planet http://www.digitalsoundplanet.com ""Chris Lee"" [EMAIL PROTECTED] wrote in message 97jbpe$m17$[EMAIL PROTECTED]">news:97jbpe$m17$[EMAIL PROTECTED]... try droping the max_file_size entry, does it help? I run on linux and my file uploads work from all browsers but opera. input type=hidden name='MAX_FILE_SIZE' value='10' is a silly thing php has added, the only purpose I could ever see for this is to prevent people from uploading 3G files, but if this is the case, should the security not be server side, vs client side? as you mentioned, modify php.ini to change your limit. does anyone know another use for this ? -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Dhaval Desai" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi! I think I just found a bug in php. I try to upload a file of size 37.0 K and you know what happens.,, The browser takes its own time..and the stupid thing doesnot upload the file. If I upload a file of size 2k then it uploads.. I have specified the file size in the form as : FORM ENCTYPE="multipart/form-data" ACTION="upload.php" METHOD="POST" INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="10" In Php.ini file I have found 8M is the maximum size.. I am running php 4.0.3pl1 wioth Apache on Windows 98. I also have a server on Cqhost.com I have seen the same happen there,.too... Is this a bug or a problem..?? Please Reply Cheers!~ 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] -- PHP General Mailing List (http://www.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] Export Linux Users and Password's to MYSQL database
On Thursday 01 March 2001 17:37, Joe Njeru wrote: Hi All, Is there a way I can export the users in my Linux machine to a mysql database. Together with their passwords without manually entering all of them. the passwords are usually encrypted and stored in /etc/passwd or /etc/shadow you'll have to make a script that takes values from here and stores them in the DB. these passwords cannot usually be decrypted, so for verification/validation you will have to use the same encryption algorithm on the password that the users have sent and compare this with the encrypted key. I will appreciate any input. Thanks in advance, Joe Njeru Nairobi, Kenya. "Where the sun shines all day!!" -- PHP General Mailing List (http://www.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] Javascript and Php
Hi! I'd like to include an inc file once a button id cliked! I tried calling that function: function more() { ?php include "sessions.inc"; ?; // var f=?php include "sessions.inc"; ?; document.form1.action="formhtl_rd.html";document.form1.submit(); } but it fails! Any idea Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP on NetWare
Hi, Can you please let me know whether anyone is working on PHP for NetWare Web server (Apache/Enterprize)? Rgds, Surendra -- PHP General Mailing List (http://www.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] Need Function generating integers
Use MySQL's autoincrement ? Miles At 10:29 AM 3/1/01 +, M. A. Ould-Beddi wrote: I need a sequence of small integers for primary keys in mysql tables; I want php to generate them. How can I do that? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] strange think with 'mail()' [sendmail?]
Hy leuts i got a strange problem and hope someone knows a solution or a hint i send a mail in a absenden.php3 like this: mail("[EMAIL PROTECTED]","subjekt","inhalt", "Content-Type: text/html\nFrom: [EMAIL PROTECTED]"); the mail reaches me, is readable, but on the next time i start netscape its GONE ? I tryed some other header pieces, but all get the same effekt. does anyone know a reason ? i think the code is quite simple - maybe a problem with senmail? i hope for answers befor my brain goes to the same place where my mails go thanks
[PHP] strange think with 'mail()'
Hy leuts i got a strange problem and hope someone knows a solution or a hint i send a mail in a absenden.php3 like this: mail("[EMAIL PROTECTED]","subjekt","inhalt", "Content-Type: text/html\nFrom: [EMAIL PROTECTED]"); the mail reaches me, is readable, but on the next time i start netscape its GONE ? I tryed some other header pieces, but all get the same effekt. does anyone know a reason ? i think the code is quite simple - maybe a problem with senmail? i hope for answers befor my brain goes to the same place where my mails go thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Export Linux Users and Password's to MYSQL database
Depends. say you are wanting to put the passwords from your servers passwd file, you would only be able to export the encrpypted passwords, since they are one-way encrypted. you will not be able to store plain text passwords in the db from your passwd file through importing it. if you want to do that the best way is to send a mass email to the users, sending the to a link with some scripting, having them enter their password. the scripting with take the inputed password, then encrypt it and compare it against the passwd file. if it's a match it would insert the users password in the mysql users table. people like to use plain text passes in db's either because they want to be able to send their users their passes in the email incase they are forgotten or other functions that require a plain text password to be displayed, or maybe laziness =). encrypting is better security wise, for a number of reasons. mainly are threats from both your remote code hacker, and anyone with an account on the system, not to mention admins and employees. do a password hint and/or question (allowing the user to change his pass incase he forgets it). it may not be possible or neccessarily needed for all applications, but those with sensitive information should always be encrypted. -Original Message- From: Joe Njeru [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 5:08 AM To: [EMAIL PROTECTED] Subject: [PHP] Export Linux Users and Password's to MYSQL database Hi All, Is there a way I can export the users in my Linux machine to a mysql database. Together with their passwords without manually entering all of them. I will appreciate any input. Thanks in advance, Joe Njeru Nairobi, Kenya. "Where the sun shines all day!!" -- PHP General Mailing List (http://www.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] strange think with 'mail()'
mail("[EMAIL PROTECTED]","subjekt","inhalt", "Content-Type: text/html\nFrom: [EMAIL PROTECTED]"); the mail reaches me, is readable, but on the next time i start netscape its GONE ? I tryed some other header pieces, but all get the same effekt. What do the headers look like when it arrives? I suspect it disappears because they are screwed up. I would seperate them with '\r\n' instead of just '\n'. -- PHP General Mailing List (http://www.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] changing the .ini file
Hi, Surely you don't have to re-boot the server (NT/IIS) when you change the .ini file??!! I'm trying to change the SMTP value but when I do, my phpinfo() page still lists the old one. And that'll be why my forms don't work! ;o) I've stopped and started the website to no avail, what should I do? ta Mat -- PHP General Mailing List (http://www.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/mnogosearch php_mnogo.c php_mnogo.h test.php
gluke Thu Mar 1 05:26:25 2001 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c php_mnogo.h test.php Log: Udm_Get_Doc_Count function from mnoGoSearch 3.1.11 has been added. mnoGoSearch library version printing in phpinfo() has been added. Example updated. Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.19 php4/ext/mnogosearch/php_mnogo.c:1.20 --- php4/ext/mnogosearch/php_mnogo.c:1.19 Thu Mar 1 03:38:17 2001 +++ php4/ext/mnogosearch/php_mnogo.cThu Mar 1 05:26:25 2001 @@ -1,5 +1,5 @@ /* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.19 2001/03/01 11:38:17 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.20 2001/03/01 13:26:25 gluke Exp $ */ /* +--+ @@ -117,6 +117,10 @@ PHP_FE(udm_free_res,NULL) PHP_FE(udm_free_agent, NULL) + +#if UDM_VERSION_ID 30110 + PHP_FE(udm_get_doc_count, NULL) +#endif {NULL, NULL, NULL} }; @@ -275,8 +279,13 @@ DLEXPORT PHP_MINFO_FUNCTION(mnogosearch) { + char buf[32]; + php_info_print_table_start(); php_info_print_table_row(2, "mnoGoSearch Support", "enabled" ); + + sprintf(buf,"%d", UDM_VERSION_ID); + php_info_print_table_row(2, "mnoGoSearch library version", buf ); php_info_print_table_end(); } @@ -1033,6 +1042,33 @@ RETURN_STRING(UdmDBErrorMsg(Agent-db),1); } /* }}} */ + + +#if UDM_VERSION_ID 30110 +/* {{{ proto int udm_get_doc_count(int agent) + Get total number of documents in database */ +DLEXPORT PHP_FUNCTION(udm_get_doc_count) +{ + pval ** yyagent; + UDM_AGENT * Agent; + int id=-1; + + switch(ZEND_NUM_ARGS()){ + case 1: { + if (zend_get_parameters_ex(1, yyagent)==FAILURE) { + RETURN_FALSE; + } + } + break; + default: + WRONG_PARAM_COUNT; + break; + } + ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, id, "mnoGoSearch-Agent", +le_link); + RETURN_LONG(UdmGetDocCount(Agent)); +} +/* }}} */ +#endif #endif Index: php4/ext/mnogosearch/php_mnogo.h diff -u php4/ext/mnogosearch/php_mnogo.h:1.6 php4/ext/mnogosearch/php_mnogo.h:1.7 --- php4/ext/mnogosearch/php_mnogo.h:1.6Fri Feb 23 02:34:49 2001 +++ php4/ext/mnogosearch/php_mnogo.hThu Mar 1 05:26:25 2001 @@ -1,5 +1,5 @@ /* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.h,v $ */ -/* $Id: php_mnogo.h,v 1.6 2001/02/23 10:34:49 gluke Exp $ */ +/* $Id: php_mnogo.h,v 1.7 2001/03/01 13:26:25 gluke Exp $ */ /* +--+ @@ -27,6 +27,9 @@ #if HAVE_MNOGOSEARCH +#include udm_config.h +#include udmsearch.h + extern zend_module_entry mnogosearch_module_entry; #define mnogosearch_module_ptr mnogosearch_module_entry @@ -64,6 +67,10 @@ DLEXPORT PHP_FUNCTION(udm_free_res); DLEXPORT PHP_FUNCTION(udm_free_agent); + +#if UDM_VERSION_ID 30110 +DLEXPORT PHP_FUNCTION(udm_get_doc_count); +#endif #else Index: php4/ext/mnogosearch/test.php diff -u php4/ext/mnogosearch/test.php:1.14 php4/ext/mnogosearch/test.php:1.15 --- php4/ext/mnogosearch/test.php:1.14 Fri Feb 23 02:53:06 2001 +++ php4/ext/mnogosearch/test.php Thu Mar 1 05:26:25 2001 @@ -1,6 +1,6 @@ !-- $Source: /local/repository/php4/ext/mnogosearch/test.php,v $ -$Id: test.php,v 1.14 2001/02/23 10:53:06 gluke Exp $ +$Id: test.php,v 1.15 2001/03/01 13:26:25 gluke Exp $ -- html @@ -23,6 +23,8 @@ // DBMode is optional, "single" by default $udm=Udm_Alloc_Agent("mysql://udm:udm@localhost/udm/",'single'); + + print "Total number of urls in database: ".Udm_Get_Doc_Count($udm)."br\n"; // Stage 2: set search parameters -- 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] Newbie question about running JAVA classes on PHP scripts
try this article: http://www.phpbuilder.com/columns/marknold20001221.php3 though i must admit i couldn't get it to work on windows. - Original Message - From: Federico Ragazzoni [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 9:24 AM Subject: [PHP] Newbie question about running JAVA classes on PHP scripts Hi all, I've a problem with my php.ini file, running JAVA classes... What exactly should write in php.ini? I've JDK in /usr/local/jdk and PHP in /usr/local/php Tanks -- PHP General Mailing List (http://www.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] Hebrew websites transition with php3 ..
On Thursday 01 March 2001 09:17, Boaz Yahav wrote: I think that Aviv should stick to logical hebrew (which is the standart, as mentioned by Boaz). I don't use IE (I'm using Linux) and I can access all the logical sites with no problem, including the "html dir=rtl" tag and the 'direction: rtl' style (thank god for konqueror). Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble there, and if Opera wants to gain market share they shold support the standart (logical) in here to. Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) , the majority of users in Israel are using IE. One more problem you'll have with visaul hebrew is the ugly line breaks which cause the end of the sentence to appear before the start of it. I had a long discussion of this subject with Manuel off this mailing list. I can send you a digest of it if you wish. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd Hi Manuel, All is great, working hard to make WeberDev.com a better place for the community and trying to make people understand we don't make $$$ from it :) The IE / NN war was one that left no chance for NN in Israel. While MS spent millions in making all of their products in Hebrew, including the free IE, NN refused to support Hebrew. While the 3% is correct for Israel, it's far from being true on an international basis. There are 3 large portals in Israel, 1 supports only IE (MSN), and the other two that supported NN, until not long ago, started to develop for IE only about 4-6 months ago. This is why there is no reason to support anything other than IE in Israel. With all due respect to people that like other browsers, developing for all browsers costs lots of $$$ and as long as portals are free and loosing lots of $$$ it's not profitable to develop for all. Bottom line, as the CTO of one of those portals I say go with Logical Hebrew and dump Netscape (In Israel Only). and don't forget to add the HTML DIR="rtl" tag at the beginning of each page. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 10:51 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Hebrew websites transition with php3 .. Hello Boaz, How are you doing these days? :-) On 28-Feb-01 16:39:35, you wrote: The figures I'm giving you are from one of the two biggest portals in Israel. it's less than 3%. Mind me for jumping in, but I think Aviv question about the truth of the 3% figure ie very pertinent. The way I see it it is a gross mistake to assume that the audience of a large portal is necessary a reflex of the potential audience of that portal. I also work for a large portal company (not for the Hebrew audience though) and I found people making the same large mistake. They looked at the sites audience and figure that there is over 90% of Internet Explorer users in a site that used IE specific DHTML. Needless to say that it didn't show right in Netscape. Given that sites do not show right in certain browsers, it looks obvious that almost nobody using those browsers would show in the browser audience rates. I even wonder why there are still 3% of users of browsers that do not support logical Hebrew display that go to your portal. Same for the 10% of Netscape users that go to that other site in my company portal. Maybe those are just lurkers that went there and gave up on the site and did not return because they could not see right what was in there. The reality is that it turns out that there is still about 30% os Netscape users, meaning that if you force a certain type of display that they don't see right, you loose their audience. Just my .02 EUR. :-) Manuel Lemos I'm not sure about Opera, if you are developing for an Israeli audience, you can simply develop for IE 4.x and up. anyone with any other browser can go and get IE :) -Original Message- From: Aviv Revach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 4:03 PM To: Boaz Yahav; [EMAIL PROTECTED] Subject: RE: [PHP] Hebrew websites transition with php3 .. Hey! Thank you for the quick reply. I do have some questions regarding your answer. From what I know and have seen so far, there are more than just 3% Internet users in Israel which use Netscape 4.x (I use it myself...). Are you sure that I should just ignore these people, and just use logical Hebrew? Also, quite a lot of people started using Opera lately.. (ain't speaking about Israeli users). Does Opera supports Logical Hebrew? If so, from which version? Best Regards - Aviv Revach At 15:20 28/02/01 +0200, Boaz Yahav wrote: Hi Aviv Let me give you a small tip about Hebrew on the net. The proper Hebrew code which was adopted by the Israeli Institute of
[PHP] security improvements
Would it be a good features if php had all programs executed with system,exec,passthrouth and `program_name` wrapped by apache suexec ? What you think about that ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] RE: How to insert time and date into mysql?
Why not use the CURDATE() and CURTIME() functions built into mysql? Kevin Cawthorne - Original Message - From: "Foley, John" [EMAIL PROTECTED] To: "'Zenith'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 2:20 PM Subject: [PHP] RE: How to insert time and date into mysql? I have an application that serializes uploaded files by datetime of upload. This may not be the most efficient, but this will yield a MySQL DATETIME type string: $datetime = date("YmdHis"); If you are looking for a DATE column and a TIME column seperately (not recomended . . . use logic to parse the TIME and DATE parts of a DATETIME column) thet you will need to use $myDate = date("Ymd"); file://year,month,day with preceeding zeros $myTime = date("His"); file://hours,minutes,seconds with preceeding zeros I have not checked the documentation for these: check the DATE and TIME column type requirements in MySQL, and the date() function in PHP. Obviously, make sure your MySQL column data type is DATETIME, and that you single quote the $datetime value since it's considered text. Here is my SQL string: $sql="INSERT INTO $docMaster ( sqDocID, sqUID, sqSubmitDate, sqDocAnon, sqRequestID, sqHostID, sqTitle, sqCopies, sqOptionStr, sqFileName, sqDocType, Fsize, ppFsize ) VALUES( NULL, $uid, '$datetime', '$Anon', '$request_id', $sqHostID, '$title', $copies, '$option_list', '$file', '$DocType', $Fsize, $tmpFsize )"; It should be obvious by now that I am making a PHP4/CGI shell script LP print filter. This filter intercepts incoming print streams, then converts postscript to PDF or compresses PCL, moves the result to a controlled directory structure, and then logs to database. A little Apache with PHP with MySQL later, and I have a hands-off paperless queueing system. I love OpenSource! Any interest from the PHP community in seeing this effort released? I'm developing on Solaris for production use on Solaris, and have noted some incompatabilities with Linux, FWIW. John T. Foley Network Administrator Pollak Engineered Products, Actuator Products Division, A Stoneridge Company 195 Freeport Street, Boston MA 02122 ph: (617) 474-7266fax: (617) 282-9058 The geographical center of Boston is in Roxbury. Due north of the center we find the South End. This is not to be confused with South Boston which lies directly east from the South End. North of the South End is East Boston and southwest of East Boston is the North End. -Original Message- From: Zenith [SMTP:[EMAIL PROTECTED]] Sent: Monday, February 28, 2000 1:16 PM To: [EMAIL PROTECTED] Subject: How to insert time and date into mysql? How can I insert time and date into mysql table, if the table i have to insert has a field of type time, and a field of type date. Then how can I insert it in PHP, if I use time() function?? -- PHP General Mailing List (http://www.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] PostgreSQL vs InterBase
On Wednesday 28 February 2001 06:19, [EMAIL PROTECTED] wrote: Arnold Gamboa wrote: I hve heard a great deal about InterBase. Please comment on which is better: 1. Speed 2. Data Reliability 3. Compatibility with PHP Thanks for your comments. -- 1. I think Postgresql 2 and 3 I can't say which is better. Both seem to work ok - you might want to search for postgresql and persistent connections in the archives - seems they aren't perfect yet. I use both of the databases (Interbase 6.01 and PostgreSQL 7.1beta4). PostgreSQL has more features comapared to Interbase (the procedureal language is very robust and there are many datatyps to choose from. Also you can have some kind of object support in it to inherit tables for example), but it's windows implemenation is very hard (at least for me, I like to compile it). As for speed both are very fast (even when compared to commerical DB, in my tests the deafult install of Interbase outperfomed the default install of Oracle 8i about 10X, tested on P166 with 96MB and PII400 with 192MB). -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP General Mailing List (http://www.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] Hebrew websites transition with php3 ..
Hey! Ok, I think that I will stick to logical Hebrew as most of you suggested. But still, I'm interested in knowing how could I take a HTML document which contains HTML tags, Hebrew words and English words, and reveres only the Hebrew words (making them Visual Hebrew) using only php3 functions (the server I'm using doesn't support php4). It would be great if anyone could point of a solution for doing that. By writing a script that will do that, I will both options - show the Hebrew in my website as Logical or use a script to translate it into visual Hebrew for browsers who do not support it. Thank you in advance - Aviv Revach At 16:45 01/03/01 +0200, Meir kriheli wrote: On Thursday 01 March 2001 09:17, Boaz Yahav wrote: I think that Aviv should stick to logical hebrew (which is the standart, as mentioned by Boaz). I don't use IE (I'm using Linux) and I can access all the logical sites with no problem, including the "html dir=rtl" tag and the 'direction: rtl' style (thank god for konqueror). Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble there, and if Opera wants to gain market share they shold support the standart (logical) in here to. Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) , the majority of users in Israel are using IE. One more problem you'll have with visaul hebrew is the ugly line breaks which cause the end of the sentence to appear before the start of it. I had a long discussion of this subject with Manuel off this mailing list. I can send you a digest of it if you wish. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd Hi Manuel, All is great, working hard to make WeberDev.com a better place for the community and trying to make people understand we don't make $$$ from it :) The IE / NN war was one that left no chance for NN in Israel. While MS spent millions in making all of their products in Hebrew, including the free IE, NN refused to support Hebrew. While the 3% is correct for Israel, it's far from being true on an international basis. There are 3 large portals in Israel, 1 supports only IE (MSN), and the other two that supported NN, until not long ago, started to develop for IE only about 4-6 months ago. This is why there is no reason to support anything other than IE in Israel. With all due respect to people that like other browsers, developing for all browsers costs lots of $$$ and as long as portals are free and loosing lots of $$$ it's not profitable to develop for all. Bottom line, as the CTO of one of those portals I say go with Logical Hebrew and dump Netscape (In Israel Only). and don't forget to add the HTML DIR="rtl" tag at the beginning of each page. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 10:51 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Hebrew websites transition with php3 .. Hello Boaz, How are you doing these days? :-) On 28-Feb-01 16:39:35, you wrote: The figures I'm giving you are from one of the two biggest portals in Israel. it's less than 3%. Mind me for jumping in, but I think Aviv question about the truth of the 3% figure ie very pertinent. The way I see it it is a gross mistake to assume that the audience of a large portal is necessary a reflex of the potential audience of that portal. I also work for a large portal company (not for the Hebrew audience though) and I found people making the same large mistake. They looked at the sites audience and figure that there is over 90% of Internet Explorer users in a site that used IE specific DHTML. Needless to say that it didn't show right in Netscape. Given that sites do not show right in certain browsers, it looks obvious that almost nobody using those browsers would show in the browser audience rates. I even wonder why there are still 3% of users of browsers that do not support logical Hebrew display that go to your portal. Same for the 10% of Netscape users that go to that other site in my company portal. Maybe those are just lurkers that went there and gave up on the site and did not return because they could not see right what was in there. The reality is that it turns out that there is still about 30% os Netscape users, meaning that if you force a certain type of display that they don't see right, you loose their audience. Just my .02 EUR. :-) Manuel Lemos I'm not sure about Opera, if you are developing for an Israeli audience, you can simply develop for IE 4.x and up. anyone with any other browser can go and get IE :) -Original Message- From: Aviv Revach [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 4:03 PM To: Boaz Yahav;
[PHP] Restrict Access per IP Addresses
Thank you for the script, but it is not clear for me :-) i'm a beginner in PHP ! This script accept all range IP for every domain, but me i need to determine only a range IP for select domains. Users will be connect by my network, so they have an IP give by the network. Example (because i don't speak english very well !) : there are 3 networks, each of them have a mask : (it is not necessary to know these parameters i think !) 198.143.15.255 (255.255.255.0) 202.139.84.255 (255.255.255.128) 210.176.142.255 (255.255.255.192) When a user will connect, his IP will be between 198.143.15.0 and 198.143.15.255 or between 202.139.84.0 and 202.139.84.255 or between 210.176.142.0 and 210.176.142.255 So if someone else connect without using my network, the system disallow him and redirect in 403 Page. To resume : - Users will be accept by the system if they will use my network. - Others will be redirect in 403 Page. - So i must check there IP Addresses and authorize them or not to enter in the member area in fontion of there IP ! Thanks for every solutions ! Byebye @+ Anthony. [snip] well i have a problem, i try make an authentication per range IP Address like : from 194.195.196.0 to 194.195.196.255 but it doesn't work, except if i make an authentication for only one IP Address. I tried to make with "LOOP" and "WHILE" tag, but i got the problem everytime ! This is the last example script i made with two domains which accept only the range IP Address for each : ?php $host = getenv("REMOTE_ADDR"); $ip = range(0,255); if ($host != "194.195.196.($ip)) if ($host != "195.196.197.($ip)) [snip] Salut Anthony, you may check if an address is within a certain network/subnet, you need to compare each octet. For example: Address 192.168.11.212 Network 192.168.12.255 Mask 255.255.255.0 192 255 = 192 192 255 = 192 OK 168 255 = 168 168 255 = 168 OK 11 255 = 11 12 255 = 12 NOT WITHIN SUBNET I've put this together in this littel test form: [snip] ?php function contains_ip($network, $snmask, $address) { if (!is_array($network)) $network = explode(".", $network); if (!is_array($snmask)) $snmask = explode(".", $snmask); if (!is_array($address)) $address = explode(".", $address); for ($i=0; $i4; ++$i) { $a = $address[$i]*1; $m = $snmask[$i]*1; $n = $network[$i]*1; $m1 = $a $m; $m2 = $n $m; if (($a $m) != ($n $m)) return false; } return true; } if ($network $subnet $address) $result = contains_ip($network, $subnet, $address); ? html body ?php if (isset($result)):? h4?=$address? is?php if(!$result):? inot/i?php endif;? contained in ?=$network?, mask ?=$subnet?/h4 ?php endif;? form Enter Address: input type="text" name="address" value="?=$address?"br Enter Network: input type="text" name="network" value="?=$network?"br Enter Subnetmask: input type="text" name="subnet" value="?=$subnet?"br input type="submit" /form /body /html [snip] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.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 / NEWS
gluke Thu Mar 1 05:44:05 2001 EDT Modified files: /php4 NEWS Log: # Corrected NEWS entry about mnoGoSearch extension. Index: php4/NEWS diff -u php4/NEWS:1.600 php4/NEWS:1.601 --- php4/NEWS:1.600 Mon Feb 26 07:20:53 2001 +++ php4/NEWS Thu Mar 1 05:44:04 2001 @@ -48,8 +48,7 @@ - Major change of the php pdf api. It could break some functions though backwards compatibility was tried to maintain. Adding some still missing functions as well. (Uwe) -- Added mnoGoSearch extension. (Sergey K) - This module currently at the alpha state, but it can be used already. +- Added mnoGoSearch extension - http://search.mnogo.ru (Sergey K) - Allow url encoding in DB usernames and passwords (Stig, PEAR) - Added raiseError and setErrorHandling methods to PEAR class (Stig, PEAR) - Added support for converting images from JPG/PNG on the fly with the GD -- 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] Hebrew websites transition with php3 ..
As Boaz suggested look into hebrev and hebrevc functions. They are the only ones I can think about right now. check http://php.net/hebrev http://php.net/hebrevc the manual states that this functions are defined in PHP3 and PHP4. HTH -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd On Wednesday 28 February 2001 17:00, Aviv Revach wrote: Hey! Ok, I think that I will stick to logical Hebrew as most of you suggested. But still, I'm interested in knowing how could I take a HTML document which contains HTML tags, Hebrew words and English words, and reveres only the Hebrew words (making them Visual Hebrew) using only php3 functions (the server I'm using doesn't support php4). It would be great if anyone could point of a solution for doing that. By writing a script that will do that, I will both options - show the Hebrew in my website as Logical or use a script to translate it into visual Hebrew for browsers who do not support it. Thank you in advance - Aviv Revach At 16:45 01/03/01 +0200, Meir kriheli wrote: On Thursday 01 March 2001 09:17, Boaz Yahav wrote: I think that Aviv should stick to logical hebrew (which is the standart, as mentioned by Boaz). I don't use IE (I'm using Linux) and I can access all the logical sites with no problem, including the "html dir=rtl" tag and the 'direction: rtl' style (thank god for konqueror). Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble there, and if Opera wants to gain market share they shold support the standart (logical) in here to. Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) , the majority of users in Israel are using IE. One more problem you'll have with visaul hebrew is the ugly line breaks which cause the end of the sentence to appear before the start of it. I had a long discussion of this subject with Manuel off this mailing list. I can send you a digest of it if you wish. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd Hi Manuel, All is great, working hard to make WeberDev.com a better place for the community and trying to make people understand we don't make $$$ from it :) The IE / NN war was one that left no chance for NN in Israel. While MS spent millions in making all of their products in Hebrew, including the free IE, NN refused to support Hebrew. While the 3% is correct for Israel, it's far from being true on an international basis. There are 3 large portals in Israel, 1 supports only IE (MSN), and the other two that supported NN, until not long ago, started to develop for IE only about 4-6 months ago. This is why there is no reason to support anything other than IE in Israel. With all due respect to people that like other browsers, developing for all browsers costs lots of $$$ and as long as portals are free and loosing lots of $$$ it's not profitable to develop for all. Bottom line, as the CTO of one of those portals I say go with Logical Hebrew and dump Netscape (In Israel Only). and don't forget to add the HTML DIR="rtl" tag at the beginning of each page. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 10:51 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Hebrew websites transition with php3 .. Hello Boaz, How are you doing these days? :-) On 28-Feb-01 16:39:35, you wrote: The figures I'm giving you are from one of the two biggest portals in Israel. it's less than 3%. Mind me for jumping in, but I think Aviv question about the truth of the 3% figure ie very pertinent. The way I see it it is a gross mistake to assume that the audience of a large portal is necessary a reflex of the potential audience of that portal. I also work for a large portal company (not for the Hebrew audience though) and I found people making the same large mistake. They looked at the sites audience and figure that there is over 90% of Internet Explorer users in a site that used IE specific DHTML. Needless to say that it didn't show right in Netscape. Given that sites do not show right in certain browsers, it looks obvious that almost nobody using those browsers would show in the browser audience rates. I even wonder why there are still 3% of users of browsers that do not support logical Hebrew display that go to your portal. Same for the 10% of Netscape users that go to that other site in my company portal. Maybe those are just lurkers that went there and gave up on the site and did not return because they could not see right what was in there. The reality is that it turns out that there is
[PHP-CVS] cvs: php4 /ext/mnogosearch test.php
gluke Thu Mar 1 06:18:06 2001 EDT Modified files: /php4/ext/mnogosearch test.php Log: # mnoGoSearch example updated. Index: php4/ext/mnogosearch/test.php diff -u php4/ext/mnogosearch/test.php:1.16 php4/ext/mnogosearch/test.php:1.17 --- php4/ext/mnogosearch/test.php:1.16 Thu Mar 1 05:38:38 2001 +++ php4/ext/mnogosearch/test.php Thu Mar 1 06:18:06 2001 @@ -1,14 +1,11 @@ !-- $Source: /local/repository/php4/ext/mnogosearch/test.php,v $ -$Id: test.php,v 1.16 2001/03/01 13:38:38 gluke Exp $ +$Id: test.php,v 1.17 2001/03/01 14:18:06 gluke Exp $ -- html body -mnoGoSearch API version: ? echo Udm_Api_Version(); ? -br - form method=post input type=text size=30 name=q value="? echo htmlspecialchars(stripslashes($q)); ?" input type=submit value=" Search ! " @@ -27,7 +24,9 @@ $udm=Udm_Alloc_Agent("mysql://udm:udm@localhost/udm/",'single'); - print "Total number of urls in database: ".Udm_Get_Doc_Count($udm)."br\n"; + if (Udm_Api_Version() = 30111) { + print "Total number of urls in database: +".Udm_Get_Doc_Count($udm)."br\n"; + } // Stage 2: set search parameters -- 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] Restrict Access per IP Addresses
At 16:09 01.03.2001, Nazoren said: [snip] there are 3 networks, each of them have a mask : (it is not necessary to know these parameters i think !) 198.143.15.255 (255.255.255.0) 202.139.84.255 (255.255.255.128) 210.176.142.255 (255.255.255.192) When a user will connect, his IP will be between 198.143.15.0 and 198.143.15.255 or between 202.139.84.0 and 202.139.84.255 or between 210.176.142.0 and 210.176.142.255 So if someone else connect without using my network, the system disallow him and redirect in 403 Page. [snip] Anthony, given the function contains_ip from my earlier post, you would code: ?php if (!contains_ip("198.143.15.255", "255.255.255.0", $REMOTE_ADDRESS) !contains_ip("202.139.84.255", "255.255.255.128", $REMOTE_ADDRESS) !contains_ip("210.176.142.255", "255.255.255.192", $REMOTE_ADDRESS)) { header("403 Forbidden"); echo "h1Access Forbidden/h1You may not come here from outside our domain"; exit(); } process_domain_app(); ? ...ebird O Ernest E. Vogelsinger (\)http://www.1-at-web.at/ ^ ICQ# 13394035 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] RE: How to insert time and date into mysql?
Why not use the CURDATE() and CURTIME() functions built into mysql? Because my filing system requires that the filename.extension be datetime.extension in the PHP LP script (lazy man's serialization). That way, I can just referance the datetime when I build my table of links on the query output. Since this is an LP filter, there's no guarantee of consistancy in filenaming conventions in the LP/LPD handling from the clients. I've seen different behavior from Solaris (local queue) and the following client queues: HP-UX, IRIX 6.5, SAMBA, and most significantly OS/400. IRIX was the worst. I had to discover the "mkbsdnetpr" command since IRIX's graphical Printer Administrator makes for really strange queues. By default, there apparently is no LP style "host!user" information passed from an IRIX client to a "non-SGI" server. Instead, an option list "user@host; flist=file1 file2" is used. "mkbsdnetpr" however creates a "real" BSD-style queue. Also, since my main interest is in making paperless PCL reports from my AS/400 enterprise resource planning system, the filenames passed by OC/400's TCP/IP spooler are pretty meaningless anyway. (Ever seen what OS/400 does with filenames?) And, all, please disregard the file:// referances in my code examples from earlier. Damn Microsoft Outlook changed my C++ style comments without asking. John T. Foley Network Administrator Pollak Engineered Products, Actuator Products Division, A Stoneridge Company 195 Freeport Street, Boston MA 02122 ph: (617) 474-7266fax: (617) 282-9058 The geographical center of Boston is in Roxbury. Due north of the center we find the South End. This is not to be confused with South Boston which lies directly east from the South End. North of the South End is East Boston and southwest of East Boston is the North End. -Original Message- From: Kevin Cawthorne [SMTP:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:58 AM To: Foley, John; 'Zenith'; [EMAIL PROTECTED] Subject: Re: [PHP] RE: How to insert time and date into mysql? Why not use the CURDATE() and CURTIME() functions built into mysql? Kevin Cawthorne - Original Message - From: "Foley, John" [EMAIL PROTECTED] To: "'Zenith'" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 2:20 PM Subject: [PHP] RE: How to insert time and date into mysql? I have an application that serializes uploaded files by datetime of upload. This may not be the most efficient, but this will yield a MySQL DATETIME type string: $datetime = date("YmdHis"); If you are looking for a DATE column and a TIME column seperately (not recomended . . . use logic to parse the TIME and DATE parts of a DATETIME column) thet you will need to use $myDate = date("Ymd"); file://year,month,day with preceeding zeros $myTime = date("His"); file://hours,minutes,seconds with preceeding zeros I have not checked the documentation for these: check the DATE and TIME column type requirements in MySQL, and the date() function in PHP. Obviously, make sure your MySQL column data type is DATETIME, and that you single quote the $datetime value since it's considered text. Here is my SQL string: $sql="INSERT INTO $docMaster ( sqDocID, sqUID, sqSubmitDate, sqDocAnon, sqRequestID, sqHostID, sqTitle, sqCopies, sqOptionStr, sqFileName, sqDocType, Fsize, ppFsize ) VALUES( NULL, $uid, '$datetime', '$Anon', '$request_id', $sqHostID, '$title', $copies, '$option_list', '$file', '$DocType', $Fsize, $tmpFsize )"; It should be obvious by now that I am making a PHP4/CGI shell script LP print filter. This filter intercepts incoming print streams, then converts postscript to PDF or compresses PCL, moves the result to a controlled directory structure, and then logs to database. A little Apache with PHP with MySQL later, and I have a hands-off paperless queueing system. I love OpenSource! Any interest from the PHP community in seeing this effort released? I'm developing on Solaris for production use on Solaris, and have noted some incompatabilities with Linux, FWIW. John T. Foley Network
AW: [PHP] Passing values from ASP to PHP
Hi you could try to ad a filter for 'exactfilename.asp' and assign it to php. i forgot most of my iis knowledge, but as far as i recal the .asp filter can be changed on per-directory basis. putting exactfilename.asp in the filter- tab higher then the asp one should map it to php it can be done with apache even easier, but as you use asp, i assume you use iis Sebastian -Ursprungliche Nachricht- Von: Isaac [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 28. Februar 2001 22:08 An: [EMAIL PROTECTED] Betreff: [PHP] Passing values from ASP to PHP I've been given a project that I want to use PHP with, but unfortunately there are unchangable hard-coded values that point clients to an ASP script residing on our server. Here's what I want to do, and I don't really know how to do it: I want to pass all the key/value pairs that are passed to the ASP script to a PHP script. I can get values with Request.Form("key_name"), but that takes hard-coding the name of the key. So if the following is passed to the ASP script: one=bluetwo=redthree=yellow Then I would want to redirect to myscript.php?one=bluetwo=redthree=yellow How do I go about walking through all the key/values that have been passed in ASP? I really don't want to have to learn this ugly language.. -- Isaac Force [EMAIL PROTECTED] (503)656-2489 http://gorgonous.dhs.org Real Users find the one combination of bizarre input values that shuts down the system for days. -- PHP General Mailing List (http://www.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/mnogosearch php_mnogo.c test.php
gluke Thu Mar 1 06:51:11 2001 EDT Modified files: /php4/ext/mnogosearch php_mnogo.c test.php Log: UDM_PARAM_CROSS_WORDS mnoGoSearch extension session parameter has been added to use crosswords available since version 3.1.11 of mnogosearch. Example updated. Index: php4/ext/mnogosearch/php_mnogo.c diff -u php4/ext/mnogosearch/php_mnogo.c:1.21 php4/ext/mnogosearch/php_mnogo.c:1.22 --- php4/ext/mnogosearch/php_mnogo.c:1.21 Thu Mar 1 05:38:38 2001 +++ php4/ext/mnogosearch/php_mnogo.cThu Mar 1 06:51:11 2001 @@ -1,5 +1,5 @@ /* $Source: /local/repository/php4/ext/mnogosearch/php_mnogo.c,v $ */ -/* $Id: php_mnogo.c,v 1.21 2001/03/01 13:38:38 gluke Exp $ */ +/* $Id: php_mnogo.c,v 1.22 2001/03/01 14:51:11 gluke Exp $ */ /* +--+ @@ -58,6 +58,7 @@ #define UDM_PARAM_MIN_WORD_LEN 12 #define UDM_PARAM_MAX_WORD_LEN 13 #define UDM_PARAM_ISPELL_PREFIXES 14 +#define UDM_PARAM_CROSS_WORDS 15 /* udm_add_search_limit constants */ #define UDM_LIMIT_URL 1 @@ -78,6 +79,10 @@ #define UDM_PREFIXES_ENABLED 1 #define UDM_PREFIXES_DISABLED 0 +/* crosswords modes */ +#define UDM_CROSS_WORDS_ENABLED 1 +#define UDM_CROSS_WORDS_DISABLED 0 + /* udm_get_res_param constants */ #define UDM_PARAM_NUM_ROWS 256 #define UDM_PARAM_FOUND257 @@ -205,6 +210,9 @@ REGISTER_LONG_CONSTANT("UDM_PARAM_PREFIXES", UDM_PARAM_ISPELL_PREFIXES,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PARAM_PREFIX", UDM_PARAM_ISPELL_PREFIXES,CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_CROSS_WORDS", UDM_PARAM_CROSS_WORDS,CONST_CS +| CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("UDM_PARAM_CROSSWORDS", UDM_PARAM_CROSS_WORDS,CONST_CS +| CONST_PERSISTENT); + /* udm_add_search_limit constants */ REGISTER_LONG_CONSTANT("UDM_LIMIT_CAT", UDM_LIMIT_CAT,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_LIMIT_URL", UDM_LIMIT_URL,CONST_CS | CONST_PERSISTENT); @@ -240,6 +248,12 @@ REGISTER_LONG_CONSTANT("UDM_PHRASE_ENABLED",UDM_PHRASE_ENABLED,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PHRASE_DISABLED", UDM_PHRASE_DISABLED,CONST_CS | CONST_PERSISTENT); + /* crosswords mode params */ + +REGISTER_LONG_CONSTANT("UDM_CROSS_WORDS_ENABLED",UDM_CROSS_WORDS_ENABLED,CONST_CS | +CONST_PERSISTENT); + +REGISTER_LONG_CONSTANT("UDM_CROSSWORDS_ENABLED",UDM_CROSS_WORDS_ENABLED,CONST_CS | +CONST_PERSISTENT); + +REGISTER_LONG_CONSTANT("UDM_CROSS_WORDS_DISABLED",UDM_CROSS_WORDS_DISABLED,CONST_CS | +CONST_PERSISTENT); + +REGISTER_LONG_CONSTANT("UDM_CROSSWORDS_DISABLED",UDM_CROSS_WORDS_DISABLED,CONST_CS | +CONST_PERSISTENT); + /* prefixes mode params */ REGISTER_LONG_CONSTANT("UDM_PREFIXES_ENABLED", UDM_PREFIXES_ENABLED,CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("UDM_PREFIX_ENABLED",UDM_PREFIXES_ENABLED,CONST_CS | CONST_PERSISTENT); @@ -551,6 +565,28 @@ Agent-Conf-max_word_len=atoi(val); break; + +#if UDM_VERSION_ID 30110 + + case UDM_PARAM_CROSS_WORDS: + switch (atoi(val)){ + case UDM_CROSS_WORDS_ENABLED: + +Agent-Conf-use_crossword=UDM_CROSS_WORDS_ENABLED; + break; + + case UDM_CROSS_WORDS_DISABLED: + +Agent-Conf-use_crossword=UDM_CROSS_WORDS_DISABLED; + break; + + default: + php_error(E_WARNING,"Udm_Set_Agent_Param: +Unknown crosswords mode"); + RETURN_FALSE; + break; + } + + break; + +#endif default: php_error(E_WARNING,"Udm_Set_Agent_Param: Unknown agent session parameter"); Index: php4/ext/mnogosearch/test.php diff -u php4/ext/mnogosearch/test.php:1.17 php4/ext/mnogosearch/test.php:1.18 --- php4/ext/mnogosearch/test.php:1.17 Thu Mar 1 06:18:06 2001 +++ php4/ext/mnogosearch/test.php Thu Mar 1 06:51:11 2001 @@ -1,6 +1,6 @@ !-- $Source: /local/repository/php4/ext/mnogosearch/test.php,v $ -$Id: test.php,v 1.17 2001/03/01 14:18:06 gluke Exp $ +$Id: test.php,v 1.18 2001/03/01 14:51:11 gluke Exp $ -- html @@ -47,6 +47,10 @@
RE: [PHP] Passing values from ASP to PHP
Hi, To enumerate the key/value in ASP from the form you'd do this % dim element dim objForm dim strURL '/* We're creating an object so that it won't matter which ' * HTTP method the previous form uses. ' */ If LCase(Server.Request("HTTP_METHOD")) = "post" Then Set objForm = Request.Form Else Set objForm = Request.QueryString End If strURL = "myscript.php?" '/* Now step through the form For each element in objForm '/* Key Name is in the "element" var ' * Value of the key is in the objForm(element) ' * Now build the Redirect string ' */ strURL = strURL Server.URLEncode(element) "=" Server.URLEncode(objForm(element)) "" Next '/* Now redirect Response.Redirect(strURL) % That should do it. I've been given a project that I want to use PHP with, but unfortunately there are unchangable hard-coded values that point clients to an ASP script residing on our server. Here's what I want to do, and I don't really know how to do it: I want to pass all the key/value pairs that are passed to the ASP script to a PHP script. I can get values with Request.Form("key_name"), but that takes hard-coding the name of the key. So if the following is passed to the ASP script: one=bluetwo=redthree=yellow Then I would want to redirect to myscript.php?one=bluetwo=redthree=yellow How do I go about walking through all the key/values that have been passed in ASP? I really don't want to have to learn this ugly language.. -- PHP General Mailing List (http://www.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] Passing values from ASP to PHP
I'm no ASP guru (never touched it actually), but...it seems as if this will add an extra "" on the end of the url. myscript.php?one=bluetwo=redthree=yellow ^ -Original Message- From: Opec Kemp [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:47 AM To: [EMAIL PROTECTED] Cc: PHP General List Subject: RE: [PHP] Passing values from ASP to PHP Hi, To enumerate the key/value in ASP from the form you'd do this % dim element dim objForm dim strURL '/* We're creating an object so that it won't matter which ' * HTTP method the previous form uses. ' */ If LCase(Server.Request("HTTP_METHOD")) = "post" Then Set objForm = Request.Form Else Set objForm = Request.QueryString End If strURL = "myscript.php?" '/* Now step through the form For each element in objForm '/* Key Name is in the "element" var ' * Value of the key is in the objForm(element) ' * Now build the Redirect string ' */ strURL = strURL Server.URLEncode(element) "=" Server.URLEncode(objForm(element)) "" Next '/* Now redirect Response.Redirect(strURL) % That should do it. I've been given a project that I want to use PHP with, but unfortunately there are unchangable hard-coded values that point clients to an ASP script residing on our server. Here's what I want to do, and I don't really know how to do it: I want to pass all the key/value pairs that are passed to the ASP script to a PHP script. I can get values with Request.Form("key_name"), but that takes hard-coding the name of the key. So if the following is passed to the ASP script: one=bluetwo=redthree=yellow Then I would want to redirect to myscript.php?one=bluetwo=redthree=yellow How do I go about walking through all the key/values that have been passed in ASP? I really don't want to have to learn this ugly language.. -- PHP General Mailing List (http://www.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/Cache Cache.php Function_Cache.php /pear/Cache/Container cache_container.php cache_container_file.php
sbergmann Thu Mar 1 07:35:18 2001 EDT Added files: /php4/pear/CacheCache.php /php4/pear/Cache/Container cache_container.php cache_container_file.php Removed files: /php4/pear/CacheFunction_Cache.php Log: Removed my old Function_Cache class implementation. Initial commit of the multi-purpose Cache System Ulf Wendel and I worked on the last couple of days. In this first phase I commit the Cache base class, the Cache Container Base class and the File-based Cache Container. During the next couple of hours I hope to finish the Cache Container classes for caching with PEAR/DB, PHPLIB/DB_Sql and Native MySQL Heap Table support. I also have working versions of classes extending Cache, namely Function_Cache, Graphics_Cache and Output_Cache. Bare with me, tomorrow at the latest PEAR/Cache will be a extensive and efficient means for general caching purposes, besides specialized caching for graphics. Index: php4/pear/Cache/Cache.php +++ php4/pear/Cache/Cache.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // // $Id: Cache.php,v 1.1 2001/03/01 15:35:18 sbergmann Exp $ /** * Cache is a base class for cache implementations. * * TODO: Simple usage example goes here. * * @author Ulf Wendel [EMAIL PROTECTED] * @version $Id: Cache.php,v 1.1 2001/03/01 15:35:18 sbergmann Exp $ * @package Cache * @access public */ class Cache { /** * Disables the caching. * * TODO: Add explanation what this is good for. * * @var boolean * @access public */ var $no_cache = false; /** * Garbage collection: probability in seconds * * If set to a value above 0 a garbage collection will * flush all cache entries older than the specified number * of seconds. * * @var integer * @see $gc_probability * @access public */ var $gc_time = 1; /** * Garbage collection: probability in percent * * TODO: Add an explanation. * * @var integer 0 = never * @see $gc_time * @access public */ var $gc_probability = 1; /** * Storage container object. * * @var object cache_container */ var $container; // // public methods // /** * * @paramstring Name of storage container class * @paramarray Array with storage class dependend config options * @see setOptions() */ function cache($storage_class, $storage_options = "") { $storage_class = "cache_container_" . $storage_class; include_once("Cache/Container/{$storage_class}.php"); $this-container = new $storage_class($storage_options); $this-garbageCollection(); } // end constructor /** * Returns the requested dataset it if exists and is not expired * * @paramstring dataset ID * @return mixed cached data or NULL on failure * @access public */ function get($id) { if ($this-no_cache) return ""; if ($this-isCached($id) !$this-isExpired($id)) return $this-load($id); return NULL; } // end func get /** * Stores the given data in the cache. * * @paramstring dataset ID used as cache identifier * @parammixed data to cache * @paraminteger lifetime of the cached data in seconds - 0 for endless * @return boolean * @access public */ function save($id, $data, $expires = 0) { if ($this-no_cache) return true; return $this-container-save($id, $data, $expires); } // end func save /** * Loads the given ID from the cache.
RE: [PHP] Double Click
A tactic I've been planning to use, but don't know if it actually works or not, is to disable the button first thing in its onClick so the second click occurs on a disabled button. Does anybody know if this actually works or not? - Theo -Original Message- From: John Huggins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 3:04 PM To: Manuel Lemos; [EMAIL PROTECTED] Subject: RE: [PHP] Double Click If you are lucky and are feeding this form data to a database, you can create a unique hash field from other fields that would not change from click 1 to click 2. Then just make the database treat the hash as a unique index and it should prevent double entries. Works for me. Other advice is to not tell the double clicker that had an error; Just silently ignore their second request. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Double Click Hello Fabian, On 28-Feb-01 03:01:02, you wrote: Hi, I have a page, and when I have to add a product I use a form, many people are used to make double click in every task, so when the product is sent with a double click in the send button, the program send it twice to the data base. What can I do to prevent this? You may want to try this forms generation class that lets you define a warning message that shows when the user attempts to submit a form more than once. http://phpclasses.UpperDesign.com/browse.html/package/1 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.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] javascript VS php
Hello all I would like to know if its possible from a javascript function call a php function (uiuiuiuiui...) ? This because I have a bidimensional array, and when user select a option of a checbox, on javascript function I read the selectedIndex and want to see the values of that name ( see arr[selectedIndex] with for cicle). If not possible(and I think it isnt), there is any solution? TY all Best Regards Miguel Loureiro [EMAIL PROTECTED]
Re: [PHP] javascript VS php
Javascript (js) is client side and PHP is server side. So what you can do to call the php function is by re-submitting the page, with somekind of a flag from the js to call the php function. You write the php parts like: if($flag) callTheFunctions(args); Reuben D. B At 04:28 PM 3/1/01 +, Miguel Loureiro wrote: Hello all I would like to know if its possible from a javascript function call a php function (uiuiuiuiui...) ? This because I have a bidimensional array, and when user select a option of a checbox, on javascript function I read the selectedIndex and want to see the values of that name ( see arr[selectedIndex] with for cicle). If not possible(and I think it isnt), there is any solution? TY all Best Regards Miguel Loureiro [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] File type not set
I find depending on the browser the mime-type is not allways set or correct. I like to double check it before I save the type in my db. I find alot of the time my type is set to application/octlet-stream meaning it knows its binary data, just the browser didnt know what kind. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] "Fredrik Wahlberg" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm uploading a file to my server, and I check the mime-type and file size before saving it. For some reason I get the file size, but not the file type. $userfile_type returns nothing and $userfile_size returns the correct size. This works just fine on another server where I have the same script so the problem is not in the browser. I'm running RedHat 7.0 with PHP rpm php-4.0.4pl1-3 Bug, feature or my fault? /Fredrik -- PHP General Mailing List (http://www.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] best slashdot?
Jason Murray [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... PHPSlash is really goodd, although user management won't be out until .7 and .6 was just released. PHPNuke has usermanagement, but from what I hear its not all that customizable.. Check out phpslash at www.phpslash.org.. they aren't running phpslash on that site currently due to DB difficulties with the host (i.e., requested the DB and am still waiting..) I'm evaluating PHPNuke at the moment. It certainly seems to have the goods on customisation. Besides which, you can always edit and fiddle :) I'm working on one at the moment that'll (hopefully, fingers crossed) be fully customisable. And the admin/users area has permissions. Which is something PHPNuke is lacking in. -- Rick Hodger [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] big database with php ?
on a 45mb table with 31,470 rows mysql takes this long. mysql SELECT stockno from products; ... 31470 rows in set (2.34 sec) mysql not exactly great performance, if I put two 'LIKE' statments and an 'ORDER BY' clause then we're at 8 sec this is on a PII500 512mb ram linux.mysql 3.23.28 this is not a lightning fast server, but I am not impressed with mysql speed. if you ever have todo any table joins I would highly recommend against mysql people has 161 rows. products has 31,470 rows select count(stockno), count(customernum) from products, people; ... 1 row in set (12.34 sec) mysql try adding a third table, oi. or a fouth, I timedout at nearly 2 hours with four tables. postgres (7.1beta) could do the same four tables in less then 0.9sec. I use mysql because I use mysql. I would like to use postgres but everyone seems to use mysql and clients know the name. they request it. I hear problems about un-stability of 7.0 on phpbuilder.com, are they warented? I am interested in hearing strong customer testomonials for postgres or against it. I have little info other then a few benchamrks I ran myself. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Markus H. Maussner"" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi.. i am looking for a database wich runs with php and supports big tables ... i am thinking about areas in the range of 1,5-2TB. can mysql handle that ? i know ms-sql is good for databases at arround 1TB. markus -- PHP General Mailing List (http://www.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] Double Click
On Thursday 01 March 2001 21:41, Brinkman, Theodore wrote: A tactic I've been planning to use, but don't know if it actually works or not, is to disable the button first thing in its onClick so the second click occurs on a disabled button. Does anybody know if this actually works or not? script language="javascript" !-- var submitpressed; submitpressed=0; function submitcheck() { if(submitpressed) return false; submitpressed=1; return true; } //-- /script input type=button value="Submit" onClick="return submitcheck();" - Theo -Original Message- From: John Huggins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 3:04 PM To: Manuel Lemos; [EMAIL PROTECTED] Subject: RE: [PHP] Double Click If you are lucky and are feeding this form data to a database, you can create a unique hash field from other fields that would not change from click 1 to click 2. Then just make the database treat the hash as a unique index and it should prevent double entries. Works for me. Other advice is to not tell the double clicker that had an error; Just silently ignore their second request. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Double Click Hello Fabian, On 28-Feb-01 03:01:02, you wrote: Hi, I have a page, and when I have to add a product I use a form, many people are used to make double click in every task, so when the product is sent with a double click in the send button, the program send it twice to the data base. What can I do to prevent this? You may want to try this forms generation class that lets you define a warning message that shows when the user attempts to submit a form more than once. http://phpclasses.UpperDesign.com/browse.html/package/1 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- PHP General Mailing List (http://www.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/Cache/Container cache_container_phplib.php
sbergmann Thu Mar 1 07:42:36 2001 EDT Added files: /php4/pear/Cache/Container cache_container_phplib.php Log: Added Cache Container class for PHPLIB's database abstraction layer DB_Sql. I can't test this right now, but Ulf told me earlier today that it works fine. Index: php4/pear/Cache/Container/cache_container_phplib.php +++ php4/pear/Cache/Container/cache_container_phplib.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // // $Id: cache_container_phplib.php,v 1.1 2001/03/01 15:42:36 sbergmann Exp $ require_once("Cache/Container/cache_container.php"); /* CREATE TABLE cache ( id CHAR(32) NOT NULL DEFAULT '', data TEXT NOT NULL DEFAULT '', expires INT(9) NOT NULL DEFAULT 0, changed TIMESTAMP(14), INDEX (expires), PRIMARY KEY (id) ) */ /** * Stores cache data into a database table. * * @author Ulf Wendel [EMAIL PROTECTED], Sebastian Bergmann [EMAIL PROTECTED] * @version $Id: cache_container_phplib.php,v 1.1 2001/03/01 15:42:36 sbergmann Exp $ * @package Cache */ class cache_container_phplib extends cache_container { /** * Name of the DB table to store caching data * * @see cache_container_file::$filename_prefix */ var $cache_table = "cache"; /** * PHPLib object * * @var object PEAR_DB */ var $db; /** * Name of the PHPLib DB class to use * * @var string * @see $db_path, $local_path */ var $db_class = ""; /** * Filename of your local.inc * * If empty, "local.inc" is assumed. * * @var string */ var $local_file = ""; /** * Include path for you local.inc * * HINT: If your're not using prepend.php you must * take care that all classes (files) references by you * local.inc are included automatically. So you might * want to write a new local2.inc that only referrs to * the database class (file) you're using and includes all required files! * * @var string path to your local.inc - make sure to add a trailing slash * @see $local_file */ var $local_path = ""; /** * * @parammixed */ function cache_container_phplib($options = "") { if (is_array($options)) $this-setOptions($options, array("db_class", "db_file", "db_path", "local_file", "local_path")); if (!$this-db_class) return new CacheError("No database class specified.", __FILE__, __LINE__); // include the required files include_once($this-local_path . $this-local_file); // create a db object $this-db = new $this-db_class; } // end constructor function fetch($id) { $query = sprintf("SELECT expires, data FROM %s WHERE id = '%s'", $this-cache_table, $id ); $this-db-query($query); if (!$this-db-Next_Record()) return array(NULL, NULL); return array($this-db-f("expires"), $this-decode($this-db-f("data"))); } // end func fetch function save($id, $data, $expires = 0) { $query = sprintf("REPLACE INTO %s (data, expires, id) VALUES ('%s', %d, '%s')", $this-cache_table, $this-encode($data), $expires, $id ); $this-db-query($query); return (boolean)$this-db-affected_rows(); } // end func save function delete($id) { $query = sprintf("DELETE FROM %s WHERE id = '%s'",
[PHP] htaccess problem
Hey all. I've written htaccess files and stuff with one or 2 users, and it works fine. I decided that making an htgroup file would work best in my situation though, so I went to webmonkey.com and followed their tutorial to make the htaccess files. As far as I can tell, all of my files are correct. But for some reason when I try to authenticate, the server won't take my info as valid. Has anyone else had this problem with using an htgroup file? Thanks. Jason -- PHP General Mailing List (http://www.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/Cache/Container cache_container_shm.php
sbergmann Thu Mar 1 07:47:01 2001 EDT Added files: /php4/pear/Cache/Container cache_container_shm.php Log: Just hired Björn Schotte to foster the Shared Memory Cache Container implementation. He'll start working on it right away. Index: php4/pear/Cache/Container/cache_container_shm.php +++ php4/pear/Cache/Container/cache_container_shm.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // | Björn Schotte [EMAIL PROTECTED] | // +--+ // // $Id: cache_container_shm.php,v 1.1 2001/03/01 15:47:01 sbergmann Exp $ require_once("Cache/Container/cache_container.php"); /** * Stores cache data into shared memory. * * @author Björn Schotte [EMAIL PROTECTED] * @version $Id: cache_container_shm.php,v 1.1 2001/03/01 15:47:01 sbergmann Exp $ * @package Cache */ class cache_container_shm extends cache_container { function cache_container_shm($options = "") { } // end constructor function fetch($id) { } // end func fetch function save($id, $data, $expires = 0) { } // end func save function delete($id) { } // end func delete function flush() { } // end func flush function idExists($id) { } // end func isExists function garbageCollection() { } // end func garbageCollection } // end class cache_container_shm ? -- 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] pleaaaaaaaase help!
Um...yeah. Make the action of the form with the button be a script with the statement. - Original Message - From: kaab kaoutar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:59 AM Subject: [PHP] plese help! Hi! please i'm really in need of knowing if there is a way to do a php statement once a button is clicked! Thanks _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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 /pear Cache.php /pear/Cache Cache.php Container.php /pear/Cache/Container cache_container.php cache_container_file.php cache_container_phplib.php cache_container_shm.php file.php phplib.php shm.php
chagenbuThu Mar 1 08:32:30 2001 EDT Added files: /php4/pear Cache.php /php4/pear/CacheContainer.php /php4/pear/Cache/Container file.php phplib.php shm.php Removed files: /php4/pear/CacheCache.php /php4/pear/Cache/Container cache_container.php cache_container_file.php cache_container_phplib.php cache_container_shm.php Log: use standard naming/capitalization, and do a bit of error checking when instantiating the storage classfile. Index: php4/pear/Cache.php +++ php4/pear/Cache.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // // $Id: Cache.php,v 1.1 2001/03/01 16:32:28 chagenbu Exp $ /** * Cache is a base class for cache implementations. * * TODO: Simple usage example goes here. * * @author Ulf Wendel [EMAIL PROTECTED] * @version $Id: Cache.php,v 1.1 2001/03/01 16:32:28 chagenbu Exp $ * @package Cache * @access public */ class Cache { /** * Disables the caching. * * TODO: Add explanation what this is good for. * * @var boolean * @access public */ var $no_cache = false; /** * Garbage collection: probability in seconds * * If set to a value above 0 a garbage collection will * flush all cache entries older than the specified number * of seconds. * * @var integer * @see $gc_probability * @access public */ var $gc_time = 1; /** * Garbage collection: probability in percent * * TODO: Add an explanation. * * @var integer 0 = never * @see $gc_time * @access public */ var $gc_probability = 1; /** * Storage container object. * * @var object Cache_Container */ var $container; // // public methods // /** * * @paramstring Name of storage container class * @paramarray Array with storage class dependend config options * @see setOptions() */ function Cache($storage_driver, $storage_options = "") { $storage_driver = strtolower($storage_driver); $storage_class = 'Cache_Container_' . $storage_driver; $storage_classfile = 'Cache/Container/' . $storage_driver . '.php'; if (@include_once $storage_classfile) { $this-container = new $storage_class($storage_options); $this-garbageCollection(); } else { return null; } } /** * Returns the requested dataset it if exists and is not expired * * @paramstring dataset ID * @return mixed cached data or NULL on failure * @access public */ function get($id) { if ($this-no_cache) return ""; if ($this-isCached($id) !$this-isExpired($id)) return $this-load($id); return NULL; } // end func get /** * Stores the given data in the cache. * * @paramstring dataset ID used as cache identifier * @parammixed data to cache * @paraminteger lifetime of the cached data in seconds - 0 for endless * @return boolean * @access public */ function save($id, $data, $expires = 0) { if ($this-no_cache) return true; return $this-container-save($id, $data, $expires); } // end func save /** * Loads the given ID from the cache. * * @paramstring dataset ID * @return mixed cached data or NULL on failure * @access public */ function load($id) { if ($this-no_cache) return ""; return
Re: [PHP] big database with php ?
Definitely something wrong with your setup, if a query takes as long as 2 hours. I could see maybe 2 seconds to return all 31000 rows, but why would you ever need all 31000 rows? Put a limit on it to say 20 or 30 and you'll get fast performance. If your columns are indexed, the order by won't take as long as you indicate. As for joins, mysql is very fast in my experience. Take this for instance, operating on several tables with about 2 rows: select a.description as project, b.phase, c.worktype, d.description, d.regular, d.ot, d.uid, d.sync, d.ot15, d.ot2, d.project_id, d.phase_id, d.worktype_id, DATE_FORMAT(d.date, '%a, %b %d, %Y') as date from project a, phase b, worktype c, hours d where week(d.date) = week('2001-02-03') and year(d.date) = year('2001-02-03') and d.project_id = a.code and d.phase_id = b.code and d.worktype_id = c.code and d.personnel_id = 1139 order by d.date asc; 22 rows in set (0.07 sec) A count for 1 col on the same table takes 0.01 seconds. This is on a slower machine than yours - but for the join it's only returning the important rows. I think that might be where you're interpreting the slow performance, unless you're missing indexes on the pertinent joins. Julian -- Julian Wood Multimedia Developer University of Calgary on 3/1/01 6:52 AM, Chris Lee at [EMAIL PROTECTED] wrote: on a 45mb table with 31,470 rows mysql takes this long. mysql SELECT stockno from products; ... 31470 rows in set (2.34 sec) mysql not exactly great performance, if I put two 'LIKE' statments and an 'ORDER BY' clause then we're at 8 sec this is on a PII500 512mb ram linux.mysql 3.23.28 this is not a lightning fast server, but I am not impressed with mysql speed. if you ever have todo any table joins I would highly recommend against mysql people has 161 rows. products has 31,470 rows select count(stockno), count(customernum) from products, people; ... 1 row in set (12.34 sec) mysql try adding a third table, oi. or a fouth, I timedout at nearly 2 hours with four tables. postgres (7.1beta) could do the same four tables in less then 0.9sec. I use mysql because I use mysql. I would like to use postgres but everyone seems to use mysql and clients know the name. they request it. I hear problems about un-stability of 7.0 on phpbuilder.com, are they warented? I am interested in hearing strong customer testomonials for postgres or against it. I have little info other then a few benchamrks I ran myself. -- PHP General Mailing List (http://www.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] Can't connect php to mysql on linux
Also, consider getting PHP 4 on your system. PHP 3 is old hat. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 24, 2001 11:33 AM To: George Alexander; [EMAIL PROTECTED] Subject: Re: [PHP] Can't connect php to mysql on linux Addressed to: "George Alexander" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "George Alexander" [EMAIL PROTECTED] 24 Feb 2001 05:40:59 - Hi, I working on Redhat Linux 6.1 and I've installed MySQL-3.23.33-1.i386.rpm and MySQL-client-3.23.33-1.i386.rpm. MySql is working fine. I've even created a database also using MySqlAdmin. Regarding Php I've installed php-3.0.18-1.6.x.i386.rpm and as for Apache : apache-1.3.14-2.6.2.i386.rpm. I've even installed php-mysql-3.0.16-1.i386.rpm and mod-php3-3.0.12-2.i386.rpm. My problem is I can't connect PHP to Mysql Db using the mysyql_connect("localhost","root","mypassword") command. mypassword is the same password you used for mysqladmin, and the command line interpreter for the root user, right? Try this command and see what it returns. If the error message doesn't give you a good idea what is wrong, please post again, including the error message you receive. mysql_connect( "localhost", "root", "mypassword" ) or die( "Unable to connectBR" . mysql_error()); I suggest you always use this code, along with: mysql_select_db( "database" ) or die( "Unable to selectBR" . mysql_error()); in every program you write. It is almost impossible to troubleshoot problems if you don't know what went wrong. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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] exclusive file locking under windows
Is exclusive locking not supported under windows? It doesn't seem to be working: flock($fd, LOCK_EX); -- 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]
Re: [PHP] pleaaaaaaaase help!
Uh huh, I agree. You can't run client-side PHP, it's called javascript. On 3/1/01 12:01 PM this was written: Um...yeah. Make the action of the form with the button be a script with the statement. - Original Message - From: kaab kaoutar [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:59 AM Subject: [PHP] plese help! Hi! please i'm really in need of knowing if there is a way to do a php statement once a button is clicked! -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.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-CVS] cvs: php4 /pear Makefile.in
chagenbuThu Mar 1 08:33:34 2001 EDT Modified files: /php4/pear Makefile.in Log: update the makefile for the new Cache classes. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.68 php4/pear/Makefile.in:1.69 --- php4/pear/Makefile.in:1.68 Thu Feb 22 08:01:14 2001 +++ php4/pear/Makefile.in Thu Mar 1 08:33:34 2001 @@ -12,6 +12,7 @@ PEAR_SUBDIRS = \ Benchmark \ Cache \ + Cache/Container \ Console \ Crypt \ Date \ @@ -33,7 +34,11 @@ PEAR_FILES = \ Benchmark/Iterate.php \ Benchmark/Timer.php \ - Cache/Function_Cache.php \ + Cache.php + Cache/Container.php \ + Cache/Container/file.php \ + Cache/Container/phplib.php \ + Cache/Container/shm.php \ Console/Getopt.php \ Crypt/CBC.php \ Crypt/HCEMD5.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]
[PHP-CVS] cvs: php4 /pear Makefile.in
chagenbuThu Mar 1 09:02:06 2001 EDT Modified files: /php4/pear Makefile.in Log: missing a backslash Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.69 php4/pear/Makefile.in:1.70 --- php4/pear/Makefile.in:1.69 Thu Mar 1 08:33:34 2001 +++ php4/pear/Makefile.in Thu Mar 1 09:02:05 2001 @@ -34,8 +34,9 @@ PEAR_FILES = \ Benchmark/Iterate.php \ Benchmark/Timer.php \ - Cache.php + Cache.php \ Cache/Container.php \ + Cache/Container/db.php \ Cache/Container/file.php \ Cache/Container/phplib.php \ Cache/Container/shm.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]
[PHP] Javascript php
Thanks! Does it mean that there is no way to execute a php statement after the click of a button ? then go to the other page mentionned in the form action ? From: "Johnson, Kirk" [EMAIL PROTECTED] To: "'kaab kaoutar'" [EMAIL PROTECTED] Subject: RE: [PHP] plese help! Date: Thu, 1 Mar 2001 10:47:58 -0700 Jason Jacobs has the right idea. Put the PHP code that you want to run in a 2nd file, for example, myScriptFile.php. Put this file name in the "ACTION" attribute of your FORM tag in your first file. Then, when the user clicks the "Submit" button in the first file, myScriptFile.php gets executed. Say your first file is named myForm.php and it contains the FORM. In this file put: FORM METHOD = "post" ACTION = "myScriptFile.php" INPUT TYPE = "submit" Put your PHP code in the file named myScriptFile.php. You see, you have to hit the server again to run the PHP code. If you want the code to run in *real time without leaving the first page* (myForm.php), you need to use JavaScript to do that. -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 10:23 AM To: Johnson, Kirk Subject: RE: [PHP] plese help! I don't get what u mean ! i know that one is client side and the other server side! From: "Johnson, Kirk" [EMAIL PROTECTED] To: "'kaab kaoutar'" [EMAIL PROTECTED] Subject: RE: [PHP] plese help! Date: Thu, 1 Mar 2001 10:01:47 -0700 Not without hitting the server! PHP works on the server side, JavaScript works on the client side. -Original Message- From: kaab kaoutar [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:59 AM To: [EMAIL PROTECTED] Subject: [PHP] plese help! Hi! please i'm really in need of knowing if there is a way to do a php statement once a button is clicked! _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] related to my .htgroup question...
Heh...I'm a list frequenter today... Ok, so I want to be able to do some things with php. 1) add a user to the .htpasswd file I know I can use exec() to run commands on the server. The problem here is that when I do "htpasswd .htpasswd username" I get prompted for passwords twice. How the heck can I do that with php? Will this work (I just thought of this right now...): exec("htpasswd .htpasswd username"); exec("password"); exec("password"); If this works, that would be great. I would assume that after this, the program stops and I don't have something running in the background. 23)edit the .htgroup and .htaccess files I have no idea how to do this at all whatsoever. I don't want the person running this script to have to see or touch the file at all, but I'm thinking that I'm going to have to, like, read the file into a textarea and make the user edit it and then save it again. That's going to be a pain in the butt when the user is office personnel that doesn't know this stuff from french. Throughtout this all, I don't want any output. I just want the scripts to run and then redirect back to the page it was submitted from. Whew...any ideas? I'm not going to have to learn perl just for this am I? ;^) Thanks a bunch Jason -- PHP General Mailing List (http://www.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 1 Mar 2001 18:17:20 -0000 Issue 541
php-general Digest 1 Mar 2001 18:17:20 - Issue 541 Topics (messages 42125 through 42203): multiple query in 1 select ? 42125 by: Jack Sasportas 42131 by: CC Zona Caller's __LINE__ 42126 by: elias Re: [PHP-GENERAL] Please help 42127 by: Nilesh Parmar 42130 by: Jack Dempsey Re: Template recommendations 42128 by: Alexander Wagner Re: Hebrew websites transition with php3 .. 42129 by: Boaz Yahav 42173 by: Meir kriheli 42177 by: Aviv Revach 42179 by: Meir kriheli about include 42132 by: Marcos 42133 by: Felipe Fernandez 42141 by: Christian Reiniger How would you have liked to have invested in Yahoo when it was still a year old? 42134 by: Jess Ragaza Re: PHP on Cobalt 42135 by: Fernando Caamaño variable scope -- unsetting vars inside functions 42136 by: Michael A. Smith Newbie question about running JAVA classes on PHP scripts 42137 by: Federico Ragazzoni 42140 by: Robert Vetter 42172 by: Adrian Murphy Re: PHP single user?? 42138 by: Rick Hodger Re: require on compressed files 42139 by: Christian Reiniger big database with php ? 42142 by: Markus H. Maussner 42190 by: Chris Lee 42195 by: Julian Wood Need Function generating integers 42143 by: M. A. Ould-Beddi 42147 by: CC Zona 42162 by: Miles Thompson including html 42144 by: Marcos 42145 by: Harshdeep S Jawanda 42151 by: Josh Reynolds File type not set 42146 by: Fredrik Wahlberg 42187 by: Chris Lee newbie: mail setup in php.ini 42148 by: Mat Marlow iptcembed 42149 by: Mathur get html-page 42150 by: mailing_list.gmx.at images problem 42152 by: John LYC Re: Restrict Access per IP Addresses 42153 by: Nazoréen 42178 by: Nazoréen 42180 by: Ernest E Vogelsinger whats the message count ? 42154 by: Markus H. Maussner 42156 by: Kees Hoekzema Re: PHP and iPlanet on Solaris 42155 by: Montgomery-Recht, Evan Export Linux Users and Password's to MYSQL database 42157 by: Joe Njeru 42159 by: Hrishi 42165 by: Jason Beebe Re: found a bug with File Uploads.. 42158 by: TTT 42196 by: TTT Javascript and Php 42160 by: kaab kaoutar PHP on NetWare 42161 by: Surendranath strange think with 'mail()' [sendmail?] 42163 by: Michael Plies strange think with 'mail()' 42164 by: Michael Plies 42166 by: Lewis Bergman pg_cmdtuples support needed in PHP4 42167 by: Jess Perez 42170 by: Egon Schmid (.work) changing the .ini file 42168 by: Mat Marlow 42169 by: Ernest E Vogelsinger Re: How to insert time and date into mysql? 42171 by: Foley, John 42175 by: Kevin Cawthorne 42181 by: Foley, John security improvements 42174 by: Gustavo Vieira Goncalves Coelho Rios Re: PostgreSQL vs InterBase 42176 by: Meir kriheli Re: Passing values from ASP to PHP 42182 by: Sebastian Stadtlich 42183 by: Opec Kemp 42184 by: Michael Geier Re: Double Click 42185 by: Brinkman, Theodore 42191 by: Hrishi javascript VS php 42186 by: Miguel Loureiro 42188 by: Reuben D Budiardja Re: best slashdot? 42189 by: Rick Hodger plese help! 42192 by: kaab kaoutar 42194 by: Jason Jacobs 42200 by: Thomas Deliduka htaccess problem 42193 by: Jason Jacobs Re: Can't connect php to mysql on linux 42197 by: John Huggins exclusive file locking under windows 42198 by: Monte Ohrt Announcing PHP-GTK 42199 by: Andrei Zmievski Javascript php 42201 by: kaab kaoutar 42202 by: Jason Jacobs related to my .htgroup question... 42203 by: Jason Jacobs 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] -- lets say we have a database with the State Names and cities, and I wanted to select all the cities in FL I would execute something like this mysql_query("SELECT * FROM cities WHERE state='FL'"); and lets say there are 50 records returned I want to be able to get all the cities in FL GA instead of just FL and display the results together as if it was 1 restult. Then the resul would be 100 records ( 50 FL 50 GA ). Thanks! I did look on php.net and in a php book I have, but could not find anything... ___ Jack Sasportas In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jack Sasportas) wrote: lets say we have a database with the State Names and cities, and I wanted to select all the
[PHP] Some search engine questions....
Hey guys, I've got a question regarding a search engine I have to write Basically what I have is this.. I have a table with a serialized array in it. I'd like to take that array and search for keywords... I've got a mySQL database and this is how I'm doing it... SELECT a FROM b,c WHERE(b.serializedarray LIKE CONCAT('%', c.keywords,'%')); Where b is the table containing the serialized data and c is a single column HEAP table with the list of keywords... Now... My question is kind of two fold... A) Is this the best way to do it? By Best I mean considering I am dealing with a serialized array and - thiis is my real question B) How do I show limited page results? I want to break up the results into groups of 5 per page and have x pages (count % 5). My problem is that the origional query gets lost once the page has returned the first set of results and I have no real way of keeping them... There can be too many to append to the A HREF of the link to the next page and I don't want to use form POSTS since I have to have buttons for all of them Any suggestions? John -- PHP General Mailing List (http://www.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/Cache Container.php /pear/Cache/Container file.php phplib.php shm.php
sbergmann Thu Mar 1 09:18:23 2001 EDT Modified files: /php4/pear/CacheContainer.php /php4/pear/Cache/Container file.php phplib.php shm.php Log: Added flushPreload() method. Index: php4/pear/Cache/Container.php diff -u php4/pear/Cache/Container.php:1.1 php4/pear/Cache/Container.php:1.2 --- php4/pear/Cache/Container.php:1.1 Thu Mar 1 08:32:29 2001 +++ php4/pear/Cache/Container.php Thu Mar 1 09:18:22 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $Id: Container.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +// $Id: Container.php,v 1.2 2001/03/01 17:18:22 sbergmann Exp $ /** * Common base class of all cache storage container. @@ -36,7 +36,7 @@ * not recommended! * * @author Ulf Wendel [EMAIL PROTECTED] -* @version $Id: Container.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +* @version $Id: Container.php,v 1.2 2001/03/01 17:18:22 sbergmann Exp $ * @package Cache * @access public * @abstract @@ -147,13 +147,8 @@ if ($expired = ($this-expires = time() || ($max_age $this-expires = time() + $max_age)) ) { $this-delete($id); + $this-flushPreload(); - // remove preloaded values - $this-id = ""; - $this-data = ""; - $this-expires = 0; - $this-unknown = true; - } return $expired; @@ -210,6 +205,7 @@ * @abstract */ function save($id, $data, $expire = 0) { +$this-flushPreload($id); return NULL; } // end func save @@ -223,6 +219,7 @@ * @abstract */ function delete($id) { +$this-flushPreload($id); return NULL; } // end func delete @@ -235,6 +232,7 @@ * @abstract */ function flush() { +$this-flushPreload(); return NULL; } // end func flush @@ -257,6 +255,7 @@ * @abstract */ function garbageCollection() { +$this-flushPreload(); } // end func garbageCollection /** @@ -288,6 +287,27 @@ return true; } // end func preload +/** +* Flushes the internal preload buffer. +* +* save(), delete() and flush() must call this method +* to preevent differences between the preloaded values and +* the real cache contents. +* +* @see preload() +*/ +function flushPreload($id = "") { + +if (!$id || $this-id == $id) { +// clear the internal preload values +$this-id = ""; +$this-data = ""; +$this-expires = -1; +$this-unknown = true; +} + +} // end func flushPreload + /** * Imports the requested datafields as object variables if allowed * Index: php4/pear/Cache/Container/file.php diff -u php4/pear/Cache/Container/file.php:1.1 php4/pear/Cache/Container/file.php:1.2 --- php4/pear/Cache/Container/file.php:1.1 Thu Mar 1 08:32:29 2001 +++ php4/pear/Cache/Container/file.php Thu Mar 1 09:18:23 2001 @@ -16,7 +16,7 @@ // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $Id: file.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +// $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $ require_once 'Cache/Container.php'; @@ -24,7 +24,7 @@ * Stores cache contents in a file. * * @author Ulf Wendel [EMAIL PROTECTED] -* @version $Id: file.php,v 1.1 2001/03/01 16:32:29 chagenbu Exp $ +* @version $Id: file.php,v 1.2 2001/03/01 17:18:23 sbergmann Exp $ */ class Cache_Container_file extends Cache_Container { @@ -94,6 +94,8 @@ function save($id, $data, $expire = 0) { +$this-flushPreload($id); + $file = $this-getFilename($id); if (!($fh = @fopen($file, "wb"))) return new CacheError("Can't access '$file' to store cache data. Check access rights and path.", __FILE__, __LINE__); @@ -115,6 +117,8 @@ function delete($id) { +$this-flushPreload($id); + $file = $this-getFilename($id); if (file_exists($file)) { @@ -130,6 +134,8 @@ function flush() { +$this-flushPreload(); + if (!($dh = opendir($this-cache_dir))) return new CacheError("Can't access the cache directory '$this-cache_dir'. Check access rights and path", __FILE__, __LINE__); @@ -167,6 +173,8 @@ */ function garbageCollection() { +$this-flushPreload(); + if (!($dh = opendir($this-cache_dir))) return new CacheError("Can't access cache directory.", __FILE__, __LINE__); Index: php4/pear/Cache/Container/phplib.php diff -u php4/pear/Cache/Container/phplib.php:1.1
[PHP-CVS] cvs: php4 /pear/Cache/Container db.php
chagenbuThu Mar 1 09:22:59 2001 EDT Added files: /php4/pear/Cache/Container db.php Log: almost working version. Index: php4/pear/Cache/Container/db.php +++ php4/pear/Cache/Container/db.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // // $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ require_once 'DB.php'; require_once 'Cache/Container.php'; /** * PEAR/DB Cache Container. * * CREATE TABLE cache ( * id varchar(32) NOT NULL DEFAULT '', * data text NOT NULL DEFAULT '', * expires int(9) NOT NULL DEFAULT 0, * changed timestamp(14), * INDEX(expires), * PRIMARY KEY(id) * ) * * @author Sebastian Bergmann [EMAIL PROTECTED] * @version $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ * @package Cache */ class Cache_Container_db extends Cache_Container { /** * Name of the DB table to store caching data * * @see Cache_Container_file::$filename_prefix */ var $cache_table = ''; /** * PEAR DB dsn to use. * * @var string */ var $dsn = ''; /** * PEAR DB object * * @var object PEAR_DB */ var $db; /** * * @parammixed */ function Cache_Container_db($options) { if (!is_array($options) || !isset($options['dsn'])) { return new CacheError('No dsn specified!', __FILE__, __LINE__); } $this-setOptions($options, array('dsn', 'cache_table')); if (!$this-dsn) return new CacheError('No dsn specified!', __FILE__, __LINE__); $this-db = DB::connect($this-dsn, true); if (DB::isError($this-db)) { return new CacheError('DB::connect failed: ' . DB::errorMessage($this-db)); } else { $this-db-setFetchMode(DB_FETCHMODE_ASSOC); } } function fetch($id) { $query = sprintf('SELECT data, expires FROM %s WHERE id = %s', $this-cache_table, "'" . $this-db-quoteString($id) . "'"); $res = $this-db-query($query); if (DB::isError($res)) return new CacheError('DB::query failed: ' . DB::errorMessage($res)); $row = $res-fetchRow(); if (is_array($row)) return array($row['expires'], $row['data']); } function save($id, $data, $expires = 0) { $query = sprintf('REPLACE INTO %s (data, expires, id) VALUES (%s, %d, %s)', $this-cache_table, "'" . $this-db-quoteString(serialize($data)) . "'", $expires, "'" . $this-db-quoteString($id) . "'"); $res = $this-db-query($query); if (DB::isError($res)) { return new CacheError('DB::query failed: ' . DB::errorMessage($res)); } } function delete($id) { $query = sprintf('DELETE FROM %s WHERE id = %s', $this-cache_table, "'" . $this-db-quoteString($id) . "'"); $res = $this-db-query($query); if (DB::isError($res)) return new CacheError('DB::query failed: ' . DB::errorMessage($res)); } function flush() { $query = sprintf('DELETE FROM %s', $this-cache_table); $res = $this-db-query($query); if (DB::isError($res)) return new CacheError('DB::query failed: ' . DB::errorMessage($res)); } function idExists($id) { $query = sprintf('SELECT id FROM %s WHERE ID = %s', $this-cache_table, "'" .
Re: [PHP] pleaaaaaaaase help!
From: "kaab kaoutar" [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 5:59 PM please i'm really in need of knowing if there is a way to do a php statement once a button is clicked! What you really need to understand is, that PHP is a SERVER-side scripting language. The only way to execute a statement when pressing a button is to use a CLIENT-side scripting language (JavaScript or VBScript if you're using Explorer only). PHP is only run when a page is requested, such as when pressing a link or submitting a form or the like. - Carsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP single user??
Rick - That was a typo. I have IIS 5 on my Win 2K and my friend has IIS 4 on the NT 4 box. Something that I believe is at the heart of the problem is the fact that in the ISAPI Filters, PHP is associated with php4isapi.dll and the green up arrow does not come up; there is a red down arrow instead. Todd Rick Hodger wrote: Todd Cary [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am having a very strange problem: PHP 4.0.4 on a NT 4 platform with IIS 5 is only allowing one surfer to do a DB Select. If the DB is busy with the first user, the page is not available to other users. And I have no problems with Win 2K. Am I missing something very obvious? Umm...is IIS5 not Win2k -only-? -- Rick @ DomainsBuy.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] -- Todd Cary Ariste Software [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] Bitwise solution?
I'm wondering how I can do the following (if it is possible at all): I have 2 values. The first is a constant while the second is not. The second value, in this case, is a unix time stamp and as such will change every time it is set, down to the second. I need to somehow merge the two values so that the new, merged value would be as (semi) unique as the timestamp value. I was thinking I could do something like this: ( var1 var2 ) But that generates an identical value every time. Is there a way I can do this? And no, I cannot just use the timestamp value. :P And microtime() isn't really an option either. :( Any help at all would be greatly appreciated! :) Chris
[PHP] PHP image browser
Can PHP GD-lib create an index with thumbnail images of all graphics in a directory? Has anyone done this? Specifically, I would like to create small (maybe 1/8 or 1/16 size) thumbnails on-the-fly and place them in an index.php page with links to the larger images. Thanks in advance, Tim Wright ::: ::: ::: ::: Timothy Wright::: ::: mailto:[EMAIL PROTECTED] ::: ::: Digital Network Enterprises ::: ::: http://www.01network.com ::: ::: ::: ::: (PGP Public Key ID: 0x891B2C91) ::: ::: -- PHP General Mailing List (http://www.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] Bitwise solution?
on 3/1/01 02:34 PM, [EMAIL PROTECTED] split open and melted thusly: I was thinking I could do something like this: ( var1 var2 ) i think what you want is: ${$var1$var2} But that would give me a value of a variable variable. And I need a numerical value so $var1 ="joe"; $var2 = date( "U" ); echo "$var1$var2"; won't do me any good. :/ I've a very odd predicament... Chris
[PHP] Odd PHP/MySQL Question
I have a user database where a year has to be put in. Now, I want to compile a list of each different year and how many users are in that year. Is there a way to do this beyond coding for each year: SELECT * FROM students WHERE year = '1983' ? - Kath
Re: [PHP] PHP image browser
Addressed to: "Timothy Wright" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Timothy Wright" [EMAIL PROTECTED] Thu, 1 Mar 2001 14:40:16 -0500 Can PHP GD-lib create an index with thumbnail images of all graphics in a directory? Has anyone done this? Specifically, I would like to create small (maybe 1/8 or 1/16 size) thumbnails on-the-fly and place them in an index.php page with links to the larger images. It can be done, but it is not fast enough to do in real time. The way I create thumbnails is ImageMagick. I keep my thumbnails in a hidden directory (.s) and create them like this: mkdir( "imagedir/.s" 0700 ); system( 'cp imagedir/*.jpg imagedir/.s' ); system( '/usr/local/bin/mogrify -geometry 150X150 imagedir/.s/*' ); The last command will take an image of any size and aspect ratio, maintain the aspect ratio and resize it so the largest dimension is 150 pixels. There are MANY other commands available. Your thunbmails have the same names as the full size files, but are stored in imagedir/.s/. Image Magick: http://www.imagemagick.org/ Rick Widmer Internet Marketing Specialists http://www.developersdesk.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP 4.0.4pl1 on Cobalt Raq 2
I have a Cobalt Raq 2 with with 2.0.34 kernel installed. When I compile PHP and then try to execute it, it will dump core with the following message: Floating point exception (core dumped) I'm untaring the files, cd'ing to the directory and running './configure' and then 'make'. The compile appears to work fine, yet when I run the php executable in the php directory, I get the above error. The only change I have made to the system is to install all the Cobalt security patches and then install flex 2.5.4 and bison 1.28. Otherwise it's a stock Raq2. One other thing: configure sees my system as mipsel-unknown-linux-gnu. Anyone have any suggestions? -- Matt Perry | matt at primefactor dot 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] Error, anyone seen this before?
hello, I am getting this error when I try to get an ftp_list. Warning: Unable to find ftpbuf 0 in c:\apache\htdocs\sitemaestro\scripts\formmail.php on line 72 and ideas? Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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] Odd PHP/MySQL Question
You could try something like this: SELECT year, count(studentID) FROM students GROUP BY year ...where studentID is the primary key column/field in your students table. Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here I have a user database where a year has to be put in. Now, I want to compile a list of each different year and how many users are in that year. Is there a way to do this beyond coding for each year: SELECT * FROM students WHERE year = '1983' ? - Kath
Re: [PHP] Odd PHP/MySQL Question
select count(*), year from students group by year; on 3/1/01 12:07 PM, Kath at [EMAIL PROTECTED] wrote: I have a user database where a year has to be put in. Now, I want to compile a list of each different year and how many users are in that year. Is there a way to do this beyond coding for each year: SELECT * FROM students WHERE year = '1983' ? - Kath -- PHP General Mailing List (http://www.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] Munging hidden/form variables
It is possible (I've done it) to find out all the variables that make up a form on a particular site, generate a similar form on your site with that form's action being the CGI/PHP script that the particular site uses to process the form once submitted, modify the values for the form variables to be anything you want and submit the form that resides on your site. This will basically submit totally fabricated data to the foriegn site and possibly screw them up somehow and/or in some way. Is there any way to defend against this? Is there any way to ensure that when a form is submitted that the submission request originated from your site/domain and not somewhere else? Any help would be greatlyl appreciated. Chris
[PHP-CVS] cvs: php4 /pear Makefile.in /pear/Cache Graphics.php Output.php
sbergmann Thu Mar 1 11:22:26 2001 EDT Added files: /php4/pear/CacheGraphics.php Output.php Modified files: /php4/pear Makefile.in Log: Added Graphics and Output Cache. Index: php4/pear/Makefile.in diff -u php4/pear/Makefile.in:1.70 php4/pear/Makefile.in:1.71 --- php4/pear/Makefile.in:1.70 Thu Mar 1 09:02:05 2001 +++ php4/pear/Makefile.in Thu Mar 1 11:22:25 2001 @@ -36,6 +36,8 @@ Benchmark/Timer.php \ Cache.php \ Cache/Container.php \ + Cache/Graphics.php \ + Cache/Output.php \ Cache/Container/db.php \ Cache/Container/file.php \ Cache/Container/phplib.php \ Index: php4/pear/Cache/Graphics.php +++ php4/pear/Cache/Graphics.php ?php // +--+ // | PHP version 4.0 | // +--+ // | Copyright (c) 1997, 1998, 1999, 2000, 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 at 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: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // // $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ require_once'Cache.php'; /** * Graphics disk cache. * * The usual way to create images is to pass some arguments that describe the image * to a script that dynamically creates an image. For every image of a page * a new PHP interpreter gets started. This is a good way to kill your webserver. * * When dealing with dynamically generated images you should not call another script * to generate the images but generate the images by the script that produces the page * that contains the images. This is a major improvement but it's only half the way. * * There's no need to rerender an image on every request. A simple disk cache can reduce * the computation time dramatically. This is what the class graphics_cache is for. * * Usage: * * // create an instance of the graphics cache * $cache = new graphics_cache; * * $img = ImageCreate(...); * * // compute an ID for your image based on typical parameters * $id = m5d( $size, $colors, $label); * * // check if it's cached * if (!($link = $cache-getImageLink($id, "gif"))) { * * // hmmm, it's not cached, create it * ... * // cacheImageLink() and cacheImage() make the ImageGIF() call! * // cacheImage() returns the value of ImageGIF() [etc.], cacheImageLink() returns a URL * $link = $cache-cacheImageLink($id, $img, "gif"); * * } * * // Ok, let's build the ImageLink * $size = getImageSize($link[0]); * printf('img src="%s" %s', $link[1], $size[3]); * * // for cacheImage(): * // header("Content-type: image/gif"); print $cache-cacheImage($id, $img, "gif"); * * * The class requires PHP 4.0.2+ [ImageType()]. Note that cacheImage() works with * the output buffer. Modify it if required! * * @author Ulf Wendel [EMAIL PROTECTED] * @version $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ */ class graphics_cache extends cache { /** * Cache URL prefix. * * Make sure that the cache URL prefix points to the $cache_dir, otherwise * your links will be broken. Use setCacheURL to specify the cache_url and * setCacheDir() for the cache_dir. * * @var string * @see setCacheURL(), setCacheDir() */ var $cache_url = ""; /** * Directory where cached files get stored. * s * Make sure that the cache_dir is writable and offers enough space. Check * also if your cache_url points to the directory. Use setCacheDir() to set * the variable. * * @var string * @see setCacheDir(), setCacheURL() */ var $cache_dir = ""; /** * Nameprefix of cached files. * * Per default the prefix "graphics_" gets used. You might use this * for versioning or to ease (manual) clean ups. * * @var string */ var $cache_file_prefix = "graphics_"; /** * Mapping from supported image type to a ImageType() constant. * * Referr to the PHP manual for more informations on ImageType() * * @var array *
RE: [PHP] Munging hidden/form variables
Is there any way to defend against this? Is there any way to ensure that when a form is submitted that the submission request originated from your site/domain and not somewhere else? Knowing that $HTTP_REFERER cannot be relied on as containing valid data (as some browsers don't support it)? Chris
[PHP] The neverending Session
I'm working on a chat of sorts, and in the main frame that shows the actual messages, there is an infinite loop (while(1)) ... now, for whatever reason, when the browser is closed, the loop/thread/whatever just won't die. There are sessions involved, and the loop basically just checks a MySQL DB for new posts, and updates a timestamp in a user database. Any idea of why the loop/thread/whatever won't die? Thanks, Sean B. -- PHP General Mailing List (http://www.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] What did I forget?
Hello everybody, Im a spanish newbie in PHP. Ive installed Apache Web Server over my Windows 2000 Server and after that I did the same with PHP4. I followed the docs step by step and I think I did everything they say. I configured php.ini and httpd.conf to suply my needs and I restarted Apache but when I runned a simply script like this: html head/head body ?php echo "Hola, mi primera pgina PHP"; phpinfo(); ? /body /html The browser gave me an Internal Error, and the Apaches error logs says: [Thu Mar 01 21:29:06 2001] [error] [client 10.0.0.3] Premature end of script headers: d:/php/php.exe I dont known whats wrong, anybody can help me? thanks Borja. -- PHP General Mailing List (http://www.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/Cache Graphics.php Output.php
sbergmann Thu Mar 1 11:38:04 2001 EDT Modified files: /php4/pear/CacheGraphics.php Output.php Log: I have nothing to do with this code :-) Index: php4/pear/Cache/Graphics.php diff -u php4/pear/Cache/Graphics.php:1.1 php4/pear/Cache/Graphics.php:1.2 --- php4/pear/Cache/Graphics.php:1.1Thu Mar 1 11:22:25 2001 +++ php4/pear/Cache/Graphics.phpThu Mar 1 11:38:04 2001 @@ -13,10 +13,9 @@ // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel [EMAIL PROTECTED] | -// | Sebastian Bergmann [EMAIL PROTECTED] | // +--+ // -// $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +// $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ require_once'Cache.php'; @@ -67,7 +66,7 @@ * the output buffer. Modify it if required! * * @author Ulf Wendel [EMAIL PROTECTED] -* @version $Id: Graphics.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +* @version $Id: Graphics.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ */ class graphics_cache extends cache { Index: php4/pear/Cache/Output.php diff -u php4/pear/Cache/Output.php:1.1 php4/pear/Cache/Output.php:1.2 --- php4/pear/Cache/Output.php:1.1 Thu Mar 1 11:22:25 2001 +++ php4/pear/Cache/Output.php Thu Mar 1 11:38:04 2001 @@ -13,12 +13,11 @@ // | [EMAIL PROTECTED] so we can mail you a copy immediately. | // +--+ // | Authors: Ulf Wendel [EMAIL PROTECTED] | -// | Sebastian Bergmann [EMAIL PROTECTED] | // | Christian Stocker [EMAIL PROTECTED] | // | Vinai Kopp [EMAIL PROTECTED] | // +--+ // -// $Id: Output.php,v 1.1 2001/03/01 19:22:25 sbergmann Exp $ +// $Id: Output.php,v 1.2 2001/03/01 19:38:04 sbergmann Exp $ require_once'Cache.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]
[PHP] security approach?
Hi folks! I am facing a common problem, related to allowing my shell users to use php. I would like to prevent them from forking process. How can this be accomplished? Is there any way to get the proccess creation wrapped by suexec? -- PHP General Mailing List (http://www.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] Hiding php Code
That's the problem, I don't want the web server user or administrator to see the code. Rene Kath wrote: You might be able to limit who the file is readable by to just the web server user. - Original Message - From: "Rene Maldonado" [EMAIL PROTECTED] To: "Lista PHP" [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 4:02 PM Subject: [PHP] Hiding php Code Hi all, I need to hide the php code, on the server. I know that php is not compiled, so, is there a way to do this?? Thanks Rene -- PHP General Mailing List (http://www.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] Hiding php Code
If you don't want the admin or web server user to see your code, you may want to consider Zend's Encode product (http://www.zend.com/zend/products.php#encoder) which encodes your PHP code for you. BUT, this can be rather expensive (depending on your use) and you probably still need your Administrator to install it for you, so I'm not sure if this does you any good or not. Josh Hoover KnowledgeStorm, Inc. Searching for a new IT solution for your company? Need to improve your product marketing? Visit KnowledgeStorm at www.knowledgestorm.com to learn how we can simplify the process for you. KnowledgeStorm - Your IT Search Starts Here That's the problem, I don't want the web server user or administrator to see the code. Rene
[PHP-CVS] cvs: php4 / NEWS
sbergmann Thu Mar 1 11:42:07 2001 EDT Modified files: /php4 NEWS Log: Added note about PEAR/Cache. Index: php4/NEWS diff -u php4/NEWS:1.601 php4/NEWS:1.602 --- php4/NEWS:1.601 Thu Mar 1 05:44:04 2001 +++ php4/NEWS Thu Mar 1 11:42:07 2001 @@ -2,6 +2,7 @@ ||| ?? ??? 200?, Version 4.0.5 +- Added PEAR/Cache as a generic Caching System. (Sebastian, PEAR/Cache) - IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via c-client2000 (kalowsky) - Upgraded PCRE to version 3.4. (Andrei) -- 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 /pear/Cache/Container db.php
sbergmann Thu Mar 1 11:51:49 2001 EDT Modified files: /php4/pear/Cache/Container db.php Log: Added Chuck as author. Index: php4/pear/Cache/Container/db.php diff -u php4/pear/Cache/Container/db.php:1.1 php4/pear/Cache/Container/db.php:1.2 --- php4/pear/Cache/Container/db.php:1.1Thu Mar 1 09:22:59 2001 +++ php4/pear/Cache/Container/db.phpThu Mar 1 11:51:49 2001 @@ -14,9 +14,10 @@ // +--+ // | Authors: Ulf Wendel [EMAIL PROTECTED] | // | Sebastian Bergmann [EMAIL PROTECTED] | +// | Chuck Hagenbuch [EMAIL PROTECTED] | // +--+ // -// $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ +// $Id: db.php,v 1.2 2001/03/01 19:51:49 sbergmann Exp $ require_once 'DB.php'; require_once 'Cache/Container.php'; @@ -34,7 +35,7 @@ * ) * * @author Sebastian Bergmann [EMAIL PROTECTED] - * @version $Id: db.php,v 1.1 2001/03/01 17:22:59 chagenbu Exp $ + * @version $Id: db.php,v 1.2 2001/03/01 19:51:49 sbergmann Exp $ * @package Cache */ class Cache_Container_db extends Cache_Container { -- 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] SetCookie
How can I set cookies during a login for fields in the a table? Example set cookie for UserID which is a file in the same table. Also how would I retrieve that info? Thanks in advance... David Smith ?php $auth = false; // Assume user is not authenticated if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) // Connect to MySQL mysql_connect( 'localhost', 'root', '**' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'indywebdesign' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM customers WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) // A matching row was found - the user is authenticated. $auth = true; } } if ( ! $auth ) header( 'WWW-Authenticate: Basic realm="Customer Support"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else echo '!-- Login Successful --'; } ? David Smith Indy Web Design http://www.indywebdesign.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] wrapper (simple questions)
Is there any way to have process started by a php script wrapped by a similar suexec utility (like in apache)? Plans to support such a funcionality? When? -- PHP General Mailing List (http://www.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] Hebrew websites transition with php3 ..
Hey! I'm sending this e-mail only to you, since it's way off-topic from being in the php-general mailing list. I have downloaded Netscape 6, it seems that Logical Hebrew isn't support yet - only Visual. So if Netscape 4.x (except for the 4.61 version developed by IBM), Netscape 6, and Opera does not support Logical Hebrew why should I use it?? What do other Hebrew web sites do regarding this matter? Do they make two versions of the same web site, one for Netscape and one for IE? For conclusion - I'm working on a Hebrew website. I want this website to look ok in both browsers (IE and Netscape), and I want this to be done the easiest way possible. What should I do? Use Logical Hebrew and ignore the fact that Netscape does not support it? or maybe I should use Visual Hebrew (reverse all the Hebrew words using some utility such as - "EasyHEB"), or maybe I should use Logical Hebrew in the HTML itself and turn it to Visual using a PHP script? (doing that would be rather complicated.. hebrev() and hebrevc() aren't enough..) Thank you in advance - Aviv Revach At 17:20 01/03/01 +0200, Meir kriheli wrote: As Boaz suggested look into hebrev and hebrevc functions. They are the only ones I can think about right now. check http://php.net/hebrev http://php.net/hebrevc the manual states that this functions are defined in PHP3 and PHP4. HTH -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd On Wednesday 28 February 2001 17:00, Aviv Revach wrote: Hey! Ok, I think that I will stick to logical Hebrew as most of you suggested. But still, I'm interested in knowing how could I take a HTML document which contains HTML tags, Hebrew words and English words, and reveres only the Hebrew words (making them Visual Hebrew) using only php3 functions (the server I'm using doesn't support php4). It would be great if anyone could point of a solution for doing that. By writing a script that will do that, I will both options - show the Hebrew in my website as Logical or use a script to translate it into visual Hebrew for browsers who do not support it. Thank you in advance - Aviv Revach At 16:45 01/03/01 +0200, Meir kriheli wrote: On Thursday 01 March 2001 09:17, Boaz Yahav wrote: I think that Aviv should stick to logical hebrew (which is the standart, as mentioned by Boaz). I don't use IE (I'm using Linux) and I can access all the logical sites with no problem, including the "html dir=rtl" tag and the 'direction: rtl' style (thank god for konqueror). Netsacpe 6/Mozilla should support logical Hebrew pretty soon so no trouble there, and if Opera wants to gain market share they shold support the standart (logical) in here to. Altough the 3% estimate seems wrong (as noted by Manuel Lemos - Hi :-) , the majority of users in Israel are using IE. One more problem you'll have with visaul hebrew is the ugly line breaks which cause the end of the sentence to appear before the start of it. I had a long discussion of this subject with Manuel off this mailing list. I can send you a digest of it if you wish. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd Hi Manuel, All is great, working hard to make WeberDev.com a better place for the community and trying to make people understand we don't make $$$ from it :) The IE / NN war was one that left no chance for NN in Israel. While MS spent millions in making all of their products in Hebrew, including the free IE, NN refused to support Hebrew. While the 3% is correct for Israel, it's far from being true on an international basis. There are 3 large portals in Israel, 1 supports only IE (MSN), and the other two that supported NN, until not long ago, started to develop for IE only about 4-6 months ago. This is why there is no reason to support anything other than IE in Israel. With all due respect to people that like other browsers, developing for all browsers costs lots of $$$ and as long as portals are free and loosing lots of $$$ it's not profitable to develop for all. Bottom line, as the CTO of one of those portals I say go with Logical Hebrew and dump Netscape (In Israel Only). and don't forget to add the HTML DIR="rtl" tag at the beginning of each page. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 10:51 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Hebrew websites transition with php3 .. Hello Boaz, How are you doing these days? :-) On 28-Feb-01 16:39:35, you wrote: The figures I'm giving you are from one of the two biggest portals