Re: [PHP] Reading mime attachments into a rdbms
I did a bit of research on the same subject a couple months back for an upcomming project. I still have not gotten to it so wont have to many specifics for you, but what I would recommend is NOT using php for this task. I would say your best bet, assuming a unix install, is to use procmail to filter mail and remove attachments to a given directory. Procmail will need help from something like metamail to decode the attachment and save it. Then have PHP do the work of putting the file into the DB. Just my 2 cents. Mattias Segerdahl wrote: Good morning, I've been trying to find out how to use IMAP to read attachments from the MIME E-Mail and save them on the filesystem and later transfer them into a RDBMS, the problem I have at the moment is that I have no clue what so ever how to do this, I've tried using imap_headerinfo and other imap_command to check if anything show up in the given ARRAY or OBJECT that will show that the mail contains an attachment. But I havn't been able to do this so far. I bet there are hundreds of you out there that probably has done that same thing that could help me and guide me to what I should look for, this is in a bit of a hurry. And since I've been trying to solve this problem myself and tried not to bother the list with this, I really do need the help now. So, if anyone could spare a few minutes of their time and give me some guidelines, I would really love it. I know that I should look for #$message .= (Content-Disposition: attachment; filename=) in some way, but I don't know how, or where to go from there. Thanks in advance, // Mattias -- 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] -- Larry Hotchkiss Universal Capital 612-551-9309 http://www.unicap.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] --enable-trans-sid and forms
Its my understanding that PHP appends the SID on the end of the URL regardless of weather its a form or not. If thats not happening for you, check your php.ini and make sure you have session.use_trans_sid enabled. Boget, Chris wrote: If you have PHP compiled with --enable-trans-sid, are the URLs that are part of the form's action supposed to be modified to include the SID? So far that's not been happening and I just want to verify that this is expected behavior. thnx, Chris -- Larry Hotchkiss Universal Capital 612-551-9309 http://www.unicap.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] update form design question.
Basically I am just trolling for some thoughts on how others may accomplish this task. I have a mysql database. In the database I of course have records. These records have a date field and after so many days I have a script to delete old records. Now, there are often times when a user will want to refresh one or more records and also delete one or more as well and possibly not do anything to other records. My initial thought was to have thier records displayed with 2 checkboxes, one to check to delete the record and one to check to refresh(renew the record by setting the date field to the current date). Not checking either will simply do nothing to the record in question. Most users will have anywhere from 50 to 3000 records and 3k records would be a little unwieldy to display on one page which brought up a concern for how to handle the processing of the previous page of records when you head to the next. Should I update the DB as I move to the next page or perhaps after all pages are viewed? Anyways, any thoughts, ideas and or suggestions are all welcome. -- Larry H -- 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] PHP Sessions Problem
Thats very interesting. I normally use Netscape 4.7 myself, I find 6 to be a resource hog and just plain slow. I tried your site and as you pointed out, with 4.7 the registered var does not show. Yet, when I fire up IE all works fine. I guess what I find strange is that I am using sessions on a site I am working on right now. I have cookies off since I was getting strange behavior depending on OS and browser so I opted just to pass SID with URL as well. I register a handfull of session vars and on my site everything works fine with all the browsers (4.7 included). Luke Muszkiewicz wrote: Hey Folks: I am using PHP sessions in IE 5.5 and NN 6 successfully, but I am not able to retrieve the data from my registered variables in Communicator 4.7. I am passing the session ID via SID and have turned off cookies in each browser to simplify testing, although Communicator 4.7 doesn't work with cookies enabled either. Research shows that with Communicator 4.7 the session ID is being carried from one page to the next successfully; however, the registered variables are not. Outside of the page where they are set and registered, they are not registered nor set even though the session ID is carried successfully. session.save_path is set to /tmp. When I start a session in Communicator 4.7, the session file is created in /tmp but it contains no data. When using IE 5.5 or NN 6, the session file does contain the serialized data for the registered variables, and everything works as it should. So, it looks like the problem is that in Communicator 4.7, the serialized data is not being successfully written to the session file in /tmp. Has anyone dealt with this problem? -- 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] regex and mysql - looking for opinions.
Im working on a site utilizing apaches/mysqp and of course php. Im working through the basic framwork creating forms to collect user input and do various searches etc. I was curious as to what most people find the best way keep thier mysql queries from getting messed up by user entered data. None of my searches or database data has or needs any sort of punctuation, so I was thinking of striping it all out from form input. What method is everyone else using? -- Larry H. -- 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] PHP and Double?
There are prolly a few ways to do it, using split() may be easiest. Jason Caldwell wrote: how can i separate the digits in a Double number? for example: if i have 3.2 i would like to separate the digits into 3 and 2 and assign each to its own variable, like so numb1 = 3 numb2 = 2 thanks. 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] -- Larry Hotchkiss Universal Capital 612-551-9309 http://www.unicap.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] php sessions and proxies.
Here is the scenario. I have a pure html form where a user login and pass is gathered and sent to a php script via the post method. The php script authenticates against a DB starts a session and uses the header function to send a header with the sessionid back to the browser. Everything works fine and as expected with one catch. While testing, I have accessed the site through a few different proxies. Through an AS/400 proxie, everything is fine. Through another NT proxie everything is fine, but when I try and access it through a novel proxy something falls apart. I am assuming that the data is reaching the script fine since other forms can be posted through the proxie. I am thinking the proxie is screwing up the returned header with the session id attached. Has anyone else encountered this phenomenon before? -- Larry H -- 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] php 4.04pl 1-3 for red hat 7
I treid running configure with all the current config options. First time through it puked at apxs so, after a little research, installed the apache devel rpm to get apxs. Configure was chugging right along but failed. It got pased system checks, started "configuring extensions" and then failed. It reported "cannot find necessary header files". I am sure I just need some devel software installed or have an incorrect path, but what is the best way to figure out which header is missing or not pathed? Larry Hotchkiss wrote: Thanks. I just grabbed the source and am looking over it. The way the red hat RPM is configed is perfect for me except for the exclusion of enable-trans-sid. Am I correct in assuming in addition to using --enable-trans-sid that I should also use the current config options displayed by phpinfo() ? Larry H. "..s.c.o.t.t.. [gts]" wrote: snip.. (replace php. with whatever the PHP tarball is named) at the prompt (you dont need to be root) type: tar xvfz php.tar.gz cd php. ./configure --enable-trans-sid make make test if you didnt get any errors, then (as root) type: make install snip... -- 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] sessions and javascript.
Running linux RH 7, apache and php 4.04 as a module. I have a web pagewith an image that is chopped up and regrouped into a table. There are a few spots on the image that link (a href="") to other pages and I use some javascript for rollovers. Now, within the table, I have two input fields and I have another word which is part of the larger image that the user clicks to submit the form. This is done with input type="image" src="xxx". The image can be clicked which in turn calls a login script, if the form data is found in the database a session is started and a few session vars are registered. The SID is passed along with the URL and everything works fine. My sticking spot is that I would like the image that is used as the "submit" button for the form to also use "MouseOver". In my above outline, the image works fine as a submit button, but I am afraid people may not think to click there to submit thier login info. I tried the following javascript to the form page which gives me my "mouseOver" functionality but thats where it stops. SCRIPT LANGUAGE="Javascript" function sub() { document.mainlogin.submit(); } /SCRIPT .. a href="javascript: sub()" onMouseOver="if(document.images) document.logo211.src='5x2over.gif';" onMouseOut="if(document.images) document.logo211.src='5x2.gif';"img SRC="5x2.gif" NAME="logo211" BORDER=0 height=20 width=79/a My login script creates a session and then uses header()(and I append the SID) to forward the user to the main page where I again issue "session_start" to continue the session. In the browser, after pressing the submit image it just stays there, but on the server I am having two sessions created. I presume one for the loging script and another when session_start is called on the main page. One session contains the appropriate registered vars but apparently the SID is not being passed from the login script to the main page. The only thing I have played with is the form, not the login script or the main page. When I dont use javascript for submitting the form everything works fine, yet when I implement javascript to submit the form it ceases to function. Anyone have any ideas? -- Larry Hotchkiss -- 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] php 4.04pl 1-3 for red hat 7
Thanks. I just grabbed the source and am looking over it. The way the red hat RPM is configed is perfect for me except for the exclusion of enable-trans-sid. Am I correct in assuming in addition to using --enable-trans-sid that I should also use the current config options displayed by phpinfo() ? Larry H. "..s.c.o.t.t.. [gts]" wrote: snip.. (replace php. with whatever the PHP tarball is named) at the prompt (you dont need to be root) type: tar xvfz php.tar.gz cd php. ./configure --enable-trans-sid make make test if you didnt get any errors, then (as root) type: make install snip... -- 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] php 4.04pl 1-3 for red hat 7
Ok, I am working on a site where I would like to use sessions but NOT cookies. I would also like to have the sessions automatically appended to URL but I have a few questions. The current php rpm distribution was not compiled with --enable-trans-sid (according to phpinfo.php), am I correct in assuming I need to recompile? If that is the case, can someone recommend a good "how-to" to walk me through it. I have no experience with compiling at all. -- Larry H -- 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] cancel 3A79D543.779F9F37@unicap.com
This message was cancelled from within Mozilla. -- 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] imap (nntp) message tracking
Can anyone recommend a good (eficient) way of tracking downloaded (read) messages from a nntp server? I would like to run a script to retrieve a couple news groups and archive them, but I am unsure as to the best method of tracking which messages I have. I will likely be storing messages in mysql databse and I am using php4. I have been playing with a little code and can retrieve a list of messages as well as the headers/body etc, I am just unsure how to track message status. ANyone have any ideas? -- Larry Hotchkiss -- 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] connecting to AS400 DB2
Its my understanding that you use the odbc functions to access db/2 400. I also recall reading that the db2/400 functionality is true db2 functionality and does not use the generic odbc layer even though it is grouped in. Apparently its smart enough to know. Depending on where you got your windows ver of php, you should just be able to uncomment the line in your php.ini so it can use odbc and make sure the extension path is set correctly. -- Larry Hotchkiss "Conover, Ryan" wrote: I was wondering if anyone as successfully pulled info from a DB2 Database on As400. My enviroment is Win2K server/php4.0.4/ZendOptimizer/IIS5. I was wondering how I could directly query the AS400. Or would it be wiser to pull the info from the AS400 into MSSQL Server. I was wondering how I would do either of these options. Ryan Conover -- 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] PHP_SELF - silly question
Im a little brain fried today and I have a silly question. I have a script (imagine that huh?) that I want to pull some code out of and put in a function that is contained in a seperate file. The function however inlcudes some lines with $PHP_SELF in a link (a href). When I remove the code from the running script and include it in a function file seperate from the script the function works fine as far as generating links etc, but when the link that includes $PHP_SELF is selected, the file of the running script is not passed. So in other words, when I have my function code in my running script, it generates some links that limit a query on a mysql database and pass data to PHP_SELF, the passed URL looks like this (for example): http://69.02.217.123/php4/php.exe/searchitem.php?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+offset=100numpage=3 But, when I move the code to create the links externally into a function, the link I end up with is like this: http://69.02.217.123/?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+offset=100numpage=3 Can someone shed some light on the best way to handle this? -- Larry H. -- 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] PHP_SELF - silly question
Yep, thats it, I knew it was a stupid question. I already had a few globals assigned in the function, dont know why I didnt think to ad PHP_SELF as well. Thanks. Krznaric Michael wrote: You may have to declare PHP_SELF as global. Take a look at http://www.php.net/manual/en/language.variables.scope.php Mike -Original Message- From: Larry Hotchkiss [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 23, 2001 12:21 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP_SELF - silly question Im a little brain fried today and I have a silly question. I have a script (imagine that huh?) that I want to pull some code out of and put in a function that is contained in a seperate file. The function however inlcudes some lines with $PHP_SELF in a link (a href). When I remove the code from the running script and include it in a function file seperate from the script the function works fine as far as generating links etc, but when the link that includes $PHP_SELF is selected, the file of the running script is not passed. So in other words, when I have my function code in my running script, it generates some links that limit a query on a mysql database and pass data to PHP_SELF, the passed URL looks like this (for example): http://69.02.217.123/php4/php.exe/searchitem.php?sql=SELECT+%2A+FROM+items+W HERE+LCASE%28partnumber%29+LIKE+%27x%25%27+ORDER+BY+partnumber+offset=100n umpage=3 But, when I move the code to create the links externally into a function, the link I end up with is like this: http://69.02.217.123/?sql=SELECT+%2A+FROM+items+WHERE+LCASE%28partnumber%29+ LIKE+%27x%25%27+ORDER+BY+partnumber+offset=100numpage=3 Can someone shed some light on the best way to handle this? -- Larry H. -- 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] mysql index (semi ot)
I am developing a site with php, apache and mysql. The database will have likely 250k to 500k records at most, but the data will be changing often. New records will be constantly added and old ones removed. I am pretty new to DB's and was wondering what is the best way to keep the indexes tight and clean? How do others handle this type of scenario? Could I run a reindex or something from a cron job? Thanks for any input. - Larry Hotchkiss -- 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]