[PHP] Parsing RSS
Hi to all Does anyone know of any good books or online tutorials on parsing RSS feeds with PHP (or parsing XML in general in PHP)? Tom Malone Web Designer http://www.tom-malone.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 and XML
Can anyone recommend a good book on XML, maybe from a PHP perspective? Tom Malone -- 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 - create user?
Is there a way to create a new user with an email address on my mail server (for a web mail app i'm writing) using an IMAP or some other PHP function? Tom Malone Web Designer http://www.tom-malone.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] Re: code check
I do have the little script active on my website - http://www.tom-malone.com. I don't know anyone who has a mac though. Isn't there a site somewhere that allows you to view what your site looks like in other browsers/OSs? I've searched but can't find one. Or perhaps some kind mac user on the list would view source on it to determine if it worked by checking the font tags for face=geneva? I could compensate you by being extremely nice to you for the rest of your life... =) Tom Malone Web Designer http://www.tom-malone.com -Original Message- From: Gabe da Silveira [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 23, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: code check Perhaps you could put it on a webpage and ask a Mac user to see if it works. BTW, there is no reason to use preg_match for that. Instead use strpos(), it is MUCH faster. In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Tom Malone) wrote: Sorry to bother you all with this, but I have no way to test this, as I have no access to a Mac. Could you tell me if this little piece of code looks as if it would work (detect whether someone's using the Mac OS)? if (preg_match(/mac/i, $HTTP_USER_AGENT) || preg_match(/macintosh/i, $HTTP_USER_AGENT) || preg_match(/ppc/i, $HTTP_USER_AGENT) || preg_match(/PowerPC/i, $HTTP_USER_AGENT)): $basefont = Geneva; else: $basefont = Verdana, Helvetica, Serif; endif; It doesn't return an error, but that doesn't mean it works. I really appreciate your help. TIA Tom Malone Web Designer http://www.tom-malone.com -- __ Gabe da Silveira, Web Designer Twin Cities Student Unions University of Minnesota http://www.coffman.umn.edu wFone: (612)624-7270 eMail: [EMAIL PROTECTED] hPage: http://www.visi.com/~jiblet -- 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] code check
Sorry to bother you all with this, but I have no way to test this, as I have no access to a Mac. Could you tell me if this little piece of code looks as if it would work (detect whether someone's using the Mac OS)? if (preg_match(/mac/i, $HTTP_USER_AGENT) || preg_match(/macintosh/i, $HTTP_USER_AGENT) || preg_match(/ppc/i, $HTTP_USER_AGENT) || preg_match(/PowerPC/i, $HTTP_USER_AGENT)): $basefont = Geneva; else: $basefont = Verdana, Helvetica, Serif; endif; It doesn't return an error, but that doesn't mean it works. I really appreciate your help. TIA Tom Malone Web Designer http://www.tom-malone.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] Fwd: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability
This is not an issue if you're site is using Apache, correct? Tom Malone Web Designer http://www.tom-malone.com -Original Message- From: Kurth Bemis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 11:13 AM To: [EMAIL PROTECTED] Subject: [PHP] Fwd: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability Thought this may be of interest to somebody. ~kurth Delivered-To: [EMAIL PROTECTED] Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm List-Id: vuln-dev.list-id.securityfocus.com List-Post: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Delivered-To: moderator for [EMAIL PROTECTED] From: acz [iSecureLabs] [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability Date: Wed, 22 Aug 2001 11:11:28 +0200 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal -- [ iSecureLabs BadBlue v1.02 beta for Windows 98, ME and 2000 Advisory ] -- BadBlue v1.02 beta for Windows 98, ME and 2000 .php Source Code Disclosure Vulnerability Problem discovered: 22/08/2001 -- [ Overview ] -- BadBlue http://badblue.com/ is a tiny, free download that lets you share files, search other PCs and even run powerful web applications. Badblue support .php extension. It is possible to retrieve full .php source code. -- [ Description ] -- Badblue contains an input validation vulnerability which may lead to download the full source code of .php pages. This is due to a lack of checks for NULL bytes. Exemple: http://myBadBlue.com/test.php%00 Note: It is possible too to download .dll file used by BadBlue. Exmeple: http://myBadBlue.com/ext.dll%00 -- [ Tested Version ] -- BadBlue v1.02 beta for Windows 98, ME and 2000 -- [ Discovered by ] -- Cabezon Aurelien | [EMAIL PROTECTED] http://www.iSecureLabs.com | French Security portal http://www.isecurelabs.com/advisory/badblue.html -- 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] Dnsquery
I don't know if this will be helpful or not - I found it in the manual: [EMAIL PROTECTED] 25-Oct-2000 03:16 system() function doesn't return a string value, if you want to assign the output of a system command, try using: $a = `/bin/ls -a`; note the ` is a backtick, not a single quote Tom Malone Web Designer http://www.tom-malone.com -Original Message- From: J.Mueller, pro.vider.de GmbH [mailto:[EMAIL PROTECTED]] Sent: Friday, August 17, 2001 4:29 AM To: '[EMAIL PROTECTED]' Subject: [PHP] Dnsquery Hello, I've tried to execute the system function dnsquery, which works fine from a shell: % dnsquery -h domain.net ;; -HEADER- opcode: QUERY, status: NOERROR, id: 61611 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; domain.net, type = ANY, class = IN domain.net. 2D IN NSNS2.domain.net. domain.net. 2D IN NSNS1.domain.net. domain.net. 2D IN NSNS2.domain.net. domain.net. 2D IN NSNS1.domain.net. NS2.domain.net. 2D IN A 198.182.225.2 NS1.domain.net. 2D IN A 204.107.140.2 but not with PHP-functions, e.g. system(dnsquery -h domain.net); exec(dnsquery -h domain.net); There is no output at all. I'm using FreeBSD 4.2 Server, Apache 1.3.11, PHP 4.04 Does anyone have an idea how I can get this work? Thanks very much. Juergen -- 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] Large sites that use PHP
how about ScreamingMedia http://www.screamingmedia.com Tom Malone Web Designer http://www.tom-malone.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 on client-side
Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources? Tom Malone Web Designer http://www.tom-malone.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] PHP on client-side
I don't think PHP-GTK does that, does it? Tom Malone Web Designer http://www.tom-malone.com -Original Message- From: Bruin, Bolke de [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 8:22 AM To: '[EMAIL PROTECTED]'; PHP Users Subject: RE: [PHP] PHP on client-side Euhum what about PHPGTK? Bolke -Oorspronkelijk bericht- Van: Tom Malone [mailto:[EMAIL PROTECTED]] Verzonden: Thursday, August 16, 2001 2:13 PM Aan: PHP Users Onderwerp: [PHP] PHP on client-side Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources? Tom Malone Web Designer http://www.tom-malone.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 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 on client-side
Do you think it's feasible to do that? Has anyone discussed it before? Are there any initiatives? Tom Malone Web Designer http://www.tom-malone.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Pavel Jartsev Sent: Thursday, August 16, 2001 10:08 AM To: Tom Malone Subject: Re: [PHP] PHP on client-side Tom Malone wrote: I read the introduction to PHP-GTK at http://conf.php.net What I am talking about is the potential to use PHP in the browser, like JavaScript, for functions similar to what JavaScript and VBScript are used for. In each tag could be an attribute set to whether the PHP code contained inside is supposed to run at the server or at the client. This is not the same thing as PHP-GTK, is it? Yep, it's not. I misunderstood your question. Sorry. -- Pavel a.k.a. Papi -- 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] Putting Include files outside of document root
I know this will sound like a dumb question to most, but I am new to *nix OS's - If my document root is something like /home/myname/dir/ (as per phpinfo()), and I put my include files in /home/myname/includes/, is that actually outside of the document root, or is anything under /home/myname/ actually the document root? Tom Malone Web Designer http://www.tom-malone.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 on client-side
Wouldn't it be nice if there was a way develop client-side (browser-based) applications for PHP? I see so many posts about using PHP to interact with JavaScript - wouldn't it be cool if you could just tell your PHP code where to run - server or client (similar to what ASP does with VBScript)? I know I can't be the first person to think about this, but I've searched and can't find anything about it. Any ideas/suggestions/resources? Tom Malone Web Designer http://www.tom-malone.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] Re: Attitude of B van Ouwerkerk
I have to agree with Phil and Mr. van Ouwerkerk. I am a newbie too, and while we may miss things in the manual that are obvious to more experienced programmers, or ask questions that have been asked and answered in the list over and over again (guilty here!), I believe an attempt should at least be made to find the answer before asking the experts in the mailing list. Newbies like myself should remember that most people who are subscribed to this list are very busy with work and projects and are being quite generous to contribute free advice to those of us who are less knowledgeable. Here are some useful resources I turn to when I'm seeking a PHP-related answer: www.phpbuilder.com www.webreference.com www.webmonkey.com www.devshed.com www.weberdev.com Tom Malone http://www.tom-malone.com On Tuesday 31 July 2001 3:05, you wrote: I've just looked at his emails for the last week, and he is a helpful guy! Not only is he helpful, I'll wager he's being helpful in a language that's not his native tongue, so it's utterly unreasonable to expect the subtle 'gentle' idioms that you might get from a native speaker who had plenty of time to construct an email, and plenty of patience for someone who should have RTFM. I say, be grateful he is sparing some time to contribute! -- 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] Apache/phpinfo
How can you tell if your host has PHP installed as mod_php or in CGI mode on the webserver (Apache in my case)? Is it in phpinfo.php? If so, where - I couldn't find it... Thanks Tom Malone -- 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] Prevent user to close web browser
I am almost positive this is not possible with JavaScript or even VBScript. It might be possible with Visual Basic, but again - why would you want to do that? Tom -Original Message- From: kath [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 19, 2001 8:39 AM To: Mihailo Dzigurski Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Prevent user to close web browser Not with PHP. Maybe some Javascript could. But why would you want this? Planning some infinite spawning pop up website? =) - k On Thursday 19 July 2001 08:28 am, you wrote: Hello, I need to prevent user to close the web browser on close button or by pressing ALT+F4. Is this possible? Thanks, Mihailo. _ Do You Yahoo!? Get your free @yahoo.com address at http://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 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] encryption
Hello! I have a small problem. On my website there is some information I would like to protect. Right now I am using .htaccess to password-protect the directory, but I was thinking about using php and a form with usernames/passwords in a MySQL database. Thankfully, I read the following in the manual right before I was about to use the crypt() function to encrypt my password and compare it to the encrypted hash in the DB: It seems that a lot of people don't understand the point of using one-way encryption. More importantly, a lot of web designers forget that PHP encryption is done entirely on the web server, not the client. Point being, if your form has a password input option and the user clicks SUBMIT, the password is then sent _as plain text_ over the Internet to the web server where it is then encrypted for comparison against a password database. Do _not_ use these types of functions to add security to a form unless you're using an SSL or TLS (etc.) encrypted session. The only potential way around this issue is for you to write a JavaScript program that does the hashing on the client side before being sent over the Internet (which would make this function unnecessary). I am pretty new to PHP and absolutely clueless as far as encryption/algorithims are concerned. Could anyone possibly point me to a viable solution for this problem? Thanks in advance! Tom Malone -- 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] encryption
I guess I should clarify - I'm just making a login for myself for the admin section of my website, so I only need to be able to protect my own password. I'm not sure if that information if helpful at all, but I haven't been able to figure out how to do it. Tom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 19, 2001 3:21 PM To: Sheridan Saint-Michel Cc: php-general Subject: Re: [PHP] encryption Ahh, well then, another solution could be to use SSL, depends on your application weather you can get away with using an unsigned certificate (free) or weather you will need to pay a company like verisign to prove your identity. With an unsigned certificate the browser will warn the user that the certificate says it's you, but it's not proven by a CA so it might not be you. The JavaScript MD5 tenique is an interesting way of doing it, but i don't think it's any more secure. If a hacker sniffs the md5 hash how is that any diffrent than him sniffing a plain text password? You're comparing hashes, so as long as he has the hash he's in. On Thu, Jul 19, 2001 at 01:58:43PM -0500, Sheridan Saint-Michel wrote: The problem he is addressing is that the password is sent plaintext to the server before it ever gets to MySQL. I would suggest using a JavaScript program like this http://pajhome.org.uk/crypt/md5/md5src.html and then using the PHP md5 function on the server side and comparing the two results. That way the only thing that ever gets transmitted is an md5 hash =P Sheridan - Original Message - From: Jeff Bearer [EMAIL PROTECTED] To: Tom Malone [EMAIL PROTECTED] Cc: PHP Users [EMAIL PROTECTED] Sent: Thursday, July 19, 2001 12:17 PM Subject: Re: [PHP] encryption I'd use the password function in mysql to store encrypted passwords, I'd be interested to hear if anyone has a reason that doing this is not a good idea. On Thu, Jul 19, 2001 at 12:52:55PM -0400, Tom Malone wrote: Hello! I have a small problem. On my website there is some information I would like to protect. Right now I am using .htaccess to password-protect the directory, but I was thinking about using php and a form with usernames/passwords in a MySQL database. Thankfully, I read the following in the manual right before I was about to use the crypt() function to encrypt my password and compare it to the encrypted hash in the DB: It seems that a lot of people don't understand the point of using one-way encryption. More importantly, a lot of web designers forget that PHP encryption is done entirely on the web server, not the client. Point being, if your form has a password input option and the user clicks SUBMIT, the password is then sent _as plain text_ over the Internet to the web server where it is then encrypted for comparison against a password database. Do _not_ use these types of functions to add security to a form unless you're using an SSL or TLS (etc.) encrypted session. The only potential way around this issue is for you to write a JavaScript program that does the hashing on the client side before being sent over the Internet (which would make this function unnecessary). I am pretty new to PHP and absolutely clueless as far as encryption/algorithims are concerned. Could anyone possibly point me to a viable solution for this problem? Thanks in advance! Tom Malone -- Jeff Bearer, RHCE Webmaster PittsburghLIVE.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 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 vs Perl question
I'm pretty new to programming - besides JavaScript, PHP is really the first language I've used. I'm just wondering, and I'm sure you all would know - should I learn Perl? Is it considered a necessity for a web developer to know Perl, or is it not a worthwhile endeavor, considering how easy PHP is to learn and use? Someone I know told me not to bother, but I just wanted a second opinion. (BTW - if you think it is worthwhile to learn Perl, what is a good book to begin with?) Thank you! Tom Malone -- 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] Re: a good PHP editor
How weird. I have an old computer windows Win 98 with only 64M RAM and I've never had any problem with Homesite. I'm always running it and at least 2-4 browser windows and Eudora with no problems. Perhaps I've just been lucky, but I've been using Homesite since it was shareware. :) HomeSite used to be a great editor until version 4 - that's when it began to have memory problems, and that's when I switched to TextPad (although this EditPlus editor looks pretty good!) Tom -- 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] Re: PHP vs Perl Question
I haven't been to Barnes Noble yet, so I'm not sure if I will get the O'Reilly or the Wrox book yet, but supposing I went with O'Reilly, I wonder which would be better: Learning Perl 3rd Edition, or Learning Perl on Win32 Systems? I don't have much experience with Unix or Linux (minimal), but on the other hand, I use Windows ME, not NT. Also, I wonder if the Learning Perl on Win32 book might not me geared more towards NT administrators (I'm a web designer). Sorry this is so OT, but I really need to know and you people are the experts. Tom I'd go for it. Perl can be messy, but it is also quite powerful and doesn't HAVE to be messy. It is EVERYWHERE both in terms of availability and use. But most of all, it is a fun language to play with... and if you do any system admin it is an indispensable tool. I recommend _Beginning Perl_ from Wrox over _Learning Perl_ by O'Reilly, but only by a hair. Both are good. c -- 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] Strange wierd problem
I am using sessions to track visitors to my site, and one of the things I'd like to do is add a time-stamp to each entry in my MySQL database. The problem is that, for some reason, the time-stamp part only seems to work part of the time. I know it can't be, but it almost seems arbitrary - i haven't been able to determine a pattern. The code I'm using follows: ? session_start(); session_register(origin); session_register(ip_address); session_register(browser); session_register(id); $modules = //modules; $page = $modules/index.inc; include($modules/db_info2.inc); $id = session_id(); $ip_address = $REMOTE_ADDR; $browser = $HTTP_USER_AGENT; $sessn_root = sessn-log; $origin = $HTTP_REFERER; $now = date(D M j, H:i); $sql = INSERT INTO $table_name (ndx, id, time, ip_address, browser, origin) VALUES (\\, \$id\, \$now\, \$ip_address\, \$browser\, \$origin\); $result = mysql_query($sql, $connection) or die(Couldn't update session logs. MySQL error: . mysql_error()); include($modules/template.html.php); ? Can anyone help? Thanks in advance! Tom -- 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] Session Question
I'm new to Apache (and PHP) and was unable to find anything approaching an answer to this problem in the Apache documentation. In fact, I'm not even sure if I'm having a problem with Apache or with PHP. I am trying to use sessions to track users on my site and write information to a file. I'm not requiring them to login or anything - all I really want to know is which users are visiting different pages on my site so I can judge the effectiveness of my design. Anyway the problem is - I'm using the following script: ? session_start(); session_register(origin); session_register(ip_address); session_register(browser); session_register($id); $id = session_id(); $origin = $HTTP_REFERER; $ip_address = $REMOTE_ADDR; $browser = $HTTP_USER_AGENT; $sessn_root = /***/sessn-log; //substituted asteriks for actual path here if(!file_exists($sessn_root/$id.txt)): $sessn_data = $id\n $ip_address\n $browser\n $origin\n; else: $sessn_data = $origin\n; endif; $fp = fopen($sessn_root/$id.txt, a); fputs($fp, $sessn_data); fclose($fp); $includes = ***/includes; //substituted asteriks for actual path here $page = $includes/index.inc; include($includes/template.html.php); ? and i get the following error: Warning: fopen(/home/tgmalone/sessn-log/0bbaf33ab1c1f9d714e2244459979ec7.txt,a) - Permission denied in /home/tgmalone/public_html/index.php on line 17 The problem is obvious, but I've been searching, searching and wracking my inadequate brain for a solution and can't find one - can anyone help me find a solution/workaround? Thanks, Tom Malone -- 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] Re:[PHP] Session Question
Thanks Christopher! I chmoded the directory to 777 like you said, and it worked fine, but then I took your advice regarding security and put all the data in a MySQL database. Thank you very much for your help! Tom Malone -- 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] Confusion abounds here
I just renamed a directory on my webserver (apache) and then did a searchreplace in my text editor to update all my files then uploaded them. Now I am getting the following error on a page I am using to display all the rows in a database that contains session data: Warning: Cannot send session cache limiter - headers already sent (output started at /home/tgmalone/public_html/admin/logs.php:1) in /home/tgmalone/public_html/admin/logs.php on line 1 but I'm not trying to send any headers! (or am I?) Confused! Tom Malone -- 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] Re: Confusion abounds here
Thanks Maxim and Inercia - you were both right - somehow an extra space was put in before the ? when I did the search and replace. Thank you! Tom Malone -- 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] HTTP Authorization
Call me stupid, because this may be a stupid question, but I have searched all over for the answer and cannot find it. How can you get the username and password from HTTP_AUTH_USER or another environment variable in PHP? I need to determine who is logging in so I can connect to the correct database. Thank you! Tom -- 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] Protecting a directory
I hope this is the appropriate place for this post - I apologize in advance if I'm stepping on any toes... I have created a database to manage my contacts in a sub-directory of my site. I used php user authentication to protect the directory, but you can still see the directory index by entering http://www.somefakeurl.com/admin/. Since i do not want to use an index page in that directory, is there any way to keep people from seeing that index using PHP? Thank you Tom -- 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]