RE: [PHP] Stopping stolen / spoofed / linked sessions
keep the current user's IP address or timestamp in a database with the session ID. if the session is requested by someone with a different IP or too-late timestamp, give the requesting user a new session. -Original Message- From: adam (dahamsta) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 1:39 PM To: [EMAIL PROTECTED] Subject: [PHP] Stopping stolen / spoofed / linked sessions [Please copy replies off-list.] I want to use PHP4 sessions for authentication, but I'm having difficulty understanding how to get around users spoofing, stealing or linking sessions. Here's an example: Alice sends Bob a link from a site she's logged into. Alice has cookies turned off in her browser, so the session id will be in the URL she sends Bob. Eve intercepts the message, follows the link and now she can take over Alice's session, and any data that is associated with that session. For that matter, Bob can do the same thing. I can think of lots of ways around this, but most of them are kludges that don't really cut it. I can store a second authentication value in a cookie, but that would require cookies, which isn't acceptable. I could propogate a second authentication variable in the URL, but that's a lot of hassle and defeats the purpose of PHP sessions. I can check the HTTP_REFERER to see if the user came from my own site, but that can be spoofed. I can log and check the users IP address, but that can't be relied upon. Is there any reliable way around this? Am I missing something obvious? Cheers, adam -- 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] --with-zlib/--with-zlib-dir and --enable-xslt
haha... i had been trying to compile PHP 4.0.5 and previous with the GD library, and it was giving me all sorts of bizarre errors, but when i downloaded PHP 4.0.6 and tried to compile it against GD, it worked beautifully not a single error. :) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Sure, if it works why bother? Still, isn't it nice the way configuration directives change along versions? It helps keeping one fit :-) -- 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] Pricing Advice Needed
I believe its how_many_times_client_changes_mind * (man_hours * 2) * rate = what_your_time_is_worth provided that (how_many_times_client_changes_mind * (man_hours * 2)) + other_projects_time 18hr/day of programming Think of the project overall and make sure to sit down with the client and make a detailed list of features and stuff. Make sure to significantly increase the man_hours over a real figure, as every other quote he gets would include the same, better to have program done early and happy customer than late program and sad customer. Rate should be an average based on what is your minimum and what_your_time_is_worth. So for instance, on a project you could decide to charge 20$ an hour... but doing the project is worth 3 months of colo fees and a new Alienware dual Athlon :) So you get out a calculator and do the magic. With any project, make sure you know your client too... what most important to him: Functionality, Form, Lines of Code, or Cost? Then you can program to his needs, cause cost usually isn't the main feature. --- Toolshed Computer Productions - Professional PHP Hosting Hosting - Dedicated Servers - Design - Programming http://www.toolshed51.com -Original Message- From: Alva Chew [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 11:50 PM To: [EMAIL PROTECTED] Subject: [PHP] Pricing Advice Needed Hi everyone, Just don't really know where to post this, so here goes: I am working as a freelance programmer. Problem is I don't really have a clue how the pricing mechanism in the industry works. I have heard calculations based on man hours and lines of code, so perhaps anyone one can tell me on the average, how much should I be charging per man hour, or per line of code? Sincere thanks and regards, Alva Chew, Singapore -- 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] setting output_buffering for certain hosts or directories
i've never done this myself, but a suggestion would be to check out: 'auto_append_file' and 'auto_prepend_file' they're php.ini directives. for example, try adding auto_prepend_file 'stuff.php' to your php.ini when PHP goes to load a page, it'll first check to see if 'stuff.php' can be found, then it'll include('stuff.php') and proceed with your script... in 'stuff.php', you can then turn on any per-directory options you want -Original Message- From: Mark Maggelet [mailto:[EMAIL PROTECTED]] Subject: [PHP] setting output_buffering for certain hosts or directories Is there any way to set output_buffering per directory or host? I tried putting: php_value output_buffering On in my virtual host, also in directory, location, and .htaccess the only place it seems to get noticed is in php.ini php4.7devel/apache1.3.20/linux thanks, - Mark -- 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] What does this error mean?
I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? ERROR Warning: fopen(logs/993700800.log,w+) - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 29 Warning: Supplied argument is not a valid File-Handle resource in /home/sites/site20/users/guide/web/counter.php on line 30 1 END The last two errors are becuase the first fails to return a file handle. Here's the actual offending code. It's just a simple counter. CODE ?PHP $iDate = mktime(0, 0, 0, date(m), date(d), date(Y)); $iCount = 1; $sFile = logs/.$iDate..log; if (file_exists($sFile)) { $iCount = incCount($sFile); } else { createCountLog($sFile); } echo BFONT COLOR=BLUE$iCount/FONR/B; function incCount($sFile) { // Open and read existing count $hCounter = fopen($sFile, r); $iCount = fgets($hCounter, 1024); fclose($hCounter); // Write over it with the new count $hCounter = fopen($sFile, w); fputs($hCounter, ++$iCount); fclose($hCounter); return $iCount; } function createCountLog($sFile) { $hCounter = fopen($sFile, w+); fputs($hCounter, 1); fclose($hCounter); } ? END Usually I've been able to fix every PHP error I've gotten in the past - they've been pretty straightforward - but I've been playing around with this error for a few days now to no avail. I'm new to this mailing list and have never used it before so I'm not sure which one/s to join or post this specific message to. I apologize if this is the wrong forum for this type of question. Thank you for your time. -- Jimi Malcolm Web Content Manager inburst Internet Media inburst.com jimi.malcolm@inburst -- 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] Week Number
Does know of anyway to get PHP to return the week number? As in there are 52 weeks in a year and this is week x? If there is no internal feature, perhaps something built into PHPLib? Lemme know, Matt TrollBoy Wiseman Webmaster: Shoggoth.net Site Designer: phpslash.org The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. -H.P. Lovecraft - Please do not resell my e-mail address to anyone or send me unsolicited e-mail - -- 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] Creating domain and default page
1) read apache and named docs so you know what changes need to be made, and where to make them 2) update 'httpd.conf' and the domain's 'zone' file 3) restart both 'named' and 'apache' 4) copy an 'index.php' into the subdomain's newly created directory. there are probably better ways to do it, but that's how i add subdomains to my machine when i do it manually... it's a start -Original Message- From: E K L [mailto:[EMAIL PROTECTED]] Subject: [PHP] Creating domain and default page Hi all, Can anybody give me a guideline or idea on how to write a PHP scriot which is used to create a domain or sub-domain and a default page and a same time. My OS is Red Hat Linux 6.1. For example, in my program, when i press activate' button, the script will create me a sub-domain try.php.com and a default page index.php is created for that sub-domain. Thanks for advice.. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] system() call to payflow pro
I had a site that was working fine and now gives this error. Warning: Unable to fork [C://winnt//system32//pfpro connect.signio.com 443 TRXTYPE=STENDER=CUSER=usernamePWD=passwordACCT=56532325168784512EXPDAT E=0102AMT=11.95NAME=Jeff RossiSTREET=1506 Tuscaloosa AveCITY=Holly HillSTATE=FloridaZIP=32117[EMAIL PROTECTED]] in e:\www\roffice.net\ssl\bouncersbible\sec_order.php on line 104 I'm assuming that my host moved or deleted the executable in question. Is there another possible cause? Username/password changed. Thanks Data Driven Design 1506 Tuscaloosa Ave Holly Hil, FL 32117 http://www.datadrivendesign.com http://www.rossidesigns.net -- 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] search for a better php source code viewer
on 6/27/01 1:49 AM, ReDucTor leaped tall buildings, and wrote: EditPlus is the best program EVER I use it for every thing... :) :) BB Edit is the PHP coder of choice on the Mac side. It does everything! It also has a great PHP library so you don't have to manually type redundant code, like MySQL connects and such. http://www.bbedit.com mto -- Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si - M A N G O B O U L D E R - http://www.thinkmango.com e- [EMAIL PROTECTED] p- 303.442.1821 f- 303.938.8507 -- 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] About Integration PHP- VPOS
I've already compiled and tested the communication betwen PHP (cURL module included) and Vpos. The only problem I'm actually facing is how to process the curl's answer. -Mensaje original- De: Richard Lynch [mailto:[EMAIL PROTECTED]] Enviado el: Wednesday, June 27, 2001 2:16 AM Para: [EMAIL PROTECTED] Asunto: Re: [PHP] About Integration PHP- VPOS cURL is probably your only option, but I think you can build cURL into PHP if you haven't already... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Ing. Marco Antonio Lopez Melendez [EMAIL PROTECTED] Newsgroups: php.general Sent: Tuesday, June 26, 2001 5:37 PM Subject: [PHP] About Integration PHP- VPOS Hi, actually I'm developing a electronic store and I'm integrating VPos to the store application. I'm Using CURL in order to comunicate to Vpos. Is it the only way or there are another one? The Vpos aplication resides on other server and I have to comunicate with it via SSL. Thanx. == Ing. Marco Antonio Lopez Melendez Jefe del Departamento de Estructuracion de Sistemas DCAA.DGSCA.UNAM. Tel. 56-22-36-61 Fax. 56-22-36-78 == -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Postcard/Tell a friend app
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Michael O'Neal) wrote: So, on to the next question. Has anyone seen an app that can send digital cards, where a user can choose their picture, and add whatever text and font they want, then send to as many people as they want? Some convenient places to find PHP apps of all kinds: http://php.net/projects.php http://hotscripts.com/ http://php.resourceindex.com/ -- CC -- 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] Interfacing with Excel
You can use PHP4 under win32 (CGI Binary) and use the DCOM Interface to access excel. Search with google and some appropriate keywords. - Markus On Thu, Jun 28, 2001 at 11:00:19AM +0530, Sharat Hegde wrote : Hello, I have a web site on a Unix environment running PHP 3.0 and MySQL. I need to convert data in an Excel format to a MySQL database format periodically based on the input feed received in Excel format. the conversion to MySQL is not a problem at all. What I need help is to read data from an Excel 2000 format. How do I retrieve data from Excel 2000? The data is basically a 2 columnar data with currency names and conversion values. Thanks in advance. Regards, Sharat Hegde Phone: 6560360 Ext 4680 -- 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] -- Markus Fischer, http://guru.josefine.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0 -- 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 Not Working
Very strange situation, PHP Version 4.0.3 on one of my production web servers has started to loose different functionality?? The OS is Apache/1.3.12 (Unix) (Red Hat/Linux 6.2) PHP/4.0.3 mod_perl/1.21, PHP was compiled as a module with apxs. The strange thing is, some virtual host directories have some of the things other Virtual host directories don't have or quite working. It started with the include() function not working and has now moved to the mail() function not working. Has anyone excperienced similiar problems or know of a fix?? Thanks, Blake -- 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] Convert
implode see manual/function.implode.html Chris Date sent: Thu, 28 Jun 2001 17:34:41 +0530 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:[PHP] Convert Hi How do I convert arrays to string ??. ~ Karthick -- 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] -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- -- 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] closing window after submit
I have a form that is in a pop up window it has an image for a submit button how can I close the pop up after submitting. I know I can do it with javascript with a standard submit button. but how can I do it when I use an image for a submit button form method=post action=?echo $PHP_SELF;? input type=TEXT name=email size=30 maxlength=50 input type=image src=fm_sub.gif width=71 height=11 border=0 Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] referencing arrays in arrays
I have an array, $field, like following: Array ( [0] = Array ( [0] = Array ( [disp] = computer [index] = computer ) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = title [index] = @at 1=4 term [name] = ti ) ) [1] = Array ( [0] = Array ( [disp] = human [index] = human) [1] = Array ( [disp] = or [index] = @or ) [2] =Array ( [disp] = subject [index] = @at 1=5 term [name] = s ) ) [2] = Array ( [0] = Array ( [disp] = [index] = John) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = tsd [index] = @at 1=5 term @at 7=44 term [name] = tsd) ) [3] = Array ( [0] = Array ( [disp] = [index] = Eric) [1] = and [2] = Array ( [disp] = subject [index] = @at 9=5 term [name] = s ) ) [4] = Array ( [0] = Array ( [disp] = [index] = Main) [1] = and [2] = Array ( [disp] = subject [index] = @at 9=5 term [name] = s ) ) [5] = Array ( [0] = Array ( [disp] = [index] = Dog) [1] = and [2] = Array ( [disp] = [index] = [name] = ) ) ) In each string, $field[$j][2][index] in the array, will I replace 'term' with the word in {$field[$j][0][index]}. Why doesn't it work like this?: --- 1.for($j=0; $j6; $j++){ 2.$temp =str_replace(term,{$field[$j][0][index]},{$field[$j][2][index]}); 3.echo brtemp: $temp; 4.$field[$j][2][index]=$temp; 5.echo brutskrift: ${$field[$j][2][index]}; 6.} 7.echo brfield: br; 8.print_r($field); - Line 3 and 6 gives the same, and correct outprint, but in line 8 nothing is changes from how it looked before the loop. term is still term and not replaced. What am I doing wrong!? Thanks! anette Bra att veta: Hardware is the part of a computer that can be kicked, if all you can do is swear at it, then it must be software. Anette Löfquist e99al icq#: 69648675 -- 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] referencing arrays in arrays
I have an array, $field, like following: Array ( [0] = Array ( [0] = Array ( [disp] = computer [index] = computer ) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = title [index] = @at 1=4 term [name] = ti ) ) [1] = Array ( [0] = Array ( [disp] = human [index] = human) [1] = Array ( [disp] = or [index] = @or ) [2] =Array ( [disp] = subject [index] = @at 1=5 term [name] = s ) ) [2] = Array ( [0] = Array ( [disp] = [index] = John) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = tsd [index] = @at 1=5 term @at 7=44 term [name] = tsd) ) [3] = Array ( [0] = Array ( [disp] = [index] = Eric) [1] = and [2] = Array ( [disp] = subject [index] = @at 9=5 term [name] = s ) ) [4] = Array ( [0] = Array ( [disp] = [index] = Main) [1] = and [2] = Array ( [disp] = subject [index] = @at 9=5 term [name] = s ) ) [5] = Array ( [0] = Array ( [disp] = [index] = Dog) [1] = and [2] = Array ( [disp] = [index] = [name] = ) ) ) In each string, $field[$j][2][index] in the array, will I replace 'term' with the word in {$field[$j][0][index]}. Why doesn't it work like this?: --- 1.for($j=0; $j6; $j++){ 2.$temp =str_replace(term,{$field[$j][0][index]},{$field[$j][2][index]}); 3.echo brtemp: $temp; 4.$field[$j][2][index]=$temp; 5.echo brutskrift: ${$field[$j][2][index]}; 6.} 7.echo brfield: br; 8.print_r($field); - Line 3 and 6 gives the same, and correct outprint, but in line 8 nothing is changes from how it looked before the loop. term is still term and not replaced. What am I doing wrong!? Thanks! anette Bra att veta: Hardware is the part of a computer that can be kicked, if all you can do is swear at it, then it must be software. Anette Löfquist e99al icq#: 69648675 -- 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 varaible to perl
Hello all, Can anyone see what's happening here? I'm trying to pass some variables (font stuff) to a cgi script so that it will appear the same as the current theme being used. Everything seems to be working except the replacements. here's the code. Any help much appreciated, thanks! Or would there be a better way to do this? ?php include(/path_to/preload.php); include($header_forum_prog); $out = implode(\n, file(http://domain.com/path_to/forum.pl$QUERY_STRING;)); preg_match_all(/PHP?([^?]+)?PHP/, $out, $matches, PREG_PATTERN_ORDER); for($i=0; $i count($matches[1]); $i++){ $out = str_replace(PHP?.$matches[1][$i].?PHP, $$matches[1][$i], $out); } echo $out; include($footer_prog); ? and the variable in the cgi script are var heading_bgcolor = \PHP?$bgcolor?PHP\ var heading_font = \PHP?$ThemeFont?PHP\ but eh variable from the php globals are $bgcolor, $ThemeFont Thanks Richard -- 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] Announcement: DEF CON 9 PHP Talk
Hello, everyone. I've been reading the list for a few years now and wanted to let you know that I'll be giving a talk on Data Mining and Web Security With PHP this year. I'll be speaking on Friday afternoon so anyone in Las Vegas the weekend of July 13th who's interested please attend! For more info, see www.defcon.org Thank you, Adam Bresson -- 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] ADD a user in linux using PHP
Title: ADD a user in linux using PHP Hi! I'm Bruno, from brazil Somebody knows how to create a new user in LINUX (not http server) using PHP? Something like useradd and passwd Thanks, Bruno.
Re: [PHP] PHP and Windows XP
Jochen Except when it is compiled in standalone mode, PHP works through a web server. Judging from posts on the list, Apache is the best bet, rather than MSFT's PWS or IIS. If you're running XP, do a test and share the info! Miles At 05:47 AM 6/28/01 +0200, Jochen Kaechelin wrote: Will PHP run under Windows XP? -- 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] Interfacing with Excel
Are you getting an Excel2000 file and don't have Excel to open it? Just have it sent to you as CSV (Comma Separated Values) rather than XLS; that would be easy to parse. If you have direct access to the MySQL box, copy the file there and do the import directly. Check the MySQL docs. A more elaborate way would be to have the Excel file sent with XML markup, but from the sounds of it you'd be using a sledgehammer to swat flies. Miles Thompson At 11:00 AM 6/28/01 +0530, Sharat Hegde wrote: Hello, I have a web site on a Unix environment running PHP 3.0 and MySQL. I need to convert data in an Excel format to a MySQL database format periodically based on the input feed received in Excel format. the conversion to MySQL is not a problem at all. What I need help is to read data from an Excel 2000 format. How do I retrieve data from Excel 2000? The data is basically a 2 columnar data with currency names and conversion values. Thanks in advance. Regards, Sharat Hegde Phone: 6560360 Ext 4680 -- 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] Stopping stolen / spoofed / linked sessions
Adam, They way I got around this was to create a session key using a MD5 hash of the session id and the user's IP address. The username, session id and session key are then stored in a MySQL table. Every time the user loads a page I want secure, it re-creates the session key and checks to make sure it matches the information stored in the database. If that works, then it checks another table to determine if the user has access to the page or not. I know that the IP address can be spoofed, but I'm not sending the session id in the url, so no one knows what it is and without the session id the session key can not be spoofed. Hope this helps, David Price -Original Message- From: adam (dahamsta) [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 10:39 AM To: [EMAIL PROTECTED] Subject: [PHP] Stopping stolen / spoofed / linked sessions [Please copy replies off-list.] I want to use PHP4 sessions for authentication, but I'm having difficulty understanding how to get around users spoofing, stealing or linking sessions. Here's an example: Alice sends Bob a link from a site she's logged into. Alice has cookies turned off in her browser, so the session id will be in the URL she sends Bob. Eve intercepts the message, follows the link and now she can take over Alice's session, and any data that is associated with that session. For that matter, Bob can do the same thing. I can think of lots of ways around this, but most of them are kludges that don't really cut it. I can store a second authentication value in a cookie, but that would require cookies, which isn't acceptable. I could propogate a second authentication variable in the URL, but that's a lot of hassle and defeats the purpose of PHP sessions. I can check the HTTP_REFERER to see if the user came from my own site, but that can be spoofed. I can log and check the users IP address, but that can't be relied upon. Is there any reliable way around this? Am I missing something obvious? Cheers, adam -- 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] INVITO AD UNA VISITA
Title: GIUGNO NEWS1 GIUGNO: INVITO AD UNA VISITA Gentile Sig.re/ra buongiorno, vorrei invitarLa ad una visita del nostro sito www.prosoft.it e, per non farLe inutilmente perdere del tempo, mi permetto di sottoporLe un' offerta speciale dei nostri prodotti. BIGLIETTI DA VISITA (Cod.7K0001) una buona procedura in italiano che si può utilizzare per mettere a punto rapidamente, ma in modo accurato, biglietti da visita, che mancano sempre quando è necessario, ma anche badge, biglietti di auguri e comunicazioni in genere. Si possono poi stampare con una qualsiasi stampante a colori nel formato desiderato anche in più pezzi per pagina. Il programma può essere acquistato da Lei in questo caso a l. 19.900 iva compresa, invece di l. 29.000 L' ordine può essere fatto sia dal nostro sito, indicando però il codice sconto GIU3IN98 per i Biglietti da visita, perché altrimenti non verranno applicati i prezzi riservati. Oppure con un' email diretta: mailto:[EMAIL PROTECTED]?subject= ACQUISTO COD.GIU3IN98 per l' acquisto dell' offerta relativa ai Biglietti da visita In questo caso si ricordi di specificare i Suoi dati come ragione sociale, indirizzo, ecc., tipo di spedizione e pagamento.L' ordine, per posta (l. 8.900 pacchetto raccomandato) o per corriere espresso(l.19.000 iva compresa), verrà evaso entro 24 ore. Restando a disposizione per ogni chiarimento, vogliamo sottolineare che suggerimenti e consiglisono sempre graditi.Cordiali saluti Direzione Clienti Taviti Monia www.prosoft.it NOTA IMPORTANTE Prosoft rispetta il Suo tempo online e la Sua Privacy. Se preferisce non essere informato in futuro sulle novità ed offerte può inviare un messaggio di posta elettronica, cliccando semplicemente sul collegamento: Mailto:[EMAIL PROTECTED]?subject=STOP NEW Ha ricevuto questo messaggio perchè registrato nel nostro database. Se così non fosse La preghiamo di scusarci e di segnalarcelo con lo STOP NEW. Grazie.
[PHP] PHP ImageMagick
In PHP I try to run a shell command with the following source code: $fotonaam = 'convert -font arial -pointsize 20 -gravity center -fill white -draw text 5,5 VERKOCHT image.jpg image2.jpg'; exec($fotonaam); PHP runs the program but the -draw text 5,5 VERKOCHT is not executed (there is no VERKOCHT in the image2.jpg). I tried everything but I can't solve the problem. Could somebody explain to me how it's possible that the program (convert) runs but there (seams to be) a problem with -draw text 5,5 VERKOCHT. If I run the same command troughs telnet/ssh as root or nobody it works fine Is it something with the and the combinative with the exec function (I also tried \)? Or is it because I run PHP in safe mode and the convert program tries to run a external program what is not in the . path (you now, the basic safe mode restriction)? Please help me.. I'm getting despaired on this in. ;-) Regards, Jeffrey Barendse -- 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] making e-mail link
I use this to replace URLs as links: $text = eregi_replace((http://[^ ]*),a href=\\\1\\\1/a,$text); What can I use to replace email addresses (like [EMAIL PROTECTED]) as e-mail links? kind regards, bill hollett -- 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] php4 phplib
I upgraded php3 to php 4.0.6 on Linux 2.2.19+apache 1.3.17+sybase 11.9.2 and my phplib stoped to work. I am using Cart class and Sessions etc. Page_close sends the message: Database error: Invalid SQL: insert into active_sessions ( sid, name, val, changed ) values ('62298a7def668dff3a8b417a4f0ad7a0', 'Batnet_usr_Session', 'QmF0bmV0X3Vxbvsnbsdf3iubn', '20010628161008') Sybase Error Session halted. There is a session with this id and phplib should do update instead of insert. Are there good sites where I can read about how to safely upgrade php and keep my phplib working ? Thanks in advance Marcin. -- 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] making e-mail link
Bill I grabed this function from the www.php.net manual and it works great, it covers all your bases, except that it will show you http://www.something.com for http://www.something.com or www.something.com. If somone knows how to modify it so it would only show www.something.com when linked, that would be perfect. // Auto Link HTML /** * Function from phpmanual http://www.php.net/ * [EMAIL PROTECTED] */ function getAutoLink($text){ if($GLOBALS[use_AutoLinks]){ $text = ereg_replace(((www.)([a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0-9@:%_~#\?/])), http://\\1;, $text); $text = ereg_replace(((ftp://|http://|https://){2})([a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0 -9@:%_~#\?/]), http://\\3;, $text); $text = ereg_replaceftp://|http://|https://){1})[a-zA-Z0-9@:%_.~#-\?]+[a-zA-Z0 -9@:%_~#\?/]), A HREF=\\\1\ TARGET=\_blank\\\1/A, $text); $text = ereg_replace(([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}),A HREF=\mailto:\\1\;\\1/A, $text); return $text; } } peace Richard bill [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I use this to replace URLs as links: $text = eregi_replace((http://[^ ]*),a href=\\\1\\\1/a,$text); What can I use to replace email addresses (like [EMAIL PROTECTED]) as e-mail links? kind regards, bill hollett -- 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] Pricing Advice Needed
This varies greatly depending on where you are... For example here on Long Island I can make $60-80 / man hour, but in New York City I can make as much as $150 / man hour... It also depends on what you are doing. Hope this helps, Julia Quoting Alva Chew ([EMAIL PROTECTED]): Hi everyone, Just don't really know where to post this, so here goes: I am working as a freelance programmer. Problem is I don't really have a clue how the pricing mechanism in the industry works. I have heard calculations based on man hours and lines of code, so perhaps anyone one can tell me on the average, how much should I be charging per man hour, or per line of code? Sincere thanks and regards, Alva Chew, Singapore -- 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] -- [ Julia Anne Case ] [Ships are safe inside the harbor, ] [Programmer at large] [ but is that what ships are really for.] [ Admining Linux ] [ To thine own self be true. ] [ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ] PGP signature
Re: [PHP] Pricing Advice Needed
On 6/28/2001 2:49 AM this was written: I am working as a freelance programmer. Problem is I don't really have a clue how the pricing mechanism in the industry works. I have heard calculations based on man hours and lines of code, so perhaps anyone one can tell me on the average, how much should I be charging per man hour, or per line of code? I think the majority is man hour. I actually handn't heard of lines of code. I think that would be ridiculous, can you imagine. You get paid more depending on your style: If ($foo == bar) { $dofoo = fobar($foo); } else { $dofoo = foobar($bar); } Or If ($foo == bar) { $dofoo = fobar($foo); } else { $dofoo = foobar($bar); } I would never trust someone who charged by line. I think in general it's about $100-$150/hour for programming/database work. -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.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] parse error in PHP Manual in php web site...
Parse error: parse error in /local/Web/sites/phpweb/include/shared-manual.inc on line 265 Fatal error: Call to undefined function: sendmanualheaders() in /local/Web/sites/phpweb/manual/en/getting-started.php on line 3 HELPPP!! :) Rom -- 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] Stopping stolen / spoofed / linked sessions
David Price [EMAIL PROTECTED] said: They way I got around this was to create a session key using a MD5 hash of the session id and the user's IP address. SNIP I know that the IP address can be spoofed, but I'm not sending the session id in the url, so no one knows what it is and without the session id the session key can not be spoofed. IP spoofing is only a side issue - some users IP address changes from request to request. WebTV is an example, and users behind proxies is another. I guess I'm looking for the perfect solution here, which just doesn't appear to be possible with HTTP. Maybe a better question is: What is the ideal model for a PHP4 sessions authentication scheme? Thanks anyway, adam -- 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] Mail slow
On 27-Jun-01 Tim Ward wrote: I've finally got a mail client running on our web server and it works fine, except in the time it takes to run the mail() function. I've put diagnostics round the call and it seems to be taking 22 seconds to return. All I'm doing is forwarding the results of an enquiry form as plain text. I'm sure I've seen reference to this problem somewhere but can't remember (or find) where it was. Can anyone out there help? Sounds like sendmail is timing-out on a dns lookup ... is sendmail running as a daemon ? try it from the shell df | /usr/sbin/sendmail [EMAIL PROTECTED] Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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] Passing parameters to another .PHP via a tag
Hi there. I'm completely new in PHP so I apologize for this question. I've download and read PHP manual but I didn't found how to pass parameters from one .PHP to another .PHP file. I'm not trying to send variables from a form using $HTTP_POST_VARS[ ], but pass via A HREF=somescript.php?. Please tell me what is the convention to pass them or where I can read about it. Thanks Momchil -- 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] ENC: ADD a user in linux using PHP
Title: ENC: ADD a user in linux using PHP -Mensagem original- De: Bruno Freire Enviada em: quinta-feira, 28 de junho de 2001 11:31 Para: '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Assunto: ADD a user in linux using PHP Hi! I'm Bruno, from brazil Somebody knows how to create a new user in LINUX (not http server) using PHP? Something like useradd and passwd Thanks, Bruno.
Re: RE: [PHP] mssql and uniqueidentifier's
Hi all, The dll is not broken. The type UNIQUEIDENTIFYER is a 16 byte binary value and is returned as such. With versions of the php_mssql.dll distributed with php4.0.5 or before did not include proper support for binary data. This has been changed in php4.0.6. I have hust added a small function to the extension called mssql_guid_string(). This function can be used to convert the binary value into a readable string. This function will be available in php4.0.7. If you want a copy of the dll before the release of php4.0.7, please email me directly. You could also let the server handle the convertion select id from mytable will return binary data if id is a UNIQUEIDENTIFIER. select case(id as varchar(36)) from mytable will do the convertion on the server and return a valid string. - Frank well, the SQL statement you're trying to execute would help determine why it's not working... :) just stating that it's broken is like saying my car makes this funny noise and hoping that a mechanic will give you a detailed diagnosis. -Original Message- From: Thomas Häger [mailto:[EMAIL PROTECTED]] Subject: [PHP] mssql and uniqueidentifier's Hi NG, my problem is following: I made a query on a table on a MS SQL Server 2000. The table have a key-column from type uniqueidentifier. Ever i made a query on this column, the result is not right. It comes back some crypt. For example: Value Database: 496467D1-7646-4094-8016-087083EA9432 Result shown in the browser, queried by php : ÑgdIFv@?pfê2 Can somebody help me, thanks, Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problem with Excel
Hi ! I think the simplest thing to do is to convert your excel file to a CSV file (it an ASCII format ). jean-arthur At 17:16 28/06/01 +0530, Sharat Hegde wrote: Hello, I have a web site on a Unix environment running PHP 3.0 and MySQL. I need to convert data in an Excel format to a MySQL database format periodically based on the input feed received in Excel format. the conversion to MySQL is not a problem at all. What I need help is to read data from an Excel 2000 format. How do I retrieve data from Excel 2000? The data is basically a 2 columnar data with currency names and conversion values. Thanks in advance. Regards, Sharat -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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 Digest 29 Jun 2001 15:14:33 -0000 Issue 726
php-general Digest 29 Jun 2001 15:14:33 - Issue 726 Topics (messages 55538 through 55544): PHP Not Working 55538 by: Black S. Re: Convert 55539 by: Chris Hayes closing window after submit 55540 by: Richard Kurth (slightly OT) the bad and the good (hosting recommentations) 55541 by: Justin French referencing arrays in arrays 55542 by: Anette Löfquist 55543 by: Anette Löfquist Re: Problem with Excel 55544 by: Jean-Arthur Silve Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Very strange situation, PHP Version 4.0.3 on one of my production web servers has started to loose different functionality?? The OS is Apache/1.3.12 (Unix) (Red Hat/Linux 6.2) PHP/4.0.3 mod_perl/1.21, PHP was compiled as a module with apxs. The strange thing is, some virtual host directories have some of the things other Virtual host directories don't have or quite working. It started with the include() function not working and has now moved to the mail() function not working. Has anyone excperienced similiar problems or know of a fix?? Thanks, Blake implode see manual/function.implode.html Chris Date sent: Thu, 28 Jun 2001 17:34:41 +0530 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject:[PHP] Convert Hi How do I convert arrays to string ??. ~ Karthick -- 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] -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- I have a form that is in a pop up window it has an image for a submit button how can I close the pop up after submitting. I know I can do it with javascript with a standard submit button. but how can I do it when I use an image for a submit button form method=post action=?echo $PHP_SELF;? input type=TEXT name=email size=30 maxlength=50 input type=image src=fm_sub.gif width=71 height=11 border=0 Best regards, Richard mailto:[EMAIL PROTECTED] hi all, i'm about to change ISPs, and i'll probably be moving to a US based server, on Unix, with Apache, PHP4, CGI, Perl 5, MySQL, etc etc. so far the best I can find (price/service level/features) is experthost.com.au. Has anyone got a bad experience with these guys, or a good experience with annother ISP that they can recommend? for what it's worth they offer a reseller package with 2-4 domains for US$10/month each, all the way down to 25+ for US$4.99 each / month. this is with 50 meg space, MySQL DB, 20 POPs, and much more. i don't require dial up access, just hosting. i'd be interested to hear of competitors to this ISP, or of any good / bad experiences. I'm ony interested in Australian, US, Canada or UK ISPs. many thanks jsutin french I have an array, $field, like following: Array ( [0] = Array ( [0] = Array ( [disp] = computer [index] = computer ) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = title [index] = @at 1=4 term [name] = ti ) ) [1] = Array ( [0] = Array ( [disp] = human [index] = human) [1] = Array ( [disp] = or [index] = @or ) [2] =Array ( [disp] = subject [index] = @at 1=5 term [name] = s ) ) [2] = Array ( [0] = Array ( [disp] = [index] = John) [1] = Array ( [disp] = or [index] = @or ) [2] = Array ( [disp] = tsd [index] = @at 1=5 term @at 7=44 term [name] = tsd) ) [3] = Array ( [0] = Array ( [disp] = [index] = Eric) [1] = and [2] = Array ( [disp] =
[PHP] passwd in php....
Title: passwd in php Hi... My name is Bruno. Somebody Knows how to use passwd in php? I mean, create linux users on my httpd server using a php page. I already try the EXEC(), but i had no sucess.. Any help will be needed Thanks everyone
Re: [PHP] PHP PGP
Hello Pepe, Thursday, June 28, 2001, 6:05:48 PM, you wrote: PL I want to encrypt mails coming from my webform with pgp. Is it possible? It is possible. Also, If you had been chosen GNUPG instead of PGP you could use the class located at http://phpclasses.upperdesign.com/browse.html/package/245 -- Best regards, Maxim Derkachev mailto:[EMAIL PROTECTED] System administrator programmer, Symbol-Plus Publishing Ltd. phone: +7 (812) 324-53-53 www.books.ru, www.symbol.ru -- 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] how to determine size of gz-handler output
Hi all I'd like to know how small my content gets when i use ob_gzhandler. so far i tried $cont=ob_get_contents(); $length=strlen($cont); echo !-- $length --\n; but it outputs !-- 17280 -- while apache says in its logfile: 217.81.41.121 - - [29/Jun/2001:12:43:59 +0200] GET / HTTP/1.1 200 2028 i'm starting to get confused... Sebastian -- 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] Stopping stolen / spoofed / linked sessions
Hi When you start a session for the first time store remote host info and validate it on subsequent accesses. Tom At 10:48 PM 28/06/01, [EMAIL PROTECTED] wrote: Hi adam! On Wed, 27 Jun 2001, adam (dahamsta) wrote: [Please copy replies off-list.] I want to use PHP4 sessions for authentication, but I'm having difficulty understanding how to get around users spoofing, stealing or linking sessions. Here's an example: Alice sends Bob a link from a site she's logged into. Alice has cookies turned off in her browser, so the session id will be in the URL she sends Bob. Eve intercepts the message, follows the link and now she can take over Alice's session, and any data that is associated with that session. For that matter, Bob can do the same thing. I can think of lots of ways around this, but most of them are kludges that don't really cut it. I can store a second authentication value in a cookie, but that would require cookies, which isn't acceptable. I could propogate a second authentication variable in the URL, but that's a lot of hassle and defeats the purpose of PHP sessions. I can check the HTTP_REFERER to see if the user came from my own site, but that can be spoofed. I can log and check the users IP address, but that can't be relied upon. Is there any reliable way around this? Am I missing something obvious? there was a long and interesting thread on bugtraq @ securityfocus.com recently regarding this (it started w/ uploading images, I don't recall what was the subject, but you can figure some keywords to search for ;) Among proposed solutions was to send a ticket and validate it for each operation. Worth a searchread if you're a web developer. -- teodor -- 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] extract data from html
On Thu, 28 Jun 2001, CC Zona wrote: In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Adrian D'Costa) wrote: 1. Open the html file in read only mode 2. Start reading the html file till I encounter a td tag (I don't know how to do this) 3. Grab that data after the td tag (and then what?) See http://php.net/manual/en/function.fopen.php and http://php.net/manual/en/function.fgetss.php plus the chapter for whatever DBMS you want to drop the file contents into. Thanks. One thing just reading the manual without the idea of how the function works is of no use. Some examples would help. In fact I did use fopen, fgets, fgetss but the problems is that the html tag that I am looking is td. Now this is easy but if td width=25% or td colspan=7 would give a problem. Adrian -- 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] Please Help......
Hi all, Can anybody give me a guideline or idea on how to write a PHP scriot which is used to create a domain or sub-domain and a default page and a same time. My OS is Red Hat Linux 6.1. For example, in my program, when i press activate' button, the script will create me a sub-domain try.php.com and a default page index.php is created for that sub-domain. Thanks for advice.. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] Temporary file during image create trouble
Hello! Can anybody help me with some problem? Here it is. I need to create PNG image with PHP script. When I try to create the image with ImagePNG(), I get warning: PHP Warning: imagepng: unable to open temporary file in ../../include/Gr_sektor.php on line 413. Image is not created, as you are right thinking. What temporary file? Where is it usually created? How can I change the place to another? Or, may be, I should give some rights for my anonymous user for specific folder (what?). The exterior: Win2000Srv, IIS 5.0, anonimous (IUSR_SERVER2) user for access. Help, please! -- Alexander Rybin [EMAIL PROTECTED] ICQ: 13391736 ôÅÌ./æÁËÓ: +7-(08439)-62194 Pager: [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] Function No Longer works
I have found the problem with my previous post and PHP functions no longer working. It seems the code: include(http://www.domain.com/path/to/file.txt;); no longer works? If I type in a complete directory path then it works great, but no Internet include, any one know why? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP PGP
It is possible, but I have not found any good tutorials on the subject. There is one on Web Monkey at this address: http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial1.html All the commands were wrong for the PGP version (6.5) that was loaded on my web server. I found that the following worked: 1. Make sure you know where PGP is located on the server. Try a whereis pgp. On my system it was installed in /usr/bin. 2. Make sure the nobody (or the user the web server runs as) user has a home directory defined in your passwd file. This will cause problems when you setup the key ring. (do not define a shell for this user!) 3. Copy an ASCII version of your public key into a file that the nobody user can access. 4. su into the nobody account 5. Create a signing key for the nobody user this this command: pgp -kg There is no need to create an encryption key. 6. Add your public key to nobody's keying with this command: pgp -ka /path/to/your/public/key 7. Assign an trust level to the key: pgp -ke 'Usuerid' If you don't know the userid for the key use pgp -kvv to find out 8. Sign the key with: pgp -ks 'your user id' -u 'their userid' Then the form and php script in the Web monkey tutorial should work. Let me know if this helps and good luck. David Price -Original Message- From: Pepe Lopez [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 7:06 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP PGP Hi there, I want to encrypt mails coming from my webform with pgp. Is it possible? regards, Lopez -- 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] Pricing Advice Needed
On 28 Jun 2001 02:08:20 -0700 impersonator of [EMAIL PROTECTED] (elias) planted I saw in php.general: It all depends on your experience and knowledge. You know that if you're too experienced you can save lots of research and learning time. therefore you have to estimate how much does your hour cost and how much are you able to do. you can start by $20/hour... You stared your post almost as i think, but then degraded to Unionistic's/Communistic (to my mind:) views. I think - only the end product costs something (not a labor by itself) - therefore cost would better be estimated for the whole needed to be done project (based on market price). And you decide - whether you fit required deadlines, and whither your performance is enough to support yourself on every concrete project. At least this seem to be right for freelances.. I know, trade unions will flame me for that:) But then again what are they have being doing all the time (and not always _genital_:) Alva Chew [EMAIL PROTECTED] wrote in message 9hejcu$3n6$[EMAIL PROTECTED]">news:9hejcu$3n6$[EMAIL PROTECTED]... Hi everyone, Just don't really know where to post this, so here goes: I am working as a freelance programmer. Problem is I don't really have a clue how the pricing mechanism in the industry works. I have heard calculations based on man hours and lines of code, so perhaps anyone one can tell me on the average, how much should I be charging per man hour, or per line of code? Sincere thanks and regards, Alva Chew, Singapore -- 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] Leonid (not a member:) -- 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] new break tags
I'm trying to fix two regular expressions to work with the new break tags. This $breaks=preg_match_all(/br\s+br/i, $text, $parts) and this preg_replace(/br\s+br/i,/PP class=\doserif\,$text) Now that PHP 4.0.5 has changed the nl2br() function, it no longer replaces new lines with: br but instead with the new XHTML compliant break tags: br / I tried just substituting the new tag into the above regular expressions to no avail. Any ideas? kind regards, bill hollett -- 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] simple message board (no login)
anyone got a simple threaded message board where the poster doesn't have to login but can leave there name. OR anyone modified the nuke forum so anonymous users can leave their name? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Line Breaks in textarea
On Thu, 28 Jun 2001 04:44, Nathan Cook wrote: Hello- I am selecting a value from a blob field in a mysql db. The value looks like this: Test 12...3 \r \n br %0%D Test When I print that value in a TEXTAREA$value/TEXTAREA -- The textarea returns exactly what you see above. I am trying to get it to display a line break (so that I can store the line breaks in the db). If you can shed any light on this subject, please share. Thank You, Nathan Cook [EMAIL PROTECTED] You might want to make your textarea tag thus: TEXTAREA WRAP=VIRTUAL$value/TEXTAREA to show any EOLs as line breaks. Cue RANT from Richard Lynch on TEXTAREA :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Spell chequers dew knot work write. -- 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] Stopping stolen / spoofed / linked sessions
I want to use PHP4 sessions for authentication, Ok, stop right there. Sessions and authentication have nothing to do with each other. To create a secure authenticated site you should be using HTTP-based authentication over SSL. Sessions are simply for maintaining state across http requests and have nothing to do with authentication. -Rasmus -- 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] Temporary file during image create trouble
Hello!Can anybody help me with some problem?Here it is.I need to create PNG image with PHP script.When I try to create the image with ImagePNG(), I get warning: "PHP Warning:imagepng: unable to open temporary file in ../../include/Gr_sektor.php online 413". Image is not created, as you are right thinking.What temporary file? Where is it usually created? How can I change the placeto another? Or, may be, I should give some rights for my anonymous user forspecific folder (what?).The exterior: Win2000Srv, IIS 5.0, anonimous (IUSR_SERVER2) user for access.Help, please!--Alexander Rybin[EMAIL PROTECTED]ICQ: 13391736ôÅÌ./æÁËÓ: +7-(08439)-62194Pager: [EMAIL PROTECTED]
[PHP] Reducing Brackets is a Logical expression
Somewhere, some time ago, i saw a rountine, C, C++, php, some language that provided a rountine to reduce brackets in a logical expression to the fewest number of brackets possible (much like mysql does), for ex: ((a and b) or (a and c)) would be reduced to: (a or c) and b not a very good example, anyone one ever run across this code, or have an idea what this operation is called, I know there was a namefor the life of me I can't remember the name. any help appreciated kb __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regular Expression help
Hi everyone, I have a new user function that checks e-mail addresses. I wish to only allow people from two different domains to register. How can I filter out all other e-mail addresses and return an error if it's not from those domains. Here's what I have: if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$,$email))) $stop = center._ERRORINVEMAIL./centerbr; What this currently does is just makes sure it's a valid e-mail address. What I'd like it to do is if the user enters anything except @domain1.com or @domain2.com it spits out the error (ERRORINVEMAIL) So (I think) It would look something like this: if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@([DdOoMmAaIiNn1] || (or statement???) [DdOoMmAaIiNn2-]+\.)+[a-z]{2,3}$,$email))) $stop = center._ERRORINVEMAIL./centerbr; Of course, this doesn't work, but you get the point. Thanks! P.S. Thanks for the Awesome List! Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net -- 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: Regular Expression help
Okay, here's what I have so far: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This works, but how can I add a second domain? ie: ---snip--- if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@domain.+[a-z],$email)) || (!eregi(^[_\.0-9a-z-]+@otherdomain.+[a-z],$email)) ) $stop = center._ERRORINVEMAIL./centerbr; ---snip--- This doesn't work. (it returns the error no matter what I enter) Thanks guys (and gals?) Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net - Original Message - From: Clayton Dukes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 29, 2001 9:08 AM Subject: Regular Expression help Hi everyone, I have a new user function that checks e-mail addresses. I wish to only allow people from two different domains to register. How can I filter out all other e-mail addresses and return an error if it's not from those domains. Here's what I have: if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$,$email))) $stop = center._ERRORINVEMAIL./centerbr; What this currently does is just makes sure it's a valid e-mail address. What I'd like it to do is if the user enters anything except @domain1.com or @domain2.com it spits out the error (ERRORINVEMAIL) So (I think) It would look something like this: if ((!$email) || ($email==) || (!eregi(^[_\.0-9a-z-]+@([DdOoMmAaIiNn1] || (or statement???) [DdOoMmAaIiNn2-]+\.)+[a-z]{2,3}$,$email))) $stop = center._ERRORINVEMAIL./centerbr; Of course, this doesn't work, but you get the point. Thanks! P.S. Thanks for the Awesome List! Clayton Dukes CCNA, CCDA, CCDP, CCNP Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net -- 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 / apache
can anyone tell me how to configure a php script so that it can only be accessed by other scripts and not directly by typing its url in the webrowser? -petur -- 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] wierd array problem using mysql_fetch_array and mssql_fetch_array
Hi, I've been having some very wierd problems using arrays and the database functions for mysql_fetch_array and mssql_fetch_array. (Running on Windows 2000). Please see the comments in the code below. #connect to the ms sql db #(the problem also occurs when using a mysql db) $connsrc = mssql_connect(dellserver,vbweb, password); #select the db mssql_select_db(vbwcontent, $connsrc); #execute the query $query = mssql_query(SELECT TOP 10 * FROM dir_items); #get the number of fields in the query $count=mssql_num_fields($query); while ($data=mssql_fetch_array($query)) { #in theory, count($data) should return the same number #as the $count variable, but it returns twice the amount #presumably because of the use of keys and indicies? #loop through the returned data for ($i=0;$i$count;$i++) { #we can try to do this 2 ways, both cause access errors #use the array position. However, once we use this, #it appears we cannot use the named field... try it! $data[$i]=str_replace(','',$data[$i]); #alternatively, try getting the name of the field, and reference #it using it's named field... $pos=mssql_field_name($query,$i); $data[$pos]=str_replace(','',$data[$pos]); #and we still get 'PHP has encountered an Access Violation at 0146E027', or #Warning: Cannot use a scalar value as an array in D:\Virtual Hosts\vbweb.co.uk_new\bin\importdata.php on line 27 #it appears that PHP is getting it's memory in a mess, as #some very weird values are returned... } echo INSERT INTO dir_items (authorid,url) VALUES ($data[memberid],'$data[url]'); } Can any one tell me why this is happening, and any way to work around it? Regards, - James Editor, VB Web == Web - http://www.vbweb.co.uk Email - [EMAIL PROTECTED] ICQ# - 60612011 Fax - +44(0)8707052859 == -- 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 PGP
Yes, here's some code, adapt to your needs. -Original Message- From: Pepe Lopez [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:06 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP PGP Hi there, I want to encrypt mails coming from my webform with pgp. Is it possible? regards, Lopez -- 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] calculate download time
Scott, All your method does is come up with how many kb/s you would need to achieve to transfer the file in 1 minute. To estimate how long it would take with a 28.8 modem connection (many sites do this), I would do something like the following: -- 28.8Kbps Modem (that's kilobit, not byte, so let's convert it to KB) ( 28800 / 8 ) / 1024 = 3.515625 -- So, we assume a transfer rate of approx. 3.5KB/sec ( y / 3.5 ) / 60 = x x is how many minutes it will take to transfer a file of size y using a 28.8 Kbps modem. -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:42 AM To: php Subject: RE: [PHP] calculate download time simple. get total KB (1k = 1024 bytes) divide that by 60 (seconds in a minute) now you have estimated transfer time in minutes. -Original Message- From: Rhett Hermer [mailto:[EMAIL PROTECTED]] Subject: [PHP] calculate download time Hi, I am trying to write code to find out how long it takes to download a file. The code is below. When I compare to other websites which you can calculate online, varies wildly. I do know about many factors that affect the download times. All I want is correct forumla to caclulate. $b = filesize(foo.zip); echo brIt will take you:br; $dl = (($b * 8) / (64*1000)); $sec = $dl % 60; $min = (($dl / 3600) % 60); $hrs = $dl / 3600; printf (%1.0f hours, %1.0f mins and %1.0f secs at 64k/sbr, $hrs, $min, $sec); -- 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 PGP
class eZGPG { /*! \static Encrypt function */ function eZGPG( $plaintxt, $keyname, $wwwuser) { $this-keyname=$keyname; if ( sizeof( $this-keyname ) == 0 ) $this-body = WARNING: No Keys Specified; $this-pcmd = echo '$plaintxt' | ; $this-pcmd .= $this-pathtogpg.$this-encryptcommand; $this-pcmd.= -a -q --no-tty -e -u . $wwwuser . --homedir ' . $this-home .' -r '. $this-keyname . ' ; //clear return array and execute encrypt command unset( $ret ); exec($this-pcmd, $ret); //loop return array for encrypted text foreach( $ret as $key=$value ) { $this-body .= $value; $this-body .=\n; } } // return $this-body function getbody() { return $this-body; } var $body; var $keyname = array(); var $ret = array(); var $pathtogpg = /usr/bin/; var $pcmd; var $encryptcommand = gpg --encrypt --batch --no-secmem-warning; var $home = /var/www/.gnupg; } -Original Message- From: Pepe Lopez [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:06 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP PGP Hi there, I want to encrypt mails coming from my webform with pgp. Is it possible? regards, Lopez -- 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 crashing IIS 5 on Wnidows 2K
Remember that the cgi version does not support PHP authentication. the DLL version does! Brave Cobra -Original Message- From: Bernie Kruger [mailto:[EMAIL PROTECTED]] Sent: donderdag 28 juni 2001 15:08 To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP crashing IIS 5 on Wnidows 2K I had PHP 4.0.5 ISAPI running in Win2K IIS5. It also crashed every few minutes. I switched over to CGI and now its running like a dream. Bernie Kruger Phil Driscoll [EMAIL PROTECTED] wrote in message 01062709242201.02176@linux">news:01062709242201.02176@linux... On Tuesday 26 June 2001 21:35, Jason Lustig wrote: I have PHP 4.04pl1 set up on a IIS 5 server on Windows 2k. However, it keeps on crashing the server -- not all the time, but sometimes it does, sometimes it doesn't. And I have no idea whatsoever what is causing it. I *think* that it has to do with my include()s. I end up including all my function and nav libraries into each and every page, which turns out to maybe 10 includes. Theoretically, yes, it would put a hit on the server because PHP uses the file system so much, but it shouldn't crash it. Is this possibly the reason it is crashing? Assuming that you are using the ISAPI version of PHP, it is probably crashing because that version of PHP is not very stable. You should upgrade to 4.0.6 which contains improvements in that area, but it is still not perfect. If you find 4.0.6 unstable either change from ISAPI to CGI or if you can, change from IIS to Apache and use the Apache module version of PHP. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Filtering out \ when a ' is user entered?
I had the same problem: So I tried stripslashes.. But Queries do break if unslashed ' or are present. and furthermore, there are many other problems .. So I created a function called entities.. Why don't you simply use addslashes () again when you put the stuff into the DB? Better yet, only use stripslashes() to display to the user. If your code is well-organized, you need stripslashes() in only a couple places, and that's it... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Function
you can use array_walk array_walk (PHP 3= 3.0.3, PHP 4 = 4.0b1) array_walk -- Apply a user function to every member of an array Description int array_walk (array arr, string func, mixed userdata) - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 10:48 AM Subject: [PHP] Function Hi, Is there any function to replace a character in an Array ??. Thanx in adv. ~ Karthick. -- 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 PGP
possible? yes. feasable? yes and no... 1) encrypting traffic from the user's browser to your server is extremely impractical. 2) encrypting information on the server with PGP is a whole lot easier... there are a bunch of PHP - PGP interface packages i've seen around, so do some searching and see what you pull up. after a quuick search at PHP Classes, i found this class that will encrypt text with PGP and attach it to an email message... i'm sure that you could rip out the pertinent portions of code and use it for your own ends: http://phpclasses.upperdesign.com/browse.html/package/39 -Original Message- From: Pepe Lopez [mailto:[EMAIL PROTECTED]] Subject: [PHP] PHP PGP Hi there, I want to encrypt mails coming from my webform with pgp. Is it possible? regards, Lopez -- 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] how to flip an image using GD?
how would i flip an image horizontally using the GD library in PHP? Noah -- 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] extract data from html
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Adrian D'Costa) wrote: 1. Open the html file in read only mode 2. Start reading the html file till I encounter a td tag (I don't know how to do this) 3. Grab that data after the td tag (and then what?) See http://php.net/manual/en/function.fopen.php and http://php.net/manual/en/function.fgetss.php plus the chapter for whatever DBMS you want to drop the file contents into. Thanks. One thing just reading the manual without the idea of how the function works is of no use. It should be exactly of use. Explaining how a function works, and how to use it, is the point of a manual. If there are finer points that you need clarification on *after reading the manual entry*, that's understandable. But for the most part the manual is clear and accessible, even to a newbie. I learned PHP, as a complete novice to that language and programming in general, by simply reading the manual through. Some examples would help. ..which is why most manual entries include 1-2 official examples, plus several others in the user annotations. If you're not reading the annotated version of the manual (as in the links provided), then you're only scratching the surface of what the manual has to offer. In fact I did use fopen, fgets, fgetss but the problems is that the html tag that I am looking is td. Now this is easy but if td width=25% or td colspan=7 would give a problem. See http://php.net/manual/en/function.strip_tags.php (as is noted in the see also note and user annotation for fgetss, BTW; did you bother to read the links provided before proclaiming them of no use?) -- CC -- 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] Insight into Object Serialization and Loading
Quick question to the powers that be. With the current implementation of objects and such, how flexible is unserialize and serialize. I am currently building a large object oriented web application, and I have a pile of moduls and definition files stored to disk as serialized objects. Just wondering how much flexibility I have with changing class definitions (adding/removing member variables). If I add 5 variables to the class definitions will my app fail terrible when unserializing? How about if I get rid of some variables from the class definition. Or, when unserializing, does PHP just match up whatever variables it can, and then it doesn't worry about the rest? Insight appreciated. -Brian Tanner -- 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] Pricing Advice Needed
On Thursday 28 June 2001 12:44, Alva Chew wrote: Thanks for the advice, what about charging by line of code? how does that apply? Don't. Lines of code are a terrible measurement. Good programmers often write code that has more functionality, is more maintainable *and* is much smaller than the code of newbies. Furthermore it's bad for you - you don't spend a constant amount of effort per source line. Some parts are easy while others take much time. And some areas of work (database setup, site structure planning etc) produce zero lines of code. -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) ...to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy. - David Weinberger JOHO January 25, 2000 -- 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] Filtering out \ when a ' is user entered?
On Thursday 28 June 2001 10:44, Delbono wrote: I had the same problem: So I tried stripslashes.. But Queries do break if unslashed ' or are present. and furthermore, there are many other problems .. So I created a function called entities.. Why don't you simply use addslashes () again when you put the stuff into the DB? -- Christian Reiniger LGDC Webmaster (http://lgdc.sunsite.dk/) ...to paraphrase Churchill, while representative democracy may be terrible, it's still the best system that large corporations can buy. - David Weinberger JOHO January 25, 2000 -- 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] Convert (join)
there's also join() (which is the exact same as implode) but might help you remember that it's joining the elements of an array together into a single string. -Original Message- From: Alva Chew [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 9:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Convert use implode(separator, $array). the separator joins the array together. For example, if you got 'cat', 'run', 'dog' in the array using implode(-, $array) will give you: cat-run-dog. Got it? regards, Alva Chew [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi How do I convert arrays to string ??. ~ Karthick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cannot determine HOSTNAME in 4.0.6?
Something was changed between 4.0.5 and 4.0.6 and now there is no way to determine the host name of the local host from a PHP script when executed in Apache. The output of phpinfo shows that the HOSTNAME environment variable that existed in 4.0.5 is not available in 4.0.6. This affects the return value of getenv and the contents of HTTP_ENV_VARS. Is this a bug or a feature? Here are the variables listed in the Environment section of Additional Modules as output from phpinfo on two of my servers, one with 4.0.5 and one with 4.0.6. 4.0.5 - LESSOPEN USERNAME ENV HISTSIZE HOSTNAME LOGNAME MAIL TERM HOSTTYPE PATH HOME INPUTRC SHELL USER LANG OSTYPE SHLVL LS_COLORS _ 4.0.6 - INIT_VERSION previous TERM HOSTTYPE PATH CONSOLE HOME PREVLEVEL RUNLEVEL SHELL runlevel AUTOBOOT BOOT_IMAGE OSTYPE SHLVL _
Re: [PHP] PHP PGP
Pepe Lopez [EMAIL PROTECTED] wrote: Hi there, I want to encrypt mails coming from my webform with pgp. Is it possible? this hack might help you http://alt-php-faq.org/#id65 -- Henrik Hansen -- 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] Missing arguments for function in class? (object-orientedprogramming)
rename either the function or the class. class Display_Records { function display_records($row, $record_count) { $current_date = (date(Y-m-d)); $age = ($current_date); return $age; } function disp_rec($row, $record_count) { $current_date = (date(Y-m-d)); $age = ($current_date); return $age; } } $d = new Display_Records(); // no problem here print $d - disp_rec('row', 'record cont'); // big problem here print $d - display_records('row', 'record cont'); -Original Message- From: Thomas David Kehoe [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 9:27 AM To: [EMAIL PROTECTED] Subject: [PHP] Missing arguments for function in class? (object-orientedprogramming) I have a function that works perfectly (from within a script). But when I make it a class (object) and call it from an external file, I get the following error: Warning: Missing argument 1 for display_records() in http://www.friendshipcenter.com/Objects/display_records.inc on line 5 Warning: Missing argument 2 for display_records() in http://www.friendshipcenter.com/Objects/display_records.inc on line 5 After the warnings, it executes the function without passing values to the variables (i.e., it doesn't work), and then it executes the function a second time perfectly (with the appropriate variables). Line 5 is this: function display_records($row, $record_count) It displays the first error message for $row, and the second error message for $record_count. I call the function with this: $my_records = new Display_Records; $my_records - display_records($row, $record_count); The full scripts are below. What I tried that didn't help was declaring the variables in the class with: class Display_Records { var $row; var $record_count; I also tried setting defaults for the variables (er, attributes) with this (it didn't help): $my_records = new Display_Records; $my_records - row = $row; $my_records - record_count = 1; $my_records - display_records($my_records - row, $my_records - record_count); This is my first try at OOP. The code is for a personal ad website (FriendshipCenter.com). Here's the full class script, followed by the script I use to call the function. -- Thomas David Kehoe, author of THE EVOLUTION OF INTIMATE RELATIONSHIPS How Our Brains Are Hardwired For Relationships http://www.FriendshipCenter.com/TEIR/ ?php class Display_Records { function display_records($row, $record_count) { //Calculate age $current_date = (date(Y-m-d)); $birthdate = $row[BIRTHDATE]; $age = ($current_date - $birthdate); // Display record number. echo Row number:nbsp;, ($record_count + $advance_row), p; // Display username and e-mail address echo font color=greenUsername: /font, $row[USER_NAME], p; echo font color=greenE-mail address: /fonta href=mailto:;, $row[EMAIL_ADDRESS], , $row[EMAIL_ADDRESS], /ap; // Display the information provided by the member. Empty fields aren't displayed. if ($row[DISABILITY_1 OR DISABILITY_2 OR DISABILITY_3 OR DISABILITY_4 OR DISABILITY_5 OR DISABILITY_6 OR DISABILITY_7 OR DISABILITY_8]) {echo font color=greenDisability, disease, or condition: /font, $row[DISABILITY_1], , , $row[DISABILITY_2], , , $row[DISABILITY_3], , , $row[DISABILITY_4], , , $row[DISABILITY_5], , , $row[DISABILITY_6], , , $row[DISABILITY_7], , , $row[DISABILITY_8], p;} if ($row[LIFE_STORY]){echo font color=greenLife story: /font, $row[LIFE_STORY], p;} if ($row[PHOTO_URL]){echo IMG HEIGHT=250 SRC=, $row[PHOTO_URL], p;} if ($row[PHOTO_URL]){echo font color=greenPhoto URL: /fonta href=, $row[PHOTO_URL], , $row[PHOTO_URL], /ap;} if ($row[HOMEPAGE_URL]){echo font color=greenPersonal website URL: /fonta href=, $row[HOMEPAGE_URL], , $row[HOMEPAGE_URL], /ap;} if ($row[CITY]){echo font color=greenCity: /font, $row[CITY], p;} if ($row[STATE]){echo font color=greenState: /font, $row[STATE], p;} if ($row[COUNTRY]){echo font color=greenCountry: /font, $row[COUNTRY], p;} if (($row[BIRTHDATE]) != -00-00) {echo font color=greenAge: /font, $age, p;} if ($row[GENDER]){echo font color=greenGender: /font, $row[GENDER], p;} if ($row[EDUCATION]){echo font color=greenEducation: /font, $row[EDUCATION], p;} if ($row[PROFESSION]){echo font color=greenProfession: /font, $row[PROFESSION], p;} if ($row[MARITAL_STATUS]){echo font color=greenMarital status: /font, $row[MARITAL_STATUS], p;} if ($row[SEXUAL_ORIENTATION]){echo font color=greenSexual orientation: /font, $row[SEXUAL_ORIENTATION], p;} if ($row[RELIGION]){echo font
Re: Re: [PHP] PHP and Windows XP
Yes, it will work. I know somebody, who has installed Apache 1.3.20 and PHP 4.0.5. --- elias [EMAIL PROTECTED] wrote: From pop_server.8745454@pop.gmx.net Thu Jun 28 17:53:33 2001 Return-Path: [EMAIL PROTECTED] X-Flags: Delivered-To: GMX delivery to [EMAIL PROTECTED] Received: (qmail 1264 invoked by uid 0); 28 Jun 2001 16:47:13 - Received: from w153.z064000151.sjc-ca.dsl.cnc.net (HELO toye.php.net) (64.0.151.153) by mx0.gmx.net (mx09) with SMTP; 28 Jun 2001 16:47:13 - Received: (qmail 609 invoked by uid 1013); 28 Jun 2001 08:35:32 - Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 599 invoked by uid 9); 28 Jun 2001 08:35:32 - To: [EMAIL PROTECTED] From: elias [EMAIL PROTECTED] Date: Thu, 28 Jun 2001 11:40:11 -0700 Lines: 19 Message-ID: 9heq8k$e6$[EMAIL PROTECTED] References: NFBBLHGFAKNLFNPOHMPHKEKEDEAA.jk@intern X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Subject: Re: [PHP] PHP and Windows XP Content-Length: 771 Why not? if it works with WinME and PWS, I suppose it will with XP too. Please try it and report what happens please. Jochen Kaechelin [EMAIL PROTECTED] wrote in message NFBBLHGFAKNLFNPOHMPHKEKEDEAA.jk@intern">news:NFBBLHGFAKNLFNPOHMPHKEKEDEAA.jk@intern... Will PHP run under Windows XP? -- 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] -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- GMX Tipp: Machen Sie Ihr Hobby zu Geld bei unserem Partner 11! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a -- 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] Convert
Have you some program for convert Microsoft Access Database (*.mdb) to the MySQL database ? Thanks Roman -- 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] problems with round ..
This code works fine with PHP 4.0.5 on Win. ?php srand (microtime()); for ( $i = 0; $i 1000 ; $i++) { $BLAH = rand() / 100; echo round($BLAH, 2), 'br'; } ? - Original Message - From: Chad Day [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 2001. június 27. 17:27 Subject: RE: [PHP] problems with round .. Yes, it is. I've tried it on a couple different php4 servers, I've never gotten it to work. Chad -Original Message- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 8:00 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] problems with round .. In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Chad Day) wrote: $BLAH = round($BLAH, 2); Spits out a wrong parameter error. I've tried quotes around the variable, the parameter, and any combinations, but it still pukes on me. Why can't I specify a precision? According to the manual, the second parameter is only available in PHP4--is that what you're using? -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]