php-general Digest 23 Aug 2007 10:44:37 -0000 Issue 4977

2007-08-23 Thread php-general-digest-help
php-general Digest 23 Aug 2007 10:44:37 - Issue 4977 Topics (messages 261140 through 261156): Re: Announcement: Releasing CORE GRASP for PHP. An open source, dynamic web application protection system. 261140 by: mike 261143 by: Chris 261145 by: mike 261146

Re: [PHP] Upload and resize file

2007-08-23 Thread Craige Leeder
While I'm not 100% sure, I'd say something's wrong with this line: system(pnmscale -xy 250 200 $tmpimg | cjpeg -smoo 10 -qual 50 $imgfile); I would say that Linux is not writing the output to the location stored in $imgfile, and thus there is no file there to delete. However, I can not really be

Re: [PHP] Outputting a PDF.

2007-08-23 Thread Craige Leeder
Rob, This has to be a browser problem. I cannot see it being anything else. For arguments sake however, would you mind showing us your code. While I'm sure it is a browser issue, it may have something to do with what PHP is returning to the browser. - Craige On 8/22/07, Rob Adams [EMAIL

Re: [PHP] using disable_functions silently

2007-08-23 Thread Craige Leeder
Are you *running* a shared hosting environment? If so, what is to stop you from adding the exec() function to the list in php.ini? - Craige Don't think so. The code just needs to handle it better. I do it like this: $disabled_functions = explode(',', str_replace(' ', '',

Re: [PHP] using disable_functions silently

2007-08-23 Thread Chris
Craige Leeder wrote: Are you *running* a shared hosting environment? If so, what is to stop you from adding the exec() function to the list in php.ini? He wants php to automatically ignore functions listed in the 'disabled_functions' list - which there is no way to do. -- Postgresql php

Re: [PHP] using disable_functions silently

2007-08-23 Thread Craige Leeder
Oh, okay. He simply wants to ignore them without raising any flags to say it has been done. I get what he wants. However, as you stated, there is no way to do this (to the best of my knowledge). - Craige On 8/23/07, Chris [EMAIL PROTECTED] wrote: Craige Leeder wrote: Are you *running* a

[PHP] read only?

2007-08-23 Thread coolcoder
Is there a simple php way to make a webpage read-only, please? www.coderewind.com Best Place to hunt for Code -- View this message in context: http://www.nabble.com/read-only--tf4316703.html#a12291195 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General

RE: [PHP] read only?

2007-08-23 Thread Chris Boget
Is there a simple php way to make a webpage read-only, please? Webpages are already read only. Well, read only in the browser. There is nothing to prevent the user from saving the page and altering to their hearts content. Did you mean to ask if there was a simple way to make a *form* read

[PHP] Re: Upload and resize file

2007-08-23 Thread Al
Suggest you find another script. That one is weird and not simple PHP code, which will do your task easily. Beauford wrote: I downloaded this 'upload and resize image' script, and since I have no idea what I am looking at as this is something I have never done, could someone have a look and

[PHP] Re: Outputting a PDF.

2007-08-23 Thread Al
Do you want the pdf to automatically render or to be an attachment? Which or both IEs, IE6 and/or IE7? Try Goggling IE pdf. You'll see several discussions of your problem. Rob Adams wrote: I have a pdfs saved in a database (created with pdflib). When I output them in firefox, it works

Re: [PHP] Recompiling PHP with mssql

2007-08-23 Thread Dan Shirah
You shouldn't need to recompile PHP. Just go into your PHP.ini file and uncomment the line: ;extension=php_mssql.dll After that you can go to the [MSSQL] section of the .ini file and change the rest of the settings however you want them. IE. Allow persistent connections, timeouts etc. Then,

[PHP] Creating a table with merged cells

2007-08-23 Thread Phpmanni
Hi I need to represent a sort of map. The map is a rectangular table of size X in widht and Y in height, so that I have X*Y square cells. I need to record in a database some infos for each cell. This is easy, I thought to use a record that is something like (X,Y,MyData), so with two nested loops

Re: [PHP] Creating a table with merged cells

2007-08-23 Thread Wouter van Vliet / Interpotential
You may want to look into the rowspan and colspan attributes of td G'luck! On 23/08/07, Phpmanni [EMAIL PROTECTED] wrote: Hi I need to represent a sort of map. The map is a rectangular table of size X in widht and Y in height, so that I have X*Y square cells. I need to record in a database

RE: [PHP] using disable_functions silently

2007-08-23 Thread Jay Blanchard
[snip] Unfortunately we would need a solution without changing the PHP code of our users. No way to do that? [/snip] Not really. You could auto-prepend all of the PHP files with the necessary PHP files, but that may not be a really good solution. -- PHP General Mailing List

Re: [PHP] Creating a table with merged cells

2007-08-23 Thread Phpmanni
Yes, I know I can use colspan and rowspan. Colspan is easy, I have problems when cells are vertically merged... You must build the table from the top and it is not easy to know for each row if they get some piece of cell from the preceding one. And you can have cells from the first to the last

[PHP] Re: Releasing CORE GRASP for PHP. An open source, dynamic web application protection system.

2007-08-23 Thread Colin Guthrie
Daevid Vincent wrote: The few extra ms to execute some secure code is well worth it IMHO over the chance of a XSS or script kiddie causing me hours of grief later. So in effect, we're on the same page I think. I think so :) Also it's worth noting that even for expert coders etc., one of

[PHP] Re: Recompiling PHP with mssql

2007-08-23 Thread Colin Guthrie
Dan Shirah wrote: You shouldn't need to recompile PHP. Just go into your PHP.ini file and uncomment the line: ;extension=php_mssql.dll After that you can go to the [MSSQL] section of the .ini file and change the rest of the settings however you want them. IE. Allow persistent

Re: [PHP] Creating a table with merged cells

2007-08-23 Thread Robert Cummings
On Thu, 2007-08-23 at 15:59 +0200, Phpmanni wrote: Hi I need to represent a sort of map. The map is a rectangular table of size X in widht and Y in height, so that I have X*Y square cells. I need to record in a database some infos for each cell. This is easy, I thought to use a record that

[PHP] SQL Injection protection

2007-08-23 Thread Jason Pruim
Hi Everyone, I have a application that I am writing for managing addresses on- line, I will have a fancy login system using sessions to help store the info, and to provide security for logging in. What I am wondering now, is if someone is willing to try and do some sql injection's on my

[PHP] Re: Re: About Session And Cookies

2007-08-23 Thread Michelle Konzack
Am 2007-08-21 19:34:24, schrieb Kelvin Park: Hello, thanks for all the replies. However, since I'm not very familiar with trans_sid I'll do some research on that. Michelle Konzack, if hiding the id in hidden form field element or enabling trans_sid could lead to security risks, what would

[PHP] Out of Memory error

2007-08-23 Thread Naz Gassiep
I'm getting out of memory errors in my image handling script, I *think* its because I'm handling images that are too large to fit in memory, but I thought I'd check before just upping the setting to 32mb. It is currently set to 16mb and I am working with a 2048x1536 image. Is it possible that

Re: [PHP] Out of Memory error

2007-08-23 Thread Robert Cummings
On Fri, 2007-08-24 at 01:21 +1000, Naz Gassiep wrote: I'm getting out of memory errors in my image handling script, I *think* its because I'm handling images that are too large to fit in memory, but I thought I'd check before just upping the setting to 32mb. It is currently set to 16mb and

[PHP] Re: Out of Memory error

2007-08-23 Thread M. Sokolewicz
Naz Gassiep wrote: I'm getting out of memory errors in my image handling script, I *think* its because I'm handling images that are too large to fit in memory, but I thought I'd check before just upping the setting to 32mb. It is currently set to 16mb and I am working with a 2048x1536 image.

Re: [PHP] Out of Memory error

2007-08-23 Thread Wouter van Vliet / Interpotential
I've got a followup question to this. Whenever you're doing something that takes too much memory, having a file uploaded that's bigger than max upload size (actually, not sure if that applies but I think it does) or when your script is taking too long to execute it just dies with a very unfriendly

Re: [PHP] Out of Memory error

2007-08-23 Thread Robert Cummings
Check the filesize before you attempt to load it. For uploads you can set maximum allowed uploads... can't remember if that is sufficient to catch the problem before it becomes a fatal error. Cheers, Rob. On Thu, 2007-08-23 at 17:35 +0200, Wouter van Vliet / Interpotential wrote: I've got a

Re: [PHP] Upload and resize file

2007-08-23 Thread brian
Beauford wrote: I downloaded this 'upload and resize image' script, and since I have no idea what I am looking at as this is something I have never done, could someone have a look and see what the problem might be. I've been searching around but haven't come across anything that makes any sense

[PHP] ignore-user-abort and connection-handling

2007-08-23 Thread Jason Pruim
Hi Everyone :) One of these days someone is going to get sick of hearing from me, but until that day comes I have another question :) I asked on a MySQL list about wether it's better to have 1 database with many tables, or many databases with 1 table for my address list application I'm

Re: [PHP] ignore-user-abort and connection-handling

2007-08-23 Thread Jason Pruim
Hey Craig, Thanks for the answer, my test data is 935 records and on initial page load, it only takes 2 seconds to load the entire page. So I probably won't worry about it for now. Thanks for the answer! :) On Aug 23, 2007, at 1:30 PM, Craige Leeder wrote: Hi Jason, If you have a

Re: [PHP] ignore-user-abort and connection-handling

2007-08-23 Thread Craige Leeder
Hi Jason, If you have a lengthy script with several queries throughout it, it is possible you could end up with a scrambled database. However, with short scripts, there is not much of a threat of this. Generally, your scripts will probable execute in 2 seconds (and 2 seconds is lengthy), with an

Re: [PHP] using disable_functions silently

2007-08-23 Thread Samuel Vogel
That'd be at least some kind of a solution. I'm thinking of overwriting the functions I want to block with one, that just returns true and does nothing. How would I do that? Jay Blanchard schrieb: [snip] Unfortunately we would need a solution without changing the PHP code of our users. No

[PHP] [mssql_connect] Interfaces File?

2007-08-23 Thread Liz Kim
Hello, I am trying to connect to a mssql server from php 4.3.9. mssql_connect('IP_ADDRESS:PORT_#',LOGIN,PASSWORD) or die(Could not connect to the mssql server); is failing... after doing a little bit of research, I found this on php.net *mssql_connect()* establishes a connection to a MS SQL

RE: [PHP] [mssql_connect] Interfaces File?

2007-08-23 Thread Jay Blanchard
[snip] I am trying to connect to a mssql server from php 4.3.9. mssql_connect('IP_ADDRESS:PORT_#',LOGIN,PASSWORD) or die(Could not connect to the mssql server); is failing... after doing a little bit of research, I found this on php.net *mssql_connect()* establishes a connection to a MS SQL

Re: [PHP] using disable_functions silently

2007-08-23 Thread Craige Leeder
You can't overwrite PHP's built-in functions, nor any function that has been defined for that matter. - Craige On 8/23/07, Samuel Vogel [EMAIL PROTECTED] wrote: That'd be at least some kind of a solution. I'm thinking of overwriting the functions I want to block with one, that just returns

[PHP] Live support system (in php)

2007-08-23 Thread robert mena
Hi, I am looking for solutions to enable live support in my websites. I was told that phplivesupport (http://www.phplivesupport.com/) is a good solution but it seems to be dead (no anwser to emails, always offline). Does anybody have another solution (with source code available) within the same

Re: [PHP] Re: Upload and resize file

2007-08-23 Thread Børge Holen
On Thursday 23 August 2007 14:50, Al wrote: Suggest you find another script. That one is weird and not simple PHP code, which will do your task easily. just my thoughts to Beauford wrote: I downloaded this 'upload and resize image' script, and since I have no idea what I am looking at

[PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Can server1 receive a web page form post from remoteAttacker, identify it as spam (or a DoS or DDoS attack), hand off the socket to multiple threads on multiple servers owned by server1's owner, return multiple responses to remoteAttacker which normally would have been a single response

Re: [PHP] Live support system (in php)

2007-08-23 Thread David Wonderly
robert mena wrote: Hi, I am looking for solutions to enable live support in my websites. I was told that phplivesupport (http://www.phplivesupport.com/) is a good solution but it seems to be dead (no anwser to emails, always offline). Does anybody have another solution (with source code

RE: [PHP] Re: Upload and resize file

2007-08-23 Thread Beauford
Been finding that out about the script. I have downloaded another and it works great. I just have to do some tweaking to suit my needs, but bottom line is it works. Thx -Original Message- From: Børge Holen [mailto:[EMAIL PROTECTED] Sent: August 23, 2007 3:30 PM To:

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Stut
Instruct ICC wrote: Can server1 receive a web page form post from remoteAttacker, identify it as spam (or a DoS or DDoS attack), hand off the socket to multiple threads on multiple servers owned by server1's owner, return multiple responses to remoteAttacker which normally would have been a

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Not sure what you mean by hand off the socket to multiple threads on multiple servers. I think you're talking about detecting that a POST is spam and passing that off to another machine to handle it. Yes, that is what I meant. A socket is a lower level object that the web server is using to

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Stut
Instruct ICC wrote: Not sure what you mean by hand off the socket to multiple threads on multiple servers. I think you're talking about detecting that a POST is spam and passing that off to another machine to handle it. Yes, that is what I meant. A socket is a lower level object that the web

Re: [PHP] Upload and resize file

2007-08-23 Thread Børge Holen
On Thursday 23 August 2007 03:41, Beauford wrote: I downloaded this 'upload and resize image' script, and since I have no idea what I am looking at as this is something I have never done, could someone have a look and see what the problem might be. I've been searching around but haven't come

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Why don't you and others just reply to the list? (I'm smiling when I say this.) Wow, that's for that egg-sucking lesson. I would think it was clear from my answer that I know what a socket is. Sorry. You understood the concept but it wasn't clear to me that you understood about the socket.

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Stut
Instruct ICC wrote: Why don't you and others just reply to the list? (I'm smiling when I say this.) Because that means messing with the recipient list - that's donkey work your client should do, hence my use of reply-to-all. Wow, that's for that egg-sucking lesson. I would think it was

Re: [PHP] Spam Post Defense / ID spam form posts

2007-08-23 Thread Instruct ICC
Because that means messing with the recipient list - that's donkey work your client should do, hence my use of reply-to-all. Wouldn't gmail thread it but still have 2 copies? I could send email TO/CC/BCC the list to a specific folder, but I'd still get the copy to me directly in another folder.

[PHP] [mssql_connect error] Changed database context to..

2007-08-23 Thread Liz Kim
Did anyone else run into this problem? PHP fails to connect to MSSQL7 with mssql_connect with the message: Changed database context to 'DB_NAME'. I've been searching around but did not find a good solution for PHP. I did find this link:

Re: [PHP] [mssql_connect error] Changed database context to..

2007-08-23 Thread John A DAVIS
That doesn't sound like the whole error message to me, but it does hint that maybe your connection isn't referencing the database correctly with the correct prefixes or USE statement. No expert here. "Liz Kim" [EMAIL PROTECTED] 8/23/2007 4:26:19 PM Did anyone else run into this

RE: [PHP] ignore-user-abort and connection-handling

2007-08-23 Thread Bastien Koert
if aborted actions are a worry, then consider using transactions in the database, if the process is interupted at any time, the changes made will all role back to a pre transaction start state. bastien Date: Thu, 23 Aug 2007 13:30:00 -0400 From:

Re: [PHP] Aggressive PHP Smart Caching

2007-08-23 Thread Nathan Nobbe
Alexander, i have begun to experiment w/ your caching tool. i wonder if you would mind providing some feedback.. firstly i noticed a call to ob_start(), ob_start('cacheSave'); which references the method defined beneath the initial bit of code, cacheSave(). in order to actually send anything

[PHP] Re: SQL Distinct-like behaviour

2007-08-23 Thread Hamza Saglam
$files = glob(directory/*.jpg); will give you a list of all the jpg files in the directory, $files_unique = array_unique($files); will get rid of the duplicates and create a shiny new array. Regards, Hamza. PS: glob is case-sensitive so the above will only match *.jpg, and not *.JPG

RE: [PHP] SQL Distinct-like behaviour

2007-08-23 Thread Jay Blanchard
[snip] How could I iterate over the files in a directory and build a list of unique filenames? Take the following filelist: file1_01.jpg file2_01.jpg file2_02.jpg file2_03.jpg file3_01.jpg file3_02.jpg file3_03.jpg file4_01.jpg file4_02.jpg file4_03.jpg I would like to build an array like this:

[PHP] check array values for all NULL

2007-08-23 Thread brian
I have an array that is initialised with many keys and all values set to NULL. I'd like to be able to test these values later to see if any of them have been set. I tried: if (!empty(array_values($the_array))) but that's not allowed, so: $array_check = array_values($the_array); if

Re: [PHP] SQL Distinct-like behaviour

2007-08-23 Thread brian
Marcelo de Moraes Serpa wrote: How could I iterate over the files in a directory and build a list of unique filenames? Take the following filelist: file1_01.jpg file2_01.jpg file2_02.jpg file2_03.jpg file3_01.jpg file3_02.jpg file3_03.jpg file4_01.jpg file4_02.jpg file4_03.jpg I would like to

[PHP] SQL Distinct-like behaviour

2007-08-23 Thread Marcelo de Moraes Serpa
How could I iterate over the files in a directory and build a list of unique filenames? Take the following filelist: file1_01.jpg file2_01.jpg file2_02.jpg file2_03.jpg file3_01.jpg file3_02.jpg file3_03.jpg file4_01.jpg file4_02.jpg file4_03.jpg I would like to build an array like this: $names

Re: [PHP] check array values for all NULL

2007-08-23 Thread Chris
This should work : $default_array = array('key0'=NULL,'key1'=NULL,'key2'=NULL,'key3'=NULL); $the_array = $default_array; [ ... do some stuff ... ] if($the_array === $default_array) { // handle it } brian wrote: I have an array that is initialised with many keys and all values set to

[PHP] CURL receiving content data

2007-08-23 Thread Bruce Steinback
Hi all, First thanks to the people that corrected my dumb mistake on XML parsing a few weeks ago, and let's hope that this is as dumb. I've got a mashup that when contacted attempts to gather feed info to mash into it's response. I send a GET request (Atom request to be exact), and get the

[PHP] PHP and SOAP calls

2007-08-23 Thread Angelo Zanetti
Dear All I have been using nusoap to development a client that makes SOAP calls to a server. I have however been stuck on a small issue but can't seem to solve it and therefore I need to relook at using another package to get a solution. So I have read that PEAR also has a package that

[PHP] nuSoap client SOAP Call problem

2007-08-23 Thread Angelo Zanetti
Dear all Im using nusoap to create a cleint and I am having a small issue but its a fairly large one because I cant get the correct XML to send. I have a scenario as follows: My client: $wsdlfile=http://xxx_WSDL.xml?wsdl;; $client=new soapclient($wsdlfile, true); //, true);