RE: [PHP] Sharing Cookies with Java?

2003-07-01 Thread Mike Migurski
>>Can php share cookies with java servlets? Specifically, can php use >>cookies written by a java servlet? > >I don't know about Java, but JavaScript can use php cookies and >vice-versa. A cookie is a cookie is a cookie, regardless of the originating technology -- browsers should treat them all i

Re: [PHP] Session vs Cookie Issues

2003-07-01 Thread Mike Migurski
> I know this topic has been talked about a LOT but all the info >I've managed to get from google is that there is no center / best option >to choose between using sessions or cookies. You're comparing apples and oranges -- cookies are one of the mechanisms by which PHP implements sessions.

RE: [PHP] Session vs Cookie Issues

2003-07-02 Thread Mike Migurski
> based on what you're saying, I gather that if I were to choose to >use cookies, and if cookies were rejected by the user, PHP will default >to using sessions? If you chose to use sessions, and cookies were rejected by the user, then PHP would append the session ID to each internal link, in

Re: [PHP] Session vs Cookie Issues

2003-07-02 Thread Mike Migurski
>>The only major flaw I've found with PHP's session support is that it >>doesn't appear to be possible to force the data to be written without >>also closing the session. > >Mike - can you expand on your point above? I've running into this problem where--in an app with a lot of OOP and reference-p

Re: [PHP] Authentication system

2003-07-02 Thread Mike Migurski
>At the point where they fill out the registration form, I am sending them >an email, informing them that they have been registered. On many sites >I've gone to, the process then includes a requirement that the person >reply to the message. > >Now I need to learn how to take the incoming message an

Re: [PHP] Incrementing counter from an HTML page.

2003-07-06 Thread Mike Migurski
>The problem I am facing is that my Index page can be an HTML page only.. >not PHP. I cant use framesets, redirects etcetera. I want to build my >own Counter using PHP & mySQL Database.. with the "Users Online" and >"Total Hits" feature. How can I increment the counter or affect a PHP >code using

Re: [PHP] Eregi filtering..

2003-07-07 Thread Mike Migurski
>elseif (eregi("a-ZA-9", $v_tel_filter)) { >echo "'$v_tel_filter' Telephone Number Contains words"; > >} else { > >im looking how to verify numbers alone and dash "-" can that be possible? I >have tried using "a-ZA-9" but did not work. /^[\-\d]+$/ should match a string of just digits and dashes.

Re: [PHP] Storing large amounts of text in db

2003-07-07 Thread Mike Migurski
>I am working on some scripts that will allow for uploading of files that >will then be stored in a database with the ability to be listed and >searched. > >What im wondering, is if I have a user upload a file in txt, or doc >format if there is an easy way to read that file, store the information >

Re: [PHP] Retaining formatting problem[Scanned]

2003-07-08 Thread Mike Migurski
> cannot have multiple lines, use this > >little amount of > >text This is true. Also, watch the line endings coming aout of that textarea - you may want to normalize them. I prefer unix linebreaks, so I use this to convert mac and DOS endings: str_replace(array("\r\n", "\r"), "\n", $tex

Re: [PHP] Stumper: Get Variable Name

2003-07-08 Thread Mike Migurski
>I want to be able to e-mail myself the name of the variable that bombed >out and the line that it was on (as well as the filename) if possible. >Don't really know where to start... looks like this: You can use PHP's predefined constants in an assertion, and debug_backtrace(). http://www.php.net/

Re: [PHP] $_SESSION act funny...

2003-07-09 Thread Mike Migurski
>If you go to the next webpage by using the same file (webpage) or a >$_SERVER['PHP_SELF'], the data in the $_SESSION array remain the same, it >does not change as it should. > if ($_SESSION['test'] == "one") { $_SESSION['test'] = "two" }; > if ($_SESSION['test'] == "two") { $_SESSION['test'

RE: [PHP] Using PPP with PHP

2003-07-10 Thread Mike Migurski
>[snip] >Umm, use exec() to call the dialing program? >[/snip] > >That works on the surface, but the PPP program returns some vital >information about its connection status that is required for use by any >subsequent file operations. The information is returned via STDOUT. so try system() instead.

Re: [PHP] download hyperlink

2003-07-10 Thread Mike Migurski
>Does anyone know how I can set a hyperlink to a file so that someone can >download the file instead of viewing it in the browser? Please let me >know. Thanks. You want the Content-Disposition header, see the HTTP spec. - micha

Re: [PHP] Searching a test file...

2003-07-15 Thread Mike Migurski
>No matter what I do, it always returns "not here" even if there is a >matchvery frustrating! > >Any ideas? -snip- Looks like you are attempting to match 'user1' to "user1 26:48:59 6 logins 4:28:09 hrs/login\n", which will come up false. You'll need to either do some postprocessing on the fil

Re: [PHP] XML Array

2003-07-15 Thread Mike Migurski
>I'm looking for a function to take an XML file and turn it into a PHP >array with the same structure. So if I have: It's not one function, but you could use xml_parse() with appropriately-defined handlers for character data and open/close elements: http://php.net/xml There is also http://php.net

Re: [PHP] Re: Object can not be used after a session

2003-07-15 Thread Mike Migurski
>$customer = new Customer($_GET['facilityID'], $_GET['customerID']); >$_SESSION['acceptPayment']['serializedCustomer'] = serialize($customer); > >so now when I have moved on to another page or another instance of the >same page and I want to access the object from the session var, I do so >like thi

Re: [PHP] Re: Object can not be used after a session

2003-07-16 Thread Mike Migurski
>Wow thats strange?? I am using PHP 4.3.2 as well and I don't see that >happening where it serializes the object when assigning it to the >$_SESSION. It doesn't do it when you assign it into the $_SESSION array, it does it when the script completes and updated session data is written to the sessi

Re: [PHP] session objects crossing applications

2003-07-17 Thread Mike Migurski
>foobar and foobar_dev are suppose to point to different databases, but >other than that all is identical. > >If I open a new internet explorer window via the windows Start menu all >is fine. I thought if the url base is different then the session would >be different? This is how it is with JSP.

RE: [PHP] fsockopen

2003-07-22 Thread Mike Migurski
>Is there a way to get fsockopen to suppress the header information it >returns. I have no use for the crap, have no idea how to use a regexp to >get it out of there (nor does anyone on this list it would seem either). preg_match('/()/ms', $http_response, $html) ...puts it into $html[1]. Adjust

Re: [PHP] fsockopen

2003-07-22 Thread Mike Migurski
>> preg_match('/()/ms', $http_response, $html) >> >> ...puts it into $html[1]. Adjust to suit your local standards-compliance >> practices. You can also look for everything after the first instance of >> "\n\n". > >Thats assuming that the person used the for the first >item. what bout extra space,

Re: [PHP] classes v. functions

2003-07-23 Thread Mike Migurski
>> Execution speed isn't all that matters. In fact, speed is not the point >> at all. > >Then you must be an PHPNuke or Typo3-programmer, beeing lucky to get at >least 1 request per second ;). Don't take it hard, but If you had ever >been in computer-science [school|college|...] you would know tha

RE: [PHP] mysqldump

2003-07-25 Thread Mike Migurski
>Thanks for the replies guys but the main reason I'm doing this is >because most times I don't have access to the servers, or not enough >preveleges to install myadmin or any other tools. I wish we had our own >server but I'm trying for a solution where you can't upload any tools and >cannot access

Re: [PHP] debuging and getting mor information about failures

2003-07-29 Thread Mike Migurski
>These errors are usually caused by an extra or missing brace or >quote/apostrophe/backtick. The best way to find where this is happening >is to use another error. Alternatively, use a text editor that's syntax-aware. In bbedit for the mac, finishing a closure or double-clicking on one (parens, b

Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Mike Migurski
>$HTTP_RAW_POST_DATA is an array... >with echo you'll only get "array".. No, it's a string - just the raw bytes that were posted. >> Is register globals ON or OFF? Either way, maybe try >> $_SERVER['HTTP_RAW_POST_DATA']... Also, ensure that "always_populate_raw_post_data" is on, too - see: http:

Re: [PHP] Purging old files from directories

2003-08-04 Thread Mike Migurski
>I need to write a script that will scan/read a given directory's contents >and delete files older than a certain date. Ideally, this will be a >script that runs via cron once a week and deletes all files it finds in >the directory older than 2 weeks from the current date. I do currently >have scri

Re: [PHP] dev style guide

2003-08-05 Thread Mike Migurski
>Is there a style guide for coding practices used when creating code to be >shared with the community? PEAR has some, http://pear.php.net/manual/en/standards.php I gave them a cursory glance, and they seem to be pretty solid -- in line with standards that I used for the past year or so after real

RE: [PHP] Unzipping Files

2003-08-05 Thread Mike Migurski
>I am doing this for a client, and he doesn't have the ZZIPlib installed, >and would like to avoid it if possible. Any other ideas? It has been mentioned before: use exec, or the backtick operator, and the command-line tools: unzip, bunzip, gunzip, etc. --

RE: [PHP] dev style guide

2003-08-07 Thread Mike Migurski
>At the risk of starting a flame/religious/holy war I find the One True >Brace style to have some inconsistency if it is as above. The 'function' >does not open the curly brace at the EOL, but the 'if' does. Yeah, that's pretty much the definition of the OTBS. :) I'm not sure why I find it so nat

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-07 Thread Mike Migurski
>I have written as part of my CMS, an image upload system, now when the >images are placed in the destination folder, they are owned by httpd.root >and I need to get them to be owned by siteuser.sitegroup. > >I have tried to chmod and chgrp it to siteuser.sitegroup but it gives >permission denied e

Re: [PHP] Simple cookie question

2003-08-09 Thread Mike Migurski
>There are two ways round your problem... > >1. Set your cookie right at the top of the script, so as your first line >have something like: if(isset($_POST['vote'])){ setcookie(); } > >2. Use output buffering, this will make PHP buffer all of your content >and not send it till you tell it to (o

Re: [PHP] segmentation faults

2003-08-10 Thread Mike Migurski
>I have a large project underway which is (hopefully!) nearing completion, >running on the latest stable release, 4.3.2. However, strange things >have started happening... > >My main page sometimes causes Apache to seg fault at some point during >the execution (e.g. [Sun Aug 10 18:05:55 2003] [not

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Mike Migurski
>> But some web pages when I cut and paste the URLs don't work. Like when >> I search for something on Ebay. Could this be because of cookies? > >That's a good guess! Yet further proof that cookies suck, except the >ones made with flour, shortening and sugar, of course. Huh? seems like further

Re: [PHP] what is %s %d

2003-08-14 Thread Mike Migurski
>They are codes for date formatting. > >Specifically: >%s represents seconds with leading zeros. >%d represents day of the month with leading zeros They can also be codes for the printf family of functions: %s represents string %d represents number See http://php.net/sprintf

Re: [PHP] php.ini configuration can we have two include_path inphp.in file

2003-08-14 Thread Mike Migurski
> I am not able to locate the file you are referring to. Please do >help me I am very much frustrated. .htaccess files are described here: http://httpd.apache.org/docs/configuring.html#htaccess - michal migurski- contact inf

Re: [PHP] Validate The Last Day of Month with server's clock????

2003-08-14 Thread Mike Migurski
>Here's a trick script. We know that some months have the last day >which is 30 while other is 31. As for February, it can be either 28 or >29. So, what's the trick in using the php to find out what is the last >day of the month if you want to checked it against the server's clock to >find o

Re: [PHP] getting images?? Help!!

2003-08-14 Thread Mike Migurski
>I have created a little image manager. Mainly for personal usage but I >have a few friends that would like it as well. Anyway, the problem that >I've run into is that I can only select one file at a time using the form >attribute that I want to upload. Does anyone know of >a way to select mult

RE: [PHP] PHP Counter on HTML Page

2003-08-14 Thread Mike Migurski
>I've never used GD or ImageMagick before.. can you guide me to any >tutorial, script, reference.. something upon the same that can help me >out? Can you -please- do some of your own legwork once in a while? http://www.google.com/search?q=imagemagick+tutorial http://www.google.com/search?q=gd+php

Re: [PHP] host name

2003-08-14 Thread Mike Migurski
>I want to get the current domain name in to a PHP variable. print_r() the contents of $_SERVER to see all the information given to you by the webserver -- the host name will be in there. - michal migurski- contact info and pgp k

Re: [PHP] Function arguments

2003-08-15 Thread Mike Migurski
>What is the best way to pass the arguments so it is easy to maintain in >future if function behaviour changes by adding/removing one or more >arguments? > >Currently i am passing arguments in array. But i think it is not the >clean way to do it and another approach i am using is functionName(arg1,

Re: [PHP] [php] explode that :) !

2003-08-16 Thread Mike Migurski
>echo "Your score is: "; $score=split($P1OC1Q1,"ΒΆ"); echo >$score[0]."\n"; > >Do I have to go through all that to get score[0] ? I think reset(split()) should work for getting the first element. - michal migurski- contact info an

Re: [PHP] indexing a folder

2003-08-17 Thread Mike Migurski
>> Thanks, but is this also possible for directories not on my server? Or >> can i just use these functions? > >Missed that bit, sorry. If the directory is not on your server, then you >need to go through FTP. or SSH, or HTTP, or one of the other innumerable ways to get information from one machin

Re: [PHP] get current path

2003-08-17 Thread Mike Migurski
>The PHP site seems to be down right now ... so here's the question: Is >it possible for PHP to tell me the current path of a page? For example: >www.whatever.com/this/page.php - I'd like PHP to return /this/page.php >... is that possible and if so, how so? PHP site looks up to me, though I hav

Re: [PHP] user-defined superglobals?

2003-08-24 Thread Mike Migurski
>It would be nice to have a php-function like > >declare_superglobal($_MYFRAMEWORK); > >And then use $_MYFRAMEWORK like $_GET. You have a few options: if you are looking to set variables that are static and atomic, you can use environmental variables in an .htaccess file (getenv() to access them)

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Mike Migurski
>> For example, on a file called info.html, i want to have some PHP >> code that actually gets executed. > >In your httpd.conf add the line > >AddType application/x-httpd-php html Better to do this in an .htaccess file, so you don't incur PHP processing overhead on the entire server (if there

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Mike Migurski
>> Better to do this in an .htaccess file, so you don't incur PHP >> processing overhead on the entire server (if there are others using >> it). > >Apache suggests not using .htaccess files at all because they require a >recursive traversing of directories looking for .htaccess files, because >some

Re: [PHP] Recursive Object Troubles

2003-08-26 Thread Mike Migurski
>I am building a recursive Menu object. Inside each menu item there is an >array which should allow me to add submenu items and so on. I am having >trouble, though, with getting the submenus to stay. They are >disappearing as I go along. Without really going through your code (sorry) I would ha

[PHP] OOP, bus errors, segfaults

2003-06-16 Thread Mike Migurski
Hello, First post to the list, hi everyone. I'm having some difficulties with a script that makes heavy usage of objects, (de)serialization, and reference-passing. I've been noticing extremely frequent segfaults and bus errors in my apache logs (Bus Error 10, Segmentation Fault 11). These are not

Re: [PHP] Re: put data into array

2003-06-16 Thread Mike Migurski
>I have problem when I try to retrieval the data from Oracle database. >what I want is to put each row of data into an array with second column >value as the key and first column as the value, at present I can not >append the value to the existing array instead replacing current array >value, can a

Re: [PHP] Naming a variable with a variable

2003-06-17 Thread Mike Migurski
>Ho can I create (name) a variable with other variables value? > >If $foo = "bar"; > >then the variable I want to create is $bar. > >How do I do this? $$foo see: http://www.php.net/manual/en/language.variables.variable.php - mic

Re: [PHP] Convert KB to MB?

2003-06-19 Thread Mike Migurski
>Is there a simple script that will take a value in Kilobytes and convert >it to MegaBytes? $value_in_mb = $value_in_kb / 1024; ta da - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.h

Re: [PHP] Convert KB to MB?

2003-06-20 Thread Mike Migurski
>>Ahhh, but then marketing gets involved and changes the 1024 to 1000 and >>ta da, you now have more MegaBytes. 1024 is the right number to use, but >>don't be surprised if it doesn't match with some numbers you might >>compare it to. > >Not necessarily, in data storage 1mb = 1024kb but in data tra

Re: [PHP] return all non-tag characters

2003-06-21 Thread Mike Migurski
>I want to be able to retrieve and return all character that are not >located in html tags. For example: > >1234567 >or >1234567 > >I would just like it to be equal to 1234567, but I would need it to work >with any tags and attributes. A good starting point might be preg_replace, search pattern '

Re: [PHP] Date problem

2003-06-23 Thread Mike Migurski
>I am storing dates in an Access database in a field with a "Date/Time" Type >the date is being generated using date("n/d/Y h:i a"). It appears to be >stored in Access correctly but when I output it to the page using PHP it >seems to be changing. It is being stored in the database as "6/19/2003

Re: [PHP] Source/version control?

2003-06-23 Thread Mike Migurski
>What tools do you recommend or use for a team environment that will allow >us to maintain source control and even offer some version >tracking/history in case we need to go back to old code? > >We need the ability to check-in and check-out files in a team environment >--- normally just HTML and PH

Re: [PHP] Passing Array to object

2003-06-25 Thread Mike Migurski
You define a function "SetLinks", but call it as "SetLink" -- is this a typo? Also, neither of your SetLink/s() calls are correct function calls. This may work better: $index->SetLinks(array(...)); - michal migurski- cont

Re: [PHP] Securing PHP code

2003-06-25 Thread Mike Migurski
>I am getting started on a project on PHP that requires very very high >levels of security. I cannot give you exact details but the basics is >that it deals with credit cards. > >I want some advice and tips from experts on the following >The server will be Red Hat Linux 7.3 > >1) The site will have

Re: [PHP] Securing PHP code

2003-06-25 Thread Mike Migurski
>>> 2) I store the db password and login info in a database.inc.php file. >>> Is there any way I can prevent a person from getting the db pass even >>> after he gets this file? >> >> Store that file outside the docroot. That way there is no chance they >> can get it from the web site. I myself us

Re: [PHP] Securing PHP code

2003-06-25 Thread Mike Migurski
>> Why rely on some access restriction when you don't have to? You include >> code using a filesystem path. There is no need for it to reside under >> document root. Yes, you can make it so that certain things are not >> served directly by the Web server, but why take the extra risk? You >> gain no

Re: [PHP] Largest Member of Array

2003-06-26 Thread Mike Migurski
>How would i find the value of the largest number in this array? > >$example_data = array( >array("Mar-99",100,2000,5945.33,1234,10), >array("Feb-99",908,3454,4764.90,4321,50), >array("Jan-99",542,8000,13365.52,6012,60) >); end(array_reduce($example_data, create_function('$a, $b', 'ret

Re: [PHP] A simpler question involving http_user_agent

2003-06-29 Thread Mike Migurski
>Would anyone happen to know what http_user_agent would be if the user is >visitng from an internet enabled cell phone (e.g. sprint pcs phone or >similar)? It may or may not be one of these: http://www.thewirelessfaq.com/useragents.asp ---

RE: [PHP] web site security: how to hide login info for mysql-connection

2003-06-30 Thread Mike Migurski
>> >> php_value mysql.default_user fred >> php_value mysql.default_password secret >> php_value mysql.default_host server.example.com >> > >H what about phpinfo()? It shows those settings in the clear. solution: don't leave stray phpinfo's on a production site. :) -

Re: [PHP] php-general as REPLY TO

2003-06-30 Thread Mike Migurski
>I just read this FAQ, and I still don't see a good reason why not to >change the REPLY-TO. The primary reason offered is that it will prevent >people from sending messages in private, but that is not really the case >(the FROM field will still contain the sender's address and it can simply >be cu

Re: [PHP] Gripe

2003-09-03 Thread Mike Migurski
>Cuz the the way the PHP parser is written makes it impossible to discover >the error before it gets to the end of the file, and realizes that there >are no more braces to go around. > >It definitely sucks... almost as badly as a stray backtick. Try finding >that little bugger at 1600x1280... Thi

Re: [PHP] [SOLVED] Re: [PHP] Parse error?

2003-09-05 Thread Mike Migurski
>Ok, the reason I was getting this error seems to be related to Safari on >OS X. When I copy code segments in Safari and paste them in BBEdit they >generally looked ok, although there were extra spaces inserted in some >places. I then turned on show invisible characters and it made it even >more cl

Re: [PHP] Escaping the " ' " character

2003-09-10 Thread Mike Migurski
>I need to print the following: > >onClick="MM_openBrWindow('http://www.gilardi.com/pdf/gwyt1poc.pdf','','')" > >and I am not sure how to escape the " ' " characters. with a slash. http://www.google.com/search?&q=php+single+quote+escape+site%3Aphp.net -

Re: [PHP] loading classes and efficiency

2003-09-10 Thread Mike Migurski
>> $some_object =& create_object('some_object'); >> > >This is really funny i've been doing php for a good while now but what is >the reason to use the & symbol on the function ? returns by reference. - michal migurski- contact i

Re: [PHP] loading classes and efficiency

2003-09-10 Thread Mike Migurski
>>>This is really funny i've been doing php for a good while now but what >>>is the reason to use the & symbol on the function ? >> >>returns by reference. > >ok i get it but why would i need it in my example ? I think it was a hypothetical thing on Brad's part ... one of the annoying things about

Re: [PHP] Session stealing, ..

2003-09-12 Thread Mike Migurski
>This all probably takes care about the problem with session id's in the >query string, which is known as referrer to the next website our visitor >visits. What I'm worrying and wondering about now are other users of the >server my site's at. They can most likely go into the /tmp folder and >just r

Re: [PHP] Best way to approach object construction errors?

2003-09-18 Thread Mike Migurski
>I've created a class called university, it has a constructor which can >accept an id. If the id is sent during construction the constructor will >connect to a MySQL db to set all of the objects member variables to the >MySQl counterparts. > >I'd like to include some error notification so if I send

Re: [PHP] Running system commands

2003-09-23 Thread Mike Migurski
>I was wondering, if anyone can help me with running system commands from >within php. Actually I have a script which deletes users from my database >(which is of course MySQL), now I want to delete those users from system >level also, as they are authenticated users of my OS also. > >Now, the prob

Re: [PHP] How can I auto upload a file to the server?

2003-09-24 Thread Mike Migurski
>The only part i am having trouble with is making the remote script >automatically look into the local computer's hard drive and grab the .txt >file. >The problem with the code above is the path to the file does not show up >in the , and the user would still need to click on the >'submit button'

Re: [PHP] Session info stored on server

2003-09-26 Thread Mike Migurski
>> Open sess_4f5d...0367 in any text editor and you will see your variable >> there. > >I can't. I'm unable to open or download or change the permissions. Is it >an array? A serialized array, yes. - michal migurski- contact info

Re: [PHP] Central authentication for multiple sites

2003-09-29 Thread Mike Migurski
>Does anyone know of a way to authenticate a person on one site and have >that authentication carried through to multiple sites? > >Basically I'd like to have someone login on www.domain1.com and then have >their login be valid on www.domain2.com and www.domain3.com ... the >domain name is differen

Re: [PHP] printf....

2003-10-01 Thread Mike Migurski
>Warning: printf(): too few arguments in >/home/sites/site8/web/index_test.php on line 34 > >I cannot for the life of me figure out what the problem is. I've looked >thru archives, examples, and pages of a book all about printf, and this >just doesn't add up to me.. Anyone see the problem? To pr

Re: [PHP] ps command in php

2003-10-06 Thread Mike Migurski
>I'm trying to have the output of the "ps -ef" command in Linux to my >browser. Can anyone help how to properly have the output in proper >format. I've used the passthru() function but the output is scrambled. What do you mean by 'scrambled'? The following works for me: echo '', `ps -ef`,

Re: [PHP] ps command in php

2003-10-06 Thread Mike Migurski
>my output is something like this: >UID PID PPID C STIME TTY TIME CMD root 1 0 0 Sep19 ? 00:00:04 init [3] root >2 1 0 Sep19 ? 00:00:00 [kflushd] root 3 1 0 Sep19 ? 00:00:09 [kupdate] root > >any idea? Yeah, see David Otton's response, or look at the HTML source of your output. -

Re: [PHP] dynamic -> static

2003-10-08 Thread Mike Migurski
>Dear All, > >Does anybody have any solutions, which makes possible to produce static >pages of all dynamic cms once a day and can be easily integrated into >already made site? Why do you need to do this? Is it because of hosting restrictions, performance concerns, or portability/mirroring (which

Re[2]: [PHP] dynamic -> static

2003-10-08 Thread Mike Migurski
>As I wrote already this issue is mainly because of search engines >incompatibility with dynamic content sites (to be more exact - with urls >containing get parameters, in my case ex. index.shtml?lang=en&menu_id=23) > >Which of your described solution would you suggest for my situation ? > >Turck M

Re: Re[2]: [PHP] dynamic -> static

2003-10-09 Thread Mike Migurski
>: I have the following configuration. >: >: Redhat 8.0 >: Apache/2.0.40 (stock redhat install) >: PHP 4.2.2 (stock redhat install) >: >: What I get when I try and run this is an Object Not Found. > >If I was Apache, I would try to serve the file: > > /index.php/var1/val1/var2/val2/index.

Re: Re[2]: [PHP] dynamic -> static

2003-10-09 Thread Mike Migurski
>Did a little more googling and found the answer. > >In Apache 2.0, by default is does not allow this type of URL. > >But I found a few article on it that explained that if I modified this > >in httpd.conf modify, or add, this line. > > AcceptPathInfo On > >Don't know what it does, but it fixes th

Re: [PHP] Need secure login

2003-10-09 Thread Mike Migurski
>Thanks Justin, actually I was also thinking of the same, but just wanted >to confirm that it is really not a good idea. > >Was also wondering if there is any third party solution ?. A third-party solution to a bad idea? - michal

Re: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Mike Migurski
> I got this project, I'm writing it in PHP of course. What I would >like to do is create a simple an efficient way to work on it from a >couple different locations/workstations. I'm throwing around the idea of >a CVS repository, but am not sure if this is the best way. Does anyone >have s

Re: [PHP] Need advice, hopefully on topic.

2003-10-10 Thread Mike Migurski
>> If you've used it before, I can write more about how it can be used in >> specific circumstances. I never start a project without starting a >> repository someplace, and a combination of CVS and Make have really >> helped me out with a lot of projects. > >hmm.. i'm interested in seeing your appr

Re: [PHP] Who knows all the Header attributes.

2003-10-14 Thread Mike Migurski
>Could some one tell me where can I find the documentation for the >Hedear() function? > >The manual does not provide it but just some examples. Check the HTTP spec for a definitive listing: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14 -

Re: [PHP] intercepting URLs in a "control-system"

2003-10-17 Thread Mike Migurski
>If you are using PHP as an Apachemodule you also have the option of using >a url like >http://example.com/index.php/test/test.html >Apache will see that test.html is not available and will travel down the >directory path til it gets to the index.php (which should exist BTW) and >call that script.

Re: [PHP] error reporting

2003-10-17 Thread Mike Migurski
>Heh yes umm i know this. But how i could i catch this before is spits out >to an ugly error page so i can send to a custom error page. Why would anyone but you ever see a parse error? It's the sort of thing you fix before setting up custom error handling. :) -

RE: [PHP] SQL security

2003-10-17 Thread Mike Migurski
>> If you're using MySQL, you can use mysql_real_escape_string(). If >> you're using another database, hopefully there is a similar function. > >Doesn't MySQL automatically protect against attacks like SQL injection? >Or maybe it's that it automatically applies addslashes()? I can't >remember exac

Re: [PHP] Age from birthdate?

2003-10-22 Thread Mike Migurski
>> >I do wonder what the rule for those born on Feb 29'th. Do they >> >celebrate they're birthday before or after it on non leap years? >> > >> > >>Neither. They celebrate it on Feb 29th. So while we age every >> year, they only age once every four. Make sense? > >So their life expectancy i

Re: [PHP] PHP & JavaScript

2003-10-22 Thread Mike Migurski
>Have somebody any idea how I could do something like that? You're somewhat out of luck, as the chain of events in your typical HTTP transaction looks something like this... >[time]-> client request received from browser | +-

Re: [PHP] Age from birthdate?

2003-10-23 Thread Mike Migurski
>Lastly, where in the world did you get "pedant"? word for the day or >something? :-D Thats a real unusual word for normal everyday use, unless >you were trying to act pedant?? :- The correct adverbial form is "pedantically" ;) ---

Re: [PHP] scrolling tables within a page

2003-10-25 Thread Mike Migurski
>My query output is about 20 to 30 records only. Instead of making the >visitors scroll the whole page, can I make a scrolling table with the >page such that the visitor scroll the results output table only? This isn't strictly a PHP question, but you may want to look into the HTML iframe element,

Re: [PHP] Code optimization: single vs. double quotes?

2003-10-27 Thread Mike Migurski
>It's said that you shouldn't use tables for layout, but does people >accutually listen to that? And what instead? This is veering off-topic, but: - michal migurski- contact info

Re: [PHP] Generate Thumbnail gif's

2003-10-29 Thread Mike Migurski
>Is there any pre-written code available on the net to generate thumbnail >images for a picture. I mean I send the path of the image and my PHP >Script should be able to generate a gif file of size 100x71 or something >like that. If your server has Imagemagick installed (it seems pretty common), t

Re: [PHP] removing all duplicate values from an array

2003-10-30 Thread Mike Migurski
>I'm looking for a function that does almost the same as array_unique() > >But it must also delete the other duplicate entry. Untested pseudo-PHP follows - $encountered_elements = array(); foreach($original_array as $key => $val) if(in_array($val, $encountered_ele

Re: [PHP] removing all duplicate values from an array

2003-10-30 Thread Mike Migurski
>>I'm looking for a function that does almost the same as array_unique() >> >>But it must also delete the other duplicate entry. > > >Untested pseudo-PHP follows - > > $encountered_elements = array(); > foreach($original_array as $key => $val) > if(in_array($val, $encounte

RE: [PHP] removing all duplicate values from an array

2003-10-30 Thread Mike Migurski
>array( >'a' => 'one', >'b' => 'one', >'c' => 'zero', >'d' => 'two' >); > >through this and am having a hind time with then logic... Could you >explain how the output would be array('c' => 'zero', 'd' => 'two')?? I was being pretty sloppy with the code (should've posted pseudocode to begin with,

Re: [PHP] Object References Problem

2003-10-30 Thread Mike Migurski
>I don't pretend to fully understand PHP references, or the strange and >mysterious ways that they work in regards to PHP objects, but I can tell >you how to acheive the results you desire. Someone else will have to >explain it. :) >If someone sees that I'm leading Gareth astray here, feel free

Re: [PHP] applying one function to all array elements

2003-11-02 Thread Mike Migurski
>Can someone show me a simple, clean way to apply one function (eg >stripslashes()) to every element in an array (eg $_POST)? > >I've been doing it with a foreach() loop, but there has to be a better >way. I've also seen http://www.php.net/array_walk, but couldn't >determine how/if it suited my ne

Re: [PHP] Load Stress tool

2003-11-05 Thread Mike Migurski
>I am looking for suggestions on a tool to "load stress" a php >application. We want to make sure that the application/web server will be >able to handle the amount of users we expect. I have found a few but they >seem to be very expensive. Can anyone suggestion an "affordable" and user >friendly s

Re: [PHP] getting array slice of function output

2003-11-05 Thread Mike Migurski
>I have a line which strips the suffix (gif, GIF, TIFF, jpg, JPEG, etcetc >or I would just use basename() :-) from a string but it seems needlessly >drawn out: > > $file = preg_split('/\./',$dirfiles[0]) ; $file = $file[0] ; > >I would like to just assign the 0th element of the preg_split() output

  1   2   >