php-general Digest 15 Feb 2007 14:52:35 -0000 Issue 4627

2007-02-15 Thread php-general-digest-help
php-general Digest 15 Feb 2007 14:52:35 - Issue 4627 Topics (messages 248896 through 248903): Password and FTP Folder 248896 by: Helder Lopes 248901 by: Brad Fuller Re: Extending DOMNode 248897 by: Rob Richards remote fopen not working, despite allow_url_fopen = on

[PHP]Password and FTP Folder

2007-02-15 Thread Helder Lopes
Hi people hi have a problem i need a script for make a ftp folder that have a password for enter Have anyway to do this?? /mrpostiga

[PHP] Re: Extending DOMNode

2007-02-15 Thread Rob Richards
Eli wrote: ?php class MyDOMNode extends DOMNode { public $v = 10; function __construct() {} } $dom = new DOMDocument(); $dom-registerNodeClass('DOMNode','MyDOMNode'); $dom-loadXML('roota//root'); echo $dom-firstChild-v; #-- not outputs 10 ? But I get the notice: PHP Notice:

[PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle
Hi all, i recently upgraded a server from freebsd 5.x to 6.2 php 4.4.2 - php 4.4.4 apache 1.3 - apache 2.2.4. It worked all great till i noticed that the remote fopen()/file() did not work. allow_url_fopen is set to On and the httpd-error.log shows this error message: [Thu Feb 15 14:15:42

RE: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread Aras
Alex, Either the domain you are trying to fetch data is unknown or your resolver settings do not point to a regular resolving server. (check /etc/resolv.conf) Aras Koktas [EMAIL PROTECTED] Business Excellence Development Phi.dot Internet Systems -Original Message- From: alex handle

Re: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle
On 2/15/07, Aras [EMAIL PROTECTED] wrote: Alex, Either the domain you are trying to fetch data is unknown or your resolver settings do not point to a regular resolving server. (check /etc/resolv.conf) Aras Koktas [EMAIL PROTECTED] Business Excellence Development Phi.dot Internet Systems

RE: [PHP]Password and FTP Folder

2007-02-15 Thread Brad Fuller
-Original Message- From: Helder Lopes [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 5:32 AM To: php-general@lists.php.net Subject: [PHP]Password and FTP Folder Hi people hi have a problem i need a script for make a ftp folder that have a password for enter

RE: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread Aras
I do suppose this as a networking error rather than a php problem, or a bug which may be caused by your current combination of OS and software set. By the way, allow_url_fopen is set to OFF, not ON, as it is in the attachement of phpinfo in your previous mail. That would produce a different error

Re: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread cajbecu
Hello Aras! my /etc/resolv.conf is ok - a host google.com works and i can reach google.com with lynx. There are no firewall or dns issues on the server. try: var_dump(file('http://ip_google/')); replace ip_google with google`s main ip. cajb. -- PHP General Mailing List

Re: [PHP] remote fopen not working, despite allow_url_fopen = on

2007-02-15 Thread alex handle
On 2/15/07, cajbecu [EMAIL PROTECTED] wrote: Hello Aras! my /etc/resolv.conf is ok - a host google.com works and i can reach google.com with lynx. There are no firewall or dns issues on the server. try: var_dump(file('http://ip_google/')); replace ip_google with google`s main ip.

[PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately.

[PHP] Deny processing of non included files

2007-02-15 Thread Tim
OK here is the background: My app will: have an admin access at http://sitename/admin/ Obviously authenticated users only are allowed access.. Now my issues is this, i do all the processing from a single index.php in admin/ folder that includes files from all over the webapp directory structure

[PHP] mysql_affected_rows inaccurate?

2007-02-15 Thread altendew
Hi a long time ago I stopped using mysql_affected_rows because I believed it was giving me an inaccurate number. Now I was not very knowledged then so it could of been my own fault. Is this function safe and functional? Could it possibly give me the row result of a previous query I did and not

Re: [PHP] Deny processing of non included files

2007-02-15 Thread Jon Anderson
Easy answer: deny access to them. Use your web server to prevent execution of the files. Generally, if you're using Apache, you can just do this: Directory /path/to/modules/ Order Allow,Deny Deny From All /Directory You may also be able to do that from a .htaccess file. If you can't

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Jochem Maas
Eli wrote: Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately.

RE: [PHP] Deny processing of non included files

2007-02-15 Thread Tim
-Message d'origine- De : Jon Anderson [mailto:[EMAIL PROTECTED] Envoyé : jeudi 15 février 2007 17:11 À : Tim Cc : 'php-general' Objet : Re: [PHP] Deny processing of non included files Easy answer: deny access to them. Use your web server to prevent execution of the files.

Re: [PHP] Banner rotation with links

2007-02-15 Thread Kevin Murphy
On my home page i have all my banners in a MySQL database which includes the image path, the link, and the description as separate fields. The then do a MySQL query with a query that will look something like this: $query = select * FROM banner ORDER BY RAND() LIMIT 1; Seems to work just

Re: [PHP] Deny processing of non included files

2007-02-15 Thread tedd
At 4:44 PM +0100 2/15/07, Tim wrote: OK here is the background: My app will: have an admin access at http://sitename/admin/ Obviously authenticated users only are allowed access.. Now my issues is this, i do all the processing from a single index.php in admin/ folder that includes files from

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Eli
Jochem Maas wrote: maybe the runkit extension can help - no idea how big it might explode in your face if you try to hack the DOM* stuff with runkit :-) you never stated why you want to extend all the DOM classes, maybe there is a different way of achieving what you want (i.e. without going

Re: [PHP] Retrieve value of newly inserted row.

2007-02-15 Thread Dan Shirah
Okay, I found the correct function and below is what I have: - Show quoted text - $insert1 = INSERT INTO table1 ( debit_card, card_type, card_number, exp_date, payment_amount, cvv_number, first_name, middle_name, last_name, address_1,

Re: [PHP] Re: Extending DOMNode

2007-02-15 Thread Jochem Maas
Eli wrote: Jochem Maas wrote: maybe the runkit extension can help - no idea how big it might explode in your face if you try to hack the DOM* stuff with runkit :-) you never stated why you want to extend all the DOM classes, maybe there is a different way of achieving what you want (i.e.

RE: [PHP] Retrieve value of newly inserted row.

2007-02-15 Thread Brad Fuller
Okay, I found the correct function and below is what I have: - Show quoted text - $insert1 = INSERT INTO table1 ( snip ) VALUES ( snip ) SELECT scope_identity() INSERT INTO table2 ( credit_card_id, case_number, comments) VALUES (

Re: [PHP] Banner rotation with links

2007-02-15 Thread Jochem Maas
Kevin Murphy wrote: On my home page i have all my banners in a MySQL database which includes the image path, the link, and the description as separate fields. The then do a MySQL query with a query that will look something like this: $query = select * FROM banner ORDER BY RAND() LIMIT 1;

Re: [PHP] Retrieve value of newly inserted row.

2007-02-15 Thread Dan Shirah
I GOT IT! WooHoo! Thanks to a co-worker, this problem has been solved! I was using scope_identity incorrectly. This is how you should use it: INSERT INTO Table1 ( Column1, Column2) VALUES ( Value1, Value2) INSERT INTO Table2 ( Column1, Column2) VALUES (

RE: [PHP] Deny processing of non included files

2007-02-15 Thread Tim
Ok i have actually discovered a great side-effect that i thought i'd share with any interested by using these .htaccess directives. As i only have two index.php files on the site and they are the only two files accesible through browser i have done this: Files *.* Order Deny,Allow Deny from All

Re: [PHP] Banner rotation with links

2007-02-15 Thread Edward Vermillion
On Feb 15, 2007, at 10:57 AM, Jochem Maas wrote: Kevin Murphy wrote: On my home page i have all my banners in a MySQL database which includes the image path, the link, and the description as separate fields. The then do a MySQL query with a query that will look something like this:

[PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Terra Frost
I tried running the following script on three different servers: ?php echo gmdate('m, d, Y', gmmktime(0,0,0,3,23,2000) ); ? On two of the servers, I got 03, 23, 2000 back. On the other, however, I got 03, 22, 2000. This doesn't make any sense to me. On the servers that return the correct

RE: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Peter Lauri
And what are the time zones for those two different machines? And what is the time? :) Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Terra Frost [mailto:[EMAIL PROTECTED]

RE: [PHP] mysql_affected_rows inaccurate?

2007-02-15 Thread Peter Lauri
Sometimes you can get fooled by the result. If nothing is changed on a update the result for this function will give 0, because nothing was affected. Although you might think so just because you are doing an update. However, an update doesn't necessary mean an update :) Best regards, Peter Lauri

[PHP] Re: Extending DOMNode

2007-02-15 Thread Rob Richards
Eli wrote: Rob Richards wrote: Due to the internals of the DOM extension, you need to register the class types that are actually instantiated and not the underlying base DOMNode class. Unfortunately in your case this means you need to register all of those classes separately.

Re: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Terra Frost
date('Z') on the server producing the incorrect output returns 3600. On the other two, I get -18000 and -21600. That said, I don't see how that'd make a difference. The whole reason I'm using the gm* functions, in the first place, is because those are supposed to work with a fixed timezone

[PHP] Session problems with 4.4.5?

2007-02-15 Thread Ken Williams
Is anyone else having problems with session in 4.4.5? I'm under apache 1.3.27 in linux 2.4.34 and all my web sites break under 4.4.5. As soon as a page tries to register a session variable with session_register apache will segfault. Has worked perfectly fine for the past 2 years and like 10

RE: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Brad Fuller
-Original Message- From: Terra Frost [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 3:20 PM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] plugging gmmktime value into gmdate yields incorrect date date('Z') on the server producing the incorrect

[PHP] Accessing cookies in PHP and Javascript

2007-02-15 Thread Otto Wyss
Assuming I have a cookie setcookie (username,$_SESSION['Username'], $expires); how can I access the same cookie in Javascript? Or how do I have to create a cookies so it's accessable as $_COOKIE[username] O. Wyss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] Session Problem

2007-02-15 Thread LoneWolf
I am having a problem where it appears that the session is not being saved properly. While on a page, I can start a session and set variables to it. however, when I go to the next page.. the session variables appear to have been cleared out. first page: session_start(); $_SESSION[user_level]

RE: [PHP] Session Problem

2007-02-15 Thread Alan Fullmer
Does your system have permission to write to the temp directory? Put on error_reporting(E_ALL) and see if it throws an error. -Original Message- From: LoneWolf [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 2:35 PM To: php-general@lists.php.net Subject: [PHP] Session

Re: [PHP] Session Problem

2007-02-15 Thread Brad Bonkoski
LoneWolf wrote: I am having a problem where it appears that the session is not being saved properly. While on a page, I can start a session and set variables to it. however, when I go to the next page.. the session variables appear to have been cleared out. first page: session_start();

RE: [PHP] Session Problem

2007-02-15 Thread Brad Fuller
-Original Message- From: LoneWolf [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 4:35 PM To: php-general@lists.php.net Subject: [PHP] Session Problem I am having a problem where it appears that the session is not being saved properly. While on a page, I can start a

RE: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Brad Fuller
-Original Message- From: Brad Fuller [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 3:48 PM To: 'Terra Frost'; 'Peter Lauri' Cc: php-general@lists.php.net Subject: RE: [PHP] plugging gmmktime value into gmdate yields incorrect date -Original Message- From:

[PHP] Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-15 Thread Richard Lynch
[Taking this back on-list, as it's my final answer.] On Wed, February 14, 2007 5:30 pm, Christian Schneider wrote: Richard Lynch wrote: But the code that checks for E_NOTICE also has to be altered to check for E_STRICT... How many applications use error handlers. And how many of them rely

Re: [PHP] plugging gmmktime value into gmdate yields incorrect date

2007-02-15 Thread Jim Lucas
Brad Fuller wrote: -Original Message- From: Brad Fuller [mailto:[EMAIL PROTECTED] Sent: Thursday, February 15, 2007 3:48 PM To: 'Terra Frost'; 'Peter Lauri' Cc: php-general@lists.php.net Subject: RE: [PHP] plugging gmmktime value into gmdate yields incorrect date -Original

Re: [PHP] Accessing cookies in PHP and Javascript

2007-02-15 Thread Jon Anderson
Your favorite search engine would provide you with far better JavaScript answers than a PHP mailing list... Otto Wyss wrote: Assuming I have a cookie setcookie (username,$_SESSION['Username'], $expires); how can I access the same cookie in Javascript? Parse out document.cookie. Or how do

[PHP] Problem Directing the Page with header

2007-02-15 Thread Ashish Rizal
Hi, I am having problem with redirecting the page in user authenication page . I am working on my windows machine as a localhost with PHP Version 5.2.0. Everything is working good in local machine (in Windows) but now when i tried to upload the same code to the server which is using PHP Version

Re: [PHP] Problem Directing the Page with header

2007-02-15 Thread Jim Lucas
Ashish Rizal wrote: Hi, I am having problem with redirecting the page in user authenication page . I am working on my windows machine as a localhost with PHP Version 5.2.0. Everything is working good in local machine (in Windows) but now when i tried to upload the same code to the server which

Re: [PHP] mysql_affected_rows inaccurate?

2007-02-15 Thread Richard Lynch
On Thu, February 15, 2007 10:06 am, altendew wrote: Hi a long time ago I stopped using mysql_affected_rows because I believed it was giving me an inaccurate number. Now I was not very knowledged then so it could of been my own fault. Is this function safe and functional? Could it possibly

Re: [PHP] Deny processing of non included files

2007-02-15 Thread Richard Lynch
On Thu, February 15, 2007 9:44 am, Tim wrote: typing http://sitename/modules/thismodule/admin/index.php, this file will only be processed by the browser if and only if it has been included by http://sitename/admin/index.php One simple way to be sure it's not access directly by the browser is

Re: [PHP] Deny processing of non included files

2007-02-15 Thread Richard Lynch
On Thu, February 15, 2007 10:11 am, Jon Anderson wrote: Easy answer: deny access to them. Use your web server to prevent execution of the files. Generally, if you're using Apache, you can just do this: Directory /path/to/modules/ Order Allow,Deny Deny From All /Directory You may

Re: [PHP] Problem with Redirect

2007-02-15 Thread Richard Lynch
[Didn't I see this thread before?...] On Thu, February 15, 2007 7:39 pm, Ashish Rizal wrote: Hi friends, I am having problem with following code. I have actually made the whole code on same page (login.php) and the functions that i used in this code are in functions.php. Now this time it is

[PHP] array_pop() with key-value pair ???

2007-02-15 Thread Eli
Hi, Why isn't there a function that acts like array_pop() returns a pair of key-value rather than the value only ? Reason is, that in order to pop the key-value pair, you do: ?php $arr = array('a'=1,'b'=2,'c'=3,'d'=4); $arr_keys = array_keys($arr); $key = array_pop($arr_keys); $value =

[PHP] Re: array_pop() with key-value pair ???

2007-02-15 Thread Eli
More over.. PHP seems to be quiet slow when dealing with array_shift() array_unshift(), but it is much faster with array_pop() array_push(). I am not familiar with the PHP internals, but why not add a pointer to the start and end of the array? Good word can be said on PHP that accelerated at

Re: [PHP] Text Editor for Windows?

2007-02-15 Thread Kai
[snip] I am finding that notepad is lacking when correcting syntax errors in my php code. No line numbers. What can people recommend for use under Windows? [/snip] Zend Studio :-) ...but it's not for free. Check out the trial version. -- PHP General Mailing List (http://www.php.net/) To