php-general Digest 19 Jul 2010 07:45:52 -0000 Issue 6853
Topics (messages 306972 through 306983):
Re: Getting only attribute and not its values when doing LDAP calls to 2003 AD
server
306972 by: Nathan Nobbe
handing over data between two PHP connections
306973 by: tobias.mueller13.web.de
306974 by: Ashley Sheridan
306975 by: Floyd Resler
functions and global variables
306976 by: David Mehler
306977 by: Paul M Foster
MySQL Query Puzzle
306978 by: Peter
306980 by: Paul M Foster
306981 by: Shafiq Rehman
help using phpadmin
306979 by: Isaac Lee
306982 by: Carlos Sura
How to set socket_read time out
306983 by: Gary .
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On Sun, Jul 18, 2010 at 1:01 PM, Unix Nair <tarik...@gmail.com> wrote:
> Hi
> I followed the examples mentioned in ldap functions pages at
> www.php.net<
> http://www.google.com/url?sa=D&q=www.php.net&usg=AFQjCNHoc0Ba_1Imkk_33DysfxCk38dNag
> >.
>
> But I am getting only the attribute names and not the values stored in
> attributes array. Can some one give me some tips to fix my issue.
> Here is my configuration.
give the adLdap class a shot; if it works you can reverse engineer how they
accomplished it.
http://adldap.sourceforge.net/
-nathan
--- End Message ---
--- Begin Message ---
Hello everybody
For a science project I am working on a mechanism that hands over data from a
smartphone to a web-browser (=Internet PC). Both connect to a PHP server. The
PHP server has to receive the data (=some kind of an URL) on the smartphone end
and deliver it to the browser end.
Up to now there have been two (working) implementations. One using the
filesystem the other one using a MySQL Database. The data coming up from the
smartphone is stored in a file/table and some seconds later sent down to the
browser.
My question: is it possible to implement this mechanisms just with PHP methods?
I can't think of such a method but need to be sure.
Tank you in advance.
Have a good evening,
Tobias
___________________________________________________________
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
--- End Message ---
--- Begin Message ---
On Sun, 2010-07-18 at 21:27 +0200, tobias.muelle...@web.de wrote:
> Hello everybody
>
> For a science project I am working on a mechanism that hands over data from a
> smartphone to a web-browser (=Internet PC). Both connect to a PHP server. The
> PHP server has to receive the data (=some kind of an URL) on the smartphone
> end and deliver it to the browser end.
>
> Up to now there have been two (working) implementations. One using the
> filesystem the other one using a MySQL Database. The data coming up from the
> smartphone is stored in a file/table and some seconds later sent down to the
> browser.
>
>
> My question: is it possible to implement this mechanisms just with PHP
> methods? I can't think of such a method but need to be sure.
>
>
> Tank you in advance.
>
> Have a good evening,
> Tobias
> ___________________________________________________________
> Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
> Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
>
I suppose you could do it with some sort of socket connection, but it
would surely be more work than is worth the trouble. I've not worked
with sockets before, so don't know how you'd go about it. If I were to
do this, I'd just have all communications from the phone stored on the
server somehow (database, file, etc) and then the browser can use some
refresh mechanism (http refresh or ajax update) to query for new
messages. Messages can be tagged as read once they've been sent to the
browser as well. In this way, you can retain a history of communications
and only show the browser new information sent from the phone.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
On Jul 18, 2010, at 3:27 PM, tobias.muelle...@web.de wrote:
Hello everybody
For a science project I am working on a mechanism that hands over
data from a smartphone to a web-browser (=Internet PC). Both connect
to a PHP server. The PHP server has to receive the data (=some kind
of an URL) on the smartphone end and deliver it to the browser end.
Up to now there have been two (working) implementations. One using
the filesystem the other one using a MySQL Database. The data coming
up from the smartphone is stored in a file/table and some seconds
later sent down to the browser.
My question: is it possible to implement this mechanisms just with
PHP methods? I can't think of such a method but need to be sure.
Tank you in advance.
Have a good evening,
Tobias
___________________________________________________________
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What I would do is have the smartphone send some unique identifier
along with its data. For the browser I would have the page refresh at
certain time interval, calling a PHP script to see if any data is
available for the smartphone's ID. If you did want the page to keep
reloading, you could use AJAX.
Take care,
Floyd
--- End Message ---
--- Begin Message ---
Hello,
I've got a file with a variable declared in it. For purposes of this post:
$name = $_POST['name'];
Now a little later in the same file I have a custom function call that
outputs some information. In that information is an echo statement
outputting $name:
echo $name;
I'm wondering do I have to have $name declared as a global variable
within that function? For example:
function customFunction() {
global $name
}
I've tried it both ways and both ways it works, with and without the
global statement. I was under the impression that to be useful in a
function variables outside were not accessible.
Thanks.
Dave.
--- End Message ---
--- Begin Message ---
On Sun, Jul 18, 2010 at 06:37:30PM -0400, David Mehler wrote:
> Hello,
> I've got a file with a variable declared in it. For purposes of this post:
>
> $name = $_POST['name'];
>
> Now a little later in the same file I have a custom function call that
> outputs some information. In that information is an echo statement
> outputting $name:
>
> echo $name;
>
> I'm wondering do I have to have $name declared as a global variable
> within that function? For example:
>
> function customFunction() {
> global $name
> }
>
> I've tried it both ways and both ways it works, with and without the
> global statement. I was under the impression that to be useful in a
> function variables outside were not accessible.
> Thanks.
> Dave.
Variables declared outside a function are visible outside the function.
Variables declared inside a function are visible only within that
function. To use a "global" variable inside a function, you must declare
it global, as:
global $globalvar;
Paul
--
Paul M. Foster
--- End Message ---
--- Begin Message ---
Hi All,
I have a table which contain's some duplicate rows. I just want to
delete the duplicate records alone
not original records.
Assume my table as look as below
column1 column2
1
a
1
a
2
b
3
c
3
c
i want the above table need to be as below, After executing the mysql
query.
column1
column2
1
a
2
b
3
c
Thanks in advance..
Regards
Peter
--- End Message ---
--- Begin Message ---
On Mon, Jul 19, 2010 at 10:14:30AM +0530, Peter wrote:
> Hi All,
>
> I have a table which contain's some duplicate rows. I just want to
> delete the duplicate records alone
> not original records.
>
> Assume my table as look as below
>
> column1 column2
> 1
> a
> 1
> a
> 2
> b
> 3
> c
> 3
> c
>
>
>
> i want the above table need to be as below, After executing the mysql
> query.
>
> column1
> column2
> 1
> a
> 2
> b
> 3
> c
>
>
If you're looking for a MySQL solution to this, this is the wrong list
to ask the question on. In fact, I'd be surprised to find a MySQL query
which would do this.
For a PHP solution, you'll need to query MySQL for all the rows, in
order by the column you want to use to kill duplicates. Then loop
through the rows one at a time in PHP, checking the contents of that
column against the last iteration. If they are the same, issue a DELETE
command in MySQL. Continue the loop until all rows are exhausted.
Paul
--
Paul M. Foster
--- End Message ---
--- Begin Message ---
On Mon, Jul 19, 2010 at 10:44 AM, Peter <pet...@egrabber.com> wrote:
> Hi All,
>
> I have a table which contain's some duplicate rows. I just want to delete
> the duplicate records alone
> not original records.
>
> Assume my table as look as below
>
> column1 column2
> 1
> a
> 1
> a
> 2
> b
> 3
> c
> 3
> c
>
>
>
> i want the above table need to be as below, After executing the mysql
> query.
>
> column1
> column2
> 1
> a
> 2
> b
> 3
> c
>
>
>
>
> Thanks in advance..
>
> Regards
> Peter
>
Create a table with similar structure and add UNIQUE INDEX on both
columns. Execute the following query:
INSERT IGNORE INTO NEW_TABLE (column1, column2) SELECT column1,
column2 FROM OLD_TABLE
This will give you distinct rows as required.
--
Keep Smiling :-)
Shafiq Rehman
Blog: http://shafiq.pk, Twitter: http://twitter.com/shafiq
--- End Message ---
--- Begin Message ---
this is the second time that i have made an account and set the
password. then when i try to reaccess phpadmin, it shows this message:
Error
MySQL said:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
What am supposed to do so that my regain access to phpadmin? edit the
php.ini file?
isaac
--- End Message ---
--- Begin Message ---
Hello Isaac Lee.
Are you running on Linux or Windows?
You might try:
mysql> SET PASSWORD FOR root@'localhost = PASSWORD(yourpassword);
Then restart your service -if needed-
If not... Try to edit config.inc.php file.
Regards,
Carlos Sura
-----Original Message-----
From: Isaac Lee [mailto:rhinecant...@gmail.com]
Sent: domingo, 18 de julio de 2010 10:34 p.m.
Cc: php-gene...@lists.php.net
Subject: [PHP] help using phpadmin
this is the second time that i have made an account and set the
password. then when i try to reaccess phpadmin, it shows this message:
Error
MySQL said:
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
What am supposed to do so that my regain access to phpadmin? edit the
php.ini file?
isaac
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
How can I get calls to scoket_read to timeout if the server stops
responding? It's not clear exactly what's happening, but occasionally
the server simply stops sending data and my php code (client) then sits
there waiting endlessly. I know about set_time_limit but I don't want to
abandon the entire script, just the reading of data from the server (I
can at least give a meaningful error message then, for example).
--- End Message ---