RE: [PHP] Odd behavior with unset, array indexes, and types
Curt Zirzow wrote: To simplify things: $a[2] = '1'; $k = (double)2; echo isset($a[$k]); unset($a[$k]); echo isset($a[$k]); echo - expect 1\n; Result: 11 - expect 1 Yeah, my version was just a wee bit verbose. :) It's the behavior that is specific to unset() that I'm puzzled about. The problem is, array hash's and indexes must be either integer or string as noted in the manual, so technically it really isn't a bug even though it appears to behave like one. Yeah, I agree. Personally, IMHO if there is a problem the problem is with isset(), not unset(). IMHO isset($var[(double) 2]) should return false at the least. Ideally I think any attempt to use a double as an array index should produce a warning (or notice), just like trying to use a resource or object does (Illegal offset type). Although if the error didn't mention double specifically it'd probably confuse the heck out of people. I would have to agree that there does seem to be inconsistencies between isset and unset, So perhaps mabey submiting a Feature Request showing how close php seems to supporting (floats) as indexes. Probably a good idea. or to make the above not look too silly: $k = (int) ceil(3/4); That's what I ended up doing. I lost a couple of hours and quite a bit of hair first, though. :) Thanks for the feedback... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Regular Expression - it works but uses way too much memory ?
Sorry to post this again but it's a little urgent. The preg_replace in my script allocates a little memory every time it is called and doesn't free it again untill the script ends. I don't know if it is normal behaviour for preg_replace or if it is my reg. exp. that causes this. The problem is that I call preg_replace a little more than 3 times and that causes quite a lot of memory to be allocated. Doesn't anybody know if this is a problem in preg_replace or is there a better maillist/forum for this kind of questions? Any answer will be appreciated :) Ulrik S. Kofod sagde: $replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/iS; $with = $1error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. group=\.$corr['grupper'].\ class=\.$corr['ordklasse'].\ corrected-from=\.$corr['typed'].\ corrected-to=\.$corr['corrected'].\$3error-end sourcetext=.$corr['sourcetext']. id=.$corr['id'].$4; $text = preg_replace ($replace,$with,$text,1); Above preg_replace works as expected, I have it inside a loop that processes 1000 texts and replaces a total of 3 words. The problem is that it accumulates memory up to 200MB, that isn't freed again until the script completes? It runs for about 1 - 2 minutes and allocates more and more memory. If I comment out the preg_replace the memory usage looks normal, so I'm pretty sure that is where the problem is? My question is basically, is it something in my reg. exp. that it totally nuts or is it normal behaviour for preg_replace to allocate memory and not free it again until the script ends? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] function for string to array (map)?
Is there a standard function that converts a string to an array with proper keys, not auto generated integers? I've found myself calling explode() twice. split(), etc. do not seem to offer any improvement. $str = a:x,b:y,c:z; $arr = explode(,, $str); foreach ($arr as $item) { list($key, $value) = explode(:, $item); $map[$key] = $value; } Is there a foo() that would do something like this? $map = foo(,, :, $str); -- Pete Forman-./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent [EMAIL PROTECTED]-./\.- opinion of Schlumberger, Baker http://petef.port5.com -./\.- Hughes or their divisions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: function for string to array (map)?
No, because that's not a standard format. You'll have to write your own function (as you've done). If you're looking to store an array as a string, look at serialize() Pete Forman [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Is there a standard function that converts a string to an array with proper keys, not auto generated integers? I've found myself calling explode() twice. split(), etc. do not seem to offer any improvement. $str = a:x,b:y,c:z; $arr = explode(,, $str); foreach ($arr as $item) { list($key, $value) = explode(:, $item); $map[$key] = $value; } Is there a foo() that would do something like this? $map = foo(,, :, $str); -- Pete Forman-./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent [EMAIL PROTECTED]-./\.- opinion of Schlumberger, Baker http://petef.port5.com -./\.- Hughes or their divisions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getimagesize() not working between Dirs?
Hi all, I've got two web forms that handle photo uploads. In one directory ... getimagesize() works fine, in the other... it doesn't: Directory that it works. /php/webForm1.html (has action to /php/submitForm.php) /php/submitForm.php Directory that doesn't work. /otherDir/webForm2.html (has action to /php/submitForm.php) //same as above. the submitForm.php is the script that processes both webForms found in different directory's. Everything else on the form from /otherDir/webForm2.html can be echo'd out fine. excerpt from submitForm.php script: if ($Photo) { $photoSize=GetImageSize($Photo); if ($photoSize[2]==1) { $photofinal=$uniqueID._1..gif; rename (lPhoto,$photofinal); } elseif ($photoSize[2]==2) { $photofinal=$uniqueID._1..jpg; rename ($Photo,$photofinal); //WORKS HERE WITH 1ST EX. } elseif ($photoSize[2]==3) { $photofinal=$uniqueID._1..png; rename (lPhoto,$photofinal); } else { echo p p; echo strongYour photo must be in .gif, .jpg or .png format only./strongp; echo a href=\javascript:history.back()\Back/a; exit; //THIS IS WHERE IT'S EXITING EVEN THOUGH THE PHOTO IS TYPE .jpg IN BOTH TEST CASES. } } //End if Photo. submitForm.php has 775 permissions. I think it has to do with the fact that the file is uploaded to forms in the two different dir's. But why would one work and the other not? Any ideas?? Thanks in advance.
[PHP] Re: DBG Debugger
Gary wrote: I've downloaded DBG but can't get it to work with any of the IDEs it supposedly works with. Can anyone supply links to an IDE and a DBG version that integrate and work together correctly? I have PHPEdit 7.1.132 running with the 2.11.26 and that all runs fine, and I'm not going to change it ;) Its working into PHP4 and PHP5. Also PHPEclipse has a working setup with Eclipse2 which I was using, there are still a few problems with the Eclipse3 builds. Once that is tidied up, then I will switch away from PHPEdit as the debugger. All the code is managed in Eclipse3 now. -- Lester Caine - L.S.Caine Electronic Services -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please Help, returning path
is there a function to detect the path of the directory i need my file to detect the path it is on it, not the http path but the path on server please help me with that IncrediMail - Email has finally evolved - Click Here
[PHP] Re: Please Help, returning path
Hello, On 06/18/2004 05:40 AM, Me2resh wrote: is there a function to detect the path of the directory i need my file to detect the path it is on it, not the http path but the path on server please help me with that getcwd() or dirname($_SELF); -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] This weird behavior is killing
Daniel Silva [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Php.Net wrote: The way PHP handles includes is very weird, for example: - create a folder, name it f ex includes - create 2 sub-folders, call them level1 and level2 - now lets create a file, includes.php includes.php -- ? echo testing; ? -- - now create 3 dummy files, name them dummy.php and distribute them through each folder, in each dummy.php include includes.php ? include_once ( 'includes.php' ); ? ? include_once ( '../includes.php' ); ? ? include_once ( '../../includes.php' ); ? - now in the dummy.php on the last level, include the dummy.php from the level below ? include_once ( '../../includes.php' ); include_once ( '../dummy.php' ); ? - now try to run dummy.php from the last level ( the one with 2 includes ), what do you get ? a nice message error stating Warning: main() [function.include]: Failed opening '' for inclusion (include_path='.;C:\php5\pear') in D:\shared\www\includes\level1\dummy.php on line 2 it's like php processes the first include relative path, goes down the file system tree, stays there and then caches the path, because it doesn't reset to the including script path, it just stays there ... this is very fustrating when you must/want to include one or more files in every script, and you have several folders and sub-levels. there are several workarounds, like out them in a common folder, and add it to the include_path either directly in php.ini or using ini_set(), but that would be a real pain in the arse ... solutions ? regards, idss Before anyone asks me, yes, the behaviour is the same even with the use of include_once ou require_once =) The only workaround I see is using a full system path. You could define it in a config file as a constant: define('DIR_INCLUDE', '/path/to/your/file/'); Then use it in your scripts: include_once DIR_INCLUDE . 'file.php'; include_once DIR_INCLUDE . 'file2.php'; HTH, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] function for string to array (map)?
- Original Message - From: Pete Forman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, June 17, 2004 7:22 PM Subject: [PHP] function for string to array (map)? Is there a standard function that converts a string to an array with proper keys, not auto generated integers? I've found myself calling explode() twice. split(), etc. do not seem to offer any improvement. $str = a:x,b:y,c:z; $arr = explode(,, $str); foreach ($arr as $item) { list($key, $value) = explode(:, $item); $map[$key] = $value; } Is there a foo() that would do something like this? $map = foo(,, :, $str); -- Pete Forman-./\.- Disclaimer: This post is originated WesternGeco -./\.- by myself and does not represent [EMAIL PROTECTED]-./\.- opinion of Schlumberger, Baker http://petef.port5.com -./\.- Hughes or their divisions. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You just defined your foo function ;-) Regards, Marius -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Computer algebra in PHP
Does anyone know of any PHP scripts which perform simple computer algebra functions in PHP? For example, (using a Maple-like syntax) expand( (2*x-2)^4 ); diff( sin(x^2), x); factor( x^2+2*x+1, x); and so on. Many thanks Chris Sangwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to determine animated status of gif ?
Hi, No php function found to determine if a gif is animated or not ! May you help me to do that ? -- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Solaris - IPlanet - Initialized PHP Module frequently
Hi all, Produktion System: SunOS su6-5 5.8 Generic_108528-15 sun4u sparc SUNW,Sun-Fire-280R IPlanet 4.1 sp 14 gcc version 3.1 ist not possible to create a Backtrace, weve also more then one Problem i think, ok Step by Step: Our Problem: Iplanet Webserver is terminated with Signal SIGBUS und SIGSEGV watchdog is restarting it It may be a Problem with OCI8 requests and PHP but were not sure. Weve tried to reproduce the errors and done some tests with another Solaris Workstation(SunOS sx0172 5.8 Generic_117000-03 sun4u sparc SUNW,Ultra-5_10) Iplanet and PHP. Its possible to get info.php(phpinfo()) with Apache Bench without Errors at this System. In Produktion we also can get the info.php without errors(same PHP compile Options). If we try with real traffic/live traffic at the production System we get Initialized PHP Module. We also cant locate the PHP code that caused the errors. There also no regularities in the logs apparent. Here the Logs and Infos: IPlanet error.log [17/Jun/2004:19:20:05] info (23922): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:21:19] info (23978): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:21:59] info (24004): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:22:04] info (24037): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:22:35] info (24048): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:22:38] info (24049): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:31:53] info (24611): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:37:04] info (24932): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:19:41:22] info (25152): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:20:01:19] info (26380): php4_init reports: Initialized PHP Module (128 threads exspected) [17/Jun/2004:20:06:31] info (26660): php4_init reports: Initialized PHP Module (128 threads exspected) /var/adm/messages Jun 17 19:20:04 su00056 uxwdog[15154]: [ID 767207 daemon.error] server terminated (signal 11): watchdog is restarting it Jun 17 19:22:37 su00056 last message repeated 5 times Jun 17 19:31:52 su00056 uxwdog[15154]: [ID 767207 daemon.error] server terminated (signal 10): watchdog is restarting it Jun 17 19:37:02 su00056 last message repeated 2 times Jun 17 19:41:21 su00056 uxwdog[15154]: [ID 767207 daemon.error] server terminated (signal 11): watchdog is restarting it Jun 17 20:01:17 su00056 uxwdog[15154]: [ID 767207 daemon.error] server terminated (signal 11): watchdog is restarting it Jun 17 20:06:30 su00056 last message repeated 2 times Error count can be up to 3 or more times, restarts per second Produktion System: SunOS su6-5 5.8 Generic_108528-15 sun4u sparc SUNW,Sun-Fire-280R IPlanet 4.1 sp 14 gcc version 3.1 we've tryed php-4.3.5-DEV up to 4.3.7 Configure Options for PHP: ./configure \ --prefix=/opt/php/home.intranet.de/php-4.3.7 \ --with-mysql=no \ --enable-track-vars \ --with-gd \ --with-jpeg-dir=/usr/local/jpeg-6b \ --with-png-dir=/usr/local/libpng-1.2.5 \ --with-zlib-dir=/usr/local/zlib-1.1.4 \ --with-freetype-dir=/usr/local/freetype-2.1.3 \ --enable-libgcc \ --with-nsapi=/opt/netscape/server4 \ --with-ldap=/usr/local/ldapsdk-30 \ --with-oci8=/opt/oracle/8.1.7 we've also tryed --enable-sigchild i also enabled for debugging --enable-debug Infos from the Net: http://bugs.php.net/bug.php?id=15450 http://bugs.php.net/bug.php?id=16996 http://www.mail-archive.com/[EMAIL PROTECTED]/msg105908.html Next Problem Backtrace for SIGSEGV: /var/adm/messages: Jun 17 10:51:18 su6-5 genunix: [ID 603404 kern.notice] NOTICE: core_log: ns-httpd[15821] core dumped: /var/core/core.ns-httpd.15821.su6-5.60001.60001.1087462271 Jun 17 10:51:18 su6-5 uxwdog[15820]: [ID 767207 daemon.error] server terminated (signal 11): watchdog is restarting it bash-2.03# gdb /opt/netscape/server4/bin/https/bin/ns-httpd core.ns-httpd.15821.su6-5.60001.60001.1087462271 GNU gdb 6.0 Copyright 2003 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as sparc-sun-solaris2.8...(no debugging symbols found)... Core was generated by `ns-httpd -d /opt/netscape/server4/https-home-intranet/config'. Program terminated with signal 11, Segmentation fault. Reading symbols from /opt/netscape/server4/bin/https/lib/libns-httpd40.so... (no debugging symbols found)...done. Loaded symbols for /opt/netscape/server4/bin/https/lib/libns-httpd40.so Reading symbols
[PHP] Anyone have experiences with OCI9 and PHP ??
Hi all, is it possible to use an actuall Oracle-Client (Version = 9) with PHP ?? Dose anyone habe experiences here ? Regards Christian -- /\ /\/ \/\ Powerd by llbc.de - letz board it, yeahhh !!/ \ \ \ \ --- / / \ \ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] Regular Expression - it works but uses way too much memory ?
On Fri, 18 Jun 2004 08:57:19 +0200 (CEST), Ulrik S. Kofod [EMAIL PROTECTED] wrote: Sorry to post this again but it's a little urgent. The preg_replace in my script allocates a little memory every time it is called and doesn't free it again untill the script ends. I don't know if it is normal behaviour for preg_replace or if it is my reg. exp. that causes this. The problem is that I call preg_replace a little more than 3 times and that causes quite a lot of memory to be allocated. $replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/iS; $with = $1error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. group=\.$corr['grupper'].\ class=\.$corr['ordklasse'].\ corrected-from=\.$corr['typed'].\ corrected-to=\.$corr['corrected'].\$3error-end sourcetext=.$corr['sourcetext']. id=.$corr['id'].$4; $text = preg_replace ($replace,$with,$text,1); The problem is that it accumulates memory up to 200MB, that isn't freed again until the script completes? The S modifier that you're using means that it's storing the studied expression. If the regexp changes each time around the loop then over 3 iterations, that'll add up. See if removing that modifier helps at all. $replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)(.*)/i; If that's not it, then these *might* save you some memory, although I've not tested them: I'm not entirely sure why you're matching (.*) at the end then putting it back in with your replacement text. Without running it, I'd have thought that you could leave out the (.*) from your pattern and the $4 from your replacement and get exactly the same effect. $replace = /^(([a-z]+?[^a-z]+?){.($count).})(.$typedmask.)/i; ... sourcetext=.$corr['sourcetext']. id=.$corr['id'].; You could use a non-capturing subpattern for $2 which you're not using in your replacement. $replace = /^((?:[a-z]+?[^a-z]+?){.($count).})(.$typedmask.)/i; And maybe a look-behind assertion for the first subpattern rather than a capturing pattern then re-inserting $1. $replace = /^(?=(?:[a-z]+?[^a-z]+?){.($count).})(.$typedmask.)/i; $with = error-start sourcetext=.$corr['sourcetext']. id=.$corr['id']. ... -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to determine animated status of gif ?
Pascal Landeau wrote --- napsal:: Hi, No php function found to determine if a gif is animated or not ! May you help me to do that ? -- [EMAIL PROTECTED] IIRC the information is stored at a fixed offset in the file. Read the specification. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to determine animated status of gif ?
Marek Kilimajer wrote --- napsal:: Pascal Landeau wrote --- napsal:: Hi, No php function found to determine if a gif is animated or not ! May you help me to do that ? -- [EMAIL PROTECTED] IIRC the information is stored at a fixed offset in the file. Read the specification. Well, I just checked it and I was wrong. You have to count the number of Image Descriptors. Good Luck :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call to undefined function: bindtextdomain()
Hi I am running Suse Linux 8.2, Apache 1.3.28, MySQL 4 and PHP 4.3.3 - all installed from source as I couldn't get the necessary integration when using rpms. I have several production systems working with this configuration. However, I now need to set up another one, and this one can't find bindtextdomain(). I realised that to get this function I needed to compile php with the --with-gettext switch. So, my question is, having not compiled php with that switch in the first place, how can I get the functionality I need into PHP without breaking everything else? Just to re-iterate, I HAD to compile Apache, MySQL and PHP together from source originally to get all of the required integration. What I want to avoid is having to install all three again! Is this possible? Just for info, I used this guide the first time I set up AMP (http://www.devshed.com/c/a/PHP/The-Soothingly-Seamless-Setup-of-Apache- SSL-MySQL-and-PHP/) Thanks Mick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone have experiences with OCI9 and PHP ??
I've used PHP with Oracle 10g. On Sex, 2004-06-18 at 10:46, [EMAIL PROTECTED] wrote: Hi all, is it possible to use an actuall Oracle-Client (Version = 9) with PHP ?? Dose anyone habe experiences here ? Regards Christian -- Lego my ego, and I'll lego your knowledge. signature.asc Description: This is a digitally signed message part
Re: [PHP] Re: Please Help, returning path
On Fri, 18 Jun 2004 05:46:12 -0300, Manuel Lemos [EMAIL PROTECTED] wrote: On 06/18/2004 05:40 AM, Me2resh wrote: is there a function to detect the path of the directory i need my file to detect the path it is on it, not the http path but the path on server please help me with that getcwd() or dirname($_SELF); or to get the path of the actual file rather than the script: dirname(__FILE__); -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SQL Query Statement for MySQL... (DataType -- TEXT vs BLOB)
Scott, As the quote suggests. If you require the ability to query those fields use TEXT, if you do not, use BLOB. Scott Fletcher wrote: I'm wrestling over deciding on which data type to go with, TEXT or BLOB. I have one table with one column of 400 characters, I was thinking that TEXT may be the way to go for that one. I also have another table that use 4 columns of 800 characters along with 5 columns that use 250 characters. I'm thinking of using TEXT for 9 of those columns. The reason is because I read the MySQL Manual there that say TEXT and BLOB are pretty much the same in many ways, the only thing different is that BLOB use VARCHAR Binary while TEXT use VARCHAR. But reading the article somewhere (not part of MySQL's Manual) say this... --snip-- If it doesn't have to be searchable then a BLOB might be more efficient and you shouldn't have to worry about size (Like size is important? ). The reason being that BLOB information is stored seperate from the table data and is related by a reference number in the table. This keeps the table smaller and faster as I understand. --snip-- So, I don't feel too sure what to decide on... Care for some advice or recommendation?? Thanks, Scott Fletcher -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: crazy readdir bug
Matt Richards wrote: Imagine the following: 362class someClass { 363 function someFunction() { 364if($rDirectory = opendir(/templates)) { 365 while(false != ($strFile = readdir($srDirectory))) { 366print $strFile.br /; 367 } 368 } 369 } 370} line 364 $rDirectory line 365 $srDirectory so $srDirectory does not exist. -Peter The class is constructed successfully, the function is called successfuly, the if($rDirectory = opendir(/templates)) statement returns true, and the directory most certainly exists, but as soon as an attempt to read the contents of the directory occurs, the once valid resource ($rDirectory) becomes invalid: Warning: readdir(): 36 is not a valid Directory resource in D:\inetpub\wwwroot\phpSLearningDev\root\components\installer\inc\installer.php on line 365 if the code is removed from both the class and function, it executes fine. I am currently working on a Windows 2003 server (not my choice) and an internal (non network (SMB)) HDD. I can't imagine that simply being inside a class could cause this. Am I missing something!?!?!? I regard myself as a fairly proficient PHP developer, but this one has got a whole dev team stumped. Any thoughts appreciated. Matt Richards matt_DOT_richards_AT_NOSPAM_safetymedia_DOT_co_DOT_uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] borrowing cookies
Hello... Instead posting a code I'll post short description of situation; now I'm totally stuck with no ideas, so there's no way of talking aoute code ... If you want to skip it, (that cursed) question is at the bottom of the text. Problem : There's a Site (called later a ... site :) ) which is frequently visited by me and some of my friends. Site requires login (and it siply doesn't allows to pass beyond login screen and about section), but after first login recognizes all further calls (aah, freshly baked cookies). Site gives you variable information that depend on your login (this means I'm not neccesarily seeing what other people will see), starting from Welcome, XYZ. I had wanted to simplyfy life and created on my webpage PHP-based Portal to acces site. Portal groups some frequently used options / links from the Site in one place and gives some more (local info, common interest links etc). Portal has free access - no login required. Of course, when I click link on Portal to [some place in the] Site, browser loads Site, gives apprioritate cookies, Site accepts it and recognizes me as registered user (no login screen). The same for my friends or anyone else logged to Site. That's no problem (those links are simple links, after all). Then I had tried to even more simplify life and get some of information published on Site to show it directly in Portal - and there starts the problem. Apprioritate script loads Site to variable, shaves and process this variable and post results on Portal. I theory, unfortunaltely ... To access those information, Site requires authorisation, so Portal's script has to authorize. If script didn't make it, Site simply stops at login screen (which is of no interest to me). I can use my own log/pass and write it hard to the script, but then anyone who open Portal with borrowed' Site info will see the same info as I do (including Welcome, Sejmitar). I do not want to require authorizations in Portal, because this isn't make any sense - if you're required to login on Portal, it's simplier to login on Site. I know that each Site's authorized user has an authorization cookie(s) which is recognized by the Site. Question : Is there a method to 'borrow' this cookie (cookie info) with script on my Portal, and 'show' it to Site, or make Portal to point where Site can look for it's own cookies for authorization ? I'll be very thankful for any ideas ... ~) Sejmitar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Getting values?
I have a form that uses -$i in it to create multiple write boxes for editing the information. It then passes that information to another script that read through and modifies the DB based on the information. I have this code in my parsing script and I know it is BC of the way I am accessing data, can anyone help? ! -- Snip -- for ($i=0; $i$num_rows; $i++) { if ($_POST[comment-$i] != ) $comment = $_POST[comment-$i]; else $comment = $_POST[color-$i]; $id = $_POST[id-$i]; $sess = $_POST[SESSID-$i]; ! -- End Snip -- All the values turn up empty doing it this way, and there are about 14 values to do. TIA Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting values?
[snip] I have a form that uses -$i in it to create multiple write boxes for editing the information. It then passes that information to another script that read through and modifies the DB based on the information. I have this code in my parsing script and I know it is BC of the way I am accessing data, can anyone help? ! -- Snip -- for ($i=0; $i$num_rows; $i++) { if ($_POST[comment-$i] != ) $comment = $_POST[comment-$i]; else $comment = $_POST[color-$i]; $id = $_POST[id-$i]; $sess = $_POST[SESSID-$i]; ! -- End Snip -- All the values turn up empty doing it this way, and there are about 14 values to do. [/snip] -$i ? Why the dash? Is your tag like this... input type=text name=comment-$i value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Getting values?
On Friday 18 June 2004 20:38, Robert Sossomon wrote: if ($_POST[comment-$i] != ) Put double-quotes around your array subscripts. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Death to all fanatics! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 18:07, michael watson (IAH-C) wrote: So, my question is, having not compiled php with that switch in the first place, how can I get the functionality I need into PHP without breaking everything else? In general, you can recompile PHP to your hearts content without breaking either Apache or MySQL. For best results untar a fresh copy of the source each time you 'recompile'. Stop apache before you run 'make install'. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Today's scientific question is: What in the world is electricity? And where does it go after it leaves the toaster? -- Dave Barry, What is Electricity? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Threading under win32
I'd like to know if there is any way to thread code in PHP under Windows. I need to write to two or more streams at the same time. It's not crucial that they are exactly synced, but I can't wait for one stream to finish and then let the other do the same. They have to be somewhat synced anyways. Ideas? //Simon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
Hi Jason Thanks for your response - I did just as you suggested, and here is the result: On my test server I installed php 4.3.8 (with --with-gettext) On my production server, the old version of php (4.3.3 without --with-gettext) exists On the test server, if I execute /usr/local/bin/php login.php, I get some nice HTML On the production server, if I exceute /usr/local/bin/php login.php, I get the Call to undefined function error. So this would suggest that I have cleared up the problem on my test server, right? Wrong. Test.php (which merely executes ? Phpinfo(); ? seems to think I still have PHP version 4.3.3, vene though the output of /usr/local/bin/php -v is 4.3.7. If I log in as my apache user, and execute which php, it tells me /usr/local/bin/php So in summary, I have updated php and it now works - however, when executing php from apache, apache still thinks the old version is in place - which is odd, as my apache user uses the same version of php, and to my knowledge, there is only one version of php on my computer. Any ideas??? This is really odd. I even tried re-installing apache from scratch with this new version of php, and still I get those errors about Call to undefined function... But NEVER from the command line using php, always from apache using php. Mick -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 13:59 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 18:07, michael watson (IAH-C) wrote: So, my question is, having not compiled php with that switch in the first place, how can I get the functionality I need into PHP without breaking everything else? In general, you can recompile PHP to your hearts content without breaking either Apache or MySQL. For best results untar a fresh copy of the source each time you 'recompile'. Stop apache before you run 'make install'. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Today's scientific question is: What in the world is electricity? And where does it go after it leaves the toaster? -- Dave Barry, What is Electricity? */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] create emailaccount using php
Hi Everybody (B (Bi want to know how to create an email account in the mails server using php.Also how (Bto manage the mails usng php (B (Bregards (BSyed
RE: [PHP] create emailaccount using php
[snip] i want to know how to create an email account in the mails server using php.Also how to manage the mails usng php [/snip] http://www.php.net/mail Does anyone read the manual anymore? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Getting values?
THANKS!! Worked like a charm. Robert -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 8:52 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Getting values? On Friday 18 June 2004 20:38, Robert Sossomon wrote: if ($_POST[comment-$i] != ) Put double-quotes around your array subscripts. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Death to all fanatics! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 21:10, michael watson (IAH-C) wrote: Test.php (which merely executes ? Phpinfo(); ? seems to think I still have PHP version 4.3.3, vene though the output of /usr/local/bin/php -v is 4.3.7. If I log in as my apache user, and execute which php, it tells me /usr/local/bin/php It is possible to have both a CLI version of PHP and an apache-module PHP which are compiled differently. See manual Using PHP from the command line. /path/to/php -i will tell you what your CLI php is compiled with. And ?php phpinfo(); ? via your webserver will do the same for your apache-module PHP. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The party adjourned to a hot tub, yes. Fully clothed, I might add. -- IBM employee, testifying in California State Supreme Court */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] http to https
Hitek - I tried adding the exit; after the header ('Location... Andre - Your idea about sending them to another page is a good one. I tried it, without any luck. What could the issue still be? To simplify my problem, I have a simple script: ?php header ('Location https://www.tgwedding.com/payment6.php'); exit; ? Which just hangs when I access the page and it doesn't redirect. Typing URL in browser correctly sends me to the secure page though. -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 9:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] http to https Well, I'm no php-guru, that's for sure, but if you are trying to call: https://www.tgwedding.com/payment6.php from http://www.tgwedding.com/payment6.php might be where the problem lies. You might need to do a 'refresh' since What is strange is when I go back on my browser and resubmit, it correctly sends it to the https location and all is well. What I have done a s a clutz-hack is to create an additional page for the re-direct, which then sends it back to the page in question. (I used that for 'cookie' detection/browser ident as well on my opening pages.) I suppose you might get away with a Meta Refresh but I'm not too clear whetehr you can accomplish that for the same page . . Aside from that idea . . . . Hth, Andre On Thursday 17 June 2004 08:31 pm, you wrote: Yeah, I'm assuming it's set. I have an installed ssl cert from a CA and have successfully run other https scripts (by typing in the URL) on the server. I check phpinfo(), http://www.tgwedding.com/tgwedding/phpinfo.php php, http, ftp, https, ftps, compress.bzip2, compress.zlib I searched php.ini for ssl and https and didn't find anything though -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:26 PM To: Ryan Schefke Subject: Re: [PHP] http to https Just a thought - is https on the server set? (Check your php.ini) On Thursday 17 June 2004 08:20 pm, Ryan Schefke wrote: Hi Andre, Thanks for responding. I'm not using sessions, just cookies. I used your recommendation in the code below (which gets executed if the submit button is pushed. It still sends it to http://www.tgwedding.com/payment6.php; instead of https://www.tgwedding.com/payment6.php; Any advice please? if (isset($submit)) { if ($radiobutton == 1) { $value=$validcoupon; } else { $value=0; } $query_insertcoupon = UPDATE sitepayment SET couponcode='$value' WHERE customerID='$CID'; $result_insertcoupon = mysql_query ($query_insertcoupon); // run the query if ($_SERVER['HTTPS'] != on){ header(Location: https://www.tgwedding.com/payment6.php;); exit;} // $redirect = https://www.tgwedding.com/payment6.php;; //header (Location: $redirect); } = -Original Message- From: Andre Dubuc [mailto:[EMAIL PROTECTED] Sent: Thursday, June 17, 2004 8:01 PM To: Ryan Schefke; [EMAIL PROTECTED] Subject: Re: [PHP] http to https Hi Ryan, I encountered all sorts of problems attempting to do the same (especially with AOL, Yahoo, etc click-throughs). I finally resolved the problem by calling https on the page itself (which is listed then as http) like so at the top (after my session_start(); of course: ?php if ($_SERVER['HTTPS'] != on){ header(Location: https://www.your_site.com.php;); exit;} ? Hth, Andre On Thursday 17 June 2004 07:27 pm, Ryan Schefke wrote: I'm getting some strange behavior when trying to go from http to an https script. After clicking a form submit button the script will execute the two lines below. It does this and sends it to the correct page without the https, only http. What is strange is when I go back on my browswer and resubmit, it correctly sends it to the https location and all is well. $redirect = https://www.tgwedding.com/payment6.php;; header (Location: $redirect); What am I doing wrong? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT?? - calling frames within frames
I have two frames (A and main) When I pull up one page it reloads main with the full page, however what I need the system to do when I click off that page is to jump to main.html and load item.html in the top. Main.html currently loads 2 other pages at the beginning. I have tried to jump them in this order, but it does not seem to be working: //Call the main page echo 'script language=javascriptparent.main.location.href =main.html;/script'; //Open the next two pages I need in them echo 'script language=javascriptparent.B.location.href =item.html;/script'; echo 'script language=javascriptparent.C.location.href =cart.html;/script'; TIA! Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] create emailaccount using php
On Friday 18 June 2004 21:19, Syed Ghouse wrote: (B (B i want to know how to create an email account in the mails server using (B php. (B (B1) Refer to the documentation for your mail system (B2) After you've done step 1 then you can read php manual Program Execution (BFunctions (B (B Also how to manage the mails usng php (B (Bmanual IMAP, POP3 and NNTP Functions (B (B-- (BJason Wong - Gremlins Associates - www.gremlins.biz (BOpen Source Software Systems Integrators (B* Web Design Hosting * Internet Intranet Applications Development * (B-- (BSearch the list archives before you post (Bhttp://marc.theaimsgroup.com/?l=php-general (B-- (B/* (BWin98 error 007: Fatal error: unforseeable condition: Your system has booted (Bwithout crashing. Shutting down to compensate. (B*/ (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
So in that case, if I want to upgrade the php that apache and mod_php use, I have to re-install apache, mod_php and php all over again? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 14:20 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 21:10, michael watson (IAH-C) wrote: Test.php (which merely executes ? Phpinfo(); ? seems to think I still have PHP version 4.3.3, vene though the output of /usr/local/bin/php -v is 4.3.7. If I log in as my apache user, and execute which php, it tells me /usr/local/bin/php It is possible to have both a CLI version of PHP and an apache-module PHP which are compiled differently. See manual Using PHP from the command line. /path/to/php -i will tell you what your CLI php is compiled with. And ?php phpinfo(); ? via your webserver will do the same for your apache-module PHP. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The party adjourned to a hot tub, yes. Fully clothed, I might add. -- IBM employee, testifying in California State Supreme Court */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can I make make email accounts in vpopmail using PHP
Can I make make email accounts in vpopmail using PHP. Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] wierd sendmail/mail problems
On Friday 18 June 2004 04:38, [EMAIL PROTECTED] wrote: am baffled...I've got a function to email a message that works perfectly as a simple function. I've written it 2 ways, (1) using mail and (2) writing the message to a tempfile and then sending the tempfile to sendmail both ways work. Now here's the problem...when I incorporate this function into a page that gets input from an html form, creates sessions, checks for errors, says thank you and then emails the responses it fails. Here are the errors I'm getting for the 2 different approaches: Warning: error: mail(): Could not execute mail delivery program Warning: system(): Unable to fork [/usr/lib/sendmail -t /var/tmp/FOOVFaqq2] any clues to what I'm doing wrong? Is your functioning function functioning on a different machine to the non-functioning function? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* God grant me the senility to accept the things I cannot change, The frustration to try to change things I cannot affect, and the wisdom to tell the difference. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I make make email accounts in vpopmail using PHP
[snip] Can I make make email accounts in vpopmail using PHP. Thank you [/snip] Yes. You're welcome http://catb.org/~esr/faqs/smart-questions.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] executing php script from sql field.
Hello I am trying to get some php code that's in a mysql field to execute...all I can get it to do is print the php code as human readable... I'm trying somthing like this..: print $sql[data]; where data has something like this in it: Hello, this is ? print $name;? anyone have any suggestions? Thanks, Chuck
Re: [PHP] Can I make make email accounts in vpopmail using PHP
Thanks Smarty ;))) I would like to know How I can make user email accounts using vpopmail, but Not using PECL extension. Regards Bogomil Jay Blanchard wrote: [snip] Can I make make email accounts in vpopmail using PHP. Thank you [/snip] Yes. You're welcome http://catb.org/~esr/faqs/smart-questions.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 21:26, michael watson (IAH-C) wrote: So in that case, if I want to upgrade the php that apache and mod_php use, I have to re-install apache, mod_php and php all over again? No. Assuming you installed apache-module of php using apxs then recompiling php and 'make install' will automatically do the right thing. There is no need to touch either MySQL or Apache. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Kids, the seven basic food groups are GUM, PUFF PASTRY, PIZZA, PESTICIDES, ANTIBIOTICS, NUTRA-SWEET and MILK DUDS!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] executing php script from sql field.
[snip] Hello I am trying to get some php code that's in a mysql field to execute...all I can get it to do is print the php code as human readable... I'm trying somthing like this..: print $sql[data]; where data has something like this in it: Hello, this is ? print $name;? anyone have any suggestions? [/snip] Yes. http://www.php.net/eval -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
Hi Jason Sorry to be a pain. I didn't use apxs, I installed apache and php from source using a devshed.com recipe. Mick -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 14:46 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 21:26, michael watson (IAH-C) wrote: So in that case, if I want to upgrade the php that apache and mod_php use, I have to re-install apache, mod_php and php all over again? No. Assuming you installed apache-module of php using apxs then recompiling php and 'make install' will automatically do the right thing. There is no need to touch either MySQL or Apache. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Kids, the seven basic food groups are GUM, PUFF PASTRY, PIZZA, PESTICIDES, ANTIBIOTICS, NUTRA-SWEET and MILK DUDS!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] http to https
Hi Ryan, you have an error in your script. Quoting Ryan Schefke [EMAIL PROTECTED]: ?php header ('Location https://www.tgwedding.com/payment6.php'); exit; ? correct one is ?php header ('Location: https://www.tgwedding.com/payment6.php'); ? Note the : after Location. HTH -R'twick -- This is a signature This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
Hi So I stopped apache, then for php: ./configure --with-mysql=/usr/ --with-xml --with-gettext --with-apxs=/usr/local/apache/bin/apxs make make install Everything worked fine apart from I am in exactly the same situation. Apache is working with one version of php and the command line version is different. I have even re-installed everything from scratch (apache and php) from source and still I get the same result - apache's version of php is still 4.3.1, despite installing version 4.3.7 of php CAN anyone tell me how to get rid of this old version of php which apache insists on using Thanks :-) Mick -Original Message- From: michael watson (IAH-C) Sent: 18 June 2004 14:51 To: Jason Wong; [EMAIL PROTECTED] Subject: RE: [PHP] Call to undefined function: bindtextdomain() Hi Jason Sorry to be a pain. I didn't use apxs, I installed apache and php from source using a devshed.com recipe. Mick -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 14:46 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 21:26, michael watson (IAH-C) wrote: So in that case, if I want to upgrade the php that apache and mod_php use, I have to re-install apache, mod_php and php all over again? No. Assuming you installed apache-module of php using apxs then recompiling php and 'make install' will automatically do the right thing. There is no need to touch either MySQL or Apache. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Kids, the seven basic food groups are GUM, PUFF PASTRY, PIZZA, PESTICIDES, ANTIBIOTICS, NUTRA-SWEET and MILK DUDS!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 21:50, michael watson (IAH-C) wrote: Sorry to be a pain. I didn't use apxs, I installed apache and php from source using a devshed.com recipe. It's been years since I last did a non-apxs install. OK you was using the soothingly... guide. Basically repeat the necessary actions from steps 6 and 7, namely the './configure ...', 'make', and 'make install' bits. I don't think you need to 'make certificate' again. Obviously don't copy php.ini if you've already made changes to your existing one (and want to keep them). -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Love is a grave mental disease. -- Plato */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
Hi Jason I tried that. I am still left with two versions of php - the one from the command line which has gettext compiled into it (4.3.7), and the one which apache uses, which hasn't (4.3.1). Mick -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 15:17 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 21:50, michael watson (IAH-C) wrote: Sorry to be a pain. I didn't use apxs, I installed apache and php from source using a devshed.com recipe. It's been years since I last did a non-apxs install. OK you was using the soothingly... guide. Basically repeat the necessary actions from steps 6 and 7, namely the './configure ...', 'make', and 'make install' bits. I don't think you need to 'make certificate' again. Obviously don't copy php.ini if you've already made changes to your existing one (and want to keep them). -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Love is a grave mental disease. -- Plato */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
michael watson (IAH-C) wrote: Hi Jason I tried that. I am still left with two versions of php - the one from the command line which has gettext compiled into it (4.3.7), and the one which apache uses, which hasn't (4.3.1). Mick Did you restart Apache after you compiled the newer version? -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Intermittent PHP operation
... where then does it get displayed? Why is it that I have to click the refresh button several times to get my pages to load the way they are supposed to load? What do you mean by correctly? Is it giving errors or just not rendering correctly/at all? Find out where your httpd error logs are (differs per instalation) and that is a great place to start looking for clues as to why things aren't working. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 22:15, michael watson (IAH-C) wrote: ./configure --with-mysql=/usr/ --with-xml --with-gettext --with-apxs=/usr/local/apache/bin/apxs make make install Everything worked fine apart from I am in exactly the same situation. Apache is working with one version of php and the command line version is different. I have even re-installed everything from scratch (apache and php) from source and still I get the same result - apache's version of php is still 4.3.1, despite installing version 4.3.7 of php As you have the luxury of reinstalling from scratch then trash the existing apache directory (default: rm -rf /usr/local/apache) then install using instructions from the php manual. CAN anyone tell me how to get rid of this old version of php which apache insists on using rm -rf /usr/local/apache -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Maintainer's Motto: If we can't fix it, it ain't broke. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call to undefined function: bindtextdomain()
OK, that worked :-) Now, do I really trust myself to do rm -rf /usr/local/apache/ on my production server? *strokes chin* Thanks for the help guys :-) -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 18 June 2004 15:40 To: [EMAIL PROTECTED] Subject: Re: [PHP] Call to undefined function: bindtextdomain() On Friday 18 June 2004 22:15, michael watson (IAH-C) wrote: ./configure --with-mysql=/usr/ --with-xml --with-gettext --with-apxs=/usr/local/apache/bin/apxs make make install Everything worked fine apart from I am in exactly the same situation. Apache is working with one version of php and the command line version is different. I have even re-installed everything from scratch (apache and php) from source and still I get the same result - apache's version of php is still 4.3.1, despite installing version 4.3.7 of php As you have the luxury of reinstalling from scratch then trash the existing apache directory (default: rm -rf /usr/local/apache) then install using instructions from the php manual. CAN anyone tell me how to get rid of this old version of php which apache insists on using rm -rf /usr/local/apache -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Maintainer's Motto: If we can't fix it, it ain't broke. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Call to undefined function: bindtextdomain()
On Friday 18 June 2004 22:44, michael watson (IAH-C) wrote: OK, that worked :-) Now, do I really trust myself to do rm -rf /usr/local/apache/ on my production server? *strokes chin* mv /usr/local/apache /some/directory/that/will/never/be/accidently/deleted -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The last round to be plowed next to the line fence is always one furrow narrower than the plow. -- Plowman's Precept n2 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php
Hi, can i ask what is the difference between writing and getting data from files and from SQL. will retrieving data from files have a problem like if 2 person access the same file at the same time and causing the data to crush? or will the situation be the same to SQL? because i will wish to use file instead of sql, hope that there won't be a difference. i would wish to the what is/are the difference between them in every details. Thank you CK
Re: [PHP] php
[EMAIL PROTECTED] wrote: Hi, can i ask what is the difference between writing and getting data from files and from SQL. will retrieving data from files have a problem like if 2 person access the same file at the same time and causing the data to crush? or will the situation be the same to SQL? Yes, problems when using flat files. No problems when using a database. because i will wish to use file instead of sql, hope that there won't be a difference. i would wish to the what is/are the difference between them in every details. Thank you CK -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Anyone have experiences with OCI9 and PHP ??
Yes, it's possible. http://www.php.net/oracle On Fri, 18 Jun 2004 11:21:22 +0100, André Ventura Lemos [EMAIL PROTECTED] wrote: I've used PHP with Oracle 10g. On Sex, 2004-06-18 at 10:46, [EMAIL PROTECTED] wrote: Hi all, is it possible to use an actuall Oracle-Client (Version = 9) with PHP ?? Dose anyone habe experiences here ? Regards Christian -- Lego my ego, and I'll lego your knowledge. signature.asc - 1K -- .e [ [EMAIL PROTECTED] ] [ http://ryptide.com ] [ aim: ryptide ] [ Music is the vernacular of the human soul ~ Geoffrey Latham ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] php
[EMAIL PROTECTED] wrote: will retrieving data from files have a problem like if 2 person access the same file at the same time and causing the data to crush? If you're only going to be reading the file you should be fine. Otherwise you've got a bit of research to do. Here's a starting point: http://www.php.net/flock Have fun. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php and unidata
Hello, Anybody out there in php land succesfully use php with the unidata database running on unix? We're going to be starting a project that requires php to unidata communication and I'm looking for pointers or any other useful information that will help this project get off to a smooth start. Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Apache Content Negotiation / PHP / HTTP Headers
Hi, i've tested Apache Content Negotiation with a PHP Content Managment System. Apache works correctly, but doesn't tell PHP what it has done. Example: I have a directory with two files: - test.de.htm - test.en.htm As Apache is configured for Content Negotiation I can enter test in my browser window and get the best suiting page, in my case the test.de.htm. But before I see the htm page, it is parsed by the CMS, using Apache Action AddType application/x-httpd-parse .htm Action application/x-httpd-parse /parser/parser.php?file= Well, now the problem: As I make a HTTP request for test, Apache negotiates for test.de.htm, starts the parser.php as ActionHandler for this .htm file. But PHP doesn't know about the new requested document as there is nothing changed in the original request. Apache writes a *RESPONSE* header (Content-Location: test.de.htm), but PHP does know the Apache response headers only after all PHP generated headers are sent. When I call apache_response_headers() at the beginning of my script, it show's nothing from Apache, if I run it after all my header() calls are done and i've sent the first content data, I can see the Apache Response headers, especially Content-Location:. So I see no way to know about Content Negotiation of Apache before all PHP headers are sent. *But I do need this* Why can't PHP just show all the Apache Response headers immediately ??? This is very important and I think also for many people who have dealt with PHP and Apache Content Negotiation. Please help! Hopefully Wolfgang Ulmer P.S: Please answer also to [EMAIL PROTECTED] as I don't read this newsgroup regularly. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Anyone have experiences with OCI9 and PHP ??
is it possible to use an actuall Oracle-Client (Version = 9) with PHP ?? Dose anyone habe experiences here ? It's absolutely possible, and where most of my work lies day to day. Our DBA has chosen to hold off upgrading to 10g until it's better tested, so we still use 9i. (He cites a past experience of upgrading a prior company to 8i early on in its life and managing to insert duplicate primary keys.) For PHP 9i support you'd still compile using the --with-oci8 option. Once built PHP's oci8 functions still apply to 9i. There are some 9i related comments on the php.net oci8 page: http://us4.php.net/manual/en/ref.oci8.php Cheers, Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ld error
I found this thread in a php news archive. I am fairly new to compiling php on a Unix system, and I am having the same problem described in this thread. I am trying to compile php 4.3.4 on a Solaris 9 system. I have fixed my path, and I do not have GNU sed installed on the system. I am still getting the same error. Would installing GNU sed fix the problem, or is there something else I need to do? - Original Message - Thanks for the hint, it was my standard Sun sed application before the GNU dito in my PATH as well as ld application that cased the problem. So switching usr/bin and usr/local/bin in the path helped alot. Göran -Ursprungligt meddelande- Från: Evan Nemerson [mailto:[EMAIL PROTECTED] Skickat: den 27 maj 2003 03:25 Till: Göran Höglund Kopia: [EMAIL PROTECTED] Ämne: Re: [PHP] Ld error PHP trips up on my ld sometimes if i made the command line (/cgi) version of php before the dso. Try `make clean`, then `make`. dunno if that's the problem for sure, though- my error is usually file truncated, but im on linux On Monday 26 May 2003 06:09 am, Göran Höglund wrote: Hi I'm trying to compile the php-4.3.1 package on a SUN/Solaris 8 mashine. I confugured php with: ./configure --with-apxs2=/usr/local/apache2/bin/apxs I have installed all requiered neccesary packages, downloded from sunfreeware.com. I have installed Apache2 under /usr/local/apache2. When my gcc compiler tries to make the package I get the following message: ld: fatal: file ext/ctype/ctype.lo: unknown file type ld: fatal: File processing errors. No output written to .libs/libphp4.so My ld is: /usr/ccs/bin/ld And ls gives: -rw-r--r-- 1 root other 1 May 26 11:23 ext/ctype/ctype.lo Regards Göran -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] in data
I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? TIA RObert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
[snip] I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? [/snip] Yes, we have all encountered it. You need to escape the character and other characters as well. Start here http://www.php.net/addslashes The manual is your friend -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
Robert Sossomon mailto:[EMAIL PROTECTED] on Friday, June 18, 2004 10:27 AM said: I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? can you see all the data when you view source? is the following happening what's happening? input type=text value=like omg. the other day billy said to me u r 1 fly chick. omg lol ;) i luv billy. / i don't remember exactly how i solved it but you have to escape or encode the extra 's in your string. chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] in data
Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? [/snip] Yes, we have all encountered it. You need to escape the character and other characters as well. Start here http://www.php.net/addslashes The manual is your friend Another way is to convert the quotes to quot; because this is the proper character for HTML output. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] internal server error
I'm getting an 'Internal Server Error' when I run: http://216.15.235.3/cgi-bin/testphp.php I've added AddType directives, this is not my first install of PHP but it is my first install with the latest versions. Is anybody using the php-install mailing list? I got tons of SPAM when I posted there. :-( The log says: [Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] Premature end of script headers: testphp.php [Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] (8)Exec format error: exec of '/usr/local/apache2/cgi-bin/testphp.php' failed http://216.15.235.3/cgi-bin/test-cgi that came with Apache works fine. I am using Apache-2.0.49 and PHP-4.3.7. The command line PHP works fine. testphp.php is: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
Jun 18 at 12:29pm, Jay Blanchard wrote: [snip] I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? [/snip] Yes, we have all encountered it. You need to escape the character and other characters as well. Start here http://www.php.net/addslashes The manual is your friend Doesn't help terribly much when putting it into HTML (see Chris' post)... addslashes() is good for database insertions, but for HTML probably are looking for something like http://www.php.net/htmlentities -- Kelly Hallman // Ultrafancy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can I detect size of files which are too large to upload?
Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
$userfile=$_FILES['userfile']['tmp_name']; $userfile_error=$_FILES['userfile']['error']; if ($userfile_error 0) {echo 'Problem: '; switch($userfile_error) {case 1: echo 'File exceeded upload maximum filesize'; break; case 2: echo 'File exceeded maximum file size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; }exit;} You can use a switch format like I have done previously shown above. Each file error is mentioned in a different case. -- Ashwin Purohit On Fri, 18 Jun 2004 10:50:04 -0700, Pablo Gosse [EMAIL PROTECTED] wrote: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo -- Ashwin Purohit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Here's a professional explanation: http://de3.php.net/manual/en/features.file-upload.errors.php On Fri, 18 Jun 2004 10:50:04 -0700, Pablo Gosse [EMAIL PROTECTED] wrote: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo -- Ashwin Purohit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo Content-Length request header, approximately, it also contains other post fields. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] internal server error
What installation instructions did you follow. Did you install cgi or module version? Bob Lockie wrote --- napísal:: I'm getting an 'Internal Server Error' when I run: http://216.15.235.3/cgi-bin/testphp.php I've added AddType directives, this is not my first install of PHP but it is my first install with the latest versions. Is anybody using the php-install mailing list? I got tons of SPAM when I posted there. :-( The log says: [Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] Premature end of script headers: testphp.php [Fri Jun 18 12:31:05 2004] [error] [client 216.168.107.70] (8)Exec format error: exec of '/usr/local/apache2/cgi-bin/testphp.php' failed http://216.15.235.3/cgi-bin/test-cgi that came with Apache works fine. I am using Apache-2.0.49 and PHP-4.3.7. The command line PHP works fine. testphp.php is: ?php phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] where can we downlaod PHP modules??
Anyone know where can I download the following PHP modules? Sablotron XSLT processor (command-line utility and PHP plugin) PHP DOMXML support compiled-in (libxml version) PHP XML support compiled-in (expat version) PHP XMLRPC support compiled-in Thank you!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
I tried the addslashes on the pages and in combination of using quot; to bring in the data to begin with, it works somewhat, where I am running into a problem now is the 2nd time it pulls the data out (it adds it back in with ) I am getting the same errors. I have tried using the addslashes and when I view it IN the DB all I have are the . When I pull out the data again, I have a single and it is not escaped, though I have the addslashes working on it. Do I need to post code or has this jarred someone's memory? I guess I need to figure out how to read my $_POST[data] and parse that to put in quot; because that seems to work, but not sure how to make PHP do that. Any thoughts? Robert -Original Message- From: Torsten Roehr [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 1:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] in data Jay Blanchard [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] [snip] I have data with something in it and when I pull that data and dump it into an HTML form I am losing everything that is after the first . Has anyone encountered this before, and have a way to patch it? [/snip] Yes, we have all encountered it. You need to escape the character and other characters as well. Start here http://www.php.net/addslashes The manual is your friend Another way is to convert the quotes to quot; because this is the proper character for HTML output. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
[snip] I guess I need to figure out how to read my $_POST[data] and parse that to put in quot; because that seems to work, but not sure how to make PHP do that. [/snip] INSERT INTO table htmlentities($_POST['yourStuff']); then when it comes out you should be good -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I detect size of files which are too large to upload?
Ashwin Purohit wrote: $userfile=$_FILES['userfile']['tmp_name']; $userfile_error=$_FILES['userfile']['error']; if ($userfile_error 0) {echo 'Problem: '; switch($userfile_error) {case 1: echo 'File exceeded upload maximum filesize'; break; case 2: echo 'File exceeded maximum file size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No file uploaded'; break; }exit;} You can use a switch format like I have done previously shown above. Each file error is mentioned in a different case. -- Ashwin Purohit On Fri, 18 Jun 2004 10:50:04 -0700, Pablo Gosse [EMAIL PROTECTED] wrote: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo Sorry. I know the error codes, but I'm looking to discover the uploaded size of the file which exceeded the upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Can I detect size of files which are too large to upload?
Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo Content-Length request header, approximately, it also contains other post fields. H, thanks Marek. That might work, though I'm not entirely sure. The form through which users upload files can upload five at a time, so I'm assuming that the content-length request header would contain the sum total of all uploaded files, and I don't really see how I could get the individual sizes. Thoughts? Cheers and TIA. Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
Nope, I wish it was so, but it is not to be... It puts it into the mySQL table as only, which it was doing before, it is in the extracting from there that I am having the issue. My code for extraction: $item_desc = addslashes($Quote['sel_item_desc']); The value in the HTML document: value=10in. COMP.PLATE CONCORDE 4/125 Robert -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 2:58 PM To: Robert Sossomon; [EMAIL PROTECTED] Subject: RE: [PHP] in data [snip] I guess I need to figure out how to read my $_POST[data] and parse that to put in quot; because that seems to work, but not sure how to make PHP do that. [/snip] INSERT INTO table htmlentities($_POST['yourStuff']); then when it comes out you should be good -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Pablo Gosse wrote --- napísal:: Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo Content-Length request header, approximately, it also contains other post fields. H, thanks Marek. That might work, though I'm not entirely sure. The form through which users upload files can upload five at a time, so I'm assuming that the content-length request header would contain the sum total of all uploaded files, and I don't really see how I could get the individual sizes. Thoughts? Cheers and TIA. Pablo Then you are lost. If you want it really bad, you can turn on always_populate_raw_post_data and parse the post stream, but post_max_size will still limit you anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] in data
Robert Sossomon mailto:[EMAIL PROTECTED] on Friday, June 18, 2004 12:30 PM said: My code for extraction: $item_desc = addslashes($Quote['sel_item_desc']); you don't need to addslahes() when retrieving. just htmlentities() the data before you display it. do a simple test: ?php $data = 'hello. some data is here'; // shouldn't work echo input type=text value=$data /; $data = htmlentities($data); // should work echo input type=text value=$data /; ? chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Programming User-Customized Categories ??
Hi, I need to add the ability for users to define and set up their own categories and sub-categories that can be used to group contacts they enter into a database. Here's an example of how the data might be stored... NameMain Category Sub Category - - John DoeSales New York Office Jane Smith Sales Orlando Office Mark Jones Creative Sarah Williams Creative Kevin Brown Manager Office Manager Joe Johnson Manager Site Manager I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. I know how to do this if the types of categories and sub-categories were pre-defined, but, I'm finding it a lot trickier to allow the users to customize these with their own category types. So, I'm hoping someone might be able to point me to an example of how custom categories and sub-categories can be programmed in PHP and set up in MySQL. Any suggestions or advice would be much appreciated! Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programming User-Customized Categories ??
Hey Why don't you make a second table 'categories' and have the two tables in relation? For example: Table 'contacts': id name category_id -- 0 John Doe3(Category New York Office) 1 Jane Smith 4(Category Orlando Office) 2 Mark Jones 2(Category Creative) Table 'categories': id nameparent_id -- 1 Sales 0(Main category) 2 Creative0(Main category) 3 New York Office 1(Subcategory of Sales) 4 Orlando Office 1(Subcategory of Sales) So you have unlimited subcategories and the users can choose and add them easily. In addition, you have normalized your data... cheers Marcel On Fri, 18 Jun 2004 16:29:14 -0400 Monty wrote: Hi, I need to add the ability for users to define and set up their own categories and sub-categories that can be used to group contacts they enter into a database. Here's an example of how the data might be stored... NameMain Category Sub Category - - John DoeSales New York Office Jane Smith Sales Orlando Office Mark Jones Creative Sarah Williams Creative Kevin Brown Manager Office Manager Joe Johnson Manager Site Manager I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. I know how to do this if the types of categories and sub-categories were pre-defined, but, I'm finding it a lot trickier to allow the users to customize these with their own category types. So, I'm hoping someone might be able to point me to an example of how custom categories and sub-categories can be programmed in PHP and set up in MySQL. Any suggestions or advice would be much appreciated! Monty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marcel Tschopp [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programming User-Customized Categories ??
[snip] I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. [/snip] if I follow you correctly, I would do it like this users table user_id primary key name etc... not sure what other fields you have. category table category_id primary key user_id foreign key from users table. users can have many categories name etc... sub_category table sub_category_id primary key category_id foreign key from category table. categories can have many sub_categories name etc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programming User-Customized Categories ??
Monty wrote --- napísal:: Hi, I need to add the ability for users to define and set up their own categories and sub-categories that can be used to group contacts they enter into a database. Here's an example of how the data might be stored... NameMain Category Sub Category - - John DoeSales New York Office Jane Smith Sales Orlando Office Mark Jones Creative Sarah Williams Creative Kevin Brown Manager Office Manager Joe Johnson Manager Site Manager I need to allow users to define the types of Main Categories they want, and to also define whether or not those Main Categories will have Sub Categories, which they can also define. I know how to do this if the types of categories and sub-categories were pre-defined, but, I'm finding it a lot trickier to allow the users to customize these with their own category types. So, I'm hoping someone might be able to point me to an example of how custom categories and sub-categories can be programmed in PHP and set up in MySQL. Any suggestions or advice would be much appreciated! Monty Add another column to the table, that will specify what user owns the category -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Computer algebra in PHP
Chris Sangwin wrote: Does anyone know of any PHP scripts which perform simple computer algebra functions in PHP? For example, (using a Maple-like syntax) expand( (2*x-2)^4 ); diff( sin(x^2), x); factor( x^2+2*x+1, x); and so on. Many thanks Chris Sangwin :-) That would be nice. -- paperCrane Justin Patrin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] wierd sendmail/mail problems
No, nothing fancy all on same machine, running on Apache... -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Friday, June 18, 2004 6:30 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] wierd sendmail/mail problems On Friday 18 June 2004 04:38, [EMAIL PROTECTED] wrote: am baffled...I've got a function to email a message that works perfectly as a simple function. I've written it 2 ways, (1) using mail and (2) writing the message to a tempfile and then sending the tempfile to sendmail both ways work. Now here's the problem...when I incorporate this function into a page that gets input from an html form, creates sessions, checks for errors, says thank you and then emails the responses it fails. Here are the errors I'm getting for the 2 different approaches: Warning: error: mail(): Could not execute mail delivery program Warning: system(): Unable to fork [/usr/lib/sendmail -t /var/tmp/FOOVFaqq2] any clues to what I'm doing wrong? Is your functioning function functioning on a different machine to the non-functioning function? -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* God grant me the senility to accept the things I cannot change, The frustration to try to change things I cannot affect, and the wisdom to tell the difference. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] internal server error
On 06/18/04 14:24 Marek Kilimajer spoke: What installation instructions did you follow. Did you install cgi or module version? I fixed it, I had the test file in the cgi-bin directory. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I make make email accounts in vpopmail using PHP
Mr. Bogomil Shopov wrote: Thanks Smarty ;))) I would like to know How I can make user email accounts using vpopmail, but Not using PECL extension. Jay had answered the question you asked :-) -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Right, guess i saw some kind of JS that determined the size of the selected file and wrote it into an hidden field. Maybe you try it that way. -- red Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Marek Kilimajer wrote: Pablo Gosse wrote --- napísal:: Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. It would seem logical to me that I would not be able to do this, since if the file exceeds the limit set by upload_max_filesize then the upload should not continue past that point. Is this an accurate assumption? Cheers and TIA. Pablo Content-Length request header, approximately, it also contains other post fields. H, thanks Marek. That might work, though I'm not entirely sure. The form through which users upload files can upload five at a time, so I'm assuming that the content-length request header would contain the sum total of all uploaded files, and I don't really see how I could get the individual sizes. Thoughts? Cheers and TIA. Pablo Then you are lost. If you want it really bad, you can turn on always_populate_raw_post_data and parse the post stream, but post_max_size will still limit you anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Red Wingate wrote --- napísal:: Right, guess i saw some kind of JS that determined the size of the selected file and wrote it into an hidden field. Maybe you try it that way. Maybe ActiveX, JS cannot do that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: OT?? - calling frames within frames
Allright, even if it's OT Many ways to handle it, first would be to add a function within the frameset which handles redirects to the frames: script language=javascript function handleFrameRedirect ( frame , url ) { document.frames[ frame ].document.location.href = url ; } /script Within the frame you use script language=javascript parent.handleFrameRedirect( framename , url ); /script Another way is calling this directly within the frame: script language=javascript parent.document.frames[ framename ].document.location.href = url ; /script -- red Robert Sossomon wrote: I have two frames (A and main) When I pull up one page it reloads main with the full page, however what I need the system to do when I click off that page is to jump to main.html and load item.html in the top. Main.html currently loads 2 other pages at the beginning. I have tried to jump them in this order, but it does not seem to be working: //Call the main page echo 'script language=javascriptparent.main.location.href =main.html;/script'; //Open the next two pages I need in them echo 'script language=javascriptparent.B.location.href =item.html;/script'; echo 'script language=javascriptparent.C.location.href =cart.html;/script'; TIA! Robert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can I detect size of files which are too large to upload?
Red Wingate wrote: Right, guess i saw some kind of JS that determined the size of the selected file and wrote it into an hidden field. Maybe you try it that way. Hi folks. I'm just tweaking the file manager portion of my CMS, and am wondering if there is any way I can identify the size of an uploaded file which exceeded the upload_max_filesize? I'd like to be able to tell the user the size of the file they tried to upload, in addition to telling them the allowable maximum size. As marek has pointed out JS cannot do that. SHAMELESS PLUG FOLLOWS: But i know the perfect product that can do exactly what you want. Rad Upload (http://www.radinks.com/upload/) -- Raditha Dissanayake. - http://www.raditha.com/megaupload/upload.php Sneak past the PHP file upload limits. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newbie Guide] For the benefit of new members
=== Please feel free to add more points and send to the list. === 1. If you have any queries/problems about PHP try http://www.php.net/manual/en first. You can download a copy and use it offline also. Please also try http://www.php.net/manual/faq.php for answers to frequently answered questions about PHP (added by Christophe Chisogne). 2. Try http://www.google.com next. Searching for php YOUR QUERY may fetch you relevant information within the first 10 results. 3. There is a searchable archive of the mailing list discussion at http://phparch.com/mailinglists. Many of the common topics are discussed repeatedly, and you may get answer to your query from the earlier discussions. For example: One of the repeatedly discussed question in the list is Best PHP editor. Everyone has his/her favourite editor. You can get all the opinions by going through the list archives. If you want a chosen list try this link : http://www.thelinuxconsultancy.co.uk/phpeditors/ (contributed by Christophe Chisogne). 4. Not sure if PHP is working or you want find out what extensions are available to you? Just put the following code into a file with a .php extension and access it through your webserver: ?php phpinfo(); ? If PHP is installed you will see a page with a lot of information on it. If PHP is not installed (or not working correctly) your browser will try to download the file. (contributed by Teren and reworded by Chris W Parker) 5. If you are stuck with a script and do not understand what is wrong, instead of posting the whole script, try doing some research yourself. One useful trick is to print the variable/sql query using print or echo command and check whether you get what you expected. After diagnosing the problem, send the details of your efforts (following steps 1, 2 3) and ask for help. 6. PHP is a server side scripting language. Whatever processing PHP does takes place BEFORE the output reaches the client. Therefore, it is not possible to access users' computer related information (OS, screen size etc) using PHP. Nor can you modify any the user side settings. You need to go for JavaScript and ask the question in a JavaScript list. On the other hand, you can access the information that is SENT by the user's browser when a client requests a page from your server. You can find details about browser, OS etc as reported by this request. - contributed by Wouter van Vliet and reworded by Chris W Parker. 7. Provide a clear descriptive subject line. Avoid general subjects like Help!!, A Question etc. Especially avoid blank subjects. 8. When you want to start a new topic, open a new mail composer and enter the mailing list address [EMAIL PROTECTED] instead of replying to an existing thread and replacing the subject and body with your message. 9. It's always a good idea to post back to the list once you've solved your problem. People usually add [SOLVED] to the subject line of their email when posting solutions. By posting your solution you're helping the next person with the same question. [contribued by Chris W Parker] 10. Ask smart questions http://catb.org/~esr/faqs/smart-questions.html [contributed by Jay Blanchard) 11. Do not send your email to the list with attachments. If you don't have a place to upload your code, try the many pastebin websites (such as www.pastebin.com). [contributed by Burhan Khalid] -- Integrated Management Tools for leather industry -- http://www.leatherlink.net Ma Siva Kumar, BSG LeatherLink (P) Ltd, Chennai - 600106 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] triggering scripts through apache configuration
hello, wondering how you might go about triggering PHP scripts from an apache configuration file, for certain events... for instance, how might i trigger a script whenever a file was accessed within a given directory. and, would it be possible to know which file was accessed? if the above is possible, could you also trigger different scripts for when a file download begins and when a file download finishes? thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] UPLOAD scripts refuse to function
ok, someone please lend me some advice here. I am trying create a upload form for my site. Sure that sounds easy right? well I have tried at least 10 different php scripts as well as a handful of cgi. Same resuls with everyone of them...nothing in my specified tmp folder. After contactig my host so many times, they know my name by voice, I have made no progress and here I sit without a very neccessary aspect of our website. Anyone have any idea on this...is there something server side that would prohibit me from executing my upload scripts? (yes chmod the folder...done) I have no problem with ANY other cgi or php script that I have used. Thanks in advance for any insight... -Cory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] triggering scripts through apache configuration
* Thus wrote Chris Wagner: hello, wondering how you might go about triggering PHP scripts from an apache configuration file, for certain events... This would be more of an apache question. As far as I know you can't do such a thing. for instance, how might i trigger a script whenever a file was accessed within a given directory. and, would it be possible to know which file was accessed? via the log files. if the above is possible, could you also trigger different scripts for when a file download begins and when a file download finishes? Downloading is a relative term. If you mean server - client then a php script can easily handle such a thing. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] UPLOAD scripts refuse to function
* Thus wrote cory: ok, someone please lend me some advice here. I am trying create a upload form for my site. hmm.. another upload question... they all seem to pop up all at once for some reason. Sure that sounds easy right? well I have tried at least 10 different php scripts as well as a handful of cgi. Same resuls with everyone of them...nothing in my specified tmp folder. After contactig my host so many times, they know my name by voice, I have made no progress and here I sit without a very neccessary aspect of our website. Anyone have any idea on this...is there something server side that would prohibit me from executing my upload scripts? (yes chmod the folder...done) This usually explains everything: http://www.php.net/manual/en/features.file-upload.php I have no problem with ANY other cgi or php script that I have used. What kind of specific problems are you having with the uploads? Make sure that error_reporting is on E_ALL and check the web server logs for any hints. Both error and access logs. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where can we downlaod PHP modules??
* Thus wrote Nguyen, Long P (Mission Systems): Anyone know where can I download the following PHP modules? What your looking for arn't the modules, but the libraries that the modules depend on. Sablotron XSLT processor (command-line utility and PHP plugin) See Installation: http://www.php.net/xslt PHP DOMXML support compiled-in (libxml version) See Installation: http://www.php.net/domxml (this one is still experimental) PHP XML support compiled-in (expat version) See Installation: http://www.php.net/xml PHP XMLRPC support compiled-in See Installation: http://www.php.net/xmlrpc Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] in data
* Thus wrote Chris W. Parker: $data = htmlentities($data); // should work echo input type=text value=$data /; s/should/will Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php