php-general Digest 27 Feb 2006 08:48:39 -0000 Issue 3987

2006-02-27 Thread php-general-digest-help
php-general Digest 27 Feb 2006 08:48:39 - Issue 3987 Topics (messages 231113 through 231126): Re: Parsing PHP variables in XML document 231113 by: Ivan Nedialkov 231119 by: Bogdan Ribic Re: PHP upgrade on Go Daddy virtual server 231114 by: Nicolas Verhaeghe

[PHP] Re: mail function

2006-02-27 Thread Cristian MARIN
I don't know exactly if this problem belongs to this news forum. This is more or less a SMTP question. The email servers names are kept into the mail MIME headers even if the message only passed through them and was then forwarded the servers names and IP's. This is done for anti-spam

[PHP] Secure input

2006-02-27 Thread emil
Hi, What shall one do to avoid people that trys to manipulate my server? I mysql_real_escape_string() all input from GET and POST. A long time ago I think I used addslashes or something like that too, so people couldn't insert php code in their input. Is that still something I should do, or

[PHP] URL output query

2006-02-27 Thread Chris
Greetings PHP folks, Which PHP function do I use if I want to achieve the following : http://www.somesite.com/gallery/pics.php is the url...how do I get it to read only http://www.somesite.com in the browser address bar without the rest of the directory and filename appearing ? Regards --

Re: [PHP] Secure input

2006-02-27 Thread Greg Schnippel
On 2/27/06 6:20 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: When users input is displayed for others then themself I try to filter out html tags too. I type cast all relevant variables before processing them as one last check. Type casting forces the variable to be of the type you

Re: [PHP] RSS / XML

2006-02-27 Thread John Nichel
Gustav Wiberg wrote: Hi there guys! Where is a good startpoint for learning XML Reader on a very, very basic level? (I appreciate links) Is RSS a technique for retrieving XML? I can't clue the pieces together... /G Please turn off your mail client's request for read receipts when sending

Re: [PHP] PHP Manual in PDF format

2006-02-27 Thread John Nichel
ÃmìtVërmå wrote: snip Please turn off your mail client's request for read receipts when sending to a mailing list. -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To

[PHP] classes and return values

2006-02-27 Thread Jason Gerfen
I am attempting to work up a class and because I am unfamiliar with some of the code flow I am only able to get a return value of 'object'. How can I pull the data out of a class? Any help, or pointers on what I am doing wrong is appreciated. class myAuth { var $user; var $pass; var $lvl;

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread John Nichel
Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but suggestions about Linux distributions are welcome as well! c

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread David Tulloh
Curt Zirzow wrote: On Sat, Feb 25, 2006 at 01:41:06PM -0900, Chris Lott wrote: I'm making the switch from Windows to Linux for mydesktop and development environment and would greatly appreciate suggestions for development tools on this platform. Ubuntu seems to be getting all the press, but

[PHP] Expiring other resources with HTTP headers

2006-02-27 Thread William Lovaton
Hello everybody, I write here to find out if this is possible: I want to expire an static file in the web browser through an HTTP header (Expires, Cache-Control or something else) sent from a PHP program. The usual thing is that those headers apply only to the program or file sending those

[PHP] Re: Expiring other resources with HTTP headers

2006-02-27 Thread Barry
William Lovaton wrote: Hello everybody, I write here to find out if this is possible: I want to expire an static file in the web browser through an HTTP header (Expires, Cache-Control or something else) sent from a PHP program. The usual thing is that those headers apply only to the program

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread David Tulloh
I don't think you can expire another file, I would consider any ability to do so a bug in the browser. Someone with too much time on their hands could possibly turn something like that into a security risk. I would solve the changing javascript problem by subtly altering the pages that use the

Re: [PHP] Secure input

2006-02-27 Thread tedd
Hi, What shall one do to avoid people that trys to manipulate my server? I mysql_real_escape_string() all input from GET and POST. A long time ago I think I used addslashes or something like that too, so people couldn't insert php code in their input. Is that still something I should do, or

[PHP] Sr. PHP Salary North Carolina

2006-02-27 Thread Beau Gould
Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? Thanks -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.1.0/269 - Release Date: 2/24/2006 -- PHP General Mailing List

[PHP] Class calling Class returning 'object'

2006-02-27 Thread Jason Gerfen
I am in need of some assistance working with classes. I have a function (X) which calls a class (A), that class calls another class (B) and returns the results. At this point I think I am doing everything correctly within' class A because if I echo the results of Class A calling Class B the

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread William Lovaton
Nice idea... thanks. I agree with you that the ability to expire another file would be somewhat risky but I fail to see how this could be exploited. May be the browser should allow this kind of operations from pages coming from the same server. But again, I don't think this is posible to begin

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread tedd
I know I could reduce the expiration time to reduce this problem but most of the time those files do not change. What can I do to notify the web browser that the file in the cache is no longer valid? -William William: Include this: ?php # nocache.php // this script prevents all caching //

Re: [PHP] Re: Expiring other resources with HTTP headers

2006-02-27 Thread William Lovaton
El lun, 27-02-2006 a las 16:21 +0100, Barry escribió: Set the HTML expire to yesterday. Therfore the browser will reload the whole page. Barry Hi Barry, I don't think this would work, this should refresh the HTML page only but the link pointing to the javascript file will be taken from the

[PHP] Optional pass-by-reference parameters?

2006-02-27 Thread TomS
I would like to have an optional pass-by-reference. i.e. you can call the function w/o the variable. Basically, like how you don't need to pass $matches to the preg_match function. I've tried, function some_func($var = null) and this doesn't work. func_get_args only gets copies, does anyone have

[PHP] Re: Sr. PHP Salary North Carolina

2006-02-27 Thread Barry
Beau Gould wrote: Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? Thanks Depends on the workspace and what kind of work somone has to do. Is it a monitoring position, or a leading one. More infos would probably help though. -- Smileys

RE: [PHP] Sr. PHP Salary North Carolina

2006-02-27 Thread Beau Gould
No I haven't. Thanks for the lead. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, February 27, 2006 11:18 AM To: [EMAIL PROTECTED]; php-general@lists.php.net Subject: RE: [PHP] Sr. PHP Salary North Carolina [snip] Can anyone possibly tell me what the

RE: [PHP] Sr. PHP Salary North Carolina

2006-02-27 Thread jblanchard
[snip] Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? [/snip] Have you tried looking at salary.com ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread William Lovaton
Hi Tedd, That's not exactly what I am looking for. That would cause the JavaScript file to be requested to the web server every single time. I just want the browser to request the file only when it have been modified on the server. Let's say that by default, those JavaScript files expires

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread Stut
William Lovaton wrote: Let's say that by default, those JavaScript files expires every 4 hours and that when a PHP program regenerates the file in the server it should, somehow, notify the web browser that the file changed and that it should request that file the next time it reloads the page

Re: [PHP] Sr. PHP Salary North Carolina

2006-02-27 Thread John Nichel
Beau Gould wrote: Can anyone possibly tell me what the salary range is for a Sr. PHP/MySQL Developer in North Carolina? Thanks http://.salary.com -- John C. Nichel IV Programmer/System Admin (ÜberGeek) Dot Com Holdings of Buffalo 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread tedd
William said: That's not exactly what I am looking for. That would cause the JavaScript file to be requested to the web server every single time. I just want the browser to request the file only when it have been modified on the server. Let's say that by default, those JavaScript files

[PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread phpmaillist
Hi, My first mailing, if I'm in wrong group or such, let me know ;) Here comes my question. I have implemented file uploads to my server. At the end of upload, file is beeing moved from /tmp to permanent directory. However, whenever this happens, CPU goes berzerk and waits for disk to finish

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Aaron Koning
Are you sure its the move_uploaded_file() function that is causing the delay? It could be the actual upload of the file itself. If it is the function causing the delay than try the rename() function instead. Also, I have used the copy() and unlink() functions and they work fast. Aaron On

Re: [PHP] Linux distributions and tools for Linux/Apache/PHP/MySQL dev

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 02:13:15AM +1100, David Tulloh wrote: Curt Zirzow wrote: Before I get into what distib to use there are a few things i'd like to point out: 1) Avoid using the packaging system the OS provides for the developement server. If you do, you will be under

Re: [PHP] classes and return values

2006-02-27 Thread Jochem Maas
Jason Gerfen wrote: I am attempting to work up a class and because I am unfamiliar with some of the code flow I am only able to get a return value of 'object'. How can I pull the data out of a class? which data? It doesn't seem as if anyone knows what your trying to do. (try to explain it

Re: [PHP] Optional pass-by-reference parameters?

2006-02-27 Thread Jochem Maas
TomS wrote: I would like to have an optional pass-by-reference. i.e. you can call the function w/o the variable. Basically, like how you don't need to pass $matches to the preg_match function. I've tried, function some_func($var = null) and this doesn't work. func_get_args only gets copies, does

[PHP] Strange slowdowns in PHP

2006-02-27 Thread William Lovaton
Hi there, I just setted up some changes to the Apache configuration and made some programming in PHP to log a request (and information about that request) when it is taking a lot of time to finish (let's say 20 secs). In the logs, there have been lots of useful information and I already

Re: [PHP] Secure input

2006-02-27 Thread Curt Zirzow
On Mon, Feb 27, 2006 at 12:20:51PM +0100, [EMAIL PROTECTED] wrote: Hi, What shall one do to avoid people that trys to manipulate my server? I mysql_real_escape_string() all input from GET and POST. The mysql_escape_string() will protect you from sql injections, the thing you have to

Re: [PHP] Strange slowdowns in PHP

2006-02-27 Thread Robert Cummings
What about session garbage collection? Can you log when that happens and see if it correlates with your problem? Cheers, Rob. On Mon, 2006-02-27 at 16:15, William Lovaton wrote: Hi there, I just setted up some changes to the Apache configuration and made some programming in PHP to log a

[PHP] Re: Strange slowdowns in PHP

2006-02-27 Thread Manuel Lemos
Hello, on 02/27/2006 06:15 PM William Lovaton said the following: Looking at the log I get the following information: - Execution time: 29.3 secs - Request started at: 11:08:06 AM - Request ended at: 11:08:35 AM - The functions that got executed were (time, class::method, duration): -

Re: [PHP] Strange slowdowns in PHP

2006-02-27 Thread William Lovaton
Mmmm... can you elaborate on that please? I kind of have the idea of what you mean but I don't know how to do it. What is exactly garbage collection in the context of a PHP session? I guess it is when PHP scans every session file to see if there are stale data or something like that and you can

Re: [PHP] recompiling php

2006-02-27 Thread Jochem Maas
blackwater dev wrote: I am trying to recompile php 5 with freetds so am using this : which specific version? try another [pristine] src tarball. ./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686'

Re: [PHP] Re: Strange slowdowns in PHP

2006-02-27 Thread William Lovaton
Hi Manuel, El lun, 27-02-2006 a las 18:54 -0300, Manuel Lemos escribió: Hello, on 02/27/2006 06:15 PM William Lovaton said the following: Looking at the log I get the following information: - Execution time: 29.3 secs - Request started at: 11:08:06 AM - Request ended at: 11:08:35 AM

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread William Lovaton
El lun, 27-02-2006 a las 12:35 -0500, tedd escribió: ps: your email address has generated a couple of bounced blog stuff thus far. Yeah, I seen that a couple of time now. What is going on? I have not anything to do with blogger.com, I don't know what is happening. What can I do to solve this?

Re: [PHP] Re: Strange slowdowns in PHP

2006-02-27 Thread Manuel Lemos
Hello, on 02/27/2006 07:22 PM William Lovaton said the following: Looking at the log I get the following information: - Execution time: 29.3 secs - Request started at: 11:08:06 AM - Request ended at: 11:08:35 AM - The functions that got executed were (time, class::method, duration): -

[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
So I have found this code in http://bg.php.net/manual/en/ref.xmlrpc.php and it evaluates PHP but when I try to use the PIHandler separately. It doesnt work. So I ask if someone could help me to make parser1 return an array just like parser2. PARSER1 ?php $file = xmltest2.xml; function

[PHP] Sessions in PHP... where to start???

2006-02-27 Thread Kostas Tsirigos
Hi everybody! I have a problem and I was told to check out the sessions part in PHP. What I want to deal with is the following : I have a PHP page with a form, where the user writes some data. These data are then written into a file which is then used in a system command as input for an external

Re: [PHP] recompiling php

2006-02-27 Thread Chris
Jochem Maas wrote: blackwater dev wrote: I am trying to recompile php 5 with freetds so am using this : which specific version? try another [pristine] src tarball. ./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686'

Re: [PHP] URL output query

2006-02-27 Thread Chris
Chris wrote: Greetings PHP folks, Which PHP function do I use if I want to achieve the following : http://www.somesite.com/gallery/pics.php is the url...how do I get it to read only http://www.somesite.com in the browser address bar without the rest of the directory and filename appearing ?

Re: [PHP] Class calling Class returning 'object'

2006-02-27 Thread Chris
Jason Gerfen wrote: I am in need of some assistance working with classes. I have a function (X) which calls a class (A), that class calls another class (B) and returns the results. At this point I think I am doing everything correctly within' class A because if I echo the results of Class A

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Chris
My first mailing, if I'm in wrong group or such, let me know ;) You've come to the right place :) Here comes my question. I have implemented file uploads to my server. At the end of upload, file is beeing moved from /tmp to permanent directory. However, whenever this happens, CPU goes

Re: [PHP] Sessions in PHP... where to start???

2006-02-27 Thread Philip Hallstrom
Hi everybody! I have a problem and I was told to check out the sessions part in PHP. What I want to deal with is the following : I have a PHP page with a form, where the user writes some data. These data are then written into a file which is then used in a system command as input for an

[PHP] Re: Parsing PHP variables in XML document

2006-02-27 Thread Ivan Nedialkov
I comed up with this ?php $file = xmltest2.xml; $stack = array(); $foo3 = wddw; // start_element_handler ( resource parser, string name, array attribs ) function startElement($parser, $name, $attribs) { global $stack; $tag=array(name=$name,attrs=$attrs); array_push($stack,$tag); } //

Re: [PHP] Strange slowdowns in PHP

2006-02-27 Thread Curt Zirzow
On Mon, Feb 27, 2006 at 05:16:01PM -0500, William Lovaton wrote: Mmmm... can you elaborate on that please? I kind of have the idea of what you mean but I don't know how to do it. What is exactly garbage collection in the context of a PHP session? I guess it is when PHP scans every session

Re: [PHP] Sessions in PHP... where to start???

2006-02-27 Thread Curt Zirzow
Well for the latter part of your question.. 'Where to start??' the first thing to start with is to NOT reply to a topic and change your subject to ask something else, instead click the icon in your email application that indicates a new message and compose your question addressed to

Re: [PHP] Expiring other resources with HTTP headers

2006-02-27 Thread tedd
El lun, 27-02-2006 a las 12:35 -0500, tedd escribió: ps: your email address has generated a couple of bounced blog stuff thus far. Yeah, I seen that a couple of time now. What is going on? I have not anything to do with blogger.com, I don't know what is happening. What can I do to solve

Re: [PHP] move_uploaded_file and CPU wait state (IO)

2006-02-27 Thread Curt Zirzow
On Mon, Feb 27, 2006 at 06:39:13PM +0100, [EMAIL PROTECTED] wrote: Hi, My first mailing, if I'm in wrong group or such, let me know ;) Here comes my question. I have implemented file uploads to my server. At the end of upload, file is beeing moved from /tmp to permanent directory.

Re: [PHP] recompiling php

2006-02-27 Thread John Nichel
Chris wrote: Jochem Maas wrote: blackwater dev wrote: I am trying to recompile php 5 with freetds so am using this : which specific version? try another [pristine] src tarball. ./configure '--with-apxs2=/usr/local/apache2/bin/apxs'

Re: [PHP] recompiling php

2006-02-27 Thread Curt Zirzow
On Sun, Feb 26, 2006 at 04:23:22PM -0500, blackwater dev wrote: I am trying to recompile php 5 with freetds so am using this : ./configure '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686' '--with-mssql=/usr/local/freetds' Things seem

Re: [PHP] move_uploaded_file and CPU wait state (IO) - unsubscribe

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 09:43:30AM +0800, stone.wang wrote: unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe unsubscribe dont send to me Since you hijacked my thread, to

Re: [PHP] move_uploaded_file and CPU wait state (IO) - unsubscribe

2006-02-27 Thread Curt Zirzow
On Tue, Feb 28, 2006 at 11:08:30AM +0800, stone.wang wrote: No usa to it http://php.net/unsub.php Yes fondu no be http://php.net/unsub.php i do more If english isn't your first language try to explain that you are not clear how to remove yourself from the list, otherwise try emailing:

[PHP] Re: URL output query

2006-02-27 Thread Rafael
Hi Chris, if the only thing you want is to get the domain (having the whole URL) you have more than one way to solve it. Chris -it's a little akward that Chris answered to Chris- already told you about parse_url(), and since we're talking about strings, I would suggest something like

[PHP] Re: Optional pass-by-reference parameters?

2006-02-27 Thread Rafael
If some_func( $var = NULL ) didn't work, then you're most likely using PHP 4. If that's the case then you could try passing an argument by reference in call(real/execution)-time, e.g: function some_func( $optional = NULL ) { ··· } some_func(); some_func($my_var); Note: beware

Re: [PHP] Re: URL output query

2006-02-27 Thread Chris
Rafael wrote: Hi Chris, if the only thing you want is to get the domain (having the whole URL) you have more than one way to solve it. Chris -it's a little akward that Chris answered to Chris- already told you about parse_url(), and since we're talking about strings, I would suggest

[PHP] Where to put my class files

2006-02-27 Thread Peter Lauri
Best group member, I want to run the backend of the system under HTTPS for security reasons. The pages in HTTP and HTTPS are both using the same classfiles. Right now I have the class files in httpdocs/classes/ In the httpsdocs/admin I have a variable

Re: [PHP] Where to put my class files

2006-02-27 Thread Chris
Peter Lauri wrote: Best group member, I want to run the backend of the system under HTTPS for security reasons. The pages in HTTP and HTTPS are both using the same classfiles. Right now I have the class files in httpdocs/classes/ In the httpsdocs/admin I have a variable

RE: [PHP] Where to put my class files

2006-02-27 Thread Peter Lauri
I tried this, but now I get this error. Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/mydomain.com/httpsdocs/admin/../../httpdocs/classes/ orderadmin.class.php) is not within the allowed path(s): (/home/httpd/vhosts/mydomain.com/httpsdocs:/tmp) in

Re: [PHP] Where to put my class files

2006-02-27 Thread Chris
Peter Lauri wrote: I tried this, but now I get this error. Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/mydomain.com/httpsdocs/admin/../../httpdocs/classes/ orderadmin.class.php) is not within the allowed path(s): (/home/httpd/vhosts/mydomain.com/httpsdocs:/tmp)

Re: [PHP] Where to put my class files

2006-02-27 Thread Jochem Maas
Peter Lauri wrote: I tried this, but now I get this error. Warning: main(): open_basedir restriction in effect. File(/home/httpd/vhosts/mydomain.com/httpsdocs/admin/../../httpdocs/classes/ orderadmin.class.php) is not within the allowed path(s): (/home/httpd/vhosts/mydomain.com/httpsdocs:/tmp)

[PHP] html area

2006-02-27 Thread 2wsxdr5
I am looking for a simple html area text area type editor, similar to to what you find in the phpbbs and Joomla. I don't need a lot of features it is just to edit small snipits of html and I really want it to be very simple to implement. I have been looking for the past few hours and so far