[PHP] It;s good to be back
I've been off the list for a couple of months after having been on for 2 years and I must say, it's good to be back. Unfortunately, my latest job advancement left me using jsp/servlets but there's always hope... jason __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Can someone tell me the command to enable ftp support on php4.03?
I believe it's still --enable-ftp. Jason --- Brandon Orther <[EMAIL PROTECTED]> wrote: > Hello, > > I am trying to enable ftp can someone please remind > me what the command is? > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] image orientation/resizing images
> At 17:48 21/02/2001 -0500, Jaxon wrote: > >Is there any way to take an image from the filesystem, say a .jpg or .png, > >and display it in a different orientation? e.g. 20 degrees to the right? > > At 17:18 21/02/2001 -0500, Dale Frohman wrote: > >Does anyone know of a way to resize images as they are being uploaded? > >Would you write these images to a mysql database or straight to a file on > >the server? The pictures will be small < 100k > > > In both cases, the answer will have to be some kind of server side utility > that can dynamically feed up translated images. Chris' very nice "image from > database" snippet gives a guidline on how this might work - whether or not what > you want can be done in PHP, I don't know. Actually, Brian's suggestion won't really solve your problems nor really apply. (No offense intended) In both cases you want to physically manipulate the images. This will require, as Brian mentioned, a utility. You'll want to look into using either ImageMagik or GD. I've never used ImageMagik but I have used GD quite a bit. To enable the PHP GD functions, you'll need to compile PHP with GD support. The more recent versions of GD support mainly JPEG and PNG image formats. GIF is not supported because it is copyrighted. If you need GIF support, you might be able to find an older version. You'll need one that's about a year old. (I believe that's when they stop supporting it.) In regards to the second question, you wouldn't even have to store the image in a database if you just want to manipulate it. You can just manipulate in on the filesystem. Hope that answers your questions, Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why Arrays in Forms? ( Was "Accessing variables from a form" )
You don't have to specify them as "PHP arrays". You can do something like: PHP will create the array for you. Jason --- Brian White <[EMAIL PROTECTED]> wrote: > Why do you have to specify multi-value fields in > HTML > forms specifically as PHP arrays? > > It seems incompatible with other CGI languages, and > could make it difficlt to chop and change CGI > engines in > the background. > > At 19:08 21/02/2001 +0200, Pavel Jartsev wrote: > >If you create your fields like this: > > >... > >echo ' name="name['.$rownum.']">'; > >echo ' name="phone['.$rownum.']">'; > >echo ''; > >... > >?> > > Regs > > Brian White > - > Brian White > Step Two Designs Pty Ltd - SGML, XML & HTML > Consultancy > Phone: +612-93197901 > Web: http://www.steptwo.com.au/ > Email: [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] > __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] No GIF support in this PHP build???
Are you trying to create images or just display images? If you're trying to create images using GD, you'll need to check the version of GD you have installed. If you have a newer version or don't have it installed at all, you won't be able to use that functionality. If you're trying to display and image, you should even be calling a function. If you'd like, post you code and let me have a look. Jason --- Ana Carolina Blanco Abascal <[EMAIL PROTECTED]> wrote: > I have several images all over my site but when I > call an image by a > php3 file I get this error: > ImageCreateFromGif: No GIF support in this PHP > build in > > Any ideas... > Thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Copying Files to the Web Directory
PHP runs as the webserver user which in most cases is user nobody. For PHP to write to a directory, it has to be writable to this directory. A possible solution would be to compile a PHP executable and run a script from cron to copy the files periodically. By using cron and a cgi-version of PHP you can run it as your desired user. Jason - Original Message - From: "Miles Thompson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 26, 2001 7:18 PM Subject: [PHP] Copying Files to the Web Directory > I have a customer who insists on using Front Page, but wants protection > against intruders on all his web pages. I envisioned a solution where he > works in Front Page, then all his files are ftp'd to a directory on the > server, opened and re-written as .php files with all links changed from > "something.htm" to "something.php" and then copied to a directory on the > same level called "test". So far so good, and this allows a php-one-liner > to provide the necessary security. > > Now I'm stuck, because I have to copy these files from test to the location > of the web page itself. And I've not been able to do it, and I can't do > it, as far as I can see without giving world-writeable permission to the > web directory. Here's the skeletal directory structure ... > > .../www.website.com > /admin > /upload > /test > > The script (php page) I'm using to do this is stored in /admin and I want > to copy everything in /test (and any subdir's it may have) to www.website.com. > > On the server, logged in as root, I can execute a shell script named > newpub-web, located in www.website.com, which consists of: > rm -f *.php > rm -f ./graphics/* > cp -fR ./admin/test/* . > > I've tried executing newpub-web from a php script, which changes to the the > working directory to www.website.com, as: > exec( "newpub-web"), or system( "newpub-web" ) or passthru( > "newpub-web"). None have worked. > > I've also tried executing the commands directly using system(), all without > effect, no errors, nothing. > > Do I have to change the group of www.website.com to nobody? That seems to > be an awful security hole. > > Stymied in Nova Scotia - Miles Thompson > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] try catch in php?
No, PHP doesn't have the extensive error handling that Java does. It's a bit more like C. Jason - Original Message - From: "Jeff" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 26, 2001 6:30 PM Subject: [PHP] try catch in php? > Is there any equivalent java try catch syntax in php ? > > Thanks, > > Jeff > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
re: [PHP] Custom email after form submission
Sorry. I forgot to reply to the list. - Original Message - From: "Jason Cox" <[EMAIL PROTECTED]> To: "Edward R. Bailey" <[EMAIL PROTECTED]> Sent: Tuesday, January 29, 2002 8:27 AM Subject: Re: [PHP] Custom email after form submission > Ed, > > Check the manual for the mail() function. Here's a link: > http://www.php.net/manual/en/ref.mail.php > > Good Luck, > Jason Cox > > - Original Message - > From: "Edward R. Bailey" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 29, 2002 8:25 AM > Subject: [PHP] Custom email after form submission > > > > Can anyone point me in the right direction about how to send a custom > > email to a user after a form submission. The user would provide their > > email address in the form. > > > > Thanks > > > > Ed > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Need Urgent Help!!
Scott, Apparently I'm too stupid to be able to use my mail client correctly and sent this email from my wife's account. (It was an early morning for me so please forgive me. Anyway, to answer your question you would do the following: 1) Create the page that you want to send the email. Create this page with a '.php' extension. For example, sendmail.php. This will be the target of your form. 2) Add the following code to the top of the file: "); ?> 3) You can add any html code following this that you would like to see after the email is sent. 4) Make sure this page is on your server and point your form at it. Voila! Let me know if you have any problems. Regards, Jason Cox > Shannon, > I appreciate your help! > The following are the form fields I have created in Flash and their variable > names, I need to be able to receive an email from the website using php. > FIELD = VARIABLE NAME > name = txtname > email = txtemail > message = txtmessage > > the email address it needs to be sent to is my email address: > [EMAIL PROTECTED] > > Thanks in Advance! > > - Original Message - > From: "Shannon Cox" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, January 31, 2002 12:06 PM > Subject: Re: [PHP] Need Urgent Help!! > > > > Scott, > > > > Did you ever get this solved? If not, let me know and I will help you. > > Please reply both to my address and send a copy to the list. > > > > Thanks, > > Jason > > > > "Scott" <[EMAIL PROTECTED]> wrote in message > > news:<[EMAIL PROTECTED]>... > > > All, > > > I have just found out that the VB script that I have used to send email > > from > > > my web site is null and void, apparently the server does not do VB or > > > something along those lines (security) but that's not the issue. I have > > > contacted my teh people who host my site and they told me I have to use > > PHP > > > script. > > > My website (Flash) needs to be able to send emails and membership > > > applications from form I have already created, does anyone have any > > scripts > > > and directions that some with absolutely no code writing skills can use. > > > Your help is greatly appreciated!! > > > Billy > > > > > > > > > > > > -- > > > 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: php-list- [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: php-list- [EMAIL PROTECTED] > > > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Parsing commands to a program
How I've done it in the past is to dynamically build the command string and then pass it through the exec function like so: $cmdStr = "pure-pw useradd joeblow -u ftpuser -d /home/joeblow"; exec($cmdStr); The exec call won't display output but I believe if you use system($cmdStr) it will. I don't think this method will work if the useradd program prompts for a password. The exec and system calls just execute the command and exit. Jason - Original Message - From: "Liam MacKenzie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 02, 2002 5:54 AM Subject: Re: [PHP] Parsing commands to a program > Nope, can't get that to work. > Any more suggestions? > > - Original Message - > From: "val petruchek" <[EMAIL PROTECTED]> > To: "PHP" <[EMAIL PROTECTED]> > Sent: Saturday, February 02, 2002 8:58 PM > Subject: Re: [PHP] Parsing commands to a program > > > > > Hello, > > > > > > I was wondering, how would I pass commands to a program and print the > > > results on my screen? > > > For instance, to add an FTP user the command would be: > > > "pure-pw useradd joeblow -u ftpuser -d /home/joeblow" > > > How would I make a php script do that and display it's output when it's > > > done? > > > > > > > > > Try > > > echo `pure-pw useradd joeblow -u ftpuser -d /home/joeblow`; //not quotes > by > > ticks! > > ?> > > > > but not sure about security allows u to do it > > > > Valentin Petruchek (aki Zliy Pes) > > Cut the beginning > > http://zliypes.com.ua > > mailto:[EMAIL PROTECTED] > > > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What's wrong w/ this line?
Nick, I believe you need a space between 'else' and 'if'. Should be two separate words. If that doesn't work, please send more of the code. Regards, Jason Cox - Original Message - From: "Nick Richardson" <[EMAIL PROTECTED]> To: "PHP General" <[EMAIL PROTECTED]> Sent: Monday, February 25, 2002 11:04 PM Subject: [PHP] What's wrong w/ this line? > PHP seems to be completly ignoring this line... > > Funny part is that i use this same line in another place in my code and it > works fine there... i have no clue - Need coffee. > > } elseif(!(preg_match("/^[A-Za-z0-9-]+$/",$uname))) { > > //Nick Richardson > [EMAIL PROTECTED] > [EMAIL PROTECTED] > -- > -- We must come to see that the end we seek, is a society -- > -- at peace with itself. A society that can live with its -- > -- concience. That will be a day not of the white man, not -- > -- of the black man... That will be the day of man, as man! -- > -- -Dr. Martin Luther King Jr. -- > -- -March 25th, 1965-- > -- > > > -- > 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] switch & continue statements
A switch will match the value to one of the cases and then continue executing each line until it encounters the end of the switch block or encounters a 'break'; It doesn't do any other validation after the initial sucessfull case validation. I've never used a continue inside a switch block but I doubt it will jump you to the default case. Hope that helps, Jason Cox - Original Message - From: "KAT 44" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 23, 2002 9:13 PM Subject: [PHP] switch & continue statements Hello, I'm not sure if this is a newsgroup, list or direct e-mail address. In any case, I ask of anybody who can answer my question to *send me an e-mail* at [EMAIL PROTECTED], and not answer on the list/newsgroup/etc. (Thank you.) My question is the following: When having a switch statement as follows: switch($value) { case something: if(condition) { do_my_stuff; } else { continue; } case something_else: do_my_other_stuff; default: show_error_message; } Does the continue continue on evaluating (and comparing) $value to the case statements, or does it give control to the default: statement? Simpler put: Does a "continue" statement within a "switch" statement pass control to that "switch" statement's "default:" section? Thanks, KAT44 _ Le journal des abonnés Caramail - http://www.carazine.com > -- > 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] Probably basic but seems advanced to me, PHP/SQL generation.
Matt, Perhaps I could elaborate for you. When you run a mysql query through php the function returns a result variable. This is not unlike a cursor that you would use in oracle programming. This result set contains all the rows returned by the query but you must take it a step further to gather the values from the result set. A call to mysql_fetch_row() will return a different "row" from the result set each time it is called until it is empty. It's commonly placed in a while() loop so the function will continue to be called until mysql_fetch_row() returns false. For each interation of the loop an array is returned into $row my mysql_fetch_result() that is indexed numerically by row number. These row numbers will match the order of the columns as specified in your select clause or by column order in the database if you did a select *. An alternative to mysql_fetch_row would be mysql_fetch_array or mysql_fetch_assoc. These functions return an array as well but it is associative meaning the elements can be accessed by column name. For example: $row['name']. I personally prefer this method because it makes the code a bit easier to read and I don't have to remember the order of columns. The numerically indexed arrays are handy for dumping table structures though because you can loop off the array size and don't have to change your code if you change your database schema. This latter technique is the one used by Bas in his example. Hope that clears things up a bit. Jason Cox - Original Message - From: "DARCY,MATTHEW (Non-HP-UnitedKingdom,ex2)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, February 28, 2002 6:55 AM Subject: RE: [PHP] Probably basic but seems advanced to me, PHP/SQL generation. > > Hi Baz, > > Thanks for mailing back, would you care to explain this a little more so I > understand whats going on and how to use it > > I can see that you are fetching the results of select * from - into and > array. and while there is records in the array you are echoing data, but I > am not sure on whats going on, and how to generate the table from these > results. > > thanks, > > Matt. > > > -Original Message- > From: Bas Jobsen [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 28, 2002 1:59 PM > To: DARCY,MATTHEW (Non-HP-UnitedKingdom,ex2); [EMAIL PROTECTED] > Subject: Re: [PHP] Probably basic but seems advanced to me, PHP/SQL > generation. > > > while ($row=mysql_fetch_row($result)) > { > echo "1 $row[0]" > for($x=1; $x if(!empty($row[$x])) > { > echo $x+1; > echo " ".$row[$x]; > } > } > > > -- > 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] novice question
JD, This is how you would do it: - or you could do it directly like this - - or my personal preference - === A quick read of the section on functions in the online manual would be a great resource. In fact, I recommend checking the manual before posting to this list. It's a great tool and contains user comments. Chances are that if you have a problem, someone else has already run into it and posted the solution in the manual. Here's a link: http://www.php.net/manual/en/functions.php Regards, Jason Cox - Original Message - From: "me us" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 27, 2002 2:23 PM Subject: [PHP] novice question > Hi > Id reelly like to know the syntax for returning results from a > called function to the program that called it;) > > program > > add($a,$b); > echo"$ab"; > ?> > > > === > > function add($a,$b) > { > $ab =$a+$b; > } > return?? > > > ?> > > > Many many thanks > > JD > > _ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > > -- > 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 TO CONNECT MYSQL...
Felipe, You need to login with the root account to mysql and then issue the following commands where "user1" is the user that your modifying and "pass1" is the new password. after you've logged in successfully as root, issue the following commands: use mysql; update user set password=Password("pass1") where User='user1'; Hope that helps. Jason --- Felipe Lopes <[EMAIL PROTECTED]> wrote: > I have a problem to connect mysql... > Now, when I try login to Mysql it says that my > user-password is wrong. > So I need to know what is the "equation" to delete, > or to change, my > password-user? > What is the "equation" to insert a user after I > delete my last user? > Thank you again!!! > > Felipe Lopes > MailBR - O e-mail do Brasil -- > http://www.mailbr.com.br > Faça já o seu. É gratuito!!! > > -- > 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] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to alter assoc_array?
I would just loop through the array and grab the key/value pairs and then add them to a new array as you modify them. Jason --- Jaxon <[EMAIL PROTECTED]> wrote: > Hi folks! > > If $array contains the following: > > boy => hello > girl => hi > dog => bark > > How can I alter all the elements the same way? > > e.g. so that it now conatins: > > Xboy => Xhello > Xgirl => Xhi > Xdog => Xbark > > thanks! > jaxon > > > -- > 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] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Cannot get PHP w/GD to compile with Apache on RH
Greg, I've done this many a time and haven't ever been able to do it from rpms. I install the gd stuff including libjpeg and libpng into the same directory. In my case it's /usr/local/gd. Then you should specify the path like --with-gd=/usr/local/gd . This has always worked for me. Jason --- Greg Kopp <[EMAIL PROTECTED]> wrote: > I am having trouble getting PHP, GD and apache > compiled. I have successfully > compiled PHP plus options with Apache, but can't > seem to get this to work. I > need to get ImageCreateFromJPEG working. I have > searched the digest, > newsgroups, etc., and haven;t found a solution that > seems to work. > > I am using these components: > > OS: RedHat Linux 6.2 > > RPMs: > gd-1.8.3-4 > gd-devel-1.8.3-4 > gd-progs-1.8.3-4 > libjpeg-devel-6b-13 > libjpeg-6b-13 > > PHP source: php-4.0.4pl1 > Apache source: apache_1.3.14 > > I installed the RPM's above and then started the > recompile of PHP (the last > two lines I added for this option): > > ./configure \ > --with-mysql \ > --with-apache=../apache_1.3.14 \ > --with-mcrypt \ > --enable-track-vars \ > --with-xml \ > --with-curl \ > --with-pspell \ > --with-dom=/usr/include/libxml \ > --with-gd \ > --with-jpeg-dir=/usr/lib > > Durring the configure process, I do see: > > checking whether to include GD support... yes > (static) > checking for gdImageString16 in -lgd... (cached) yes > checking for gdImagePaletteCopy in -lgd... (cached) > yes > checking for gdImageColorClosestHWB in -lgd... > (cached) yes > checking for compress in -lz... (cached) yes > checking for png_info_init in -lpng... (cached) yes > checking for gdImageColorResolve in -lgd... (cached) > yes > checking for gdImageCreateFromPng in -lgd... > (cached) yes > checking for gdImageCreateFromGif in -lgd... > (cached) no > checking for gdImageWBMP in -lgd... (cached) yes > checking for gdImageCreateFromJpeg in -lgd... > (cached) yes > checking for gdImageCreateFromXpm in -lgd... > (cached) yes > checking whether to include FreeType 1.x support... > yes > checking for T1lib support... no > > Which leads me to believe the gd-1.8.3 RPM already > has a link to the libjpeg > libraries. (BTW, I have tried clearing the > config.cache just to make sure, > and it comes up fine even with a blank cache). > > PHP copntinues and compiles fine with no errors. > (make, make install) > > Then I try and compile apache using the same > configure script I always use: > > SSL_BASE=../openssl-0.9.6 \ > RSA_BASE=../rsaref-2.0/local \ > EAPI_MM=../mm-1.1.3 \ > ./configure \ > --enable-module=ssl \ > --prefix=/usr/local/apache \ > --enable-shared=ssl \ > --activate-module=src/modules/php4/libphp4.a \ > --activate-module=src/modules/perl/libperl.a \ > --enable-module=vhost_alias \ > --enable-module=rewrite > > And durring the make process, I get: > > -o httpd buildmark.o modules.o > modules/standard/libstandard.a > modules/php4/libphp4.a modules/perl/libperl.a > main/libmain.a > ./os/unix/libos.a ap/libap.a > lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib > -rdynamic -L/usr/local > /lib -Lmodules/php4 -L../modules/php4 > -L../../modules/php4 -lmodphp4 -lpam > -ldl -lpspell -lmcrypt -lmcrypt -lz -lxml -lcurl > -lresolv -lm -ldl -lcrypt > -lnsl -lresolv -L/usr/include/libxml/lib -lz -lm > -lcrypt -lndbm -rdynamic > -L/usr/local/lib > /usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a > -L/usr/lib/pe > rl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm > -lc -lposix -lcrypt -lmm > -ldl > modules/php4/libphp4.a(gd.o): In function > `php_free_gd_image': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:198: > undefined reference > to `gdImageDestroy' > modules/php4/libphp4.a(gd.o): In function > `php_if_imagecreate': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:460: > undefined reference > to `gdImageCreate' > modules/php4/libphp4.a(gd.o): In function > `_php_image_create_from_string': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:525: > undefined reference > to `gdNewDynamicCtx' > modules/php4/libphp4.a(gd.o): In function > `php_if_imagecreatefromstring': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:567: > undefined reference > to `gdImageCreateFromJpegCtx' > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:576: > undefined reference > to `gdImageCreateFromPngCtx' > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:594: > undefined reference > to `gdImageCreateFromWBMPCtx' > modules/php4/libphp4.a(gd.o): In function > `_php_image_create_from': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:676: > undefined reference > to `gdNewDynamicCtx' > > > > modules/php4/libphp4.a(gdttf.o): In function > `tweenColorFetch': > /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:628: > undefined > reference to `gdImageColorResolve' > modules/php4/libphp4.a(gdttf.o): In function > `gdttf': > /usr/src/apache-php-
Re: [PHP] Capturing Emails
Ade, If you're running Unix/Linux, I would recommend using Procmail. It does the local delivery for mail. You would setup processing rules and can work with copies of emails for processing without disturbing delivery. Useful Procmail links Top site: http://www.ii.com/internet/robots/procmail/ Mini-tutorial: http://www.linuxgazette.com/issue14/procmail.html Manual pages: http://www.voicenet.com/~dfma/intro.html Mailing list searchable archives: http://www.xray.mpe.mpg.de/mailing-lists/procmail/ Hope that helps, Jason --- [EMAIL PROTECTED] wrote: > Hi, > > What is the best way to capture an email sent to a > server so that I can copy > it and send it to a number of emails selected from a > db. I can do the > scripting except for the capturing part (Presuming I > have no idea when the > email is sent to the server) > > Any links regarding this subject would be gratefully > recieved. > > Thanks > Ade > > -- > 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] __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Upload form
Brandon, You can set a default value for a form field by doing something like the following: Hope that helps, Jason --- Brandon Orther <[EMAIL PROTECTED]> wrote: > Hello, > > This is off topic, but I have been working on it all > day with php and can't > seem to figure it out. Does anyone know how to give > a file field in a form a > default value? I am trying to have a script > automatically fill in some > upload fields on my form. > > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > To contact the list administrators, e-mail: > [EMAIL PROTECTED] > __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] file upload temp file is and isn't there
Aaron, Are you processing the file on the page you're "posting" to? Could you send your processing code so we can have a look? If you're still having problems, I can send you an example. Jason --- "Aaron D. Turner" <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Solaris 7 > Apache 1.3.14 > PHP 4.0.4p1 > > For the life of me I can't figure out what's going > on. I have: > > action='/admin/upload.php' method='post'> > value=5000> > value=true> > Choose File: type=file> > > > and I can try to upload a file, but then the > HTTP_POST_FILES hash doesn't > get properly populated and no file is stored in the > upload > directory. Basically: > > > HTTP_POST_FILES["userfile"] > Array > ( > [name] =>1323.txt > [type] =>text/plain > [tmp_name] =>none > [size] => 0 > ) > I've set my php.ini with: upload_tmp_dir = /tmp > and nothing gets put in there (I've verified that > the dir has world r/w w/ > suid). > > Any ideas of how to debug this futher? > > - -- > Aaron Turner > <[EMAIL PROTECTED]|synfin.net|linuxkb.org> > URI:www.synfin.net > They that can give up essential liberty to obtain a > little temporary safety > deserve neither liberty nor safety. -- Benjamin > Franklin > > pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 > 9A8F 8707 9817 F86E DAE6 > All emails by me are PGP signed; a lack of a > signature indicates a forgery. > I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 > 596E 60BF 451B 20E8 > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.4 (GNU/Linux) > Comment: Public key at: > http://www.synfin.net/aturner/pgpkey.asc > > iEYEARECAAYFAjqJwWEACgkQhweYF/hu2uYnjgCfbXQVLYBwVnmAE5RHRxeTtdFI > YgAAoIf9w7fNcbFmxyT/LlRUHa3lHfqB > =Jqdm > -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] > __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File Upload equiv. with Java/JSP
Does anyone know the difference between file upload handling in PHP and with Java/JSP? An example of the Java equiv. would be most appreciated. I already know how to do it with PHP and am trying to do a bit of conversion. I'm interested more in the backend processing. thx, jason __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Will this work?
Hi, > "> > First Name: > Last Name: > E-mail Address: > > The form should work. > if(!IsSet($FirstName, $LastName, $Email)) > { > header("Location: http://www.SITE.com/error.php"); > exit; > } > else > { > header("Location: > http://www.SITE.com/thanks.php"); > exit; > } > ?> This won't work. I assume that this code is included on the page with the form above. First, the header() function must be called before any output is sent to the browser or it will throw an error and stop. The second problem is that the first time a user comes to this page, it will throw then to the error page because the vars won't be set. Try this: http://www.SITE.com/error.php"): header("Location: http://www.SITE.com/thanks.php"); } ?> Then put your form below it. This will work unless you do a form post to this page from another page in which case it will throw you to the error page. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Help!! IP functions!!!
Use the variable $REMOTE_ADDR. It contains the request ip address. Jason - Original Message - From: "Bruno Freire" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 19, 2001 12:34 PM Subject: [PHP] Help!! IP functions!!! > Hi!! > > My name is Bruno, From Brazil!!! > > I need to know how can i discovery the ip address when somebody access my > home page > > What function can I use > > Thanks!! > Bruno. > -- 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] Is it possible to use CyberCash w/o MCK?
Ben, In order to use the Cybercash functions in php, you must have php installed with cybercash support. You can't compile php with cybercash support without the MCK. If your provider won't do it, you could always compile a PHP cgi binary with the cybercash extensions(or find a different provider). Jason --- Ben Schumacher <[EMAIL PROTECTED]> wrote: > Hello- > > Does anybody have any example code for using > CyberCash w/o the Merchant > Connection Kit? I'm trying to setup secure credit > card transactions on my > site using CyberCash, but my provider doesn't have & > won't install the MCK > (no PHP support for it either). I haven't tried > installing the MCK myself, > but from my previous experience with it, I would > rather just find a way > around using it. > > So I guess all I really need to know is if somebody > has another way of > using CyberCash with PHP without using their > software. > > Thanks, > Ben Schumacher > > > -- > 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] > __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]