RE: [PHP] Strange Problem with ctype_digit
-Original Message- CODE: ? print ctype_digit( 1094164380 ); ? END OF CODE When I run the above code, my apache server performs an illegal operation and shuts down. It will keep doing this every 20 seconds or so until you restart/stop the server manually. Does anyone else have this problem? It crashed Apache on my computer as well. The manual says that function expects you to give it a string and it will tell you if all of the digits in the string are decimals. The function probably needs better error checking on incoming parameters, but you could probably create a wrapper with gettype to handle that in the meanwhile. -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problem with file upload script
Hi, Here is a script I'm using to upload files. Can anyone see anything wrong with it? No file is uploaded when I click the upload button !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head title/title meta name=GENERATOR content=Microsoft Visual Studio.NET 7.0 meta name=vs_targetSchema content=http://schemas.microsoft.com/intellisense/ie5; /head body ?php echo $_FILES['file']['tmp_name']; echo $_FILES['file']['name']; move_uploaded_file({$_FILES['file']['tmp_name']}, {$_FILES['file']['name']}); ? form method=post action=test.php ID=Form1 enctype=multipart/form-data bBrowse for file to upload:/binput type=file name=file ID=File1/br/ input type=submit value=Upload! ID=Submit1 NAME=Submit1 /form /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] problem with file upload script
[snip] Here is a script I'm using to upload files. Can anyone see anything wrong with it? No file is uploaded when I click the upload button [/snip] Start here http://us4.php.net/manual/en/features.file-upload.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql_num_rows()
Ave, In one of my scripts, I'm getting the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Library/WebServer/Documents/limiteduse.net/dumptoday.php on line 56 I¹m not clearly sure why. I¹m running PHP5 with mySQL 4 ... Is there a compatibility issues somewhere?
Re: [PHP] mysql_num_rows()
Generally you've got an error in your SQL at such points. If you do, mysql_query return false, and false is nor a valid MySQL result, so mysql_num_rows errors out. Check using mysql_error() to see what you're doing wrong Php Junkie wrote: Ave, In one of my scripts, I'm getting the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Library/WebServer/Documents/limiteduse.net/dumptoday.php on line 56 I¹m not clearly sure why. I¹m running PHP5 with mySQL 4 ... Is there a compatibility issues somewhere? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strange Problem with ctype_digit
Hi all, Noticed a strange problem when I was testing a time stamp to make sure it was all numbers. After an hour of debugging, I traced the problem to the ctype_digit funciton. CODE: ? print ctype_digit( 1094164380 ); ? END OF CODE When I run the above code, my apache server performs an illegal operation and shuts down. It will keep doing this every 20 seconds or so until you restart/stop the server manually. Does anyone else have this problem? I am using windows XP with SP2 installed. I also use apache 2.0.50 (latest binary build available) and PHP 4.3.9. The problem also occurs on my main server, which is running older versions of PHP and apache, but the same OS. Thanks, Stephen Edmonds
RE: [PHP] mysql_num_rows()
[snip] In one of my scripts, I'm getting the error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /Library/WebServer/Documents/limiteduse.net/dumptoday.php on line 56 I¹m not clearly sure why. I¹m running PHP5 with mySQL 4 ... Is there a compatibility issues somewhere? [/snip] If we could see the code we probably could tell you a little more. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Structure of Directories?
What I would like to do is create a list at the top of each page that tells the path to the file starting at the root page and links to that same area so that a document residing in /webroot/folder1/folder2/file.html would have Home Folder1 Folder2 at the top of the page. What's the BEST way to go around doing this so that it is dynamically created? Thanks, Robert -- Robert Sossomon, Webmaster and IT Guru 4-H Youth Development Department 200 Ricks Hall, Campus Box 7606 N.C. State University Raleigh NC 27695-7606 Phone: 919/515-8474 Fax: 919/515-7812 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysql_num_rows()
On Tuesday 28 September 2004 03:15, PHP Junkie wrote: In one of my scripts, I'm getting the error: Use mysql_error() after every call to the mysql_*() functions. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* The last person that quit or was fired will be held responsible for everything that goes wrong -- until the next person quits or is fired. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with file upload script
I don't know if I'm right, but ckeck this out: the echo $_FILES['file']['name'] variable holds the file name on the computer that uploads the file. and in one place you try to move the uploaded file from the temp folder back into the folder where it came from. I suggest you create a new folder on the server you are using and move the file there. Hope it helps. Amc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Here is a script I'm using to upload files. Can anyone see anything wrong with it? No file is uploaded when I click the upload button !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head title/title meta name=GENERATOR content=Microsoft Visual Studio.NET 7.0 meta name=vs_targetSchema content=http://schemas.microsoft.com/intellisense/ie5; /head body ?php echo $_FILES['file']['tmp_name']; echo $_FILES['file']['name']; move_uploaded_file({$_FILES['file']['tmp_name']}, {$_FILES['file']['name']}); ? form method=post action=test.php ID=Form1 enctype=multipart/form-data bBrowse for file to upload:/binput type=file name=file ID=File1/br/ input type=submit value=Upload! ID=Submit1 NAME=Submit1 /form /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagejpeg() problem
On Tuesday 28 September 2004 02:16, Mike wrote: What i'd like to know is whether php can output some quality jpegs, and if so, then how? imagecopyresampled() -- 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 -- /* Windows 98 is the most popular virus on the market today. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Structure of Directories?
[snip] What I would like to do is create a list at the top of each page that tells the path to the file starting at the root page and links to that same area so that a document residing in /webroot/folder1/folder2/file.html would have Home Folder1 Folder2 at the top of the page. What's the BEST way to go around doing this so that it is dynamically created? [/snip] Start here http://www.php.net/file http://www.baskettcase.com/classes/breadcrumb/ http://www.evolt.org/article/Breadcrumbs_for_PHP_Lovers/17/4455/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is_dir on WIndows
I'm having a problem I haven't encountered before. I'm using PHP 4.3.4 (upgrading the 4.3.9, but humor me) on Windows. I'm using the following code snippet to try to get all the subdirectories of a directory into an array. $maildir=MERCURY./MAIL; $handle=opendir($maildir); // echo $handle; while ($file = readdir($handle)) { // echo $file; // echo is_dir($file).BR/; if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } } What this should do (if I'm not a complete idiot), is put all the true subdirectories (excluding . and ..) into the array $users. There are two additional subdirectories under the $maildir directory. However the array is empty. As you can see, I tried echoing out $file and whether it is a directory, but it came up as not recognizing the directories as such. With the echos above in place, I get the resource handle, and it echos everything you would expect except that is_dir() fails to recognize the directories. It DOES recognize . and .. as directories, for some bizarre reason. And no, I can't switch to linux. Any ideas? Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagejpeg() problem
I tried that function too, but the same result... Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tuesday 28 September 2004 02:16, Mike wrote: What i'd like to know is whether php can output some quality jpegs, and if so, then how? imagecopyresampled() -- 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 -- /* Windows 98 is the most popular virus on the market today. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagejpeg() problem
Mike wrote: the resizing part goes well; I don't really know what the imageinterlace function does, but I used it in desperation. Why: the output image's quality is visibly inferior to the source's. And I want the image to look good. The source is a jpeg (dinamic). As you probably have noticed, I set the quality parameter to 100, but uselessly. What i'd like to know is whether php can output some quality jpegs, and if so, then how? Thanks a lot! use imagecopyresampled instead of imagecopyresized for much better results. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } It's only adding it to the array if all 3 of those are true. and since $file can't be both '.' and '..' at the same time, it's never matching. I'd do something like: if (is_dir($file) || ($file!=.) || ($file!=..)) continue; Mark wrote: I'm having a problem I haven't encountered before. I'm using PHP 4.3.4 (upgrading the 4.3.9, but humor me) on Windows. I'm using the following code snippet to try to get all the subdirectories of a directory into an array. $maildir=MERCURY./MAIL; $handle=opendir($maildir); // echo $handle; while ($file = readdir($handle)) { // echo $file; // echo is_dir($file).BR/; if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } } What this should do (if I'm not a complete idiot), is put all the true subdirectories (excluding . and ..) into the array $users. There are two additional subdirectories under the $maildir directory. However the array is empty. As you can see, I tried echoing out $file and whether it is a directory, but it came up as not recognizing the directories as such. With the echos above in place, I get the resource handle, and it echos everything you would expect except that is_dir() fails to recognize the directories. It DOES recognize . and .. as directories, for some bizarre reason. And no, I can't switch to linux. Any ideas? Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
Chris wrote: if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } It's only adding it to the array if all 3 of those are true. and since $file can't be both '.' and '..' at the same time, it's never matching. I'd do something like: if (is_dir($file) || ($file!=.) || ($file!=..)) continue; That will match everything and anything, files and dot directories... The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or .. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with file upload script
Hi, I changed the script to upload to a different directory but it still doesn't work, any ideas? I really appreciate the help. !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head title/title meta name=GENERATOR content=Microsoft Visual Studio.NET 7.0 meta name=vs_targetSchema content=http://schemas.microsoft.com/intellisense/ie5; /head body ?php echo $_FILES['file']['tmp_name']; echo $_FILES['file']['name']; move_uploaded_file({$_FILES['file']['tmp_name']}, ../pdfs/{$_FILES['file']['name']}); ? form method=post action=test.php ID=Form1 enctype=multipart/form-data bBrowse for file to upload:/binput type=file name=file ID=File1/br/ input type=submit value=Upload! ID=Submit1 NAME=Submit1 /form /body /html Mike [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I don't know if I'm right, but ckeck this out: the echo $_FILES['file']['name'] variable holds the file name on the computer that uploads the file. and in one place you try to move the uploaded file from the temp folder back into the folder where it came from. I suggest you create a new folder on the server you are using and move the file there. Hope it helps. Amc [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Here is a script I'm using to upload files. Can anyone see anything wrong with it? No file is uploaded when I click the upload button !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head title/title meta name=GENERATOR content=Microsoft Visual Studio.NET 7.0 meta name=vs_targetSchema content=http://schemas.microsoft.com/intellisense/ie5; /head body ?php echo $_FILES['file']['tmp_name']; echo $_FILES['file']['name']; move_uploaded_file({$_FILES['file']['tmp_name']}, {$_FILES['file']['name']}); ? form method=post action=test.php ID=Form1 enctype=multipart/form-data bBrowse for file to upload:/binput type=file name=file ID=File1/br/ input type=submit value=Upload! ID=Submit1 NAME=Submit1 /form /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
On Tuesday 28 September 2004 03:54, Mark wrote: With the echos above in place, I get the resource handle, and it echos everything you would expect except that is_dir() fails to recognize the directories. Because is_dir() expects a path to the file as well, otherwise it would be trying to look at $file in it's current working directory (cwd) wherever that may be (most likely not $maildir). It DOES recognize . and .. as directories, for some bizarre reason. Because all directories contain '.' and '..' and hence the cwd of is_dir() would have those. (BTW '.' and '..' ARE directories). -- 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 -- /* QOTD: I looked out my window, and saw Kyle Pettys' car upside down, then I thought 'One of us is in real trouble'. -- Davey Allison, on a 150 m.p.h. crash */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
--- John Nichel [EMAIL PROTECTED] wrote: Chris wrote: if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } It's only adding it to the array if all 3 of those are true. and since $file can't be both '.' and '..' at the same time, it's never matching. I'd do something like: if (is_dir($file) || ($file!=.) || ($file!=..)) continue; That will match everything and anything, files and dot directories... The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or .. Which is the problem I'm having. It's not evaluating anything as a directory, except . and .. = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: problem with file upload script
Someone sent you a link earlier to a php page explaining how to upload files. I think that you will find as you read that page that you are missing SOME HTML in the way you build your form. If in doubt, try to copy and paste from that page exactly to see if it works! DW
Re: [PHP] is_dir on WIndows
--- Jason Wong [EMAIL PROTECTED] wrote: On Tuesday 28 September 2004 03:54, Mark wrote: With the echos above in place, I get the resource handle, and it echos everything you would expect except that is_dir() fails to recognize the directories. Because is_dir() expects a path to the file as well, otherwise it would be trying to look at $file in it's current working directory (cwd) wherever that may be (most likely not $maildir). It DOES recognize . and .. as directories, for some bizarre reason. Because all directories contain '.' and '..' and hence the cwd of is_dir() would have those. (BTW '.' and '..' ARE directories). Perhaps I should have been more precise (I'm sure I should have...) When I echo $file, it echos what I would expect (the names of the files and directories. I guess I need to prefix $file in the is_dir statement with the full path to the file? So like this? $maildir=MERCURY./MAIL; $handle=opendir($maildir); while ($file = readdir($handle)) { if (is_dir($maildir/$file) ($file!=.) ($file!=..)) { $users[]=$file; } } It seems contrary to what's in the help, but I'll try it out. Thanks! Mark = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
Mark wrote: --- John Nichel [EMAIL PROTECTED] wrote: Chris wrote: if (is_dir($file) ($file!=.) ($file!=..)) { $users[]=$file; } It's only adding it to the array if all 3 of those are true. and since $file can't be both '.' and '..' at the same time, it's never matching. I'd do something like: if (is_dir($file) || ($file!=.) || ($file!=..)) continue; That will match everything and anything, files and dot directories... The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or .. Which is the problem I'm having. It's not evaluating anything as a directory, except . and .. Are you giving is_dir() the full path from root to the directory? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: blank emails
But wouldn't that mean that the email that is being sent to my client would be blank as well? Manuel Lemos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, On 09/27/2004 12:27 PM, Jed R. Brubaker wrote: I have run into a problem with my email class. A bunch of reciepients are claiming that they are recieving blank emails. The problem is that I can't replicate the problem. Yet I know there is one, they keep forwarding the blank emails. I am hoping one of you email masters might be able to tell me what I am doing wrong: This looks like one of the mail() function bugs but it is hard to tell what is the problem without more details on which OS and local mailer do you use. Alternatively, you may want to try this message composing and sending class that provides workaround solutions for deliverying message without the problems you are facing: http://www.phpclasses.org/mimemessage -- 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] Website with a Instant Messenger
Hello all, I want to put a instant messenger in a website. People connect to this website to stay in touch with each other. There is a photo album for everyone, a Forum, groups... The IM must work like ICQ, MSN and other, but via web. Users of the site can add other users to the list, and when people log in their status go ONLINE. Then we can open another window and chat, or send a message... Nothing more than that. Where can I start? I have no idea on how to do this... Any help? Thanks, Rics -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
--- Jason Wong [EMAIL PROTECTED] wrote: On Tuesday 28 September 2004 03:54, Mark wrote: With the echos above in place, I get the resource handle, and it echos everything you would expect except that is_dir() fails to recognize the directories. Because is_dir() expects a path to the file as well, otherwise it would be trying to look at $file in it's current working directory (cwd) wherever that may be (most likely not $maildir). It DOES recognize . and .. as directories, for some bizarre reason. Because all directories contain '.' and '..' and hence the cwd of is_dir() would have those. (BTW '.' and '..' ARE directories). Thanks. That worked. Now that I think about it, it makse sense. I should have thought about it first... = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. *** ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is_dir on WIndows
* Thus wrote Mark: I'm having a problem I haven't encountered before. I'm using PHP 4.3.4 (upgrading the 4.3.9, but humor me) on Windows. I'm using the following code snippet to try to get all the subdirectories of a directory into an array. $maildir=MERCURY./MAIL; $handle=opendir($maildir); // echo $handle; while ($file = readdir($handle)) { // echo $file; // echo is_dir($file).BR/; if (is_dir($file) ($file!=.) ($file!=..)) { You need to provide the full path to is_dir(): is_dir($maildir/$file); Otherwise it will simply look for $file relative to where the script was called from. A another way you could do this is: foreach(glob($maildir/*, GLOB_ONLYDIR) as $dirname) { // only use the directory name not the full path. $users[] = substr($dirname, strrpos($dirname, '/')+1); } Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Website with a Instant Messenger
[snip] Where can I start? [/snip] http://www.google.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website with a Instant Messenger
Well, I think everybody starts there, including me! :) I´m searching google... But thanks :) Jay Blanchard [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] [snip] Where can I start? [/snip] http://www.google.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website with a Instant Messenger
On Tuesday 28 September 2004 04:42, Ricardo Cezar wrote: I want to put a instant messenger in a website. People connect to this website to stay in touch with each other. There is a photo album for everyone, a Forum, groups... The IM must work like ICQ, MSN and other, but via web. Users of the site can add other users to the list, and when people log in their status go ONLINE. Then we can open another window and chat, or send a message... Nothing more than that. Is that all? You sure? Where can I start? I have no idea on how to do this... Any help? Hire someone? I would suggest that you search around: sourceforge.net freshmeat.net hotscripts.com and find something suitable. -- 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 -- /* You can't push on a string. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: blank emails
Actually, most of the times I encountered this problem was when I was sending complicated mime email. PlainText emails are built up of headers, and the plaintext message. More complex emails use MIME to seperate multiple things, eg. attachments, different versions of the text (some send both a plaintext version and an HTML one), etc. What hapenned was that when I sent such an email, some clients couldn't handle the way it was built up, and pretended the message was empty, while others worked just fine. So... that might be the problem you're experiencing ;) or not ;) - Tul Jed R. Brubaker wrote: But wouldn't that mean that the email that is being sent to my client would be blank as well? Manuel Lemos [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, On 09/27/2004 12:27 PM, Jed R. Brubaker wrote: I have run into a problem with my email class. A bunch of reciepients are claiming that they are recieving blank emails. The problem is that I can't replicate the problem. Yet I know there is one, they keep forwarding the blank emails. I am hoping one of you email masters might be able to tell me what I am doing wrong: This looks like one of the mail() function bugs but it is hard to tell what is the problem without more details on which OS and local mailer do you use. Alternatively, you may want to try this message composing and sending class that provides workaround solutions for deliverying message without the problems you are facing: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website with a Instant Messenger
Implementing Jabber is probably his best bet. I believe there are a few php based interfaces for it. -Brent - Original Message - From: Jason Wong [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 27, 2004 4:01 PM Subject: Re: [PHP] Website with a Instant Messenger On Tuesday 28 September 2004 04:42, Ricardo Cezar wrote: I want to put a instant messenger in a website. People connect to this website to stay in touch with each other. There is a photo album for everyone, a Forum, groups... The IM must work like ICQ, MSN and other, but via web. Users of the site can add other users to the list, and when people log in their status go ONLINE. Then we can open another window and chat, or send a message... Nothing more than that. Is that all? You sure? Where can I start? I have no idea on how to do this... Any help? Hire someone? I would suggest that you search around: sourceforge.net freshmeat.net hotscripts.com and find something suitable. -- 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 -- /* You can't push on a string. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: blank emails
Hello, On 09/27/2004 05:41 PM, Jed R. Brubaker wrote: But wouldn't that mean that the email that is being sent to my client would be blank as well? It depends on the actual cause of the mails being sent as blanks. The class provides some workarounds to avoid some causes that may lead to your problem. Some times it is a matter of formatting the message headers and body properly. In other cases it is a matter of trying a different delivery method. It is hard to tell because the causes could be too many. What I can tell, is that once you try this class and if you still have the problem, at least I can help you better as I was the one that wrote it and over the years have built many workarounds for situations like yours thanks to the feedback of many users. So, chances are that if you try it, it is unlikely that you face the problem. I have run into a problem with my email class. A bunch of reciepients are claiming that they are recieving blank emails. The problem is that I can't replicate the problem. Yet I know there is one, they keep forwarding the blank emails. I am hoping one of you email masters might be able to tell me what I am doing wrong: This looks like one of the mail() function bugs but it is hard to tell what is the problem without more details on which OS and local mailer do you use. Alternatively, you may want to try this message composing and sending class that provides workaround solutions for deliverying message without the problems you are facing: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website with a Instant Messenger
Hello all, I want to put a instant messenger in a website. People connect to this website to stay in touch with each other. There is a photo album for everyone, a Forum, groups... The IM must work like ICQ, MSN and other, but via web. Users of the site can add other users to the list, and when people log in their status go ONLINE. Then we can open another window and chat, or send a message... Nothing more than that. Where can I start? I have no idea on how to do this... Any help? Here is a good start ?php /* vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2: */ // +--- + // | PHP version ? | // +--- + // | Copyright (c) 2004 | // +--- + // | I want to put a instant messenger in a website. People connect to this | // | website to stay in touch with each other. There is a photo album for | // | everyone, a Forum, groups... | // | | // | The IM must work like ICQ, MSN and other, but via web. Users of | // | the site can add other users to the list, and when people log in their status | // | go ONLINE. Then we can open another window and chat, or send a | // | message... | // +--- + // | Authors: Anyone [EMAIL PROTECTED] | // +--- + // // $Id:$ 0.0.1 /* login here or maybe IM or ICQ or a photo album*/ ? I couldn't resist. Sorry... good luck Jim Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] poor image quality in php
hi! I have a problem with the imagejpeg() function - or related. I must specify that I'm a newbie with image handling with php and that a piece of advice would really help me right now. The deal is that I want to create a (smaller) resized copy of a certain image using this code: $veche = imagecreatefromjpeg($img_large); $noua = imagecreate($wm, $hm); imageinterlace($noua, 1); imageinterlace($veche, 1); imagecopyresized($noua, $veche, 0, 0, 0, 0, $wm, $hm, $size_large[0], $size_large[1]); imagejpeg($noua, $smallPath, 100); ImageDestroy($veche); ImageDestroy($noua); the resizing part goes well; I don't really know what the imageinterlace function does, but I used it in desperation. Why: the output image's quality is visibly inferior to the source's. And I want the image to look good. The source is a jpeg (dinamic). As you probably have noticed, I set the quality parameter to 100, but uselessly. What i'd like to know is whether php can output some quality jpegs, and if so, then how? Thanks a lot! PS: imagecopyresampled does not work either - produces the same result! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What do I need in order to validate XMl against an XSD using php?
On Mon, 27 Sep 2004 11:15:23 -0500, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Are their any specific php extensions or modules that I'd need in order to do something like this very easily? You need PHP 5 and preferably the latest libxml2 release. The dom extension of PHP 5 has XSD Schema Validation built in. chregu Thanks, Brent This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] poor image quality in php
hi! I have a problem with the imagejpeg() function - or related. I must specify that I'm a newbie with image handling with php and that a piece of advice would really help me right now. The deal is that I want to create a (smaller) resized copy of a certain image using this code: $veche = imagecreatefromjpeg($img_large); $noua = imagecreate($wm, $hm); imageinterlace($noua, 1); imageinterlace($veche, 1); imagecopyresized($noua, $veche, 0, 0, 0, 0, $wm, $hm, $size_large[0], $size_large[1]); imagejpeg($noua, $smallPath, 100); ImageDestroy($veche); ImageDestroy($noua); the resizing part goes well; I don't really know what the imageinterlace function does, but I used it in desperation. Why: the output image's quality is visibly inferior to the source's. And I want the image to look good. The source is a jpeg (dinamic). As you probably have noticed, I set the quality parameter to 100, but uselessly. What i'd like to know is whether php can output some quality jpegs, and if so, then how? Thanks a lot! PS: imagecopyresampled does not work either - produces the same result! When you create the new image try using imagecreatetruecolor() http://us2.php.net/manual/en/function.imagecreatetruecolor.php JIm Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] poor image quality in php
Mike wrote: hi! I have a problem with the imagejpeg() function - or related. I must specify that I'm a newbie with image handling with php and that a piece of advice would really help me right now. The deal is that I want to create a (smaller) resized copy of a certain image using this code: $veche = imagecreatefromjpeg($img_large); $noua = imagecreate($wm, $hm); use imagecreatetruecolor() imageinterlace($noua, 1); imageinterlace($veche, 1); imagecopyresized($noua, $veche, 0, 0, 0, 0, $wm, $hm, $size_large[0], $size_large[1]); and here imagecopyresampled() imagejpeg($noua, $smallPath, 100); ImageDestroy($veche); ImageDestroy($noua); the resizing part goes well; I don't really know what the imageinterlace function does, but I used it in desperation. Why: the output image's quality is visibly inferior to the source's. And I want the image to look good. The source is a jpeg (dinamic). As you probably have noticed, I set the quality parameter to 100, but uselessly. What i'd like to know is whether php can output some quality jpegs, and if so, then how? Thanks a lot! PS: imagecopyresampled does not work either - produces the same result! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cross-compile PHP
Has anybody gained general experience with crosscompling PHP? I want to run PHP on an axis devboard82 in combination with sqlite. The crosscompiler is gcc-cris (cris-dist-1.56). I appreciate any feedback, thanks, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cross-compile PHP
Has anybody gained general experience with crosscompling PHP? I want to run PHP on an axis devboard82 in combination with sqlite. The crosscompiler is gcc-cris (cris-dist-1.56). I appreciate any feedback, thanks, Daniel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Images in PHP and MySQL
I was wondering how to get images into and out of a Mysql database with in php... I do not have anything in my book... but was told it was possible. I have PHP 4.3.4 and mysql 4.0.18 Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Counter?
On Mon, 27 Sep 2004 11:29:34 +0200, Nick Wilson [EMAIL PROTECTED] wrote: * and then raditha dissanayake declared These counters are pretty much useless at gauging web traffic. you would be better off using log analysis tool. Who said anything about web traffic? ;-) which in turn means your mail wasn't detailed enough. :-) Nice try. But come one mate, you just *assumed* - you dont have to know the purpose of the script to anwser the question... It does tend to be rather helpful. I have no clue what you're trying to do, which makes it hard to help you do it. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Images in PHP and MySQL
I don't. I have used it on several projects. One caveat I would offer is that this is much slower than one might think. Three possible advantages come from using this approach: 1) there is no need to fiddle with directory permissions to write images. 2) if the content is sensitive you have the added security of the database password (and the fact that the database is ususally not directly accessible). 3) a mysqldump gives a backup of all images along with other persistent data Other disadvantages follow: 1) excessive load on the server for loading each image 2) the load mentioned above causes a slow down in the script 3) images usually need to be written to file before using GD for manipulation, inclusion in PDFs, etc. I have found that when I decide to store image data in the database I will usually also store a copy of the image on the server (as a file) also, primarily for performance reasons. - Original Message - From: GH [EMAIL PROTECTED] To: Daniel Watrous [EMAIL PROTECTED] Cc: GH [EMAIL PROTECTED] Sent: Monday, September 27, 2004 4:31 PM Subject: Re: [PHP] Images in PHP and MySQL Do you know of a good tutorial on this topic. On Mon, 27 Sep 2004 16:25:15 -0600, Daniel Watrous [EMAIL PROTECTED] wrote: consider using a blob field type. you will need to prepare your data on the way in, but not on the way out of DB: $content = addslashes(fread(fopen($_FILES[imgb_sizedesc][tmp_name], r), filesize($_FILES[imgb_sizedesc][tmp_name]))); then instert $content into your DB using insert! - Original Message - From: GH [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, September 27, 2004 4:19 PM Subject: [PHP] Images in PHP and MySQL I was wondering how to get images into and out of a Mysql database with in php... I do not have anything in my book... but was told it was possible. I have PHP 4.3.4 and mysql 4.0.18 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
RE: [PHP] Images in PHP and MySQL
I'm no certified expert, but preference would be storing a URL to an image in the database rather than the image itself. If however you do want to store them in the db try using a blob column type. This article is PHP3 but shows the basics: http://www.phpbuilder.com/columns/florian19991014.php3 HTH Graham -Original Message- From: GH [mailto:[EMAIL PROTECTED] Sent: 27 September 2004 23:19 To: php-general Subject: [PHP] Images in PHP and MySQL I was wondering how to get images into and out of a Mysql database with in php... I do not have anything in my book... but was told it was possible. I have PHP 4.3.4 and mysql 4.0.18 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
Re: [PHP] Images in PHP and MySQL
I hope that there are others out there that could weigh in on this topic please The more information and perspective I have the better as it would help me build the most informed decision as posible. On Mon, 27 Sep 2004 23:49:33 +0100, Graham Cossey [EMAIL PROTECTED] wrote: I'm no certified expert, but preference would be storing a URL to an image in the database rather than the image itself. If however you do want to store them in the db try using a blob column type. This article is PHP3 but shows the basics: http://www.phpbuilder.com/columns/florian19991014.php3 HTH Graham -Original Message- From: GH [mailto:[EMAIL PROTECTED] Sent: 27 September 2004 23:19 To: php-general Subject: [PHP] Images in PHP and MySQL I was wondering how to get images into and out of a Mysql database with in php... I do not have anything in my book... but was told it was possible. I have PHP 4.3.4 and mysql 4.0.18 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
Re: [PHP] is_dir on WIndows
John Nichel wrote: Chris wrote: if (is_dir($file) || ($file!=.) || ($file!=..)) continue; That will match everything and anything, files and dot directories... The first statement by the OP should work fine. All three will eval to true if it is a directory, and the directory isn't . or .. Heh, you're right. I knew I didn't spend enough time on that answer... What I * should* have said was something like: while($file = readdir($handle)) { if ('.' == $file || '..' == $file) continue; if(is_dir($handle.'\\'.$file)) $users[] = $file; } That will work, but it appears you've already sorted the issue out, despite my help. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Images in PHP and MySQL
1) there is no need to fiddle with directory permissions to write images. 2) if the content is sensitive you have the added security of the database password (and the fact that the database is ususally not directly accessible). 3) a mysqldump gives a backup of all images along with other persistent data Other disadvantages follow: 1) excessive load on the server for loading each image 2) the load mentioned above causes a slow down in the script 3) images usually need to be written to file before using GD for manipulation, inclusion in PDFs, etc. That's a very good list. I just wanted to pipe in on this one thing: 3) images usually need to be written to file before using GD for manipulation, inclusion in PDFs, etc. There is actually a function for this: imagecreatefromstring() I'll don't want to touch the rest of this topic though. :-) Jim Grill -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mass Mailing Using PHP
Quoting Manuel Lemos [EMAIL PROTECTED]: Just let me know which OS and local mailer (Sendmail, qmail, postfix, exim, MS IIS, Exchange, etc..) do you use so I can advise. What do you recommend for Linux and qmail combination ? Please advise. -- roger --- Sign Up for free Email at http://ureg.home.net.my/ --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Website with a Instant Messenger
Ricardo Cezar wrote: Hello all, I want to put a instant messenger in a website. People connect to this website to stay in touch with each other. There is a photo album for everyone, a Forum, groups... The IM must work like ICQ, MSN and other, but via web. Users of the site can add other users to the list, and when people log in their status go ONLINE. Then we can open another window and chat, or send a message... Strange as it may seem. This is not asking too much. Jabber (http://www.jabber.org) can do all that. You will even find a couple of PHP classes to talk to a jabber server. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: problem with file upload script
AMC wrote: Hi, I changed the script to upload to a different directory but it still doesn't work, any ideas? I really appreciate the help. You are not the first person to run into problems with file uploads. Quite a few of those who managed to overcome them posted their finding at the link that Jay has sent. It seems obvious that you have not read it. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: problem with file upload script
I did read this and it did not resolve the problem Raditha Dissanayake [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] AMC wrote: Hi, I changed the script to upload to a different directory but it still doesn't work, any ideas? I really appreciate the help. You are not the first person to run into problems with file uploads. Quite a few of those who managed to overcome them posted their finding at the link that Jay has sent. It seems obvious that you have not read it. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mass Mailing Using PHP
Hello, On 09/27/2004 09:02 PM, Roger Thomas wrote: Just let me know which OS and local mailer (Sendmail, qmail, postfix, exim, MS IIS, Exchange, etc..) do you use so I can advise. What do you recommend for Linux and qmail combination ? Please advise. Under Linux qmail or postfix are just fine. You can use the mail function and it will use qmail. You may just need to tune qmail to maximize the number of simultaneous deliveries according to the available bandwidth. Just keep in mind that qmail will queue every message that it receives, either from local clients or incoming via SMTP. This means that your incoming and outgoing messages will compete in the same queue. If you have urgent messages to send or receive, these may be delayed during deliveries to many recipients. For this reason, during deliveries of messages to many recipients, it is better to pause once in a while to let the queue be fully processed and do not stall other programs. -- 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] submit to a remote form without the use of curl?? Is it possible?
Is it possible with php to submit to a remote form without the use of curl? I am developing an application on a hosting server that does not have curl available and I need to submit some values to a remote form. Anybody ever do something like this without the use of curl? Thanks, Brent This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
[EMAIL PROTECTED] wrote: Is it possible with php to submit to a remote form without the use of curl? I am developing an application on a hosting server that does not have curl available and I need to submit some values to a remote form. Anybody ever do something like this without the use of curl? It's quite possible you can use fsockopen() to do this manually (RFC 2616) or you can make use of any of the classes available for free. in some platforms you might find the POST binary which makes things a lot easier. Thanks, Brent This message was sent using IMP, the Internet Messaging Program. -- Raditha Dissanayake. http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
* Thus wrote [EMAIL PROTECTED]: Is it possible with php to submit to a remote form without the use of curl? I'm assuming you want to POST a form verses a GET, since you can easily do a GET form submission like: $fp = fopen('http://domain.com/?get=var', 'r'); in PHP5 you can accomplish this using the new zcontext parameter: $postdata = 'foo=bar'; $contextConf = array( 'http' = array ( 'method' = 'POST', 'header' = Content-Length: . strlen($postdata) . \r\n, 'content' = $postdata ), ); $zcontext = stream_context_create($contextConf); $fp = fopen('http://domain.com/', 'r', $zcontext); Curt -- The above comments may offend you. flame at will. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] submit to a remote form without the use of curl?? Is it possible?
--- [EMAIL PROTECTED] wrote: Is it possible with php to submit to a remote form without the use of curl? You can use fsockopen: http://shiflett.org/hacks/php/http_post If your version of PHP supports streams, you can use streams: http://shiflett.org/hacks/php/streams_post Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly HTTP Developer's Handbook - Sams Coming December 2004http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php