[PHP] Help with pattern matching.
Hi, I'm looking for somebody to give me a hand to create some expressions to extract my information out of an ebay auction page. So that I can manage them more effectively. I've try lost of patterns but can't seem to get the hang of it. Is there anybody willing to lone their brain to a php newbie before my computer gets both barrels? Thanks Will
[PHP] Text area with an echo command
Hello everyone, I have a question on echoing text from a database into a form. The database is populated but it does not show up in the modify script page. Can someone help me?? Here is the code that I am using: Notes: The above is a display_block in the PHP code itself. Thanks in advance, Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text area with an echo command
That worked great!! But how do I get the info from the modify script back into the database?? With that code: $value It does not populated the database with the new text that was modified. Is there another way to do it?? I am learning PHP on my own so bare with me. Will John W. Holmes wrote: Will wrote: I have a question on echoing text from a database into a form. The database is populated but it does not show up in the modify script page. Can someone help me?? Here is the code that I am using: Notes: There is no "value" attribute for a textarea... $value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text area with an echo command
John, I have that script: $sql = "UPDATE $table_name5 SET care_id = '$_POST[care_id]', date = '$_POST[date]', common = '$_POST[common]', notes = '$_POST[notes]' WHERE notes_id ='$_POST[notes_id]'"; $result = @mysql_query($sql,$conn) or die(mysql_error()); header("Location: main.php"); exit; But my question is when I hit the submit button and check the database it has nothing in the "notes" field. I tried a hidden field in the modify script but it did not work. Will John Nichel wrote: Will wrote: That worked great!! But how do I get the info from the modify script back into the database?? With that code: $value It does not populated the database with the new text that was modified. Is there another way to do it?? I am learning PHP on my own so bare with me. Will You'll have to submit the form, and run an update query on your database. John W. Holmes wrote: Will wrote: I have a question on echoing text from a database into a form. The database is populated but it does not show up in the modify script page. Can someone help me?? Here is the code that I am using: Notes: There is no "value" attribute for a textarea... $value -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text area with an echo command
Thanks for the code but it comes up a parse error. I know I am new, but this is driving me crazy!!! :( Here is the code that I am working with: $display_block = " ||Cage No.: $care_id | Common Name: $common|| Date: echo "Notes:\n " . htmlentities($notes) . "\n"; "; I know it does not look right, can I take out the "echo", or must that stay?? Thanks for everyones help on this!! :) Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text area with an echo command
Eugene, Thank You much :) I really appreciate it!!! Will PS: I am curious on other guys and gals would do this code. Eugene Lee wrote: On Sat, Oct 18, 2003 at 01:27:05AM -0400, Will wrote: : : Thanks for the code but it comes up a parse error. I know I am new, but : this is driving me crazy!!! :( : Here is the code that I am working with: : : $display_block = " : : : : : : : ||Cage No.: $care_id | Common Name: : $common|| : : Date: : : : echo "Notes:\n : " . : htmlentities($notes) . "\n"; : : : "; : : I know it does not look right, can I take out the "echo", or must that : stay?? Why not make life easier and use a heredoc? $htmlnotes = htmlentities($notes); $display_block = << ||Cage No.: $care_id | Common Name: $common|| Date: Notes: $htmlnotes BLOCK; echo $display_block; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mycrypt on local doesn't decode but does on web server?
Hello, I am hoping that some body might be able to point out what is going wrong. Basically I am running apache2 etc (sokkit) on a local MS XP machine. I downloaded libmcrypt.dll from http://ftp.emini.dk/pub/php/win32/mcrypt/ as specified on php.net under ‘Mcrypt Encryption Functions’ and configured with no probs. Viewing my local phpinfo() mcrypt: is showing up however with less supported ciphers than on the web server I use, but that’s not a problem. So I run the script on localhost. It encodes but won’t decode. I run the same script on the web server and all works? What am I missing none of the functions are returning any error #s / Falses etc. Code is attached. Thanks for any help or advice Will I've stopped 46,300 spam messages. You can too! One month FREE spam protection at www.cloudmark.com <>-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Limit 15 where "Newest"
I am trying to write a limit statement for my database. I want to say something like $sql="select author, title, chapter from database where last_update = "Newest" order by date limit 15"; My question is how do you say " Newest" in php MySQL? And how do you put t link on the bottom of the page that will select the next 15 items in the database? Thank you. --WIll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Custom session functions
Hello all, Due to my need to have the whole session data file encrypted. I am thinking about using custom session functions. Saving in a database is not an option. Anyway, I have modified the session example on php.net to perform encoding and decoding. I have tested the session with data and all seems ok. However as itâs such a crucial part. I wanted to check if anybody has any thoughts or warnings on the code below. Iâm not sure if any other files are stored in the tmp folder so I included the ereg("sess_[a-zA-Z0-9]*", $tmp_files) to check the files before deleting in the garbage function. Thanks Will array("test1_1","test1_2"), "test2" => array("test2_1","test2_2")); echo(â$_SESSION[testing1]"); foreach($_SESSION['testing2'] as $key => $value) { echo("$key - "); foreach($value as $value2) echo("$value2, "); } ?> I've stopped 2,456 spam messages. You can too! One month FREE spam protection at www.cloudmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [PHP Header] Right-Click Download in Firefox showing php filename
I followed some of the examples that was on PHP header() http://us3.php.net/manual/en/function.header.php I am trying to have users download a file named 'Setup.msi', however under a PHP file with the sent header information, the default name to the user will be 'ApplicationSetup_v1_0.msi' -- I am sending the recommended header information in the notes. For example in my 'download.php': $forcename = "ApplicationSetup_v1_0.msi"; $filename = "Setup.msi"; header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream; name=".$forcename); header("Content-Type: application/octetstream; name=".$forcename); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($filename)); @readfile($filename); When I LEFT-CLICK the 'download.php' link in Internet Explorer 6/7 and Firefox 2/3, it defaults the download name to the variable that I want it changed to ($forcename). When I RIGHT-CLICK in Internet Explorer 6/7, it also works. However when I RIGHT-CLICK the link in Firefox 2/3, it downloads the file as 'download.php' and not the specified name and .msi extension (I can still rename to the .msi extension and it works fine). Am I missing another header or is there known issue for Firefox right-click "Save Link As..." and default the name to something else? Or should I contact Firefox on this to get more information to default the name to something different? Thanks -- William Frankhouser WilzDezign http://www.wilzdezign.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [PHP Header] Right-Click Download in Firefox showing php filename
Thanks everyone. I looked into the Firefox browser forums/support and found that the "Right-Click >> Save Link As" does not send the header response, as it will take the file as-is. So in this example, it sees the 'download.php' and then takes that as the default name. It then starts the download of the file, which in turn gets the header information and starts downloading the 'Setup.msi'... but now under the name of 'download.php' -- Again to note in IE the Right-Click will get the header information including the Content-Disposition and THEN open the Save As window. In all browsers, the Left-Click works as normal as it processes the header information. My solution: With mod_rewrite under Apache. I know rewrite the 'download.php' file as default of 'ApplicationSetup.msi' -- So IF Right-Clicked in FF, the user defaults the link with the proper extension to Save As. Otherwise if Left-Clicked, the rewrite will run the 'download.php' and then prompt with the correct MSI with version number (as intended) : 'ApplicationSetup_v1_0.msi' Otherwise with all the other header information, it works fine.. its just the browsers that DO NOT get the header info on a Right-Click Save As on objects, as they prompt to save in location BEFORE header info is sought. William Frankhouser WilzDezign On Mon, Aug 4, 2008 at 2:40 AM, David Otton <[EMAIL PROTECTED]> wrote: > 2008/8/4 Will <[EMAIL PROTECTED]>: > >> I am trying to have users download a file named 'Setup.msi', however >> under a PHP file with the sent header information, the default name to > >> $forcename = "ApplicationSetup_v1_0.msi"; >> $filename = "Setup.msi"; >> >> header("Content-Type: application/force-download"); >> header("Content-Type: application/octet-stream; name=".$forcename); >> header("Content-Type: application/octetstream; name=".$forcename); >> header("Content-Transfer-Encoding: binary"); >> header("Content-Length: ".filesize($filename)); >> >> @readfile($filename); > > Try a variation on this: > > header("Content-Type: application/x-msi"); > header("Content-Disposition: attachment; > filename=\"ApplicationSetup_v1_0.msi\";" ); > header("Content-Transfer-Encoding: binary"); > header("Content-Length: " . filesize('Setup.msi')); > readfile('Setup.msi'); > > http://www.mhonarc.org/~ehood/MIME/rfc2183.txt > > content-disposition controls what the browser should do with the file > you're sending (open it or save it). > filename suggests what the file should be saved as on the local > system, when downloading as an attachment > content-type is the mime-type of the file you're sending > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] addslashes & stripslashes
I’m a little confused with these functions. How I here you ask. Well I thought I understood what they were for: Escaping characters that might cause a problem when you enter your data into a database query. i.e. \ ‘ “ Anyway what is confusing me is, say I have a string which contains an ‘ e.g: that’s mine. I would use addslashes so that the query wouldn’t upset mysql when it is entered. Viewing the data entry via phpmyadmin the data is displayed as: that’s mine (not: that\’s mine) Meaning that when I extract the data from the database I need to use stripslashes returning the string to: that’s mine. (I thought that perhaps phpmyadmin striped the slashes when displaying the data.) However recently I encrypted some data which I stored in the database. The string contained a \ which I added slashes to when entered in to the database. But as the database appears to strips the first slash off the double slash automatically. Upon retrieving the data and strip the slashes off it, my data is now corrupt as there weren’t double slashes it was just a single (like it was supposed to be) and that got removed by the function instead of the extra one. As I haven’t had any data that contains a \ in it before I’ve never noticed it’s not made any difference before. So Does this basically mean that there is no point using stripslashes on the data you extract from the database. Or am I just being an idiot J Thanks Will I've stopped 46,346 spam messages. You can too! One month FREE spam protection at www.cloudmark.com
[PHP] Upload and database
Hello all, I tried to search the archives and PHP.NET and did not find anything or I missed it Anyway here is my question: I want to upload 2 files to the database. Perferribly the whole image into the data base (blob). I cannot figure it out. When I check the database it is empty!! :( Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP!!!
Hello All, I am trying to do a modify script. The problem is I can get only one thig to work, it is either the tables modified or the photos uploaded not both here is my code: HTML FORM: Image File Name: Image Thumbnail File Name: Image File: Image Thumbnail File Name: NOTE: This is only the last part of the form. AND THE PHP SCRIPT: ?> $sql = "UPDATE $table_name9 SET female_latin = '$_POST[female_latin]', female_born_date = '$_POST[female_born_date]', female_date = '$_POST[female_date]', female_where_purchased = '$_POST[female_where_purchased]', female_cost = '$_POST[female_cost]', female_size = '$_POST[female_size]', female_weight = '$_POST[female_weight]', female_humidity_level = '$_POST[female_humidity_level]', female_notes = '$_POST[female_notes]', female_image = '$_POST[female_image]', female_image_thumb = '$_POST[female_image_thumb]' WHERE female_id = '$_POST[female_id]'"; $result = @mysql_query($sql,$conn) or die(mysql_error()); if ($_FILES[application] != "") { header ("Location: main.php"); exit; } else { @copy($_FILES[application][tmp_name], "$path" .$_FILES[application][name]) or die( "Sorry Could not copy file!!" ); @copy($_FILES[application1][tmp_name], "$path1" .$_FILES[application1][name]) or die( "Could not copy file!!" ); header("Location: main.php"); exit; } ?> NOTE This is the whole script minus the setup file. Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htacess
Hello all, I tried to search PHP net for this but found nothing. I am doing an install script and I want to write a htaccess file to the server so people can login in to there admin section. What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] htaccess
Hello all, I tried to search PHP net for this but found nothing. I am doing an install script and I want to write a htaccess file to the server so people can login in to there admin section. What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: looks like the spammers got through anyway
I know the feeling!!! I wish they would go away!!! ~WILL~ Jimbo wrote: I've just received a 419 scam email to the email address I setup for posting to this forum. Looks like the safeguards have failed :-( James Holt -- www.jholt.co.uk : affordable business website solutions www.htpshareware.com : software for the disorganized "You don't needs eyes to see, you need vision" - Maxi Jazz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: htacess
Thanks Manuel!! I will look into that. ~WILL~ Manuel Lemos wrote: Hello, On 02/24/2004 06:50 PM, Will wrote: I tried to search PHP net for this but found nothing. I am doing an install script and I want to write a htaccess file to the server so people can login in to there admin section. What is the proper way to do this and the easiest way. I know how to write a file to the server, but how do you do the password thing?? There are many solutions for that. You may want to try this: Class: htaccess http://www.phpclasses.org/htaccess -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image resize on upload
Hello all, I looked at the PHP manual and found a lot of things to do with images but I did not seem to find out how to resize an image on upload. Can anyone help?? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Image resize on upload
I forgot to mention what I was trying to do. There is a web page that pulls the image file name from the database then reads the URL to the directory where the image is. Is it possible to just resize it when the web page is brought up in the browser? Like I said I am not sure which one to use. ~WILL~ Will wrote: Hello all, I looked at the PHP manual and found a lot of things to do with images but I did not seem to find out how to resize an image on upload. Can anyone help?? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Image resize on upload
Thanks!! I found some documentation on the GD library. I most likely be posting again!! :) ~WILL~ [EMAIL PROTECTED] wrote: gd seems to work fine ? even nconvert via command line does a good job and it resizes gif too I'll second that one, I wrote a shell script in PHP to resize images, using ImageMagicks mogrify command, and it took ages. It's really much too slow for a web site. If you need a faster solution, I think you have to buy something. On 26 Feb 2004, at 09:15, Adam Bregenzer wrote: On Thu, 2004-02-26 at 02:25, Will wrote: I forgot to mention what I was trying to do. There is a web page that pulls the image file name from the database then reads the URL to the directory where the image is. Is it possible to just resize it when the web page is brought up in the browser? I use ImageMagick's[1] convert[2] to do this. It is not a PHP module and must be run through exec[3]. Also, in my experience image manipulation is rather time consuming, it is a good idea to cache altered images so they do not have to be recreated on every page load. [1] http://www.imagemagick.org/ [2] http://www.imagemagick.org/www/convert.html [3] http://www.php.net/exec -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- 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] Re: Image resize on upload
Thanks everyone. I got GD2 to work quite well! The thumb look pretty good. ~WILL~ Ed Curtis wrote: Make sure you use imagecreatetruecolor() with GD when resizing images or you'll get some undesirable results. Imagemagick's convert and mogrify worked well for me although I was resizing an uploaded image. Ed Curtis On Thu, 26 Feb 2004, Will wrote: Thanks!! I found some documentation on the GD library. I most likely be posting again!! :) ~WILL~ [EMAIL PROTECTED] wrote: gd seems to work fine ? even nconvert via command line does a good job and it resizes gif too I'll second that one, I wrote a shell script in PHP to resize images, using ImageMagicks mogrify command, and it took ages. It's really much too slow for a web site. If you need a faster solution, I think you have to buy something. On 26 Feb 2004, at 09:15, Adam Bregenzer wrote: On Thu, 2004-02-26 at 02:25, Will wrote: I forgot to mention what I was trying to do. There is a web page that pulls the image file name from the database then reads the URL to the directory where the image is. Is it possible to just resize it when the web page is brought up in the browser? I use ImageMagick's[1] convert[2] to do this. It is not a PHP module and must be run through exec[3]. Also, in my experience image manipulation is rather time consuming, it is a good idea to cache altered images so they do not have to be recreated on every page load. [1] http://www.imagemagick.org/ [2] http://www.imagemagick.org/www/convert.html [3] http://www.php.net/exec -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Mail Function
Hello All, I have a question. I installed PHP on a windows XP machine. When I try to send a form it says: "Warning: mail(): sendmail_from not set in php.ini or custom "From: header. My header are as follows: $subject = "FeedBack From Site"; $msg = "Senders Name: $_POST[name]\n"; $msg .= "Senders Email: $_POST[email]\n"; $msg .= "Message: \r$_POST[message]\n"; $mailheader .= "From: $_POST[email]\n"; $mailheader .= "A message has been sent from Domain"; mail($recipient, $subject, $msg, $mailheader); require ("tmpl/send_form.htm"); ?> The recipient is in the setup.php file, just to let you know. My sendmail_from is as follows: sendmail_from = [EMAIL PROTECTED] Please help :) ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Mail Function
Please help me with this. Can someone give me an example of their php.ini on the settings of the mail function. ~WILL~ Will wrote: Hello All, I have a question. I installed PHP on a windows XP machine. When I try to send a form it says: "Warning: mail(): sendmail_from not set in php.ini or custom "From: header. My header are as follows: $subject = "FeedBack From Site"; $msg = "Senders Name: $_POST[name]\n"; $msg .= "Senders Email: $_POST[email]\n"; $msg .= "Message: \r$_POST[message]\n"; $mailheader .= "From: $_POST[email]\n"; $mailheader .= "A message has been sent from Domain"; mail($recipient, $subject, $msg, $mailheader); require ("tmpl/send_form.htm"); ?> The recipient is in the setup.php file, just to let you know. My sendmail_from is as follows: sendmail_from = [EMAIL PROTECTED] Please help :) ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() and passwords
How do I modify the following to except a password for the SMTP server? [mail function] SMTP = localhost sendmail_from = [EMAIL PROTECTED] Please help!! Thanks in advance! ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: mail() and passwords
I figured out how to do it. This is what I put in the php.ini file: SMTP = mydomains_smtp_server.com sendmail_from = [EMAIL PROTECTED] This worked great!!! It is sent right to a SMTP which is setup to authenticate all outgoing mails. ~WILL~ -Original Message- From: Manuel Lemos [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 09, 2004 7:29 PM To: Will Cc: [EMAIL PROTECTED] Subject: Re: mail() and passwords Hello, On 03/09/2004 05:37 AM, Will wrote: > How do I modify the following to except a password for the SMTP server? The mail function does not support authentication. You may want to try this class that comes with a wrapper function named smtp_mail(). It emulates the mail() function except that it lets you configure details like the authentication credentials. http://www.phpclasses.org/mimemessage You also need this: http://www.phpclasses.org/smtpclass -- 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
[PHP] Mail
Hello All, I am having a problem with sending a reply from a form. It is giving me a 550 error: There is no valid sender in any header line. My form is: And when I recieive the one email there are no from and reply to in the email client. Plus it is in the subject line!!! What the heck am I doing wrong??? Thanks in advance, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Mail
Thank you very much!!! That was it ~WILL~ -Original Message- From: Jason Davidson [mailto:[EMAIL PROTECTED] Sent: Sunday, March 14, 2004 2:40 PM To: Will Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Mail Check the manual to be sure, but it appears that you have the arguments for the mail function in the wrong order . mail(to, subject, msg, headers) ... i beleive is the correct order. Jason "Will" <[EMAIL PROTECTED]> wrote: > > Hello All, > I am having a problem with sending a reply from a form. It is giving me a > 550 error: There is no valid sender in any header line. > > My form is: > include ("inc/setup.php"); > > // Mail reply to Orginial poster > $recipient .= "[EMAIL PROTECTED], $_POST[email]\n"; > $mailheaders .= "To: $_POST[email]\n"; > $mailheaders .= "From: $_POST[email]\n"; > > $subject .= "$_POST[subject]"; > > $msg .= "Please do not reply to this email!!!\n\n"; > > $msg .= "Here is our answer: \r$_POST[message]\n\n"; > > $msg .= "Please use your username/password that was assigned to you.\n\n"; > > mail($recipient, $mailheaders, $subject, $msg); > > $add_reply = "INSERT into $table_name25 values ('', now(), > '$_POST[subject]', '$_POST[name]', > '$_POST[email]', '$_POST[message]')"; > mysql_query($add_reply,$conn) or die(mysql_error()); > > header("Location: support_archive.php"); > exit; > ?> > > And when I recieive the one email there are no from and reply to in the > email client. Plus it is in the subject line!!! What the heck am I doing > wrong??? > > Thanks in advance, > ~WILL~ > > -- > 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] catching URL#target params
David, The only thing I can think of is using Javascript to set a cookie with the variable from window.location.href and then using PHP to pick up the value. Rather crude but it might work. Will -Original Message- From: David T-G [mailto:[EMAIL PROTECTED] Sent: 15 March 2004 14:08 To: PHP General list Cc: Tom Meinlschmidt Subject: Re: [PHP] catching URL#target params Tom, et al -- ...and then Tom Meinlschmidt said... % % BACK BACK BACK. I'm a stupid fool ... No you aren't, or that means I'm one for thinking the same thing. Hmmm... That doesnt' lend a lot of weight to your side :-) % % #something is NOT send to the server, so it's unable to track it ... Really? You mean it stays with the browser entirely? Wow. % % sorry Yeah; thanks anyway! % % /tom % % request was a.php?aasdf=1234a#greetz % and from apache log % someip - - [15/Mar/2004:15:01:37 +0100] "GET /~znouza/a.php?aasdf=1234a HTTP/1.1" 200 3325 Hully gee; it sure looks like you're right. Well, anyone with old calls will just be screwed, then. On with work... Thanks again & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions
Hello All, I am having a problem. When I log into a forum it says "Page Cannot Be Displayed" I looked at my logs and did not find anything. I did a search everywhere and found nothing. Any help would be appreciated, ~WIIL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Sessions
It was a link problem!!! :) DUH What a dummy I am! :) ~WILL~ -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 16, 2004 11:38 PM To: Will Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sessions Will wrote: > Hello All, > I am having a problem. When I log into a forum it says "Page Cannot Be > Displayed" I looked at my logs and did not find anything. > > I did a search everywhere and found nothing. As did your web server, apparently. :) So what page are you trying to load? It obviously doesn't exist. Your login script is probably trying to redirect you to a page that doesn't exist. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals - www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail headers
Hello all, I searched for this but did not find what I was looking for. I want to send a file from a directory, i know how to do that in txt but I would like to send a doc or rtf document. Is the header like this: $headers = "Content-Type: multipart/mixed"; Thanks, ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Hinding URL
Hello all, I am hoping someone can help me. When someone brings up a page in the browser, is there a way to hide the URL in the browser bar to a set URL?? Example: I want them to see this URL in the browser: http://domain.com/test.htm But, I want them to see the url of http://domain.com in the browser bar. Is this possible?? I hope so!!! ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Hinding URL[Scanned]
Thanks everyone! :) I was not sure what it was called. Thanks again, ~WILL~ PS: Sorry I thought you could do something in PHP. -Original Message- From: Michael Egan [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 8:43 AM To: Will; [EMAIL PROTECTED] Subject: RE: [PHP] Hinding URL[Scanned] Will, I had a look at this a while ago though never pursued it. If you do a search on google for url cloaking this should give you some pointers. I think the only way of doing it is to set up an empty frame and load all pages within that frame. This will hide more complex urls but with all the costs of using frames. HTH, Michael Egan > -Original Message- > From: Will [mailto:[EMAIL PROTECTED] > Sent: 31 March 2004 14:38 > To: [EMAIL PROTECTED] > Subject: [PHP] Hinding URL[Scanned] > > > Hello all, > > I am hoping someone can help me. > > When someone brings up a page in the browser, is there a way > to hide the URL > in the browser bar to a set URL?? > > Example: I want them to see this URL in the browser: > http://domain.com/test.htm But, I want them to see the url of > http://domain.com in the browser bar. Is this possible?? I hope so!!! > > ~WILL~ > > -- > 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] includes
Hello all, I have a problem. My directory list is similar to this: >root >tmpl >inc >forums >test_forum >messages >test_forum1 .messages My question is in the test_form and message forums. How do I do the include files to read from the tmpl and inc?? I can get the include files to work as long as they are in the root (include "tmpl/header.htm"). I hope I explained it right. :) ~WILL~ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] quickForm
Hi, can someone say where I might post this. Hi, I am using a quickform form and it works well except when I use it by using an include in another file. In that case when the file is called in (by way of the include statement in the parent file) it seems that the quickform gets processed as though it had been submitted. Does anyone know why that is? Thanks very much. Bill C.
[PHP] xml parse engine written in php
Free for the taking, here's a simple, lenient (flawed?) xml parse engine written in php if anyone is interested in expanding such a thing. http://fribbler.us/code/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xml parse engine written in php
Jasper Bryant-Greene wrote: Will wrote: Free for the taking, here's a simple, lenient (flawed?) xml parse engine written in php if anyone is interested in expanding such a thing. http://fribbler.us/code/ Not to put down your efforts or anything, but what's wrong with SimpleXML, DOM XML, XML Reader, XML Parser etc. all of which are native PHP functions? I don't know, I've not looked at them. Does offering another implementation of a concept imply that there is something wrong with existing implementations? If that is the case, I wouldn't have bothered sharing since I don't want to offend anyone. It was just a learning exercise. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Socket Select()
Hi, I'm working on writing a multi-client socket server and have a question about the socket_select() function. I've read through lots of example source on the web using BSD sockets and select(). For some reason none of them ever populate the write fd set.They only populate the read fd set. $numchanged = socket_select($read,$write=NULL,$except=NULL,0); The server examples I've seen usually just test for any incoming data and then respond immediately with a socket_write, they never bother using the write fd set to see if the socket can be written to. Can someone explain why, and maybe point me to some examples where it would be useful to use the write fd set? thanks alot, will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stream lib vs Socket lib
I've been working with php's socket library and I've run accross the stream_socket_ library. I'm wondering whether I should be using that library instead? Is there anything that makes the stream_socket library superior to the traditional socket library for writing TCP/IP socket clients and servers? Also, Is there any way to add the functionality of the stream_socket_enable_crypto() to a program written using traditional socket library (any available classes or extensions that would help add that functionality?). thanks alot! will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Connecting to PHP
I know there are lots of ways to allow php to connect to components written in other languages. COM, EJB JAVA, .NET Components etc. Is there any way for another language to use PHP as a component so that all of it's amazing functions could be shared? I don't suppose it exposes a COM interface or anything of that sort? thanks, will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] load balancer question
I've had really good experiences with load balancing a large php app using windows 2003 NLB (network load balancing) (really, windows, I'm not kidding :)). It's available in 2003 server, you just have to turn it on and configure. If you're using windows currently I'd give it a shot before purchasing a dedicated load balancer. There are some nice ones out there, but the major drawback is redundancy. If your load balancer goes out, all of your nodes are unavailable, So, you'd need at least 2 hardware load balancers operating in failover mode. If you care nothing about availability and only care about the performance then you've got alot of options. Of course to load balance your app you need to centralize your data onto a dedicated data server. You'll have to put some thought into your session issue, and any other data read/written by the app. good luck, will > Original Message > Subject: [PHP] load balancer question > From: jonathan <[EMAIL PROTECTED]> > Date: Tue, December 20, 2005 8:54 pm > To: php-general@lists.php.net > > I was having a discussion about scaling a php-based app. Most of the > sites I've worked on have easily fit into a single server model. I"m > looking at a site that will need to scale beyond that. The > anticipated bottleneck will be TCP connections and database > performance. I'm looking at load balancers and was wondering if > people had experience with one that they felt was up to task. > > We do use sessions and I would not like to go to a saving session > data on another box or in the database. I would prefer for the > session identifier cookie to determine which box the user goes to. > > thanks, > > jonathan > > -- > 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] I.P. range authentication
I am having trouble verifying if a user is within a specified I.P. range. The idea is that if a user is at a library within an I.P. range like 231.55.*.* and their I.P. address is 231.55.122.226 a session would be registered for them. See my code below. This works but only for some I.P.'s in a range. Can anyone suggest a solution or resource that can help me? $sql = "select * from customers where ip1 <=\"$remote_address\" and ip2 >=\"$remote_address\""; $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query. AUTO SIGN IN SELECT"); while ($row = mysql_fetch_array($sql_result)) { $ip1 = $row["ip1"]; $ip2 = $row["ip2"]; $fname = $row["fname"]; $lname = $row["lname"]; $institution = $row["institution"]; $num = mysql_num_rows($sql_result); $sign_in="$fname $lname $institution"; if($num>0){ session_register("sign_in"); } else{echo" you can't see this page"} --- Electronic Publications Eurekah.com Landesbioscience.com
[PHP] Need some help with array sorting
Ahem *tap* *tap* is this thing on? Hi everyone, my name is Will and I've been addicted to php for 3 months and 21 days... *grin* I'm hitting a bit of a brick wall in a current project - the answer is probably quite simple, but I'm still newish to php and coding in general so bear with me: I have a multidim array which looks something like : $blocks[0] = array("param1"=>"4","param2"=>"some other param") $blocks[1] = array("param1"=>"3","param2"=>"some other param") $blocks[2] = array("param1"=>"6","param2"=>"some other param") And so forth Fairly straight forward you say, my problem is that elements can be inserted into the blocks array in no particular order and I need to sort at the top level using the values in param1 - so my output should be: $sorted_blocks[0] = array("param1"=>"3","param2"=>"some other param") $sorted_blocks[1] = array("param1"=>"4","param2"=>"some other param") $sorted_blocks[2] = array("param1"=>"6","param2"=>"some other param") I've had a long hard look at the manual and all those obscure array manipulation goodies (ksort, multisort, etc) and done some hunting on phpbuilder and the like, but turned up zip - either I'm not understanding the array functions properly, or this can't be done, or there's a nifty trick for doing it which I havent figured out? Ideally I'd like to be populating blocks using an sql query so I could do an order by or some such upfront, but this world is anything but ideal. Any1 got 2c for me? Thanks in advance Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Cry for help
Heh - I know how you feel. I'm an ex network tecchie fighting my way through a career change to web developer - spent some time messing with various scripting tools and so forth, but never really had any formal coding experience until I hit php - if you want some advice on learning php mine is spend the next few weeks/months just soaking up every tutorial you can lay your hands on - the best libraries are on phpbuilder, devshed and zend imho - altho webmonkey also has a couple of really 'beginner' ones (hello world country) you might want to start out with. Also one thing no-one ever really tells you about this is that one of the most important things to learn if you plan on building sites with php is not php - its html. I know this is a bit duh!, but seriously - php is about logical structures - and slapping together a few variables - it aint that hard once you get in the groove, but if you don't know your html well enough to handcode it and to deconstruct a fat mess of tags in your head and visualize what its going to end up looking like on screen - you're going to have a hard time coding scripts to generate the stuff. 0.02 - actual mileage may vary - insert coin to generate more bs Cheers Will > -Original Message- > From: Chad Winger [mailto:[EMAIL PROTECTED]] > Sent: 12 September 2002 03:34 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Cry for help > > > I have no idea what that means, sorry :) > > My point for wanting to do this isnt because I really want to > make a list of the home teams or whatnot. But obviously, at > some point, I am going to have to learn how to split > different bits of information, how organize them in certain > ways, in certain orders etc. So if i can figure out how to > get PHP to select the certain bits of info, and then organize > them, say, alphabetically, that will teach me how to write > some syntax, to use a few different functions and to begin > how to set variables. > > in 85 when i had the old Apple IIe I was able to do stuff > like this with the if A$=whatever then goto ... type stuff > and it was easy back then. Now i realize PHP is not BASIC, > nor am I a little kid anymore, but the basic idea of what i'd > like to learn to do is there. So if i can just get used to > working with it, then it will come > > -Tree > > Adam Williams <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > te.ms.us... > > You can use PHP and file() to do with, along with the str > functions, > > but if I were you and you already know what the filename of > the file > > is you are working on (or can submit it via a form) I would use the > > unix command cut to do the operations on the file. Use > another exec() > > or system() and have it run cut -d | -f 4 yourfile.txt and > then return > > you the output. > > > > Adam > > > > On Thu, 12 Sep 2002, Chad Winger wrote: > > > > > Thanks for the reply :P > > > > > > I found it actually. Now I have the apache and php > running, and am > > > able > to > > > run my aforementioned test script locally. I am still looking > > > through > the > > > manual now for the syntaxes and such. I am also looking > on the web > > > for > some > > > simple prewritten scripts to run and then try to dissect and > deconstruct. > > > > > > With my little test "script" I've written, there are a few things > > > I'd > like > > > to be able to try to do with it that I think would help > my learning > process > > > go on more smoothly, but i cant seem to figure out, what > functions > > > to > even > > > begin to try to use. > > > > > > I'll give an example. > > > > > > This is the result of my little "test" script as printed > into a txt > file. > > > > > > |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia Viola > > > > > > So if i fill out the form again, and resubmit, i might > get something > like > > > this: > > > > > > |Serie C2 Round 2|09.09.02|20.45|Sangiovannese|Florentia > Viola Serie > > > |C2 Round 2|09.09.02|20.45|Gualdo|Florentia Viola > > > > > > So for example, lets say I wanted to make another html > form that has > > > a > form > > > field for List team by: and and select either "home" or > "away" ... > > > by selecting "home", the browser would print out the following: > > > > > > Sangiovannese > > > Gualdo > > >
RE: [PHP] Re: Cry for help
Heh good so you're not a complete n00b then :P Luckily I had a fairly decent grounding in html and css as well when I got going - I'm just putting the finishing touches on my first serious project atm using OO style php which made the learning curve about 10 times steeper as I had no previous experience with an OO language and the OO tuts as you will find are pretty thin on the ground and of varying quality - thinking of writing a few myself when I get a breather :-) GL and happy reading :-) Cheers Will > -Original Message- > From: Chad Winger [mailto:[EMAIL PROTECTED]] > Sent: 12 September 2002 04:00 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Re: Cry for help > > > Html is something i do in my sleep :P thankfully I've been > good enough with it to make a decent living with it. What you > mention is quite logical, as i would find myself correcting > the ppl coding the databases and/or scripts by saying, stuff > like "you realize that when the info is returned like that > you are going to need four colums in the html, not 3..." and > they'd be like, geez..your right...and then they'd have to go > back and code again... > > So i am hoping that the html part that i know helps me gets > me thru the scripting phase a little easier, although the > languages are apples and oranges > > iom looking thru the tuts now :P > > cheers > > -Tree -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need some help with array sorting
Thanks Timo I figured if it was do-able it would be something like uasort, or uksort or one of those, but my geek muscles arent quite up to that sort of flex yet - any one mind giving me some clues as to how to get started using these functions - the manual gets pretty vague in this area? Thanks Will > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 13 September 2002 08:41 AM > To: [EMAIL PROTECTED] > Cc: timo stamm; Will Steffen > Subject: Re: [PHP] Need some help with array sorting > > > Hi Will, > > > You need a customized sort. Have a look at uasort(). > > > Timo > > > Am Donnerstag den, 12. September 2002, um 13:32, schrieb Will Steffen: > > > Ahem *tap* *tap* is this thing on? > > > > Hi everyone, my name is Will and I've been addicted to php for 3 > > months and 21 days... *grin* > > > > I'm hitting a bit of a brick wall in a current project - > the answer is > > probably quite simple, but I'm still newish to php and coding in > > general so bear with me: > > > > I have a multidim array which looks something like : > > > > $blocks[0] = array("param1"=>"4","param2"=>"some other param") > > $blocks[1] = array("param1"=>"3","param2"=>"some other param") > > $blocks[2] = array("param1"=>"6","param2"=>"some other param") > > > > And so forth > > > > Fairly straight forward you say, my problem is that elements can be > > inserted into the blocks array in no particular order and I need to > > sort at the top level using the values in param1 - so my > output should > > be: > > > > $sorted_blocks[0] = array("param1"=>"3","param2"=>"some > other param") > > $sorted_blocks[1] = array("param1"=>"4","param2"=>"some > other param") > > $sorted_blocks[2] = array("param1"=>"6","param2"=>"some > other param") > > > > I've had a long hard look at the manual and all those obscure array > > manipulation goodies (ksort, multisort, etc) and done some > hunting on > > phpbuilder and the like, but turned up zip - either I'm not > > understanding the array functions properly, or this can't > be done, or > > there's a nifty trick for doing it which I havent figured out? > > > > Ideally I'd like to be populating blocks using an sql query > so I could > > do an order by or some such upfront, but this world is anything but > > ideal. > > > > Any1 got 2c for me? > > > > > > Thanks in advance > > Will > > > > > > > > > > -- > > 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] a href...
Use & a href="bug_detail_user.php?id=$id&reporter_id=$reporter_id" Some reading around post methods and passing data between scripts might be in order to familarize yourself with all the syntax etc. Hope this helps --Will > -Original Message- > From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] > Sent: 13 September 2002 02:57 PM > To: [EMAIL PROTECTED] > Subject: [PHP] a href... > > > Hi, > Iwant to send 2 variable by using a href like that: > > a href="bug_detail_user.php?id=$id?reporter_id=$reporter_id" > > > isnt this possible because it is taking the data id as > $id?reporter_id=$reporter_id... > > can anyone tell me how I can manage this.. > thanks.. > > meltem > > > -- > 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] can you get the name of an object from within it's own class?
Hehe why break your brain- give the class an id property - then you can have a getid method and do something like this $id = $this->getid(); $this->fpLog = fopen("$id.log","w+"); get_object_vars only seems to return properties so its not gonna help you. I'm currently working on an object thang as well and what ive done where I have whole bunch of similar objects is to chuck them into a name=value array as they get created so I can find them and fiddle with them again. I have no idea if that helps you, or if its even good coding practice (formal training - wots that?) hey im also a n00b so don't take my word on it - actual mileage may vary :-P Cheers Will > -Original Message- > From: Marek Kilimajer [mailto:[EMAIL PROTECTED]] > Sent: 17 September 2002 11:49 AM > To: PHP > Subject: Re: [PHP] can you get the name of an object from > within it's own class? > > > It's not possible, imagine > > $firstname = new flashPash(); > $secondname = $firstname; > > Now is the log name secondname.log or firstname.log. Use new property. > > Simon McKenna wrote: > > >Hi all, > > > >I'm new to the php world and have just finished building my first > >class, > > > >It works pretty well, but i've run into a quandary adding > debug code, > >my problem is thus: > > > >Many objects get created by this class, often in the same > php script, > >and the debug log is an actual file. At the moment i'm > naming the file > >after the name of the class, but what I would really like to > do is name > >the log file after the name of the object instantiated from > the class. > >e.g. > > > >class flashPash { > > > > $this->fpLog = fopen("flashPash.log","w+"); > > > > function debugLog($LogMsg) { > > if (($this->debug == true) && (!empty($this->fpLog))) > > fwrite($this->fpLog,$LogMsg."\n"); > > } > >} > > > >$fpObject = new flashPash(); > >$fpObject->debug = true; > > > > > > > >so...is there a way I can get the variable name "fpObject" > from within > >flashPash itself? i.e. so I can make the logfile "fpObject.log" > >instead of "flashPash.log" > > > > I realise it would be trivial to create a new property of > the class to > >store the debug log filename, but i'm hoping I can avoid this? > > > >"get_object_vars" & "get_class" appear to be heading in the right > >direction...but not quite...so...any ideas? is this > actually possible? > >I kinda want to go down the hierarchical tree, instead of > going up it > >:) > > > >thanks for any help. php rocks! > >si > > > > > > > > > > > > > > > -- > 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] Session testing on local machine
Hi, I was wondering if somebody could tell me how to get sessions to work on my local machine. I am using easyPhp 1.6 to run my design platform, but have been unable to get the sessions to work. I tried the pages on a website and all worked so its not the scripts. Any suggestions appreciated. Thanks Will -- ICQ # 133565401 === "So many times it's hopeless dark and grey No way out And other times it's hope that saves the day" - - Jon Schaffer (Demons & Wizards / Iced Earth)
[PHP] News story with image - help
I guess you must all be getting very bored with this type of question..but away.. I have recently put together a simple news section which allows admin people to add, edit and delete stories from the site...I would like to add the function of adding an image to a story...I have managed to use the upload image script ok but can't work out how to link the image to the story ID. Is there any examples or does anyone have any suggestions? Thanks for reading this. Cheers Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] News story with image - help
in article [EMAIL PROTECTED], Nick Wilson at [EMAIL PROTECTED] wrote on 1/21/2002 1:36 PM: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * On 21-01-02 at 14:32 > * Will Hives said > >> I guess you must all be getting very bored with this type of question..but >> away.. I have recently put together a simple news section which allows admin >> people to add, edit and delete stories from the site...I would like to add >> the function of adding an image to a story...I have managed to use the >> upload image script ok but can't work out how to link the image to the story >> ID. > > When you say link it, what would be the purpose? If you have many > stories and many pictures that's one thing but if it's not so many then > that is another. > Presuming your id's are the keys to the database then perhaps you could > re-name the image to include that key? (I have no idea off hand how to > do this but I'm sure it's relatively simple) Sorry when I say link I mean that the story has an image with it so when the story header is clicked it shows the full story with imagedoes that make any sense? Will > > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > > iD8DBQE8TBlGHpvrrTa6L5oRAg/QAJ9Ust0H/IB6jqkipGY89rG+NVxvWQCcC20Q > 1aZ/0iT5Knwy6G0e0hhiRmk= > =Zmne > -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] file upload with story
Please can someone help, I can't find any answers anywhere I have this code: it's really just an online contacts book, what I want to do as have the ability to upload an image with the record. Then when the contact details are viewed it shows the also uploaded image. How do I add that code into this...any help would be fantastic. Cheers Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Increment help..please
please help I'm a newb and this is really messing with my head. All I want to know is what do I need to add to this script to allow it to increment the ID number. pleasee. thank you very much for a simple boy!!!! Will my contact management system: add a contact Name & email information name: email: File to Upload: http://www.myserver.net/php/$picture_name";; ?>> Cheers Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Increment help..please
I did that with this script and it works fine, but the reason I am doing it is so I can then give the image which is uploaded the story ID. But for some reason I can't get it to work... here is the auto_increment script any ideas of how to add the ID to the image?? I would be very great ful if you could amend the script (as I am a newb I can work things out once they have been done if that makes any sense) cheers will my contact management system: add a contact Name & email information name: email: File to Upload: http://www.main.net/images/$picture_name";; ?>> in article 004501c1a511$642b4930$a023b1cf@win2k, Tyler Longren at [EMAIL PROTECTED] wrote on 24/1/02 7:57 pm: > Why don't you just set auto_increment on the id field in the database table? > > Tyler > > ----- Original Message - > From: "will hives" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, January 24, 2002 1:43 PM > Subject: [PHP] Increment help..please > > >> please help I'm a newb and this is really messing with my head. All I want >> to know is what do I need to add to this script to allow it to increment > the >> ID number. pleasee. >> thank you very much for a simple boy >> >> Will >> > >> $db_name = "altone"; >> >> $table_name = "author"; >> >> >> >> $connection = @mysql_connect("www.myserver.net", "test", "will") or die >> ("couldn't connect."); >> >> $db = @mysql_select_db($db_name, $connection) or die ("couldn't select >> database."); >> >> $sql = "INSERT INTO $table_name (id, name, email, picture_name) >> VALUES ('$id', '$name', '$email', '$picture_name') "; >> >> $result = @mysql_query($sql, $connection) or die ("couldn't execute > query"); >> >> >> >> >> >> if ($picture != "") { >> >> >> move_uploaded_file($picture, "/home/mine/yep/php/$picture_name"); >> >> >> } >> >> >> >> >> ?> >> >> >> >> >> my contact management system: add a contact >> >> >> >> >> >> Name & email information >> >> >> >> >> >> name: >> >> >> >> >> email: >> >> >> >> File >> to Upload: >> http://www.myserver.net/php/$picture_name";; ?>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Cheers >> Will >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> To contact the list administrators, e-mail: [EMAIL PROTECTED] >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] nearly there...just one more
I have managed to set the file upload to change the name of the file when uploading, but when the file is uploaded it takes the original file name not the renamed one image upload box is named 'picture' how do I get it to call the new file name Thank you for your help so far everyone... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] move_uploaded_file() query
Sorry for my past ignorance using this news site forum I can only out this down to my lack of knowledge. I have been work on me first script for some time now and have been making good progress up until now. I have a script that adds a author to the database, ID, Name, Email, Picture Name. When a author is added it uploads their details plus it uploads and renames the image...that is working fine. It all falls down when I try and call the new file name to show the picture. It is uploading the original file name to the database and not the renamed version. I would be very grateful for any pointers on how this small problem can be solved. I hope this makes more sense than previous threads I have submitted. Cheers Will Here is the script as it stands: $sql = "INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$picture_name') "; $result = @mysql_query($sql, $connection) or die ("couldn't execute query"); if ($picture != "") { $path = "/home/main/main/php/"; $datee = date("sdFy"); move_uploaded_file($picture,$path . $datee . $picture_name); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] move_uploaded_file() query
in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 25/1/02 3:14 pm: > On Friday 25 January 2002 17:35, Will Hives wrote: > >> Sorry for my past ignorance using this news site forum I can only out this >> down to my lack of knowledge. >> >> I have been work on me first script for some time now and have been making >> good progress up until now. I have a script that adds a author to the >> database, ID, Name, Email, Picture Name. >> >> When a author is added it uploads their details plus it uploads and renames >> the image...that is working fine. It all falls down when I try and call the >> new file name to show the picture. It is uploading the original file name >> to the database and not the renamed version. >> >> I would be very grateful for any pointers on how this small problem can be >> solved. I hope this makes more sense than previous threads I have >> submitted. >> >> Cheers >> Will >> >> Here is the script as it stands: >> >> $sql = "INSERT INTO $table_name (id, name, email, picture_name) >> VALUES ('$id', '$name', '$email', '$picture_name') "; >> >> $result = @mysql_query($sql, $connection) or die ("couldn't execute >> query"); >> >> if ($picture != "") { >> >> $path = "/home/main/main/php/"; >> $datee = date("sdFy"); >> move_uploaded_file($picture,$path . $datee . $picture_name); >> >> } > > Is this the *full* script? I don't see where you are setting $picture_name? > > Also what you are inserting into the database is not the same as what you are > renaming your file to (you're adding a date string to the filename). Do you > have a procedure to resolve the correct filename when retrieving the data > from the db? > No I don't have a procedure to retrieve the new file name that's what I am looking to do. I don't know how to write that new name into the database. Picture name is the file name that is being inserted into the database (THIS IS THE OLD FILE NAME)from the html form. The browse field is named 'picture' (see all code below) the name that the database is capturing is not the new name of the fill ie. not the one that has the date inserted at start. Thank you for your help Cheers Will html form/ my contact management system: add a contact Name & email information name: email: File to Upload: php script/ my contact management system: add a contact Name & email information name: email: File to Upload: http://www.main.net/main/$picture_name";; ?>> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Editing uploaded file
I have produced an admin area which allows users to add, edit and delete stories plus images. Everything has gone great, thanks to all of you who answered previous postings. Just stuck on the very last point...editing...the script below updates the name and email fine, but uploading a new image it does not do. Does any one have any ideas why the image upload is not working...it echos the new name but does not upload the new file Thanks in advance Cheers Will PHP: http://www.main.net/php/";; $b_id = mysql_insert_id(); $new_pic_name = "$b_id$picture_name"; $imageFile = $path1.$new_pic_name; copy($picture,$path . $new_pic_name); } ?> my contact management system: add a contact Name & email information name: email: File to Upload: http://www.main.net/php/";; $imageFile = $path1.$new_pic_name; if ($new_pic_name == "$id") { print ("http://www.main.co.uk/images/no_image_available.gif\"; width=\"162\" height=\"113\" border=\"0\">"); } else { print ""; } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Editing uploaded file
The code attached was just the code which ran the html form there is another page which contains all the form details, this code just does the editeing and shows you what it's done. Cheers Will in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 30/1/02 3:20 am: > On Wednesday 30 January 2002 05:32, will hives wrote: > > Please do not use HTML mail, thanks! > >> I have produced an admin area which allows users to add, edit and delete >> stories plus images. Everything has gone great, thanks to all of you who >> answered previous postings. >> >> Just stuck on the very last point...editing...the script below updates the >> name and email fine, but uploading a new image it does not do. Does any one >> have any ideas why the image upload is not working...it echos the new name >> but does not upload the new file > > 1) You haven't defined a form using so it probably wouldn't > work in NN. > > 2) You *need* to define a form specifying the enctype if you're going to be > uploading stuff: > > > > 3) You don't have any input boxes, all you have is a submit button. What are > people supposed to be editing? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Editing uploaded file
Jason, here it all is thanks for this... Cheers Will HTML EDIT UPLOAD PAGE: my contact management system: add a contact "> Name & email information name: " size=35 maxlength=75> email: " size=35 maxlength=75> File to Upload: http://www..net/php/";; $imageFile = $path1.$pic_name; ?> "> THIS IS THE DOING EDIT SCRIPT: http://www..net/php/";; $b_id = mysql_insert_id(); $new_pic_name = "$b_id$picture_name"; $imageFile = $path1.$new_pic_name; copy($picture,$path . $new_pic_name); } ?> my contact management system: add a contact Name & email information name: email: File to Upload: http://www..net/php/";; $imageFile = $path1.$new_pic_name; if ($new_pic_name == "$id") { print ("http://www..co.uk/images/no_image_available.gif\"; width=\"162\" height=\"113\" border=\"0\">"); } else { print ""; } ?> in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 30/1/02 9:46 am: > On Wednesday 30 January 2002 17:10, will hives wrote: >> The code attached was just the code which ran the html form there is >> another page which contains all the form details, this code just does the >> editeing and shows you what it's done. > > Could you post the code which does the editing and, in particular, the > uploading of the image file? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Editing uploaded file
I have this version when I add the image on the add article page, and that works fine... if ($picture != 'none') { $path = "/home///php/"; $path1 = "http://www..net/php/";; $b_id = mysql_insert_id(); $new_pic_name = "$b_id$picture_name"; $imageFile = $path1.$new_pic_name; copy($picture,$path . $new_pic_name); it's just when it comes to editing the image??? Sorry about this is must be like banging your head against a brick wall. Cheers Will in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 30/1/02 5:56 pm: > On Wednesday 30 January 2002 19:27, will hives wrote: > >> THIS IS THE DOING EDIT SCRIPT: > > [snip] > >> if ($picture) { >> >> $path = "/home///php/"; >> $path1 = "http://www..net/php/";; >> $b_id = mysql_insert_id(); >> $new_pic_name = "$b_id$picture_name"; >> $imageFile = $path1.$new_pic_name; >> >> copy($picture,$path . $new_pic_name); >> >> >> } > > IIRC we've been through this before. Please read the manual. You *need* to > understand how to handle uploaded files (by reading the manual). The above > code simply would not work. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Editing uploaded file
It uploads it to: /home///php/ and renames it with the article ID number + the original name eg. 41button.gif should that work??? It does!!! How would you suggest doing it?? in article [EMAIL PROTECTED], Jason Wong at [EMAIL PROTECTED] wrote on 1/31/2002 3:00 AM: > On Thursday 31 January 2002 05:13, will hives wrote: >> I have this version when I add the image on the add article page, and that >> works fine... >> >> >> >> if ($picture != 'none') { >> >> $path = "/home///php/"; >> $path1 = "http://www..net/php/";; >> $b_id = mysql_insert_id(); >> $new_pic_name = "$b_id$picture_name"; >> $imageFile = $path1.$new_pic_name; >> >> copy($picture,$path . $new_pic_name); >> >> >> it's just when it comes to editing the image??? > > Honestly, I don't see how this code will work. Are you saying that after > uploading your image, the above code will copy the uploaded image into > /home/xxx/xxx/php/new_pic_name? >
[PHP] Re: Upload script with user admin
That's cool. How do you then delete and edit that image? Will in article [EMAIL PROTECTED], Lerp at [EMAIL PROTECTED] wrote on 2/1/2002 5:07 PM: > Hi there, here's a bit of code to get you started. It includes a form that > allows uploads, and the code to process the upload on the receiving page. > Basically, you have a form that allows an upload of a file on one page, and > some code on the receiving page to insert a path to that file in the > database and store the newly uploaded file in a directory on the webserver. > Of course you'll have to ensure that you have the proper write and read > permissions on that folder. There are a few 'print' lines sprinkled > throughout the code. For debugging you might want to un-comment them to see > how everything is working. > > Hoe this helps you out! > Joe/Lerp :) > > > Here's a common form that allows you to upload a file (say an image or any > type of file for that matter) to the > db > > > > Upload Photo: type='file' name='userfile'> value='Upload!!!'> > > end of upload form > ## > > > start of upload process to db > > > > #$userfile is the file being uploaded > > > > > //print $userfile . ""; > //print $userfile_name . ""; > > //determine file size -- if too big ( greater 50kb) then redirect > $siz = filesize($userfile); > //print $siz; > > $ext = substr($userfile_name, -4); > > > // if the file not of type 'jpg' then redraw out upload form > if($ext != ".jpg"){ > print "The photo you > attempted to upload was of the wrong file type. Please ensure that the file > type is a 'jpg'."; > print " enctype='multipart/form-data'> style='font-family: Verdana; font-size: 8pt;'>"; > print ""; > print ""; > print ""; > print ""; > print " action='photos.php'> value='« Photos' style='background-color: #FF; font-family: > verdana; font-weight: bold; color: #363C70; font-size: > 10pt;'>"; > print ""; > print " src='images/pixel_transparent.gif' width='1' height='1' border='0' > alt=''>"; > print " height='341'>"; > print ""; > print " "; > print " width='1' height='1' border='0' alt=''>"; > print ""; > print " height='17' border='0' alt=''>"; > print " href='contact.php' class='link_white_02'>Send us some > feedback!"; > print ""; > > exit; > } > > if ($siz >= 51200){ > > //redraw upload form > print "The photo you > attempted to upload was too large in file size. Please ensure that the file > size does not exceed 50kb."; > print " enctype='multipart/form-data'> style='font-family: Verdana; font-size: 8pt;'> name='submit' value='Upload' style='font-family: Verdana; font-size: > 8pt;'>"; > print ""; > > } > elseif ($siz < 51200) > { > > $timestamp = time(); > $userfile_name = $timestamp.$userfile_name ; > > // copy the file being posted -- remember to escape backslashes!!! > if(copy($userfile, "/ez/golfPHP/pics/". $userfile_name)){ > print "Your photo has > been uploaded and is viewable in the photo gallery." ; > } > else > { > print "A problem was > encountered during your photo upload."; > } > > $patharola = "pics/". $userfile_name; > //print $patharola; > > $caption = "No Caption."; > > // insert path into database here > file://connect to db > $connectionToDBid = odbc_connect("golf", "joegolf", "joegolf"); > > //create query statement > $sqlr = "INSERT INTO PHOTO (golferid, photo, caption, datesubmitted) VALUES > ('$sesgolferid' , '$patharola', '$caption', '$todaysdate' )"; > //execute the sql statement (query) on the connection made > $resultset = odbc_do($connectionToDBid, $sqlr); > > //grab the photoid from db > $sqlid = "SELECT @@IDENTITY AS NewId"; > $napid = odbc_do($connectionToDBid, $sqlid); > $photoid = odbc_result($napid, 1); > > //print "Photo Id is: " . $photoid . ""; > > // close the connection > odbc_close($connectionToDBid); > > > > ?> > > end of insert to db process > ## > > > > > > > > > "Artisthotel" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... >> Hi, >> >> I need an upload script that lets predefined users log in and upload > files. >> Does such a script exist? >> >> Regards >> JEns >> >> > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] file upload and change name
Hi, Does anyone know how to change the name of and image and save the new name to the database? I know how to do a standard file upload, but can't seem to get the new new to be saved into the databaseany pointers would be fantastic. Cheers Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] any ideas : Unexpected character
I have put together this script with the help of some of you kind members here. It seems to do what I set out for it to do, but when it finished the upload it comes up with the following error: Unexpected character try for yourself: http://www.alt-design.net/php/new%20admin/add.php I would be very grateful for any ideas. Cheers Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] any ideas : Unexpected character
== "image/jpg" || $type == "image/gif" || $type == "image/pjpeg" || $type == "image/jpeg"){ // is this a valid image? $time_tmp = time(); $time_tmp = substr("$time_tmp", -4); $filename = $time_tmp._.$name; // just in case someone uploads matched filenames. $savepath = "/home/*/***/php/".$filename; // change the path here. make sure the directory it is going to can be written to by the web user. $moved = move_uploaded_file($file, $savepath); // place the file on the server's filesystem $path = $filename; } else { // wrong file type $path = "Sorry, but the file type of this file is not recognised. Please check and try again."; } } else { // upload failed. $path ="Sorry, but the upload failed. Please try again in a short while."; } return $path; } // uploaded file info-zone - prepare variables to be passed to the upload function $name = $HTTP_POST_FILES['picture']['name']; // orginal name $type = $HTTP_POST_FILES['picture']['type']; // get MIME type of file $path = fileUpload($name,$type,$picture); // yer actual upload function call // I'd recommend you check the value of $path here - if it contains a text string starting with "Sorry" then something has failed. // and off to the database it goes. $sql = "INSERT INTO $table_name (id, name, email, picture_name) VALUES ('$id', '$name', '$email', '$path') "; $result = mysql_query($sql, $connection) or die ("couldn't execute query"); in article 005301c1b576$31479df0$0a0a@AERIS, Girish Nath at [EMAIL PROTECTED] wrote on 2/14/2002 4:39 PM: > Hi > > I got this error : > > Warning: Unexpected character in input: ' in > /home/altdesign/public_html/php/new admin/do_addauthor.php on line 14 > > Can you post the section around Line 14 from do_addauthor.php so we can take > a look at it ? > > Regards > > > Girish > -- > www.girishnath.co.uk > > > - Original Message - > From: "Will Hives" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, February 14, 2002 4:34 PM > Subject: [PHP] any ideas : Unexpected character > > > > I have put together this script with the help of some of you kind members > here. It seems to do what I set out for it to do, but when it finished the > upload it comes up with the following error: > > Unexpected character > > try for yourself: http://www.alt-design.net/php/new%20admin/add.php > > I would be very grateful for any ideas. > > Cheers > Will > > > > -- > 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] Upgrade PHP?
I'm having problems upgrading PHP from 4.2.2 to 4.3.8 on RedHat 9. I've tried simply making the 4.3.8 from source, but RedHat didn't use the default PHP folder structure is seems, since there has been no change in my PHP version. I also tried the "./configure" string returned by 'phpinfo()' (assuming that the correct path info was included) with no luck. Does anyone have any tips on an easier way to upgrade? Thanks, Will
RE: [PHP] Upgrade PHP?
Well I uninstalled PHP, Apache, and all dependant RPMs. I compiled both from source, and although the compile went well, I'm having problems getting modules installed into PHP. For example, when using phpinfo(), I am told that GD is installed, but trying to use GD functions won't work. What now, guys? Will -Original Message- From: Support [mailto:[EMAIL PROTECTED] Sent: Sunday, August 01, 2004 10:11 PM To: Will Collins; [EMAIL PROTECTED] Subject: Re: [PHP] Upgrade PHP? I've dealt with a similar problem with Mandrake. Some distros have their own idea of where things should go. I prefer to install major applications like apache, perl, mysql, php myself and never install from rpm or accept default distro packages when installing an os from scratch. IMHO: Although handy for some things, I still can't figure out why people put up with rpms. :-) What I finally did is use rpm to uninstall php, apache, and mysql. I also followed dependencies and deleted them as well. This approach is not really a great idea if you're not used to building from source, but I have my own idea of where I like things to go so this works for me. Usually /usr/local is a good choice for installing. Since mysql and apache both come with their own start up scripts using chckconfig to add them to the system is about as easy as it gets. Jim Grill Web-1 Hosting http://www.web-1hosting.net - Original Message - From: "Will Collins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, August 01, 2004 8:03 PM Subject: [PHP] Upgrade PHP? > I'm having problems upgrading PHP from 4.2.2 to 4.3.8 on RedHat 9. I've > tried simply making the 4.3.8 from source, but RedHat didn't use the default > PHP folder structure is seems, since there has been no change in my PHP > version. I also tried the "./configure" string returned by 'phpinfo()' > (assuming that the correct path info was included) with no luck. Does > anyone have any tips on an easier way to upgrade? > > > > Thanks, > > Will > > -- 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] Upgrade PHP?
To test it, I used: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib-dir=/usr/include -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 3:39 PM To: 'Will Collins'; [EMAIL PROTECTED] Subject: RE: [PHP] Upgrade PHP? provide us with a copy of the attributes you used when you compiled... ie ./configure --attributeA --ldapetc... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Upgrade PHP?
Won't work: Fatal error: Call to undefined function: imagecreatefromjpeg() -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 4:09 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Upgrade PHP? On Tuesday 03 August 2004 03:21, Will Collins wrote: > Well I uninstalled PHP, Apache, and all dependant RPMs. I compiled both > from source, and although the compile went well, I'm having problems > getting modules installed into PHP. For example, when using phpinfo(), I > am told that GD is installed, but trying to use GD functions won't work. > What now, guys? What does "won't work" mean exactly? -- 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 -- /* All newspaper editorial writers ever do is come down from the hills after the battle is over and shoot the wounded. */ -- 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] Upgrade PHP? [SOLVED]
Yeah, actually, you were right. I must have misunderstood the instructions - probably because of the press for time, reading too quickly. I wasn't using "--with-jpeg-dir", etc. Sorry for the mess, and thanks for all the help. At least some good came out of this -- I now have a working Slackware installation (after the headaches, I decided to install Slackware 10 on my unused server and compile everything from source to see if I could get it to work). Thanks for your time everybody. Will -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 10:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Upgrade PHP? On Tuesday 03 August 2004 07:42, Will Collins wrote: > Won't work: > > Fatal error: Call to undefined function: imagecreatefromjpeg() > ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd > --with-zlib-dir=/usr/include Read manual > Image Functions to see how to get jpeg (and other) support. -- 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 -- /* NOTICE: -- THE ELEVATORS WILL BE OUT OF ORDER TODAY -- (The nearest working elevator is in the building across the street.) */ -- 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] Cannot compile
Try running 'make clean' before you run 'make' again. I had a problem when trying to run 'make' for the umpteenth time during my recent troubles, and apparently it was because things got a little too cluttered, and this did the trick. Will -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 1:44 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Cannot compile On Tuesday 03 August 2004 14:30, Andrew W wrote: > It doesn't work regardless of whether I include any options or not. "doesn't work" can include umpteen billions of things. Please try to narrow it down a bit. -- 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 -- /* If you want your spouse to listen and pay strict attention to every word you say, talk in your sleep. */ -- 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] Wierd PHP Problem
Matthew Fonda wrote: $HTTP_*_VARS is deprecated in PHP5, so if the server is running PHP5, this code won't work. Instead, you should use $_POST On this subject, is there anything 'wrong' with using $_REQUEST instead of specifying between $_POST and $_GET? Will Beers smime.p7s Description: S/MIME Cryptographic Signature
RE: [PHP] How to duplicate this functionality?
It's fairly simple: at the top of your script, have a block of code similar to the following, and have the link point to -- $_SERVER['PHP_SELF']."?rm_id=".$id_to_be_deleted -- I'll leave out all but the essential elements. Will Collins -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:49 PM To: Ryan A Cc: PHP-General Subject: Re: [PHP] How to duplicate this functionality? On Fri, 2004-05-14 at 21:23, Ryan A wrote: > Hi, > I just visited a popular swedish based site that is mostly powered via ASP, > they have one little piece of functionality this is really puzzling me and I > would like to add it to one of my working apps (a shopping cart)... > > Its a bit hard to explain so will give you the steps so you can go to the > site and see for yourself...Its all pretty much written in swedish but will > try to explain. > > 1. go to http://www.blocket.se/ > 2. on the right side of the screen there are some numbers (1 to 23) and next > to each number is a Swedish city...click on any one of them. > 3. You should be presented by a lot of "text ads"...click on any one of them > to open them (the ones with teh little camera symbol at the side will also > display a pic of the product) > 4.Scroll to the bottom of any ad and you should see " Spara i > Annonsbevakningen " which roughly translates to "save this ad"...click it. > It will save the ad for you (via cookies most probably..dont know for > sure...but I visited much later and even after I closed->reopened my browser > and revisited the site,it was still there) > 5.Click the back button a few times so that you can save a bunch of > ads...then > > This is the part I like, when you click on "Ta bort" next to any of your > saved ads ("Ta bort" means "Remove")...it just goes from the page...very > smooth and does not need for the page to be "script processed" again or > anything...HOW? What is it? Javascript..? DHTML? what? In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- 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] How to duplicate this functionality?
Also, I forgot to mention... another little snippet I like to use for something like this is this meta tag: It makes the pages fade into each other, and for two pages that are very similar (like your example) it doesn't look like there's any reload at all. It has a pretty cool effect when you up the "duration" and use it for totally different pages too... it's just really fun to play with. Just stick it into the header of your page. Will Collins -Original Message- From: Will Collins [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 9:17 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] How to duplicate this functionality? It's fairly simple: at the top of your script, have a block of code similar to the following, and have the link point to -- $_SERVER['PHP_SELF']."?rm_id=".$id_to_be_deleted -- I'll leave out all but the essential elements. Will Collins -Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 8:49 PM To: Ryan A Cc: PHP-General Subject: Re: [PHP] How to duplicate this functionality? On Fri, 2004-05-14 at 21:23, Ryan A wrote: > Hi, > I just visited a popular swedish based site that is mostly powered via ASP, > they have one little piece of functionality this is really puzzling me and I > would like to add it to one of my working apps (a shopping cart)... > > Its a bit hard to explain so will give you the steps so you can go to the > site and see for yourself...Its all pretty much written in swedish but will > try to explain. > > 1. go to http://www.blocket.se/ > 2. on the right side of the screen there are some numbers (1 to 23) and next > to each number is a Swedish city...click on any one of them. > 3. You should be presented by a lot of "text ads"...click on any one of them > to open them (the ones with teh little camera symbol at the side will also > display a pic of the product) > 4.Scroll to the bottom of any ad and you should see " Spara i > Annonsbevakningen " which roughly translates to "save this ad"...click it. > It will save the ad for you (via cookies most probably..dont know for > sure...but I visited much later and even after I closed->reopened my browser > and revisited the site,it was still there) > 5.Click the back button a few times so that you can save a bunch of > ads...then > > This is the part I like, when you click on "Ta bort" next to any of your > saved ads ("Ta bort" means "Remove")...it just goes from the page...very > smooth and does not need for the page to be "script processed" again or > anything...HOW? What is it? Javascript..? DHTML? what? In linux under Netscape 7 and Opera 7.2 it reloaded the page :/ That said looking at the URL when the mouse is over the link: http://www.blocket.se/new?caller=ogl_s&l=0&rm_id=2595475&city=0 The rm_id is being set as a GET variable with an appropriate ID to remove the entry. So when the page reloads it first deletes the entry. This is standard functionality in many websites. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- 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
[PHP] Is PEAR worth the effort?
I don't mean to start a flame war here, but I have been working in PHP for a while now and am about to start a more extensive aplication. Some of the PEAR modules look good and I just wanted to hear what the collected wisdom out here thinks about it. When I try to read the installation instructions my eyes glaze over and roll up into my head. Before I fight my way through this learning curve I want to know if its worth it? Is this the wave of the future or just a flash in the pan? Thanks, Will Merrell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Book Required
PHP & MySQL Web Development is a pretty good one. It does a good job of giving a fairly thorough explanation on things, considering the broad range of topics to be covered. I never have really been a fan of the "Fast and Easy... " series, or the "Learn * In 24 Hours" series. Will -Original Message- From: Harlequin [mailto:[EMAIL PROTECTED] Sent: Saturday, July 17, 2004 2:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Book Required Morning There's loads and loads of books available on the subject of PHP & MySQL. Does anyone have any recommendations...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- 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] Book Required
I apologize for requesting a read receipt. Won't happen again - I hope. :) -Original Message- From: Will Collins [mailto:[EMAIL PROTECTED] Sent: Saturday, July 17, 2004 2:27 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] Book Required PHP & MySQL Web Development is a pretty good one. It does a good job of giving a fairly thorough explanation on things, considering the broad range of topics to be covered. I never have really been a fan of the "Fast and Easy... " series, or the "Learn * In 24 Hours" series. Will -Original Message- From: Harlequin [mailto:[EMAIL PROTECTED] Sent: Saturday, July 17, 2004 2:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Book Required Morning There's loads and loads of books available on the subject of PHP & MySQL. Does anyone have any recommendations...? -- - Michael Mason Arras People www.arraspeople.co.uk - -- 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] textarea/display question...
I've always gotten errors when trying to use the "value" property of a textarea. Put the value info between the tabs. -Original Message- From: bruce [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 12:59 PM To: [EMAIL PROTECTED] Subject: [PHP] textarea/display question... hi.. i'm presenting a textarea to the user... i'd like to be able to display the information within the textarea in a format. this would allow me to highlight the material that the user should modify. however, i can't figure out how to accomplish this... $foo = 'blah'; something like the above, but without displaying all the attrib stuff... any ideas/pointers would be appreciated.. thanks -bruce -- 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] Problem of a beginner with Array
Name each of the checkboxes "grid[]" (Your Text), then in your processing script, $_POST['grid'] will be an array with the values of all the checked boxes (assuming at least one was checked - otherwise it won't be set). If you want a limit on the number of boxes you can check, try a little Javascript. Hope it helps, Will -Original Message- From: Henri Marc [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 1:10 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem of a beginner with Array Hello, I'm just starting with PHP and I have a problem. This is certainly very easy for you but for me, it's tough. I want to make a lottery site (just as an exercise), so I made a page with 6 grids of 50 numbers each (check boxes). Now, I want to know which numbers have been checked by the player. I have a : "input name="Grid1" type="checkbox" for the first grid. Grid2 for the grid #2... I was thinking to get the numbers chosen by the player with $_POST['Grid1[]'] Grid1 being a table but it doesn't work. I thought I wouldn't have to declare an array. I have 50 numbers for each grid, I don't want to have to type array followed by the 50 numbers. There is not a way to do something like array(1...50). What is the solution? Thank you very much (in advance) for your help. Dave - Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail Yahoo! Messenger : dialoguez instantanément avec vos amis - c'est gratuit ! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP error catching....
Error handlers? Plus, you can set up PHP to log errors to a file in 'php.ini'... -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 9:48 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP error catching What are those php functions that catch the PHP errors, not display it and do something to it while the user load a webpage. I don't remember what those are. :-( FletchSOD -- 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] How to check if $string contains Hebrew characters?
If your goal is to eventually convert Hebrew chars to something else, you could just use str_replace or stri_replace and have each Hebrew char as an array element, replaced by another array element as a match. Example in English: str_replace(array('a','b','c'),array('t','u','v'),$string); This will replace all instances of a,b and c with t, u, and v respectively. This removes the regex resource. -Original Message- From: Nitsan Bin-Nun [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2008 10:33 AM To: php php Subject: [PHP] How to check if $string contains Hebrew characters? Hi, I have a $string and i want to know if it contains Hebrew characters in it, I wrote the following: > function containHebrewChars ($string) > { > $chars = "אבגדהוזחטיכלמנסעפצקרשת"; // ABC of hebrew chars (AlefBet) > $chars = > preg_replace("/([\xE0-\xFA])/e","chr(215).chr(ord(\${1})-80)",$chars); // > convert it to UTF8 > if (preg_match("/[".$chars."]/", $string)) return true; > return false; > } > I'm pretty sure there is a better way to do this (regex is overkill), any ideas? Regards, Nitsan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to check if $string contains Hebrew characters?
The strtr will be better as he's not looking to actually replace the characters. Looping through each character and running strtr will work, but you should run a timer on both the regex and strstr. See which is faster. -Original Message- From: M. Sokolewicz [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 25, 2008 12:46 PM To: Will Fitch Cc: 'Nitsan Bin-Nun'; PHP - General list Subject: Re: [PHP] How to check if $string contains Hebrew characters? or do the same but with strtr() Will Fitch wrote: > If your goal is to eventually convert Hebrew chars to something else, you > could just use str_replace or stri_replace and have each Hebrew char as an > array element, replaced by another array element as a match. > > Example in English: > > str_replace(array('a','b','c'),array('t','u','v'),$string); > > This will replace all instances of a,b and c with t, u, and v respectively. > This removes the regex resource. > > > -Original Message- > From: Nitsan Bin-Nun [mailto:[EMAIL PROTECTED] > Sent: Wednesday, June 25, 2008 10:33 AM > To: php php > Subject: [PHP] How to check if $string contains Hebrew characters? > > Hi, > I have a $string and i want to know if it contains Hebrew characters in it, > I wrote the following: > > >> function containHebrewChars ($string) >> { >> $chars = "אבגדהוזחטיכלמנסעפצקרשת"; // ABC of hebrew chars (AlefBet) >> $chars = >> preg_replace("/([\xE0-\xFA])/e","chr(215).chr(ord(\${1})-80)",$chars); // >> convert it to UTF8 >> if (preg_match("/[".$chars."]/", $string)) return true; >> return false; >> } >> > > I'm pretty sure there is a better way to do this (regex is overkill), any > ideas? > > Regards, > Nitsan > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SOAP - function does not exist?
Your WSDL is referencing a document literal service. How are you making the request? For instance, look at this example: $soap = new SoapClient('some.wsdl'); $soap->getOrderHistory('somestring'); The above might not work as your document literal service (not RPC) is looking for the data in the SOAP headers, not the body. You may have to attach the data to the headers and use __call() rather than RPC. Can you provide the WSDL (as attachment please) -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:43 AM To: PHP General List Subject: [PHP] SOAP - function does not exist? Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]=> string(52) "getQuoteResponse getQuote(getQuote $getquoterequest)" [1]=> string(64) "submitOrderResponse submitOrder(submitOrder $submitorderrequest)" [2]=> string(64) "updateQuoteResponse updateQuote(updateQuote $updatequoterequest)" [3]=> string(68) "accountLoginResponse accountLogin(accountLogin $accountloginrequest)" [4]=> string(80) "accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest)" [5]=> string(64) "accountInfoResponse accountInfo(accountInfo $accountinforequest)" [6]=> string(72) "accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest)" [7]=> string(80) "getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest)" [8]=> string(80) "getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest)" [9]=> string(80) "getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest)" [10]=> string(80) "getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest)" } The response I am getting is: SoapFault Object ( [message:protected] => Function 'getOrderHistory' doesn't exist [string:private] => [code:protected] => 0 [file:protected] => /home/yerkes/public_html/soap/client.php [line:protected] => 74 [trace:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => getOrderHistory [1] => Array ( [0] => Array ( [id] => 24 [key] => asdlkjf [username] => [EMAIL PROTECTED] [startdate] => 2008-05-01 [enddate] => 2008-05-31 [password] => x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SOAP - function does not exist?
It doesn't look like the SOAP service at http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.php doesn't actually implement a function called "getOrderHistory". Can you verify that? From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:52 AM To: Will Fitch Cc: PHP General List Subject: Re: [PHP] SOAP - function does not exist? On Mon, Jun 30, 2008 at 10:48 AM, Will Fitch <[EMAIL PROTECTED]> wrote: Your WSDL is referencing a document literal service. How are you making the request? For instance, look at this example: $soap = new SoapClient('some.wsdl'); $soap->getOrderHistory('somestring'); The above might not work as your document literal service (not RPC) is looking for the data in the SOAP headers, not the body. You may have to attach the data to the headers and use __call() rather than RPC. Can you provide the WSDL (as attachment please) -Original Message- From: Dan Joseph [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 9:43 AM To: PHP General List Subject: [PHP] SOAP - function does not exist? Hi, I've got a web service that I have created that. It has several functions, here is the var_dump of __getfunctions(); array(11) { [0]=> string(52) "getQuoteResponse getQuote(getQuote $getquoterequest)" [1]=> string(64) "submitOrderResponse submitOrder(submitOrder $submitorderrequest)" [2]=> string(64) "updateQuoteResponse updateQuote(updateQuote $updatequoterequest)" [3]=> string(68) "accountLoginResponse accountLogin(accountLogin $accountloginrequest)" [4]=> string(80) "accountPasswordResponse accountPassword(accountPassword $accountpasswordrequest)" [5]=> string(64) "accountInfoResponse accountInfo(accountInfo $accountinforequest)" [6]=> string(72) "accountUpdateResponse accountUpdate(accountUpdate $accountupdaterequest)" [7]=> string(80) "getQuoteHistoryResponse getQuoteHistory(getQuoteHistory $getquotehistoryrequest)" [8]=> string(80) "getQuoteDetailsResponse getQuoteDetails(getQuoteDetails $getquotedetailsrequest)" [9]=> string(80) "getOrderHistoryResponse getOrderHistory(getOrderHistory $getorderhistoryrequest)" [10]=> string(80) "getOrderDetailsResponse getOrderDetails(getOrderDetails $getorderdetailsrequest)" } The response I am getting is: SoapFault Object ( [message:protected] => Function 'getOrderHistory' doesn't exist [string:private] => [code:protected] => 0 [file:protected] => /home/yerkes/public_html/soap/client.php [line:protected] => 74 [trace:private] => Array ( [0] => Array ( [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => getOrderHistory [1] => Array ( [0] => Array ( [id] => 24 [key] => asdlkjf [username] => [EMAIL PROTECTED] [startdate] => 2008-05-01 [enddate] => 2008-05-31 [password] => x ) ) ) } ) I have gone over the wsdl countless times, and do not see anything wrong it. Can anyone tell me where to begin trouble shooting this? I can post code from the client and class if need be. I guess I'm mainly trying to figure out: Does this point to a wsdl problem, or code problem? -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life." Hi Will, thanks for the response. Here is the wsdl. I am calling the service with: http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl"; ); $d = $client->getOrderHistory( $data ); ?> -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life."
RE: [PHP] Encription
Have you considered mcrypt then base64? -Original Message- From: Stefano Esposito [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 2:37 PM To: php-general@lists.php.net Subject: [PHP] Encription Hi all, i need to encrypt a sensible string to pass it whit GET method. I need that to be decriptable (to use the string in the receiving script) and not to be base64 (too easy to decript)... is there anything similar, considering that my host hasn't installed the Pear::Crypt_GPG package? (actually, it hasn't installed Pear at all). Thanks for you hints :) Ciao, Stefano -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Motostorm.it vendita online di abbigliamento moto caschi ed accessori delle migliori marche a prezzi scontati Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=7846&d=30-6 -- 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] can you give me example of website using postgresql database?
The purchase of MySQL by Sun should actually give you more comfort. They will be able to attach more money and developers to the project. Remember, the advantage of open-source is not just that it's free, but that you may freely modify it for your purpose (keeping in mind the restrictions of individual licenses). I'm not sure what you're looking for in a RDMS, but the simple fact that you are having a hard time finding a robust, live site that uses PostgreSQL should scare you more than Sun's purchase of MySQL. I develop a relatively large, in-house application using PostgreSQL that I can't wait to convert to MySQL. What exactly scares you about Sun/MySQL? -Original Message- From: paragasu [mailto:[EMAIL PROTECTED] Sent: Monday, June 30, 2008 2:30 PM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] can you give me example of website using postgresql database? i am afraid to rely on mysql5 since it is already purchase by sun. there is nothing wrong about sun. but i see there is more i can do with postgresql. On 6/30/08, Nirmalya Lahiri <[EMAIL PROTECTED]> wrote: > Paragasu, > You are making a very good plan. I, from 2004 working on PostgreSQL. I can't > show you anything because my project(web based application) is a inhouse > intranet project, but postgresql is too much powerfull. > > --- > Nirmalya Lahiri > [+91-9433113536] > > > --- On Mon, 6/30/08, paragasu <[EMAIL PROTECTED]> wrote: > >> From: paragasu <[EMAIL PROTECTED]> >> Subject: [PHP] can you give me example of website using postgresql >> database? >> To: php-general@lists.php.net >> Date: Monday, June 30, 2008, 5:43 PM >> i am planning to use postgresql for my next project (social >> network). >> anyone can point me any website using postgresql database? >> it will help me a lot.. thanks.. >> >> -- >> 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: can you give me example of website using postgresql database?
Then in that case I agree. I develop an inherited, large-scale, in-house system that utilizes PostgreSQL. It does the job, but I can't wait until I get the time to convert it to MySQL. As with any RDMS, Postgres has its advantages: controlling sequences, aggregates, custom operators, custom types, etc. MySQL has focused on performance while PostgreSQL primarily focused on features. Now it seems both are going in each other's starting direction. -Original Message- From: paragasu [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 4:51 AM To: php-general@lists.php.net Subject: [PHP] Re: can you give me example of website using postgresql database? paragasu wrote: >> I develop a relatively >> large, in-house application using PostgreSQL that I can't wait to convert to >> MySQL. > > well, you should give me a reason why you want to do this. > >> What exactly scares you about Sun/MySQL? > personally, it is not about i am scared. i am still continue to use > mysql for several > project i did few years ago and continue support and upgrade it. > > for the moment, after making internet survey for few month i found out > it might be > worth my time trying to explore the concept of trigger etc. > > don't get me wrong. it is not about mysql vs postgresql. it is just > something i believe > worth to explore.. opps... -- 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] can you give me example of website using postgresql database?
Assuming that a system should switch RDBMSs is a waste of time without knowing the reason is asinine. Using NDB clustering is a primary reason for switching. PostgreSQL is only currently PLANNING built-in replication, much less clustering. Not to mention that the existing system is not taking advantage of ANY PostgreSQL functionality that is not already present in MySQL. So gaining performance and clustering is reason enough for me. -Original Message- From: Lester Caine [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 8:53 AM To: php-general@lists.php.net Subject: Re: [PHP] can you give me example of website using postgresql database? Will Fitch wrote: > The purchase of MySQL by Sun should actually give you more comfort. They > will be able to attach more money and developers to the project. Remember, > the advantage of open-source is not just that it's free, but that you may > freely modify it for your purpose (keeping in mind the restrictions of > individual licenses). > > I'm not sure what you're looking for in a RDMS, but the simple fact that you > are having a hard time finding a robust, live site that uses PostgreSQL > should scare you more than Sun's purchase of MySQL. I develop a relatively > large, in-house application using PostgreSQL that I can't wait to convert to > MySQL. WHY? What a waste of time. More big MySQL sites have had problems in the past that Postgres, but the only reason to change TO MySQL is if it is going to give something in return. What do you think it will give you? Personally I'll stick with Firebird even though switching between engines is very simple in my case, using ADOdb ;) paragasu - http://www.bitweaver.org/wiki/bitweaver_sites see if you can spot which engine is being used for which site :) MySQL is somewhat low on the list when it comes to testing :) -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.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] can you give me example of website using postgresql database?
Touché, salesman. -Original Message- From: Lester Caine [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2008 10:21 AM To: php-general@lists.php.net Subject: Re: [PHP] can you give me example of website using postgresql database? Will Fitch wrote: > Assuming that a system should switch RDBMSs is a waste of time without > knowing the reason is asinine. Using NDB clustering is a primary reason for > switching. PostgreSQL is only currently PLANNING built-in replication, much > less clustering. Not to mention that the existing system is not taking > advantage of ANY PostgreSQL functionality that is not already present in > MySQL. So gaining performance and clustering is reason enough for me. You gave no reasons initially ... and with facilities being added all the time, the reason to change may evaporate before a change is made? Have you looked at the alternatives as well since you seem to have some work to do rather than simply changing the data source? I'm being told I have to switch to MSSQL or Oracle but the customers can't provide justification to do that as yet and since we are only up to a couple of gigabytes of data replicated across machines I am always looking for informed explanations of why a switch is necessary ;) i.e. why one database may be more appropriate than another. The lack of proper comparison information does make it difficult at times :( -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/lsces/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.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] phpmyadmin
This is more of a SQL question that PHP. If you want to grant all privileges to abc to database xyz (minus GRANT), you should run these queries: CREATE DATABASE xyz; GRANT ALL PRIVILEGES ON xyz.* TO 'abc'@'somehost' IDENTIFIED BY 'somepassword'; -Original Message- From: Ronald Wiplinger [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2008 9:22 AM To: php-general@lists.php.net Subject: [PHP] phpmyadmin I would like to use this time phpmyadmin (2.11.3) to setup for a new user a database, which he can use to setup his own tables for his web site. User abc should get his own database xyz. I am not sure if I did it correct, and if it is safe to do so: A == 1. I created an empty database xyz (main page of phpmyadmin) 2. I added a new user on the Privileges page with: User: abc Host: Any (%) Password: (yes) Global privileges: (Data:) SELECT, INSERT, UPDATE, DELETE, FILE (Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES (Administration:)(nothing ticked) (Resource limits:) (nothing ticked) What does it mean so far? Can the user abc already access data of any database? B == I found "Database-specific privileges" for the user abc, where I added the database xyz and ticked: (Data:) SELECT, INSERT, UPDATE, DELETE (Structure:) CREATE, ALTER, INDEX, DROP, CREATE TEMPORARY TABLES (Administration:)(nothing ticked) What confuses me is that I have already some databases setup for my own web, but none of the users has "B" attached. Currently I am going away from a single person using the database to allow others also to use the database. Thanks for enlightening me. bye Ronald -- 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] Mail Function
Hello all,I did a search and did not find anything I was looking for. What is the limitation of the max emails that the mail function can send to? Thanks, Will
[PHP] How to delete text with replies for archive pages
Hey Everyone, We are writing a web archive to a mail list server. We want to be able to delete the footer that comes through on every email so that we don't end up with those long footers that are 4x repeated sometimes like in the example here: - >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: php-general-unsubscribe >>For additional commands, e-mail: php-general-help >> >>To contact the list administrators, e-mail: php-list-admin >> >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: php-general-unsubscribe protected> >For additional commands, e-mail: php-general-help > >To contact the list administrators, e-mail: >php-list-admin > So in this case we want to delete each one of those lines and the > in front of them. What would be the best way to do this? Thanks! Will __ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP] How to delete text with replies for archive pages
__ Do you Yahoo!? Yahoo! Mail - Easier than ever with enhanced search. Learn more. http://info.mail.yahoo.com/mail_250--- Begin Message --- That will result in the same problem, some lines after replies, then would be: << And finding out how to delete that with the < in front is my problem --- Jason Wong <[EMAIL PROTECTED]> wrote: > On Tuesday 28 December 2004 13:26, Will McCullough > wrote: > > > We are writing a web archive to a mail list > server. > > We want to be able to delete the footer that comes > > through on every email so that we don't end up > with > > those long footers that are 4x repeated sometimes > like > > in the example here: > > If everyone followed standards and long established > conventions then life > would be a breeze. If the signature (ie your footer) > is separated from the > body by '-- ' (note the space) then > standards/conventions compliant clients > will automatically strip the signature when needed. > > The PHP list does correctly use '-- ' when it > appends its signature. > Unfortunately Yahoo doesn't (probably because it > doesn't *want* its > signatures stripped so that it becomes advertising > for them). > > > So in this case we want to delete each one of > those > > lines and the > in front of them. What would be > the > > best way to do this? > > Look for the '-- ', otherwise good luck :) > > -- > 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 > -- > /* > Chicken Little was right. > */ > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > __ Do you Yahoo!? All your favorites on one personal page Try My Yahoo! http://my.yahoo.com --- End Message --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] making FORM dissapear when successful login
On Tuesday, January 04, 2005 9:05 PM, JHollis wrote: > I had this code working the way i wanted it to (as far as > correct username and password allowing successful login) > ...but what i want to happen now is when a user > successfully logs it it will make the login > form disappear and just say successfully logged in or > welcome user and a link below it so they can log off and > make the form re-appear. > [and then he included some sample code] I am working on something similar, so I was intrigued at your question. I took the liberty of looking at your code and rewritting it somewhat. Here are my thoughts and my version. First, as someone else noted, it is best to do the login/logout logic at the top of the code because a lot of things in PHP require that they be done before any output is sent. So I find it is best to resolve all of that before I send any HTML. Second, I don't like to rely on side effects and data outside my control to determine my code logic. I perfer to figure out what I need and then set a variable of my own to use to steer my logic. So in this case I want to determine if I have a valid user and then set a variable to hold the state of the user. Then I can use that variable to steer my logic later in the code. Below is my version of your code. I have added session management so a user can stay logged on over multiple pages. This is demonstrated by the Reload button in the Content section. \n"); } $select = mysql_select_db($db,$connect); if (!$select) { die ("Error: could not select database $db\n"); } session_start(); // Start the session. // Check to see if we are already logged in from some previous session. if( isset($_SESSION['userid']) && $_SESSION['userid'] > 0 ) { // Check to see if we are logging out. if ( isset($_POST['login']) && $_POST['login'] == "Log Out" ) { logout(); } else { // if we were previously logged in and we are not // logging out then set up the user's data $userid = $_SESSION['userid']; $sql = "select * from users where id=$userid"; $result = mysql_query($sql); $user = mysql_fetch_object($result); if (isset($user->id)) { // The specified user was found in the database $userid = $user->id; $_SESSION['userid'] = $userid; } else { // The specified user was NOT found in the database logout(); } } } else { // We were NOT previously logged in, so check if this is a // login request if ( isset($_POST['login']) && $_POST['login'] == "Login" ) { $sql = "select * from users where username='" . cleanup_text ($_POST['username']) . "' and password=md5('" . cleanup_text ($_POST['password']) . "')"; $result = mysql_query($sql); $user = mysql_fetch_object($result); if (isset($user->id)) { // The specified user was found in the database $userid = $user->id; $_SESSION['userid'] = $userid; } else { // The specified user was NOT found in the database logout(); } } } ?> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> Test Header Left Nav Box 0) { ?> Welcome, first_name; ?> Your email address is: email_address; ?> Username: Password: 0) { ?> Right Nav Box Page Content Blah, Blah, Blah Reload Blah, Blah, Blah Today is -- Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php