[PHP] Handling DELETE requests
Under Apache 1.3, how can I respond to DELETE request with a PHP script? I have no problem with GET, POST, or PUT. The only thing I found was the "Scripts" directive, but that requires a specic script to be named. I am looking for something more generic, possibly where I can just say that php scripts can accept DELETE requests. Any suggestions? --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Handling DELETE requests
Well, it turns out that the problem wasn't Apache after all. For the record, Apache does pass the DELETE request on to the script by default. The problem was with the client program I was using to test it out. Appearently, the client is sending a mal-formed request that's causing the server to close the connection. I have now switched to a php-based HTTP client that I wrote and I am getting back exactly what I'm expecting. --- Seairth Jacobs [EMAIL PROTECTED] "Seairth Jacobs" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Curt Zirzow" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > * Thus wrote Seairth Jacobs ([EMAIL PROTECTED]): > > > Under Apache 1.3, how can I respond to DELETE request with a PHP script? > I > > > have no problem with GET, POST, or PUT. The only thing I found was the > > > "Scripts" directive, but that requires a specic script to be named. I > am > > > looking for something more generic, possibly where I can just say that > php > > > scripts can accept DELETE requests. > > > > hmm.. I've never seen the DELETE method used anywhere, and probably > > for good reason. By default you cant use this method with apache > > and I'm not sure if you can enable it without recompiling it or > > getting a patch that enables it. > > Yes, Mod_Actions allows this functionality, but this ability is a "blanket > statement"-style directive, where *all* DELETE requests would go to the same > single script, regardless of what the DELETE was for. > > > Now if you do enable the method, it is rather undefined on how it > > would be handled by php. According to some documentation I found > > (w3c) is: > > > > > > DELETE > > Requests that the server delete the information corresponding to > > the given URL. After a successfull DELETE method, the URL becomes > > invalid for any future methods. > > > > > > If the client issues a 'DELETE /file.php' will the server delete > > the php file and make it unusable. Or will it pass the Request to > > php. If the latter happens then my assumption is that it will be like > > a GET request but the $REQUEST_METHOD variable will be 'DELETE' > > instead of 'GET'. And you program can act accordingly. > > Well, the argument could be made for PUT as well. Should the server PUT a > new copy of the PHP file, or pass the PUT on to the PHP file for processing? > Currently, the default behaviour is to pass the request on to the script, > which is what I would expect and what I want for DELETE as well. My > application has a single entry-point script with its own maintained > sub-paths. Such a DELETE request would inform that script to delete the > names subpath (or return the appropriate HTTP response... likely 405). > > > Now with that said, the common way to simulate a DELETE method is > > by using GET with query paramaters telling you that this request want > > to really delete something. > > In general, this is not a good design. GETs are not supposed to cause > side-effects. Use of POST to a given URI's container URI would be a better > alternative. > > Still, it's a shame that all the HTTP verbs are not better supported, as > more applications are beginning to use them (finally). It's just that most > people think the only HTTP client is the Web browser, which is not true > anymore. > > Thanks for the reply. > > --- > Seairth Jacobs > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Handling DELETE requests
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > * Thus wrote Seairth Jacobs ([EMAIL PROTECTED]): > > Under Apache 1.3, how can I respond to DELETE request with a PHP script? I > > have no problem with GET, POST, or PUT. The only thing I found was the > > "Scripts" directive, but that requires a specic script to be named. I am > > looking for something more generic, possibly where I can just say that php > > scripts can accept DELETE requests. > > hmm.. I've never seen the DELETE method used anywhere, and probably > for good reason. By default you cant use this method with apache > and I'm not sure if you can enable it without recompiling it or > getting a patch that enables it. Yes, Mod_Actions allows this functionality, but this ability is a "blanket statement"-style directive, where *all* DELETE requests would go to the same single script, regardless of what the DELETE was for. > Now if you do enable the method, it is rather undefined on how it > would be handled by php. According to some documentation I found > (w3c) is: > > > DELETE > Requests that the server delete the information corresponding to > the given URL. After a successfull DELETE method, the URL becomes > invalid for any future methods. > > > If the client issues a 'DELETE /file.php' will the server delete > the php file and make it unusable. Or will it pass the Request to > php. If the latter happens then my assumption is that it will be like > a GET request but the $REQUEST_METHOD variable will be 'DELETE' > instead of 'GET'. And you program can act accordingly. Well, the argument could be made for PUT as well. Should the server PUT a new copy of the PHP file, or pass the PUT on to the PHP file for processing? Currently, the default behaviour is to pass the request on to the script, which is what I would expect and what I want for DELETE as well. My application has a single entry-point script with its own maintained sub-paths. Such a DELETE request would inform that script to delete the names subpath (or return the appropriate HTTP response... likely 405). > Now with that said, the common way to simulate a DELETE method is > by using GET with query paramaters telling you that this request want > to really delete something. In general, this is not a good design. GETs are not supposed to cause side-effects. Use of POST to a given URI's container URI would be a better alternative. Still, it's a shame that all the HTTP verbs are not better supported, as more applications are beginning to use them (finally). It's just that most people think the only HTTP client is the Web browser, which is not true anymore. Thanks for the reply. --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mind exploded on this one!
Could you give an example of what you want/expect to get back? Seairth "Phil Powell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fread() question
I have an open socket that I am reading from. The code looks like the following: $contentLength = 0 + $this->response['headers']['content-length']; do{ $status = socket_get_status($this->socket); if( $status['eof'] == 1 ) { if( $this->clientOptions['debug'] & DBGSOCK ) echo("DBG.SOCK status eof met, finished socket_read\n"); break; } if($status['unread_bytes'] > 0) { if($contentLength > $status['unread_bytes']) { echo("DBG.SOCK reading {$status['unread_bytes']} bytes...\n"); $buffer = @fread($this->socket, $status['unread_bytes']); $contentLength = $contentLength - $status['unread_bytes']; } else { $buffer = @fread($this->socket, $contentLength); $contentLength = 0; } } else { if( $this->clientOptions['debug'] & DBGSOCK ) echo("DBG.SOCK reading {$status['unread_bytes']} bytes...\n"); usleep(1); continue; } $data .= $buffer; } while($contentLength > 0); Now, the above code hangs (infinite loop, actually), ultimately returning something like: DBG.SOCK reading 3993 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... DBG.SOCK reading 0 bytes... etc... On the other hand, if I change the following lines: $buffer = @fread($this->socket, $status['unread_bytes'] - 1); $contentLength = $contentLength - $status['unread_bytes'] - 1; Then I get something that looks like: DBG.SOCK reading 3993 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... DBG.SOCK reading 1 bytes... etc... until the entire response has been read (88771 bytes in this case). Also, this would mean that the effective fread would be: $buffer = @fread($this->socket, 0); However, if I just do: $data = @fread($this->socket, $contentLength); it works as expected. So what's going on? For now, I will use the single command in place of the loop, but I really wanted to monitor the current unread bytes. Any thoughts appreciated. --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: urldecode problem :(
"Rosen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > HI, > I'm using "urldecode" function to decode string from > "getenv("QUERY_STRING");", but part of > it is in cyrrilic (windows-1251) charset. > > I have following code: > > $a="%D1%81%D1%87%D0%B5%D1%82%D0%BE%D0%B2%D0%BE%D0%B4%D0%BD%D0%B0+%D0%BA%D1%8 > A%D1%89%D0%B0"; > $b="%d1%ee%f4%f2%f3%e5%f0"; > > echo "a=" . urldecode($a); > echo "b=" . urldecode($b); > > On the second string it works correctly, but on first it don't. > These two vars are getted from two different pages ( as refferers ). > I think the problem could be in encoding used in two pages. When I run the code without setting a charset (defaulting to UTF-8), I get back the following: a=?? b=ody> When I run the code setting the charset to windows-1251, I get: a=????µ????° ??° b=??? I'm guessing you want "a" from the first one and "b" from the second one. In which case, you are correct. Two different character encodings are being URL encoded. You could convert the first string using: convert_cyr_string(mb_convert_encoding(urldecode($a), 'ISO-8859-5', 'UTF-8'), 'i', 'w') -- --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] asynchronous processing?
I want to POST data to a server and get back an immediate response. Independently, I want the action to cause the server to submit its own POST request to another server. I do not want the original POST to block while waiting for the second POST to complete. I recently read an article [1] that said that register_shutdown_function was not capable of doing this (it causes the original request to block) and that a new function called apache_register_shutdown_function would allow this. Unfortunately, I don't see my host upgrading to 4.3.1 anytime soon (assuming that the function is even in that version). So are there any alternative methods? --- Seairth Jacobs [EMAIL PROTECTED] [1] http://www.php.net/manual/en/function.register-shutdown-function.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Converting a Java into php
If you are specifically trying to use UTF-8 encoding, look at encode_utf8(). --- Seairth Jacobs [EMAIL PROTECTED] "Umut Ozan Basar" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > i am converting a java class into php.. almost everything is done... but i > cant find a java functions equivalent in php, thats getBytes()... is anybody > knows that a function in php that exactly does the same job ? > > for more info about getBytes() > http://java.sun.com/docs/books/tutorial/i18n/text/string.html > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: :( This fact ruins my understanding of php :( please explain!
I have a couple thoughts... 1) In some other languages, passing an array by value only passes the first element value, not the whole array. This may be happening here, which would explay the fast execution times. I don't know this for sure, but it could easily be tested by seeing what's in $a inside the function f(). 2) Try returning the array by reference... function &f(&$a){return $a;} for ($i=0; $i < 100; $i++){$a = & f($big);} --- Seairth Jacobs [EMAIL PROTECTED] "Markas" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I tried some trivial expirements: > > /* here I define an array $big, which I guess would "eat" ~100kb of memory > */ > for($i=0; $i<1; $i++) > { > $big[$i] = "1234567890"; > } > > /* this func only returns the value it gets as a param...*/ > function f($a){return $a;} > > $start = microtime(); > > /* here all the job is done */ > for ($i=0; $i < 100; $i++){$a = f($big);} /* <--- every iteration I just > pass $big array to this func and it simply returns it*/ > > $end = microtime(); > > /* here I find out the time the job above takes to run, similar to the code > from the help:*/ > function > microtime($time){ > list($usec, $sec) = explode(" ",$time); > return ((float)$usec + (float)$sec); > } > > $time_start = getmicrotime($start); > $time_end = getmicrotime($end); > $time = $time_end - $time_start; > > echo "Did nothing in $time seconds"; > > So the script above takes on my server ~0.00115 sec, so as far as I understand, it takes php to copy that $big array which is rather large, at least 100 times... So I decided to change the function f($a): > function f($a){return $a;} changed to function f(&$a){return $a;}, > as you can see, I only wanted to pass that $a param by reference, without copying it, so I thought I win in performance and the 100 iterations will work faster, as no copying of such a large array $big (which is this time going to be passed by refernce) will be involved,... BUT this case the job took ~3.75093 seconds, which is 3262 times SLOWER !!! I also found out, that while using refernces, the time of job's run strictly depends on the $big array dimension, and while NOT using references, the time doesn't depend on that, but I thought just on the contrary. I thought, that while using references, we dont copy the data and therefore do not depend on that data amount, but the example above shows just the opposite results... > > What's going on, if anybody gets interested, please explain? > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: stopping repeated posts to a Bulletin Board
"Resarch And Development" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > What is the best way to avoid the "repeated comment/post" syndrome > caused by the user clicking the submit button one too many times > because he/she did not wait for the browser to return a confirmation > page or the script took too long to execute. Assign a unique key to each submission form (as a hiiden field). Once the form is submitted, you can stop any replays by testing to see if the key was already used or not. -- --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php4 w/ apache2 using module
My understanding is that PHP does not currently work well with Apache2, though this may be a platform specific problem. I couldn't even get Apache 2 to load it (under Win2K). I have seen mentions that PHP 4.3 is supposed to improve this situation, though I don't actually know if it's true or not. In the meantime, I have seen the following advice: 1) Run Apache in pre-fork mode (which makes it act like Apache 1). 2) Use the CGI version of PHP (but as you note, there are some limitations there). I finally went back to Apache 1 for the meantime (since it's what my host uses anyhow) --- Seairth Jacobs [EMAIL PROTECTED] "Yoda2005" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Is there any way to do it? I cant seem to get it to install as a module > nomatter what I do. Right now I have it running as a cgi parser but some > stuff I want to do I cant really do when it is running like this... Any > ideas? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTTP_REFERER?
If you are running PHP 4.1.0 or later, you can also use $_SERVER["HTTP_REFERER"], etc. Note that if you are using PHP 4.2.0 or later, then the "register_globals" option is off by default and the variables you mention below are not automatically created. --- Seairth Jacobs [EMAIL PROTECTED] "Lon Lentz" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > I have a template which places the value of $HTTP_REFERER into a table. > This template is included in another template which is included in yet > another template. The problem I am having is that the HTTP_REFERER, > HTTP_USER_AGENT, and QUERY_STRING variables are all blank. > > Are there issues with these values across included templates? I would > imagine not. Are there settings for Apache that impact these? > > I am running Apache on Linux. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: No Localhost with apache?
Hmm... maybe there is a problem with your hosts file (in WinNT systems (NT/W2K/XP), I think you can find it in /winnt/system32/drivers/etc). Normally, you should have a line that looks like: 127.0.0.1 localhost # default localhost (the "#default localhost" is just a comment). If this entry is missing or different, I suppose it's possible to lose access to "localhost" altogether, though I don't know for sure (and don't want to test out either ). What happens when you "ping localhost" at a command prompt? --- Seairth Jacobs [EMAIL PROTECTED] "Ryan A" <[EMAIL PROTECTED]> wrote in message 049a01c24eb5$3b29fdd0$61d396c1@l2zcaxu7emppqh">news:049a01c24eb5$3b29fdd0$61d396c1@l2zcaxu7emppqh... > Hey, > Thank you for replying... > > I checked the httpd.conf file and this is what I saw > > ServerName localhost > ServerName 212.92.**.*** > > (The stars are numbers of course but I put them there to protect myself from > evil genus's on the list :-) ) > I have no idea what the second line is forapache still only responds to > 127.0.0.1 > Any new ideas? > > Cheers, > -Ryan > > > > > Anyway, I installed PHPTriad first but since the version of php is 4.0.0 I > > uninstalled it and installed SpaceServer...the problem I noticed with both > > was I could not get the default page from apache with http://localhost/ I > > have to use http://127.0.0.1 or it gives me a page not found errorAny > > idea why? I have tried using it with the port numbers of :80 and :8080 > > without any luck..I need it to display the pages using "localhost" as some > > programs are configured that way... > > --- > > > > What is the value of "ServerName" in your httpd.conf file? I'm guessing > > that it's "127.0.0.1". If so, just change it to "localhost" and restart > > Apache. > > > > --- > > Seairth Jacobs > > [EMAIL PROTECTED] > > > > > > > > -- > > 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] Re: No Localhost with apache?
--- "Ryan A" <[EMAIL PROTECTED]> wrote in message 000e01c24e7f$b7bd8820$61d396c1@l2zcaxu7emppqh">news:000e01c24e7f$b7bd8820$61d396c1@l2zcaxu7emppqh... Anyway, I installed PHPTriad first but since the version of php is 4.0.0 I uninstalled it and installed SpaceServer...the problem I noticed with both was I could not get the default page from apache with http://localhost/ I have to use http://127.0.0.1 or it gives me a page not found errorAny idea why? I have tried using it with the port numbers of :80 and :8080 without any luck..I need it to display the pages using "localhost" as some programs are configured that way... --- What is the value of "ServerName" in your httpd.conf file? I'm guessing that it's "127.0.0.1". If so, just change it to "localhost" and restart Apache. --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Follow-up question about Digest Authentication in PHP
In a prior post, Rasmus Lerdorf said in response to implementing digest authentication: > we do not have digest auth support in PHP yet. Is it not possible to manually implement digest authentication in PHP? Or does PHP preprocess the "Authorization" request header such that the information is not retrievable from within the script? I am guessing that there are no issues in sending the "WWW-Authenticate" and "Authentication-Info" response headers using the header() function. Is digest just currently out of the question when using PHP or is it that I just have to manually implement it? --- Seairth Jacobs [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Cookies
Each cookies is it's own name/value pair. If you want to store multiple pairs, you need to encode them in some manner and store them in the value. Otherwise, you can just create multiple cookies, one for each variable. Assuming that the browser is configured to accept cookies, all cookies that you set will be returned to you with each request. --- Seairth Jacobs [EMAIL PROTECTED] "Erich Kolb" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Why cant I use more than 1 variable in a cookie? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can someone - anyone see my error?
I think you have to specify the destination file name as well. The destination directory is not enough. --- Seairth Jacobs [EMAIL PROTECTED] "Johnp" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Ok after being blasted for not looking on PHP.net first I have now returned none the wiser! :D Here is the post file: - Send this file: Here is the post handler file: And here is the error I get: - Warning: Unable to create '/home/thehobby/public_html/php/phpforums/uploads/': Is a directory in /home/thehobby/public_html/php/phpforums/forums/postbit.php on line 4 Warning: Unable to create '/home/thehobby/public_html/php/phpforums/uploads/': Is a directory in /home/thehobby/public_html/php/phpforums/forums/postbit.php on line 9 Warning: Unable to move '/tmp/phpahcXwh' to '/home/thehobby/public_html/php/phpforums/uploads/' in /home/thehobby/public_html/php/phpforums/forums/postbit.php on line 9 Anyone know whats going on - PHP.net was of a absolutely no use and I am very new at file uploads - any help appreciated! Thanks - John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Passing variables between servers
Is there any reason to pass the data to the ASP server other than the need for the ASP server to pass it back in case the PHP server session has expired? If not, why not just store the login information in a local table referencable by a primary key that you pass around instead? You could even do this with GET. --- Seairth Jacobs [EMAIL PROTECTED] "Mark McCulligh" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have two server. One running PHP/Linux the other running ASP/2000. > The user logins into the PHP server and session variables are made to hold > their username, password, department, etc.. The site from time to time > redirect the user to the ASP server. I want to pass the session variable > across to the other server. I can't use the GET method. > (www.domain.com/form.asp?username=Mark.) because putting the password on > the address bar is not an option. The ASP server will redirect them back > when they are done on it. It will pass back the variables just in case the > session on the PHP server has expired for the PHP server can create a new > session if needed. > > I don't want to use a cookie. > > I was thinking of using cURL but I can't fine any information about using it > in ASP. I know how to use cURL in PHP to redirect the user to the ASP > server and pass the variables in the POST method, but not the other way. > > Any ideas would be a GREAT help. > Mark. > > _ > Mark McCulligh, Application Developer / Analyst > Sykes Canada Corporation www.SykesCanada.com > [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing variables between servers
MD5 is a one-way hash. There is no way to get information back out of it. If he keeps a copy of the hash locally to comare instead of the original password, this is still as vulnerable as using the original password in this case. The only thing it would protect from is making available the original password (which may be used by the user for other sites, applications, etc). --- Seairth Jacobs [EMAIL PROTECTED] "Adam Williams" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Just suggestion but why not use md5($password) and then send the result of > that in your GET? > > Adam > > On Wed, 21 Aug 2002, Mark McCulligh wrote: > > > I have two server. One running PHP/Linux the other running ASP/2000. > > The user logins into the PHP server and session variables are made to hold > > their username, password, department, etc.. The site from time to time > > redirect the user to the ASP server. I want to pass the session variable > > across to the other server. I can't use the GET method. > > (www.domain.com/form.asp?username=Mark.) because putting the password on > > the address bar is not an option. The ASP server will redirect them back > > when they are done on it. It will pass back the variables just in case the > > session on the PHP server has expired for the PHP server can create a new > > session if needed. > > > > I don't want to use a cookie. > > > > I was thinking of using cURL but I can't fine any information about using it > > in ASP. I know how to use cURL in PHP to redirect the user to the ASP > > server and pass the variables in the POST method, but not the other way. > > > > Any ideas would be a GREAT help. > > Mark. > > > > _ > > Mark McCulligh, Application Developer / Analyst > > Sykes Canada Corporation www.SykesCanada.com > > [EMAIL PROTECTED] > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: phpMyAdmin is this possible
What you can and can't do with phpMyAdmin may depend on your host. phpMyAdmin itself does have the ability to create databases. However, that ability is determined by the access rights of the user you access the MySQL server with. If your host controls the creation of that user, they may puposely restrict your access rights to dissallow the creation of additional databases. I had this very problem with an old host of mine. I was given one database and that was it. I could not create any more. Now, my current host (www.webprosinc.net) works a bit different. It is using Plesk, which takes over the responsibility of creating databases and users. The users that it creates do not have the ability to create additional databases, though just about all other access rights are granted (at the database level). This gives the Plesk software absolute control over the MySQL server while still allowing me to create new databases. So, I would make sure your host allows you to create additional databases before you try to get phpMyAdmin to do it. If this is an important feature and your current host does not allow it, there are several other hosts (mine included) that do give that access (usually with some restrictions, of course). --- Seairth Jacobs [EMAIL PROTECTED] "Steve Jackson" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I am new to MySQL and PHP. > Having looked at PHPMyAdmin the GUI I was wondering if it's possible to > create a new database within the system? > If so what are the commands? I ask because I only have one database on my > server and don't want to populate it with different tables, I'd rather have > seperate ones for seperate functions.. Ideas or advice? is the way I am > suggesting better or worse than the way my hosting company expects me to > work? > Thanks in advance. > Steve. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: suggestions for a good php+mysql isp?
www.webprosinc.net has several plans, starting as little as $4.95 (1 MySQL database/1 domain/125 MB space/2GB transfer) to $49.95 (unlimited databases/100 domains/1GB space/16GB transfer). They are currently using PHP 4.1.0 and seem to regularly updated their system (they use Plesk for maintenance). As with any host, there are some limitations to what you can and cannot do. Oh. And very, very important: they have *always* gotten back to me within a few hours of any support call I have made. This is a vast difference from some prior hosts that I was lucky to hear from within 24 hours of a support call. Good luck in your search. :) --- Seairth Jacobs [EMAIL PROTECTED] "Or Not Db Db" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have searched the archives and the last time this was seriously discussed > was september of last year...unless I have a giant gaping hole in my > archive! :) I was considering northwesthost.com and would like some > opinions on them or anybody you are happy with The list of isp's on php.net > doesn't mean much to me without some current comments about their > performance. > I need php and mysql support for my site - I'm moving the domain name and > site from myhosting.com (they're ASP and perl2exe'd scripts only). TIA! > > -Kirk > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Apache 2.0.40 and php as module
I have had the same problem under Win2K. My understanding is that PHP does not yet work well (at all, in this case) with Apache2. Instead, install Apache 1.3. The console window is a bit annoying (would have liked to run it as a service), but it does work. :) --- Seairth Jacobs [EMAIL PROTECTED] "George E. Papadakis" <[EMAIL PROTECTED]> wrote in message 08f401c24772$3e5fe130$07dbdbc2@phaistonian">news:08f401c24772$3e5fe130$07dbdbc2@phaistonian... > Hi , > > I am trying to install Apache 2.0.40 with the latest php build as a module > (windows xp) yet it just wont work. > Though I tried all the tricks and possible scenarios no luck. > Does anyone have anyidea why I am getthing this frustrating "Cannot load > D:/Apache/php/sapi/php4apache2.dll into server: The specified procedure > could not be found." message? > Thanks in advance. > > -- georgep > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: frames and variables
Yes, Javascript is the most common way of doing this. The alternative is to submit the variable back to the main PHP document (whatever created the Frames in the first place) and regenerate the entire screen (frameset and all). The script can then pass the variables on in the tags. It ain't pretty, but no Javascript is required. As you may be starting to guess, this is why many people have quit using Frames. At first, they seem like a great idea. But the more you use them, the more difficult you find them to be. In the end, many people would rather give up the advantages of Frames in return for the increased simplicity of generating the pages. --- Seairth Jacobs [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote in message 01c24415$8155a1b0$86a96518@jumpy">news:01c24415$8155a1b0$86a96518@jumpy... > Has anyone here designed php sites that use a combination of php pages > and html pages? > > What I want to know is how to pass a variable from nav_frame.php (at the > top) to itself, AND to the data.php frame (lower frame, main body) > > I can pass variables to itself, (with the "?page_name=content.htm" > thingie attached to links, but I don't know how to make this accessible > to both frames at the same time. > Help appreciated, yes, I'm asking a lot of questions since this is a > project for college and my due data is in 2 ... ooops 1 DAY! WhooHOO! > > - Vic > > > > __ > Post your ad for free now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL path question
I would like to be able to do the following: www.sample.com/path/file.php/additional/path/ Unfortunately on IIS, this gives an error. Interestingly, the following does not: www.sample.com/path/file.php/ I need to have a single PHP script be responsible for a series of resources, but I do not want to use a query string (for various reasons) to identify those resources. So, how can I do this? Is this an IIS-specific problem or does PHP just not allow this? TIA. --- Seairth Jacobs [EMAIL PROTECTED] p.s. Sorry if you see a cross-post on php.version4. I got a warning that said it was a read-only list, so I am reposting to this list as well (which is probably the correct list to post to in the first place. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php