|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Tue Aug 28 2001 - 04:03:02 CDT
php-general Digest 28 Aug 2001 09:03:02 -0000 Issue 842
Topics (messages 64673 through 64733):
Re: authentication
64673 by: Sheridan Saint-Michel
64675 by: Andrey Hristov
Re: PHP/mySQL query problem...
64674 by: Andrey Hristov
64676 by: ERISEN, Mehmet Kamil
Regular Expression Problem and PHP 4 (urgent) --- continued
64677 by: Ross Nielsen
64681 by: Andrey Hristov
clause
64678 by: Jeremy Morano
64679 by: ERISEN, Mehmet Kamil
64680 by: Andrey Hristov
64687 by: ERISEN, Mehmet Kamil
About the $allowed problem
64682 by: Andrey Hristov
64683 by: Antonio S. Martins Jr.
64684 by: CC Zona
Re: fatal input in flex scanner
64685 by: Jaxon
Re: MySQL Database backup
64686 by: Alex Sofronie
64690 by: Alex Sofronie
Generating Variables
64688 by: P.Agenbag
line by line
64689 by: Gary
header()
64691 by: Alex Sofronie
64693 by: Kurth Bemis
Re: What development environment do you use for PHP?
64692 by: Andrew Chase
64694 by: John Meyer
64696 by: Andrew Chase
Re: The future of PHP
64695 by: Zeev Suraski
Use PHP to connect to Oracle 8i database
64697 by: toni baker
64699 by: Joe Conway
64701 by: Andrew Hill
A Separate Process?
64698 by: Pickup, Jordan
Using PHP to move a row of information to another table
64700 by: Brandon Orther
Re: The future of PHP -- accessory libraries
64702 by: Rasmus Lerdorf
payflow pro hosed
64703 by: Dan Harrington
POST to port 443 (SSL)
64704 by: Patrick Calkins
Re: <br> appear in Text file
64705 by: Andy Ladouceur
Pretty Formatter for PHP?
64706 by: Joel Ricker
Reading php source code?
64707 by: Seb Frost
64708 by: Jason Murray
$HTTP_POST_VARS
64709 by: Andy Ladouceur
64712 by: Tim
64714 by: Jason Murray
64716 by: Andy Ladouceur
64717 by: Andy Ladouceur
64722 by: pierre-yves
Multiple JavaScript Windows
64710 by: Carlos Fernando Scheidecker Antunes
Re: PHP mysql admin?
64711 by: Christian Dechery
64715 by: Jason Brooke
64718 by: Chris Fry
64730 by: Navid Yar
64731 by: Navid Yar
Re: Certification
64713 by: Christian Dechery
file uploads & windows clients
64719 by: Gerard Samuel
64724 by: Gerard Samuel
new socket() function in PHP which is > 4.0.6
64720 by: Scott Mebberson
Need help on putting variable into <form>
64721 by: Hugh Danaher
64723 by: Andy Ladouceur
64725 by: Hugh Danaher
64726 by: Andy Ladouceur
Formatting Dates in Form before submit
64727 by: Traci P Sumpter
64728 by: Andy Ladouceur
Disabling certain functions per directory
64729 by: Andy Ladouceur
Re: Web page authentications
64732 by: senthilvellan
virtual() call to CGI script
64733 by: Egan
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
It seems like there would be several problems with doing it this way.
The most obvious is what happens when someone types in
http://www.yoursite.com/protected.php?allowed=true
In addition to that, how can you tell who is viewing the page?
With this setup everyone passes an identical set of info to the server.
I would suggest, instead, passing their username and some sort of
simple session id ( could be as simple as md5(time()); ) variable and
comparing these against stored values in a DB.
I have examples of this here:
Main Script - http://www.zend.com/codex.php?id=393&single=1
Header File - http://www.zend.com/codex.php?id=397&single=1
Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com
----- Original Message -----
From: "Gert Mellak" <gert.mellak
utanet.at>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 1:06 PM
Subject: [PHP] Re: authentication
> hi!
>
> I ever solve this problem with sessions... when a user does the login, I
> have
>
> session_start();
> session_register("allowed");
> $allowed = true;
>
> and on the top of all the other sites, where just "special" users are
> allowed to go in, there is a
>
> include ("checkAllowed.php");
>
> checkAllowed.php just contains:
> if (!$allowed)
> die ("Access denied");
>
> I hope I could help you... if so - or if you have got questions, please
feel
> free to email me!
>
> yours,
>
> gert mellak
> ==================
> eMail: gert
mellak.com
> http://www.mellak.com
>
>
>
>
> Wilbert Enserink <wilbert
pdd.nl> schrieb in im Newsbeitrag:
> 006601c12ef5$aff7c380$0301a8c0
168.1.1...
> Hi all,
>
>
> Can anybody help me with this authentication problem?
>
> Clients can log in using a html form on my site. When they log in their
> username and password are checked in a mysql database. Then they are
> forwarded to a url, a directory on my site also coming from the db. This
> directory should not be public of couse, so I did a chmod 744 on the
clients
> directory.
>
> Anybody has any ideas? I prefer not to use the standard window popup thing
> for authentication.
> I checked the php manual, but there is not much info on plain html forms
on
> the subject, or maybe it is my English...:-)
>
>
>
> Regards, Wilbert
>
> -------------------------
> Pas de Deux
> Van Mierisstraat 25
> 2526 NM Den Haag
> tel 070 4450855
> fax 070 4450852
> http://www.pdd.nl
> info
pdd.nl
> -------------------------
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I think that this depends on GPC setting. If first is get, and then cookie I think there is no problem because $allowed from GET
will be overwritten by the session variable which is read from session_892147jshfjksahfdjk8978 file because
$PHPSESSID==892147jshfjksahfdjk8978 . But is better to use $HTTP_SESSION_VARS or whatever was the name of the array with registered
variables. Also for GET or POST variables to use $HTTP_GET_VARS and $HTTP_POST_VARS
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
----- Original Message -----
From: "Sheridan Saint-Michel" <webmaster
foxjet.com>
To: "Gert Mellak" <gert.mellak
utanet.at>; <php-general
lists.php.net>
Sent: Monday, August 27, 2001 9:27 PM
Subject: Re: [PHP] Re: authentication
> It seems like there would be several problems with doing it this way.
> The most obvious is what happens when someone types in
> http://www.yoursite.com/protected.php?allowed=true
>
> In addition to that, how can you tell who is viewing the page?
> With this setup everyone passes an identical set of info to the server.
>
> I would suggest, instead, passing their username and some sort of
> simple session id ( could be as simple as md5(time()); ) variable and
> comparing these against stored values in a DB.
>
> I have examples of this here:
> Main Script - http://www.zend.com/codex.php?id=393&single=1
> Header File - http://www.zend.com/codex.php?id=397&single=1
>
> Sheridan Saint-Michel
> Website Administrator
> FoxJet, an ITW Company
> www.foxjet.com
>
> ----- Original Message -----
> From: "Gert Mellak" <gert.mellak
utanet.at>
> To: <php-general
lists.php.net>
> Sent: Monday, August 27, 2001 1:06 PM
> Subject: [PHP] Re: authentication
>
>
> > hi!
> >
> > I ever solve this problem with sessions... when a user does the login, I
> > have
> >
> > session_start();
> > session_register("allowed");
> > $allowed = true;
> >
> > and on the top of all the other sites, where just "special" users are
> > allowed to go in, there is a
> >
> > include ("checkAllowed.php");
> >
> > checkAllowed.php just contains:
> > if (!$allowed)
> > die ("Access denied");
> >
> > I hope I could help you... if so - or if you have got questions, please
> feel
> > free to email me!
> >
> > yours,
> >
> > gert mellak
> > ==================
> > eMail: gert
mellak.com
> > http://www.mellak.com
> >
> >
> >
> >
> > Wilbert Enserink <wilbert
pdd.nl> schrieb in im Newsbeitrag:
> > 006601c12ef5$aff7c380$0301a8c0
168.1.1...
> > Hi all,
> >
> >
> > Can anybody help me with this authentication problem?
> >
> > Clients can log in using a html form on my site. When they log in their
> > username and password are checked in a mysql database. Then they are
> > forwarded to a url, a directory on my site also coming from the db. This
> > directory should not be public of couse, so I did a chmod 744 on the
> clients
> > directory.
> >
> > Anybody has any ideas? I prefer not to use the standard window popup thing
> > for authentication.
> > I checked the php manual, but there is not much info on plain html forms
> on
> > the subject, or maybe it is my English...:-)
> >
> >
> >
> > Regards, Wilbert
> >
> > -------------------------
> > Pas de Deux
> > Van Mierisstraat 25
> > 2526 NM Den Haag
> > tel 070 4450855
> > fax 070 4450852
> > http://www.pdd.nl
> > info
pdd.nl
> > -------------------------
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Use as many () as needed so WHERE clause to be meaningful. Of course you can use operators priority, but it's better with ()
----- Original Message -----
From: "Jeff Lewis" <jeff
hyrum.net>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 9:09 PM
Subject: [PHP] PHP/mySQL query problem...
Guys, why isn't this working? :)
SELECT * FROM links WHERE name LIKE "%te%" OR description LIKE "%te%" OR url LIKE "%te%" AND approved="1" LIMIT 5
I am using a PHP script to add items to the database and a small search file to grab them. Thing is, I want the above to grab ONLY
ones that have approved = 1. In the database they are all = 0. Is there a problem with my SQL query?
Jeff
attached mail follows:
Yes, there is a problem.
-- SELECT * FROM links WHERE 1=1 and ( name LIKE "%te%" OR description LIKE "%te%" OR url LIKE "%te%" ) AND approved="1" LIMIT 5; ----- Jeff Lewis <jeff
hyrum.net> wrote: > Guys, why isn't this working? :) > > SELECT * FROM links WHERE name LIKE "%te%" OR description > LIKE "%te%" OR url LIKE "%te%" AND approved="1" LIMIT 5 > > I am using a PHP script to add items to the database and > a small search file to grab them. Thing is, I want the > above to grab ONLY ones that have approved = 1. In the > database they are all = 0. Is there a problem with my > SQL query? > > Jeff >
===== Mehmet Erisen http://www.erisen.com
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
Well my first solution didn't really work the way I needed it too so here goes again...
Data returned from server process looks like following...
Header datadatadatadata[link]datadatadata{link}data[link] datadata{link}data[link]datadatadata{link}data[link] datadatadatadata[link]datadatadata{link}data[link] Closer
I need to grep the values between [] and {} to turn them into a links. (BTW I need to retain the values for use in JS) Any suggestions?
Thanks, Ross
attached mail follows:
Some time spent to try but now i think it works:
<?php echo "<pre>"; $a='datadatadatadata[link1]datadatadata{link2}data[link3]'; // $a='datadata{link1}data[link2]datadatadata{link3}data[link4]'; $pattern='/((\[)|\{)(.+?)(?(2)\]|\})/'; echo $a."\n"; echo $pattern."\n"; preg_match_all($pattern,$a,$matches,PREG_MATCH_ORDER); var_dump($matches); ?>
Produces : <pre>datadatadatadata[link1]datadatadata{link2}data[link3] /(\[)|\{(.+?)(?(1)\]|\})/ array(3) { [0]=> array(3) { [0]=> string(1) "[" [1]=> string(7) "{link2}" [2]=> string(1) "[" } [1]=> array(3) { [0]=> string(1) "[" [1]=> string(0) "" [2]=> string(1) "[" } [2]=> array(1) { [0]=> string(5) "link2" } }
Also works with the commented string. Explanation : Looking for more than one using preg_match_all. Matching for [ or {, [ is in () because at the end we test if we found [ so we look for ] otherwise { is found so we look for matching }. (?(1) true|false) is 1 as a backreference is set so we found [.
Hope this will help you.
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Ross Nielsen" <chunga668
yahoo.com>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 9:42 PM
Subject: [PHP] Regular Expression Problem and PHP 4 (urgent) --- continued
> Well my first solution didn't really work the way I needed it too so here
> goes again...
>
> Data returned from server process looks like following...
>
> Header
> datadatadatadata[link]datadatadata{link}data[link]
> datadata{link}data[link]datadatadata{link}data[link]
> datadatadatadata[link]datadatadata{link}data[link]
> Closer
>
> I need to grep the values between [] and {} to turn them into a links.
> (BTW I need to retain the values for use in JS)
> Any suggestions?
>
> Thanks,
> Ross
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi,
Can somebody help me out? My where clause is completely being ignored. More specifically the <>. I tried to use != and that didn't work either. However, when I substitute it with an = , It fuctions correctly.
Right now, the output is all the users.uid and all the users.username from the table users. H E L P !
$connection =
mysql_connect("l", "c", "c") or die("Couldn't connect.");
$db =
mysql_select_db($db_name, $connection) or die("Couldn't select
database.");
$sql = "SELECT distinct users.uid , users.username FROM users, picks WHERE picks.users_uid <> users.uid ";
$result =
mysql_query($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($result)) { $uid = $row['uid']; $username = $row['username'];
$option_block .= "<option value=\"$uid\">$username</option>"; }
attached mail follows:
Hello Jeremy, you are using two tables, but you are not joining them. What's you goal?
--- Jeremy Morano <jeremy
prepresshelp.com> wrote:
> Hi,
>
> Can somebody help me out?
> My where clause is completely being ignored.
> More specifically the <>. I tried to use != and that
> didn't work either.
> However, when I substitute it with an = , It fuctions
> correctly.
>
> Right now, the output is all the users.uid and all the
> users.username from
> the table users.
> H E L P !
>
>
>
> $connection =
mysql_connect("l", "c", "c") or
> die("Couldn't connect.");
>
> $db =
mysql_select_db($db_name, $connection) or
> die("Couldn't select
> database.");
>
> $sql = "SELECT distinct users.uid , users.username
> FROM users, picks
> WHERE picks.users_uid <> users.uid
> ";
>
> $result =
mysql_query($sql,$connection) or die("Couldn't
> execute query.");
>
>
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid'];
> $username = $row['username'];
>
> $option_block .= "<option
> value=\"$uid\">$username</option>";
> }
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
===== Mehmet Erisen http://www.erisen.com
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
I don't know if this will help but why not to try $sql = "SELECT distinct users.uid , users.username FROM users LEFT JOIN picks USING(uid) WHERE picks.users_uid <> users.uid
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
----- Original Message -----
From: "Jeremy Morano" <jeremy
prepresshelp.com>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 9:52 PM
Subject: [PHP] clause
> Hi,
>
> Can somebody help me out?
> My where clause is completely being ignored.
> More specifically the <>. I tried to use != and that didn't work either.
> However, when I substitute it with an = , It fuctions correctly.
>
> Right now, the output is all the users.uid and all the users.username from
> the table users.
> H E L P !
>
>
>
> $connection =
mysql_connect("l", "c", "c") or die("Couldn't connect.");
>
> $db =
mysql_select_db($db_name, $connection) or die("Couldn't select
> database.");
>
> $sql = "SELECT distinct users.uid , users.username
> FROM users, picks
> WHERE picks.users_uid <> users.uid
> ";
>
> $result =
mysql_query($sql,$connection) or die("Couldn't execute query.");
>
>
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid'];
> $username = $row['username'];
>
> $option_block .= "<option value=\"$uid\">$username</option>";
> }
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
HEllo, I think this will better work. What Jeremy wants to do is to OUTER joing the tables: SELECT distinct users.uid , users.username FROM users LEFT OUTER JOIN picks using(uid)
may do the trick.
If you say letf join and the use ids not equal in the where, then I think it's same as saying: where uid = pid and uid != pid and will always be false.
REF: http://www.mysql.com/doc/J/O/JOIN.html
--- Andrey Hristov <andy
icygen.com> wrote:
> I don't know if this will help but why not to try
> $sql = "SELECT distinct users.uid , users.username
> FROM users LEFT JOIN picks USING(uid)
> WHERE picks.users_uid <> users.uid
>
> Andrey Hristov
> IcyGEN Corporation
> http://www.icygen.com
> 99%
>
> ----- Original Message -----
> From: "Jeremy Morano" <jeremy
prepresshelp.com>
> To: <php-general
lists.php.net>
> Sent: Monday, August 27, 2001 9:52 PM
> Subject: [PHP] clause
>
>
> > Hi,
> >
> > Can somebody help me out?
> > My where clause is completely being ignored.
> > More specifically the <>. I tried to use != and that
> didn't work either.
> > However, when I substitute it with an = , It fuctions
> correctly.
> >
> > Right now, the output is all the users.uid and all the
> users.username from
> > the table users.
> > H E L P !
> >
> >
> >
> > $connection =
mysql_connect("l", "c", "c") or
> die("Couldn't connect.");
> >
> > $db =
mysql_select_db($db_name, $connection) or
> die("Couldn't select
> > database.");
> >
> > $sql = "SELECT distinct users.uid , users.username
> > FROM users, picks
> > WHERE picks.users_uid <> users.uid
> > ";
> >
> > $result =
mysql_query($sql,$connection) or
> die("Couldn't execute query.");
> >
> >
> > while ($row = mysql_fetch_array($result)) {
> > $uid = $row['uid'];
> > $username = $row['username'];
> >
> > $option_block .= "<option
> value=\"$uid\">$username</option>";
> > }
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail:
> php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
===== Mehmet Erisen http://www.erisen.com
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
<?php session_start(); if (!session_is_registered("allowed")){ $allowed=3306; session_register("allowed"); } var_dump($allowed); ?>
called with : http://192.168.1.11/test2.php?allowed=5000
returns : int(3306)
From php.ini : variables_order = "EGPCS" ; This directive describes the order in which PHP registers ; GET, POST, Cookie, Environment and Built-in variables (G, P, ; C, E & S respectively, often referred to as EGPCS or GPC). ; Registration is done from left to right, newer values override ; older values. register_globals = On ; Whether or not to register the EGPCS variables as global ; variables. You may want to turn this off if you don't want ; to clutter your scripts' global scope with user data. This makes ; most sense when coupled with track_vars - in which case you can ; access all of the GPC variables through the $HTTP_*_VARS[], ; variables. ; You should do your best to write your scripts so that they do ; not require register_globals to be on; Using form variables ; as globals can easily lead to possible security problems, if ; the code is not very well thought of.
Andrey Hristov IcyGEN Corporation http://www.icygen.com 99%
attached mail follows:
On Mon, 27 Aug 2001, Andrey Hristov wrote:
> <?php > session_start(); > if (!session_is_registered("allowed")){ > $allowed=3306; > session_register("allowed"); > } > var_dump($allowed); > ?> > > called with : > http://192.168.1.11/test2.php?allowed=5000 > > returns : > int(3306)
Ok, remeber, on the first run the var isn't registered, then you set it to "3306", on the subsequents calls it restore the value on the "session_start();" then the value "3306" will replace the "5000". Try puting the "var_dump" before the "session_start", or try testing "$HTTP_GET_VARS[allowed]" .
Antonio.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Antonio S. Martins Jr. - System Analist | "Only The Shadow Knows |
| WorldNet Internet Maringa - PR - Brasil | what evil lurks in the |
| E-Mail: shadow
wnet.com.br | Heart of Men!" |
| shadow
uem.br | !!! Linux User: 52392 !!! |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
This e-mail message is 100% Microsoft free!
/"\ \ / CAMPANHA DA FITA ASCII - CONTRA MAIL HTML X ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL / \
attached mail follows:
In article <030d01c12f2f$49ca7d20$0b01a8c0
ANDreY>,
ahristov
icygen.com (Andrey Hristov) wrote:
> <?php > session_start(); > if (!session_is_registered("allowed")){ > $allowed=3306; > session_register("allowed"); > } > var_dump($allowed); > ?> > > called with : > http://192.168.1.11/test2.php?allowed=5000 > > returns : > int(3306)
That sets the value of the global variable $allowed to 5000, but of course setting a variable isn't the same thing as session registering a variable. Did you perhaps mean to test for...
if(!isset($allowed))
...instead?
-- CC
attached mail follows:
New version, but it's CGI :( It's causing all sorts of problems.
Thanks for the help, but I've killed this method in favor of including a file that includes the files :)
best, jaxon
> -----Original Message-----
> From: Robert V. Zwink [mailto:rzwink
microcenter.com]
> Sent: Monday, August 27, 2001 2:08 PM
> To: jaxon
salamander.net; php-general
lists.php.net
> Subject: RE: [PHP] fatal input in flex scanner
>
>
> This line seems a little odd:
> $files_to_include[count($files_to_include)] = $file;
>
> I would change it to:
> $files_to_include[] = $file;
>
> Could be a bit of a bug. I am able to run your script on my
> server, so the
> error could also be coming from one of the files you are trying
> to include.
> Are you running an old version of php?
>
> Robert V. Zwink
> http://www.zwink.net/daid.php
>
> -----Original Message-----
> From: Jaxon [mailto:jaxon
salamander.net]
> Sent: Friday, August 24, 2001 11:29 AM
> To: php-general
lists.php.net
> Subject: [PHP] fatal input in flex scanner
>
>
> okay... I have a function that includes multiple files in a directory - it
> was working but I changed something and I'm now getting a "Fatal error:
> input in flex scanner failed"
>
> can anyone see where I messed up?
>
> cheers,
> jaxon
> -----------------------------------
> function group_include($directory)
> {
> $handle=opendir("$directory");
> while ($file = readdir($handle))
> { //load files in $directory into array
> if ($file != ".." && $file != ".")
> {
> $files_to_include[count($files_to_include)] = $file;
> }
> }
>
> //clean up and sort
> closedir($handle);
> if (is_array($files_to_include))
> {
> while (list ($key, $val) = each ($files_to_include))
> {
> include "$directory/$val";
> }
> }
> }
>
> //include common and page specific modules
>
> $common_include_dir="modules/common";
> $page_include_dir="modules/page";
>
> group_include($common_include_dir);
> group_include($page_include_dir);
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Thanks a lot.
----- Original Message -----
From: "Augusto Cesar Castoldi" <accastoldi
yahoo.com.br>
To: "Alex Sofronie" <maxx
mail.dntis.ro>
Sent: Monday, August 27, 2001 6:22 PM
Subject: Re: [PHP] MySQL Database backup
> Alex,
>
> i'm using the crontab of linux to run a php script:
>
> in crontab: "wget -q
> http://localhost/backup/backup.php.
>
> This script uses the MyPHPAdmin
> (http://phpwizard.net/projects/phpMyAdmin/) dump, he
> "fopen" the php script of MyAdmin (tbl_dump.php) and
> write to a file the "result". This is the script
>
> ------------------------------------------------
> function backup($url, $file)
> {
> if (file_exists($file))
> unlink($file);
> if ($fd = fopen($url, "r"))
> {
> $aux = fread($fd, 10000000);
> fclose($fd);
> $fd = fopen($file, "aw" );
> fwrite($fd, $aux);
> fclose($fd);
> } else {
> $fd = fopen("logs.txt", "aw");
> fwrite($fd, "\n\nErro na URL: $url\n\n");
> fclose($fd);
> }
> }
> $file = "fiesc.sql";
> $url =
>
"http://$vendaval/libs/phpadmin2/tbl_dump.php?drop=1&showcolumns=yes&use_bac
kquotes=1&what=data&server=1&lang=pt-br&db=fiesc";
> backup($url, $file);
> --------------------------------------------------
>
> see you,
>
> Augusto
>
>
>
>
> --- Alex Sofronie <maxx
mail.dntis.ro> escreveu: > I
> tried find a solution to backup a mysql database
> > using php but i didn't
> > find anything but the binary file transfer solution
> > (just open and binary
> > copy all the files in my database directory). But
> > this is not a desired
> > solution because it involves some security holes
> > that I cannot afford.
> > Can anyone tell me where can i learn more about
> > this? Or some simple :) and
> > security holes free solution?
> >
> > Thanks all.
> > Alex Sofronie
> > maxx
mail.dntis.ro
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> > php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail:
> > php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
>
>
____________________________________________________________________________
___________________
> Yahoo! GeoCities
> Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
GeoCities. É fácil e grátis!
> http://br.geocities.yahoo.com/
>
attached mail follows:
I didn't want to cron the backup, just when the admin does :). Thanks anyway and here is the solution i came up with: It's based on a prior answer (thanks, Chris L.) and a pror discussion about forcing download in IE 5.5:
<?
$result=`mysqldump -hmy.host.com -u username -ppassword dbname`;
header("Content-Type: application/x-octet-stream");
header("Content-Description: MySQLDatabaseBackup File");
echo $result;
?>
This will work with IE 5.0, 5.5, NN6, NN4 (PC-Windows98/Me/2000) and NN4 (PC-RH Linux). But I don't think the platform or browser is guilty about trying to open without asking first, just the applications it recognizes (the web plugins installed), right?
----- Original Message -----
From: "Alex Sofronie" <maxx
mail.dntis.ro>
To: "PHP General" <php-general
lists.php.net>; "Augusto Cesar Castoldi"
<accastoldi
yahoo.com.br>
Sent: Monday, August 27, 2001 7:40 PM
Subject: Re: [PHP] MySQL Database backup
> > This script uses the MyPHPAdmin
> > (http://phpwizard.net/projects/phpMyAdmin/) dump, he
> > "fopen" the php script of MyAdmin (tbl_dump.php) and
> > write to a file the "result". This is the script
> >
> > ------------------------------------------------
> > function backup($url, $file)
> > {
> > if (file_exists($file))
> > unlink($file);
> > if ($fd = fopen($url, "r"))
> > {
> > $aux = fread($fd, 10000000);
> > fclose($fd);
> > $fd = fopen($file, "aw" );
> > fwrite($fd, $aux);
> > fclose($fd);
> > } else {
> > $fd = fopen("logs.txt", "aw");
> > fwrite($fd, "\n\nErro na URL: $url\n\n");
> > fclose($fd);
> > }
> > }
> > $file = "fiesc.sql";
> > $url =
> >
>
"http://$vendaval/libs/phpadmin2/tbl_dump.php?drop=1&showcolumns=yes&use_bac
> kquotes=1&what=data&server=1&lang=pt-br&db=fiesc";
> > backup($url, $file);
> > --------------------------------------------------
> >
> > see you,
> >
> > Augusto
> >
> >
> >
> >
> > --- Alex Sofronie <maxx
mail.dntis.ro> escreveu: > I
> > tried find a solution to backup a mysql database
> > > using php but i didn't
> > > find anything but the binary file transfer solution
> > > (just open and binary
> > > copy all the files in my database directory). But
> > > this is not a desired
> > > solution because it involves some security holes
> > > that I cannot afford.
> > > Can anyone tell me where can i learn more about
> > > this? Or some simple :) and
> > > security holes free solution?
> > >
> > > Thanks all.
> > > Alex Sofronie
> > > maxx
mail.dntis.ro
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail:
> > > php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail:
> > > php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
> > > php-list-admin
lists.php.net
> > >
> >
> >
>
____________________________________________________________________________
> ___________________
> > Yahoo! GeoCities
> > Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo!
> GeoCities. É fácil e grátis!
> > http://br.geocities.yahoo.com/
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi I am trying to auto generate some sql strings. The resulting string should look like this: update $table_name set var1='$var1', var2='$var2' ............. where id=$id
I used a foreach loop to get the keys from a table and in each foreach loop I tried the following. foreach($myrow as $key=>$val) { $var_list .= " $key = '\$$key', "; }
The first php page is the "table generator"; VIEW_ALL.PHP <?php $username_1 = "user"; $password_1 = "password"; $db_name = "test"; $table_name = "users_db"; $link = mysql_connect("localhost",$username_1,$password_1); mysql_select_db($db_name,$link); $sql = "select * from $table_name"; $result = mysql_query($sql); $result_2 = mysql_query($sql); echo "<table border=\"1\">"; $myrow = mysql_fetch_assoc($result); echo"<tr bgcolor=\"#CCCCCC\">"; foreach($myrow as $key=>$val) { echo "<td><b>$key</b></td>"; } echo"</tr>"; $count = 2; while($myrow_2 = mysql_fetch_assoc($result_2)) { $id = $myrow_2["id"]; if ($count == 2) { $bgcol = "#FFFFFF"; $count = $count - 1; } else { $bgcol = "#EFEFEF"; $count = $count + 1; } echo"<tr bgcolor=\"$bgcol\">"; foreach($myrow_2 as $key=>$val) { echo"<td>$val</td>"; } echo"<td><a href=\"edit.php?id_1=$id&table_name=$table_name&db_name=$db_name&username_1=$username_1&password_1=$password_1\">Edit</a></td>";
echo"</tr>"; } echo"</table>"; ?>
Goes through to EDIT.PHP <?php $link = mysql_connect("localhost",$username_1,$password_1); mysql_select_db($db_name,$link); $sql = "select * from $table_name where id=$id_1"; $result = mysql_query($sql); $myrow = mysql_fetch_assoc($result); $count_fields = 0; echo"<form name=\"form_1\" method=\"post\" action=\"update.php?username_1=$username_1&password_1=$password_1&db_name=$db_name&table_name=$table_name\">";
echo"<table border\"1\">"; foreach($myrow as $key=>$val) { echo"<tr bgcolor=\"#CCCCCC\"><td>$key</td><td><textarea name=\"$key\">$val</textarea></td></tr>"; $var_list_1 .= "$key = '\$$key',"; $count_fields = $count_fields + 1; } echo"</table>"; $count = strlen($var_list); $new_count = $count - 1; $var_list_1[$new_count] = ""; echo"<input type=\"hidden\" name=\"var_list\" value=\"$var_list_1\">"; echo"<input type=\"submit\" value=\"submit\" name=\"submit\">"; echo"</form>"; ?>
And this goes to UPDATE.PHP
<?php $link = mysql_connect("localhost",$username_1,$password_1); mysql_select_db($db_name,$link); $sql_1 = "update $table_name set $var_list where id=$id"; $result = mysql_query($sql_1); echo "Your data has been updated!<br>"; echo "$sql_1 <br>"; echo "result: $result<br>"; ?>
This is where the problems comes in, the SQL is not brought over correctly, rather is written "as-is" with the single quotes \-ed out, can someone plz help me?
attached mail follows:
Hi All, I need to get info from a flat file line by line. What I need to do is get 3 separate lines and then a paragraph. Can someone point me to a tutorial or info on the subject.
TIA Gary
attached mail follows:
Hi all!
Anybody knows where i can find a complete list with headers? A list with what i can send with the header() function? And what thy mean? Thanks
Alex Sofronie
maxx
mail.dntis.ro
attached mail follows:
At 04:09 PM 8/27/2001, Alex Sofronie wrote:
read the http 1.1 RFC
>Hi all!
>
>Anybody knows where i can find a complete list with headers? A list with
>what i can send with the header() function? And what thy mean?
>Thanks
>
>Alex Sofronie
>maxx
mail.dntis.ro
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
>For additional commands, e-mail: php-general-help
lists.php.net
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I keep my web documents in a CVS repository on a Linux box, and use WinCVS (GNU) to check files in and out on my WinNT desktop. I use ConTEXT (freeware) for editing. Documentation and help are always available at php.net and google.com. I have an Apache 'staging' server, and to keep the document tree up to date with the CVS repository I run a cron job that performs 'cvs update -d' every five minutes from the server document root.
When a project is ready to go live, all that's needed is a 'CVS export' command to generate a clean copy of the most recent files to go on the live server - meanwhile keeping a complete revision history in CVS in case there's ever a need to access an older version. It works quite nicely. I've never had much patience with development environments... they always seem like more trouble than they're worth. (Of course, I've never gotten very deep into a language like C with all the cross linking and Make files - I could see an IDE coming in handy in that case!)
Oh, and my Linux 'box' is actually a VMWare virtual machine running Mandrake Linux 8.0 on my WinNT desktop. ;-)
-Andy
> -----Original Message-----
> From: Greg Beaver [mailto:beavergr
pilot.msu.edu]
> Sent: Monday, August 27, 2001 12:11 AM
> To: php-general
lists.php.net
> Subject: What development environment do you use for PHP?
>
>
> Hi,
>
> I'm curious what programs/platforms different people use to develop PHP.
>
>
> Anyone have a sweet setup that makes it all easier?
attached mail follows:
At 01:21 PM 8/27/01 -0700, you wrote: >I keep my web documents in a CVS repository on a Linux box, and use WinCVS >(GNU) to check files in and out on my WinNT desktop. I use ConTEXT >(freeware) for editing. Documentation and help are always available at >php.net and google.com. I have an Apache 'staging' server, and to keep the >document tree up to date with the CVS repository I run a cron job that >performs 'cvs update -d' every five minutes from the server document root.
Where do you get WinCVS , by the by?
attached mail follows:
WinCVS is available from http://www.wincvs.org - they also have Mac and X versions, although I've never tried them.
-Andy
> -----Original Message-----
> From: John Meyer [mailto:john_meyer
geocities.com]
>
> Where do you get WinCVS , by the by?
>
attached mail follows:
At 12:46 27-08-01, Alexander Skwar wrote: >So sprach »Zeev Suraski« am 2001-08-27 um 09:40:40 +0300 : > > Regarding source code hiding, you can use the Zend Encoder. Pricing wise, > > the lowest you can get it for right now is $50/month, which may be too > high > > for certain developers. > >Uhm, really? I mean, if you don't make $50/month, the developer doesn't >seem to be making a lot of money. And for such micro-projects that such >a guy seems to be doing - why even care about hiding source code?
I won't try to *convince* you that the pricing is too high :)
Zeev
attached mail follows:
Hi I want to use php to connect to an Oracle 8i database.
I have 2 questions: 1) does the webserver have to be installed on the database server? 2) do you have to use the OCI libraries?
Thanks Toni
__________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
attached mail follows:
> I want to use php to connect to an Oracle 8i database. > > I have 2 questions: > 1) does the webserver have to be installed on the > database server?
No -- you just have to configure your tnsnames.ora so that the web server can connect. Try sqlplus first. If you can connect with sqlplus, you should be able to connect from PHP.
> 2) do you have to use the OCI libraries? >
Yes, you do need the oracle client.
See http://www.php.net/manual/en/ref.oci8.php for more info. Particularly see the note on pthread.
HTH,
-- Joe
attached mail follows:
Toni
You don't have to use the OCI libraries if you use ODBC.
Compiling PHP --with-iodbc as per the HOWTO at www.iodbc.org will get you started.
Non-expiring ODBC drivers with a 2-connection license are available as a free download from http://www.openlinksw.com. Free support is also available if you encounter problems.
Best regards, Andrew Hill Director of Technology Evangeslim OpenLink Software http://www.openlinksw.com XML and eBusiness Infrastructure Technology Providers
On Monday, August 27, 2001, at 05:04 PM, Joe Conway wrote:
>> I want to use php to connect to an Oracle 8i database.
>>
>> I have 2 questions:
>> 1) does the webserver have to be installed on the
>> database server?
>
> No -- you just have to configure your tnsnames.ora so that the web
> server
> can connect. Try sqlplus first. If you can connect with sqlplus, you
> should
> be able to connect from PHP.
>
>> 2) do you have to use the OCI libraries?
>>
>
> Yes, you do need the oracle client.
>
> See http://www.php.net/manual/en/ref.oci8.php for more info.
> Particularly
> see the note on pthread.
>
> HTH,
>
> -- Joe
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Is there any way to make a separate process in PHP?
I do real-time stats collection on my site and one of the things I collect is the domain of the user (to get their country).
Sometimes getting the domain name takes a few seconds to come back and the user has to wait for that time before their page displays.
Is there any way to split of a separate process - that doesn't end when the current process ends - to do the stats collecting so that the user doesn't have to wait?
Or, if not, is there some way to tell the browser that it has all the data (so that it will finish rendering the page and run my javascript) and the script can continue running and do the ns lookup?
I'm sorry if this question has been asked and answered before but I couldn't find an answer anywhere else... and the archive for this list seems to be down.
Jordan
attached mail follows:
Hello, In MSSQL: I want to take one row of information from one table and put it into another row. Does anyone know of an easy way? Or do I have to go column by column copying each column into the new table? Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
attached mail follows:
> I love PHP, but for the following reason it could be the death of it. All > the PHP intellectuals stand up, get together, and solve this problem, or at > least give us some reassurance. (I'm only a newbie after all). :)
This is solved by people who roll distributions. Debian, Mandrake, RedHat, FreeBSD, etc. It is very simple to add new features to an existing PHP setup through these binary distributions of PHP, even for newbies. Once you know your way around PHP and its build system, you will probably want to build you own though. It's not that difficult.
-Rasmus
attached mail follows:
Hello, I am having a problem with an ISP that has installed the payflow pro (top of phpinfo shown) and yet it keeps showing up as an unknown function.
PHP Fatal error: Call to undefined function: pfpro_init() in /..... PHP Fatal error: Call to undefined function: pfpro_process() in /.....
I noticed its compiled as --with-pfpro=shared,/usr/local/payflow and in /usr/local/payflow are found the following files:
/usr/local/payflow/bin/pfpro.c /usr/local/payflow/bin/pfpro.h /usr/local/payflow/bin/pfpro /usr/local/payflow/bin/pfpro-file /usr/local/payflow/lib/libpfpro.so
Anyone care to share their configuration options, phpinfo, hints, tips? I'm at a loss, it looks like everything is setup correctly, but it still doesn't work.
Thanks Dan Harrington
PHP Version 4.0.6
System Linux www.foobar.com 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown Build Date Aug 20 2001 Configure Command './configure' '--prefix=/usr' '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc/httpd' '--enable-save-mode' '--with-zlib' '--enable-debugger' '--enable-magic-quotes' '--enable-track-vars' '--with-xml' '--with-ftp' '--with-mysql=/usr' '--with-gd=/usr/local' '--with-png-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-pfpro=shared,/usr/local/payflow' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /etc/httpd/php.ini ZEND_DEBUG disabled Thread Safety disabled
This program makes use of the Zend scripting language engine: Zend Engine v1.0.6, Copyright (c) 1998-2001 Zend Technologies
attached mail follows:
Hello, I am trying to use the UPS Online Tools, the XML version. This requires you POSTing an XML document to their Tools server, which is SSL enabled. I am having a problem getting this to connect in PHP (4.0.6) on my server (Apache 1.3.20). In my scripts, I use $Socket = fsockopen (www.ups.com, 443, $errno, $errstr);
if (!$Socket) die ("Error bla bla bla");
fputs ($Socket, "GET /ups.app/xml/Rate HTTP/1.0\r\n\r\n"); ... ... If you point your browser to https://www.ups.com/ups.app/xml/Rate you will see a response. But this code seems to just time-out. If I change the port 443 to port 80, I will get a response. What am I missing for it to talk to an SSL port??
Thanks!
Patrick
pcalkins_xxx_
oemsupport.com
** remove the _xxx_ to reply
-- Patrick Calkins OEMSupport.Com, Inc. ** please remove the _ to reply **
attached mail follows:
Hi Jack, The 'black box' you see is a newline, which can be removed by doing this: $string=str_replace("\n","",$string); $string=str_replace("\r","",$string);
That will replace \n (The newlines) and \r (The returns) with nothing,
getting rid of your problem. Hope this helps,
-Andy
Jack <jack
nedcor.com> wrote in message
news:20010827104353.87033.qmail
pb1.pair.com...
> Dear all
> I'm writing a script which will greb the data from a user input form into
a
> text file (txt file), but the problem is that when the data had passed to
> the txt file, there will be some thing like the <br> and black square
appear
> inside the file. This is affecting to display the data from that txt file
to
> the text box in (input box).
> Is there anyway that i can do to avoid grebing the <br> from txt file to
my
> input box's value? or anyway that i can delete the <br> when the data is
> greb from input box to txt file??
>
> Thanks a lot
>
> Jack
> jack
nedcor.com
>
>
>
attached mail follows:
While I try and adhere to good formatting and punctuation practice in my coding, sometimes in my haste to write code I don't have time to properly format my code especially when I do a copy and paste and the indents don't follow the new code.
Are there any apps available that will properly format PHP code particularly for a Win32 machine?
Thanks Joel
attached mail follows:
How hard is it for someone to somehow read the source code out of my php files on my isp hosted website. They use linux & apache & php 4.0.6.
I ask because in my logfile it seems someone accessed a uniquely named not-guessable folder in my web root. It is mentioned in my source code. I use imagecreatefromjpeg on files in this directory. How can someone see my folders if not by viewing my source code?
- seb
attached mail follows:
> How hard is it for someone to somehow read the source code out of my php > files on my isp hosted website. They use linux & apache & php 4.0.6.
Pretty hard, assuming your code is not output at any point.
> I ask because in my logfile it seems someone accessed a uniquely named > not-guessable folder in my web root. It is mentioned in my source code. > I use imagecreatefromjpeg on files in this directory. How can someone > see my folders if not by viewing my source code?
Does that folder name ever get output to the browser? Even in <IMG SRC=''>?
If PHP creates the file then retrieves the image itself via HTTP, that would explain the hit...
Jason
-- Jason Murray jasonmmelbourneit.com.au Web Developer, Melbourne IT "Work now, freak later!"
attached mail follows:
Hello all, I am wondering if there is a command or function to get a list of all the current '$HTTP_POST_VARS["variable"]' variables? Or, a user-created way... Any helps appreciated, thanks! -Andy L.
attached mail follows:
while (list($k,$v) = each($HTTP_POST_VARS)) { echo "<br>$k = $v"; }
On Mon, 2001-08-27 at 21:48, Andy Ladouceur wrote: > Hello all, > I am wondering if there is a command or function to get a list of all the > current '$HTTP_POST_VARS["variable"]' variables? Or, a user-created way... > Any helps appreciated, thanks! > -Andy L. > > >
attached mail follows:
> I am wondering if there is a command or function to get a > list of all the current '$HTTP_POST_VARS["variable"]' variables? > Or, a user-created way... Any helps appreciated, thanks!
You can use var_dump($HTTP_POST_VARS);
Jason
attached mail follows:
Ah, its that simple?
-feels likea bit of an idiot-
Thanks for the help!
Tim <infoz
earthlink.net> wrote in message
news:998964712.20590.9.camel
deli.lan...
>
> while (list($k,$v) = each($HTTP_POST_VARS)) {
> echo "<br>$k = $v";
> }
>
> On Mon, 2001-08-27 at 21:48, Andy Ladouceur wrote:
> > Hello all,
> > I am wondering if there is a command or function to get a list of all
the
> > current '$HTTP_POST_VARS["variable"]' variables? Or, a user-created
way...
> > Any helps appreciated, thanks!
> > -Andy L.
> >
> >
> >
>
>
attached mail follows:
Thanks!
-Andy
Jason Murray <Jason.Murray
melbourneit.com.au> wrote in message
news:1595534C9032D411AECE00508BC766FB01A4C4A8
mercury.mit...
> > I am wondering if there is a command or function to get a
> > list of all the current '$HTTP_POST_VARS["variable"]' variables?
> > Or, a user-created way... Any helps appreciated, thanks!
>
> You can use var_dump($HTTP_POST_VARS);
>
> Jason
attached mail follows:
something like this...
if( sizeof( $HTTP_POST_VARS ) > 0 ){ // avoid error when no vars while ( list ( $key, $val ) = each ( $HTTP_POST_VARS )) { print "<br>$key = $val"; } }
py
----- Original Message -----
From: "Andy Ladouceur" <SacredSilver
razza.org>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 9:48 PM
Subject: [PHP] $HTTP_POST_VARS
> Hello all,
> I am wondering if there is a command or function to get a list of all the
> current '$HTTP_POST_VARS["variable"]' variables? Or, a user-created way...
> Any helps appreciated, thanks!
> -Andy L.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hello All,
I need to have multiple JavaScripts windows with my database PHP script.
The idea is to have a main Page and links to pop-up JavaScript Windows to enter information on the database. Once these windows are closed the main PHP page need to be automaticaly updated.
The Database is a Report system that depends on 4 tables. One main table and 3 other tables that contain information for that report such as part number, procedures taken and repairs made. Each report can have none to several parts, none to several procedures and one to several repairs.
Once the user starts a new report a lot od stuff is add to the main table such as CustomerNo, ReportNo, ReportDate, etc. Then, the other three tables lists parts, procedures and repairs for a Report using the ReportNo as common field.
The help and advice I need consist of beeing able to call pop up windows with JavaScript from the main page to add Parts, Repairs and Procedures. Once the user finish adding stuff on a Pop Up window he would close it by clicking a link and the main Page of the Report would be reloaded to reflect the changes he did.
Can anyone help me with this task?
Thank you very much,
Carlos Fernando antunes
attglobal.net
attached mail follows:
phpMyAdmin is very nice... but not even close to Mysqlfront... try it out...
At 10:38 27/8/2001 -0500, Joseph Bannon wrote: >Thanks. I'll give it a try. > >Joseph > > >-----Original Message----- >Try phpMyAdmin > >http://phpwizard.net/ > > >----- Original Message ----- > > > Are there any free PHP mysql database admin programs out there?
p.s: meu novo email é cdechery
easynet.com.br
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer
attached mail follows:
Just gave it a go, it hangs for ages connecting to my servers with many databases, and takes ages to retrieve record sets that load much much faster via the phpmyadmin html interface
phpmyadmin, although plenty buggy on certain actions, is far better to use for me so far
----- Original Message -----
From: "Christian Dechery" <cdechery
easynet.com.br>
To: "Joseph Bannon" <JBannon
advparadigm.com>; "PHP (E-mail)"
<php-general
lists.php.net>
Sent: Tuesday, August 28, 2001 11:57 AM
Subject: RE: [PHP] PHP mysql admin?
> phpMyAdmin is very nice... > but not even close to Mysqlfront... try it out... > > http://www.mysqlfront.de/
attached mail follows:
Tried to download this but it bombs after about 55k of the 895k.
Seriously broken
Chris
Christian Dechery wrote:
> phpMyAdmin is very nice...
> but not even close to Mysqlfront... try it out...
>
> http://www.mysqlfront.de/
>
> At 10:38 27/8/2001 -0500, Joseph Bannon wrote:
> >Thanks. I'll give it a try.
> >
> >Joseph
> >
> >
> >-----Original Message-----
> >Try phpMyAdmin
> >
> >http://phpwizard.net/
> >
> >
> >----- Original Message -----
> >
> > > Are there any free PHP mysql database admin programs out there?
>
> p.s: meu novo email é cdechery
easynet.com.br
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
--Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia
Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chris
quillsoft.com.au http://www.quillsoft.com.au
You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt
**********************************************************************
This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so.
This notice should not be removed.
attached mail follows:
Thank you! :)
Navid Yar
-----Original Message-----
From: Christian Dechery [mailto:cdechery
easynet.com.br]
Sent: Monday, August 27, 2001 8:58 PM
To: Joseph Bannon; PHP (E-mail)
Subject: RE: [PHP] PHP mysql admin?
phpMyAdmin is very nice... but not even close to Mysqlfront... try it out...
At 10:38 27/8/2001 -0500, Joseph Bannon wrote: >Thanks. I'll give it a try. > >Joseph > > >-----Original Message----- >Try phpMyAdmin > >http://phpwizard.net/ > > >----- Original Message ----- > > > Are there any free PHP mysql database admin programs out there?
p.s: meu novo email é cdechery
easynet.com.br
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer
attached mail follows:
I downloaded it and it was fine for me. Installation only requires you to unzip the files into some folder and run the Executable. Very easy and quick. I like it, so far. I like the GUI better than phpMyAdmin...
-----Original Message-----
From: Chris Fry [mailto:chris
quillsoft.com.au]
Sent: Monday, August 27, 2001 9:36 PM
To: Christian Dechery
Cc: Joseph Bannon; PHP (E-mail)
Subject: Re: [PHP] PHP mysql admin?
Tried to download this but it bombs after about 55k of the 895k.
Seriously broken
Chris
Christian Dechery wrote:
> phpMyAdmin is very nice...
> but not even close to Mysqlfront... try it out...
>
> http://www.mysqlfront.de/
>
> At 10:38 27/8/2001 -0500, Joseph Bannon wrote:
> >Thanks. I'll give it a try.
> >
> >Joseph
> >
> >
> >-----Original Message-----
> >Try phpMyAdmin
> >
> >http://phpwizard.net/
> >
> >
> >----- Original Message -----
> >
> > > Are there any free PHP mysql database admin programs out there?
>
> p.s: meu novo email é cdechery
easynet.com.br
> ____________________________
> . Christian Dechery (lemming)
> . http://www.tanamesa.com.br
> . Gaita-L Owner / Web Developer
--Chris Fry Quillsoft Pty Ltd Specialists in Secure Internet Services and E-Commerce Solutions 10 Gray Street Kogarah NSW 2217 Australia
Phone: +61 2 9553 1691 Fax: +61 2 9553 1692 Mobile: 0419 414 323 eMail: chris
quillsoft.com.au http://www.quillsoft.com.au
You can download our Public CA Certificate from:- https://ca.secureanywhere.com/htdocs/cacert.crt
**********************************************************************
This information contains confidential information intended only for the use of the authorised recipient. If you are not an authorised recipient of this e-mail, please contact Quillsoft Pty Ltd by return e-mail. In this case, you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. This e-mail and any attachments may also contain copyright material belonging to Quillsoft Pty Ltd. The views expressed in this e-mail or attachments are the views of the author and not the views of Quillsoft Pty Ltd. You should only deal with the material contained in this e-mail if you are authorised to do so.
This notice should not be removed.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
The real reason I was looking for some kind of certification, is the course I'm trying to start.
Here in Rio de Janeiro, there are ZERO PHP Training Courses (in all Brazil I don't think there are more than three), and I think Certification is the reason. All other courses has a certification or at least a diploma from a 'Macromedia Certified' or 'Microsoft Oficial Partner' establishment.
It wouldn't be so bad to have 'PHP Endorsing Site', 'PHP Certified Professional' and so on... don't you think?
At 11:51 27/8/2001 -0400, Michael Kimsal wrote: >I know it's not specifically what you're looking for, but it may help >further the discussion. > >We offer PHP training courses. While it's not 'certification' in the sense >that we're not a 'well-known, respected' authority, we provide a hands-on >environment where you learn a series of skills - from "hello world" thru >connecting to a database, add/edit/delete info from a db, and a bit >more (user authentication techniques, etc). While we're not accredited in >anyway, it has been helpful to many of our students who need the >helping hand and/or something more than a book/magazine. > >We'd love to work with others in the PHP community to help develop >a set of certification standards, though there doesn't seem to be a big >outcry for it right now from the community. > > >Christian Dechery wrote: > >>I know this is a recurrent question around here... but it's always nice >>to ask: >> >>Is there (or is it in process of...) any kind of certification for PHP. >> >>I live in Brazil and have been developing with PHP+Mysql for over a year, >>but there are no courses around here... none. And in part, it's because >>there is no certification, or proof of any kind from a respected or >>well-known organization. > > >--------------------------------------- >michael kimsal >http://www.tapinternet.com/php/ >php training courses >734-480-9961 >
p.s: meu novo email é cdechery
easynet.com.br
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer
attached mail follows:
Hey all. I have a problem. I made a script that handles file uploads, and all the while I was testing on mozilla and netscape, totally forgot about IE. I have it set to only accept jpeg pics. It works no problem on mozilla and netscape, but IE isnt do too well. When I try to upload a jpeg, it spits out that its not a jpeg file. Not sure if the mime type is different for windows about jpegs. Anyone encountered this before. I didnt find anything in the archive. Thanks
php 4.0.6, apache 1.3.20, mysql 3.23.40 Thanks all.
attached mail follows:
Ok, I tried the to replicate on different browsers. Microsoft IE 5.5 ,6 beta & Opera 5 all show this problem. Here are some snippets of the code that Im using. Thanks
<---snip---> echo "<form action=\"$PHP_SELF\" method=\"POST\" enctype=\"multipart/form-data\">\n";
<---snip---> echo "   <input type=\"file\" name=\"pic\"><p>\n";
<---snip---> if ($pic_type != "image/jpeg") { echo "Please let the picture be in jpeg format. Thanks.<br>\n"; exit(); }
Gerard Samuel wrote: > Hey all. I have a problem. I made a script that handles file uploads, > and all the while I was testing on mozilla and netscape, totally forgot > about IE. I have it set to only accept jpeg pics. It works no problem > on mozilla and netscape, but IE isnt do too well. When I try to upload > a jpeg, it spits out that its not a jpeg file. Not sure if the mime > type is different for windows about jpegs. Anyone encountered this > before. I didnt find anything in the archive. > Thanks > > php 4.0.6, apache 1.3.20, mysql 3.23.40 > Thanks all. > >
attached mail follows:
Hi Guys,
I am trying to setup a socket relay server. Has anyone tried this?
Thanks
Scott.
attached mail follows:
Help. I have a page with a form with lots of text boxes which can be filled with data from a text file. the fopen() and fgets() works, and the text boxes which require numbers have no problems. But, I have text boxes which require several words of text and they refuse to work right. The first word makes it in the box, but the rest of the words are lost.
As an example, the data file contains: ABC Company, Inc. in the spot for $comp_name. If I call for this variable elsewhere outside of a text box, it prints in full, but when used by the following, it prints only: ABC
print "<input type=text size=30 name=comp_name value=$comp_name>";
There must be something blindingly obvious that I'm missing. Please help. Thanks, Hugh
attached mail follows:
Well,think about it like this: If you did replace $comp name with ABC Company, this is what you'd get:
<input type=text size0 namemp_name value«C Company>
Not quite right, eh? This will solve your problem: print "<input type=text size0 namemp_name value=\"$comp_name\">";
=)
-Andy
Hugh Danaher <hdanaher
earthlink.net> wrote in message
news:001201c12f71$75a45b40$c1fcb3d1
win95...
Help. I have a page with a form with lots of text boxes which can be filled
with data from a text file. the fopen() and fgets() works, and the text
boxes which require numbers have no problems. But, I have text boxes which
require several words of text and they refuse to work right. The first word
makes it in the box, but the rest of the words are lost.
As an example, the data file contains: ABC Company, Inc. in the spot for $comp_name. If I call for this variable elsewhere outside of a text box, it prints in full, but when used by the following, it prints only: ABC
print "<input type=text size0 namemp_name value=$comp_name>";
There must be something blindingly obvious that I'm missing. Please help. Thanks, Hugh
attached mail follows:
Andy,
Thank you. It Works!
Hugh
----- Original Message -----
From: Andy Ladouceur <SacredSilver
razza.org>
To: <php-general
lists.php.net>
Sent: Monday, August 27, 2001 8:35 PM
Subject: [PHP] Re: Need help on putting variable into <form>
> Well,think about it like this:
> If you did replace $comp name with ABC Company, this is what you'd get:
>
> <input type=text size=30 name=comp_name value=ABC Company>
>
> Not quite right, eh? This will solve your problem:
> print "<input type=text size=30 name=comp_name value=\"$comp_name\">";
>
> =)
> -Andy
> Hugh Danaher <hdanaher
earthlink.net> wrote in message
> news:001201c12f71$75a45b40$c1fcb3d1
win95...
> Help. I have a page with a form with lots of text boxes which can be
filled
> with data from a text file. the fopen() and fgets() works, and the text
> boxes which require numbers have no problems. But, I have text boxes
which
> require several words of text and they refuse to work right. The first
word
> makes it in the box, but the rest of the words are lost.
>
> As an example, the data file contains: ABC Company, Inc. in the spot for
> $comp_name. If I call for this variable elsewhere outside of a text box,
it
> prints in full, but when used by the following, it prints only: ABC
>
> print "<input type=text size=30 name=comp_name value=$comp_name>";
>
> There must be something blindingly obvious that I'm missing. Please help.
> Thanks, Hugh
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
No problem.
With the space in there, it considered Company as something separate...
-Andy
Hugh Danaher <hdanaher
earthlink.net> wrote in message
news:000801c12f74$62b93020$3907f4d8
win95...
> Andy,
> Thank you. It Works!
> Hugh
> ----- Original Message -----
> From: Andy Ladouceur <SacredSilver
razza.org>
> To: <php-general
lists.php.net>
> Sent: Monday, August 27, 2001 8:35 PM
> Subject: [PHP] Re: Need help on putting variable into <form>
>
>
> > Well,think about it like this:
> > If you did replace $comp name with ABC Company, this is what you'd get:
> >
> > <input type=text size=30 name=comp_name value=ABC Company>
> >
> > Not quite right, eh? This will solve your problem:
> > print "<input type=text size=30 name=comp_name value=\"$comp_name\">";
> >
> > =)
> > -Andy
> > Hugh Danaher <hdanaher
earthlink.net> wrote in message
> > news:001201c12f71$75a45b40$c1fcb3d1
win95...
> > Help. I have a page with a form with lots of text boxes which can be
> filled
> > with data from a text file. the fopen() and fgets() works, and the text
> > boxes which require numbers have no problems. But, I have text boxes
> which
> > require several words of text and they refuse to work right. The first
> word
> > makes it in the box, but the rest of the words are lost.
> >
> > As an example, the data file contains: ABC Company, Inc. in the spot
for
> > $comp_name. If I call for this variable elsewhere outside of a text
box,
> it
> > prints in full, but when used by the following, it prints only: ABC
> >
> > print "<input type=text size=30 name=comp_name value=$comp_name>";
> >
> > There must be something blindingly obvious that I'm missing. Please
help.
> > Thanks, Hugh
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
attached mail follows:
Can anyone tell me how to use the strtotime function within the on change event of a text box??
I need to format the date before submit the form because once it submits it dynamically creates a SQL statement. Is it best to use vbscript or Jscript and if so how?
Thanks in advance.
attached mail follows:
PHP is a processed before the output is sent to the browser, so a dynamic
change like what you want with it isn't possible. And unfortunately,I dont
know any JScript, or VBScript, so I can't help ya there..
=/
-Andy
Traci P Sumpter <Traci.Sumpter
opus.co.nz> wrote in message
news:KFEJJKOAGCCGEJFLKCBBAEBKCBAA.Traci.Sumpter
opus.co.nz...
> Can anyone tell me how to use the
> strtotime function within the on change
> event of a text box??
>
> I need to format the date before submit
> the form because once it submits it
> dynamically creates a SQL statement. Is
> it best to use vbscript or Jscript and
> if so how?
>
> Thanks in advance.
>
>
attached mail follows:
I'd like to use the disable_functions command from the php.ini file to disable certain functions for certain directories. I know it has to do with the httpd.conf file, but have no clue on how to go about doing it, can someone please post an example for me?With the directory I want things disabled in as '/var/www/htdocs/example/' and the base directory being '/var/ww/htdocs/' I hope someone can help, thanks.. -Andy
attached mail follows:
Hello Admin, The following example will help you
HTTP Authentication example <?php if(!isset($PHP_AUTH_USER)) { header("WWW-Authenticate: Basic realm=\"My Realm\""); header("HTTP/1.0 401 Unauthorized"); echo "Text to send if user hits Cancel button\n"; exit; } else { echo "<p>Hello $PHP_AUTH_USER.</p>"; echo "<p>You entered $PHP_AUTH_PW as your password.</p>"; } ?> 888888888888888888888888888888888888888888888888888888888888
HTTP Authentication example forcing a new name/password
<?php function authenticate() { header( "WWW-Authenticate: Basic realm=\"Test Authentication System\""); header( "HTTP/1.0 401 Unauthorized"); echo "You must enter a valid login ID and password to access this resource\n"; exit; }
if(!isset($PHP_AUTH_USER) || ($SeenBefore == 1 && !strcmp($OldAuth, $PHP_AUTH_USER)) ) { authenticate(); } else { echo "</p>Welcome: $PHP_AUTH_USER<br>"; echo "Old: $OldAuth"; echo "<form action=\"$PHP_SELF\" METHOD=POST>\n"; echo "<input type=\"hidden\" name=\"SeenBefore\" value=\"1\">\n"; echo "<input type=\"hidden\" name=\"OldAuth\" value=\"$PHP_AUTH_USER\">\n"; echo "<input type=\"submit\" value=\"Re Authenticate\">\n"; echo "</form></p>\n"; } ?>
Thanks,
Senthilvellan
----- Original Message -----
From: admin <admin
my-pcdoctor4u.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 14, 2001 11:52 PM
Subject: [PHP] Web page authentications
> I am new to PHP and am confused on HTTP authentications. I have read that
> section in the manual and still have questions. Where does PHP look to see
> if the user is valid or if the passward matches the user. How do you use
> PHP to set up user registration so users can input their information for
> authentication. Can anyone point me in the right direction to read more on
> this and help clear my confusion.
> Pat
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I use the PHP virtual() function to call a CGI script, and that works fine. But I need to prevent the CGI from being executed directly, in case someone tries to access its URL.
Since HTTP_REFERER is unreliable, I was wondering how others have solved this problem ...
Egan
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]