php-general Digest 23 Apr 2001 22:00:36 -0000 Issue 645
Topics (messages 49827 through 49944):
Why is it dangerous to have register_globals on?
49827 by: Greig, Euan
49923 by: Plutarck
PHP Sydney meeting for April
49828 by: info.phpsydney.com
Re: crypt() and md5
49829 by: Niklas Neumann
Re: IMAP Help
49830 by: Sigitas Paulavicius
Re: php-general Digest 23 Apr 2001 09:53:51 -0000 Issue 644
49831 by: alter ego
MySql / sql help plz!
49832 by: elias
49834 by: Sigitas Paulavicius
49851 by: Brian S. Dunworth
how do I do this
49833 by: Adrian D'Costa
49862 by: Andreas Landmark
reading apache log into MySQL
49835 by: Markus Maussner
gd-jpeg-support and php-3.0.18
49836 by: Felix Kronlage
if... then... else with HTML
49837 by: Martin Thoma
49838 by: Martin Thoma
49839 by: Taylor, Stewart
49840 by: Geir Eivind Mork
49841 by: Tyler Longren
49842 by: Avetis Avagyan
49843 by: Fredrik Wahlberg
49844 by: elias
49871 by: Richard Crawford
Re: SSL SSL SSL SSL -- READ THIS!!!!!!
49845 by: Scott Fletcher
PHP ---- sort()
49846 by: Scott Fletcher
49847 by: Scott Fletcher
49865 by: Andreas Landmark
Re: Connecting to a MS Access database
49848 by: Andrew Hill
logging in (online?!)
49849 by: FredrikAT
'XML To Array' Class
49850 by: php.swifte.net
49854 by: Serge Vleugels
Re: PHP Error
49852 by: jessica
49917 by: Plutarck
ALERTE: VIRUS DETECTE DANS UN MESSAGE ENVOYE PAR
[EMAIL PROTECTED]
49853 by: root.pop-1.nordnet.fr
Re: Getting a binary file from URL
49855 by: Christian Reiniger
Re: 'XML To Array' Class (Array Problem)
49856 by: php.swifte.net
Problem with session vars !
49857 by: Nicolas Guilhot
Re: include file using .htaccess
49858 by: Keyur Kalaria
Site Structure
49859 by: Jordan Elver
49860 by: Renzi, Sebastian
49861 by: Martin Gottlieb
49866 by: Jordan Elver
49869 by: John Huggins
49886 by: Toby Miller
49889 by: indrek siitan
49890 by: Kurth Bemis
49897 by: John Huggins
49921 by: Toby Miller
49925 by: Jaxon
49926 by: Martin Gottlieb
PHP4 session management and internal HTML links
49863 by: Anna Lyse
Newbie Question
49864 by: Wade
49870 by: Taylor, Stewart
49872 by: Wade
49875 by: Geir Eivind Mork
Fatal Errors and Error Handling
49867 by: Svein Roar Nilsen
49878 by: Geir Eivind Mork
XML/Array Class
49868 by: php.swifte.net
print and echo
49873 by: Wade
49874 by: Angerer, Chad
49876 by: Wade
anyone know of a dicitionary for bad site content?
49877 by: Dennis Gearon
49883 by: Christian Reiniger
Building as an Apache module
49879 by: Hasan Niyaz
49882 by: Phil Driscoll
Re: Apache, PHP, Windows XP, MSIE 6, Cheese, and Cookies.
49880 by: B. van Ouwerkerk
XML/Array Class (Possible Bug??)
49881 by: php.swifte.net
Cannot remove module mod_php4.c: not found in module list
49884 by: Markus Held
49885 by: Rasmus Lerdorf
Associative arrays in strings
49887 by: Boget, Chris
49891 by: CC Zona
49892 by: Phil Driscoll
compiling with stronghold
49888 by: charles.lunarmedia.net
insert data to mysql
49893 by: shawn
49895 by: Thomas Deliduka
49896 by: Richard Crawford
49928 by: shawn
49931 by: Philip Olson
49934 by: shawn
Problems compiling DBG debugger
49894 by: Geoff Caplan
Encryption (Browser Side)
49898 by: Jason Mowat
49899 by: Plutarck
Method Not Allowed
49900 by: Tym Rehm
Icq Message
49901 by: Christopher Allen
49911 by: Shawn J. Wallace
49914 by: Plutarck
Re: --enable-trans-sid
49902 by: Boget, Chris
Query Analyzer For MySQL with PHP?
49903 by: Brandon Orther
49906 by: Kurth Bemis
49907 by: Plutarck
49910 by: Chris Mulcahy
49924 by: Philip Olson
49933 by: Renzi, Sebastian
Re: Newbie Question (and an odd bug)
49904 by: Plutarck
PHP 4.0.5
49905 by: Dominique Paquin
49909 by: Felix Kronlage
49935 by: Martín Marqués
newbie question: duplicate emails
49908 by: Nikhil Goyal
49938 by: Phillip Bow
49940 by: Nikhil Goyal
Conflict between zlib and t1lib ?
49912 by: Shawn J. Wallace
IP Chains
49913 by: Faryal
49915 by: Shawn J. Wallace
looking for a good shopping cart - catalog system
49916 by: Roee Rubin
49920 by: Chris Cocuzzo
49936 by: Ralph Guzman
Looping through variables
49918 by: Ashley M. Kirchner
49919 by: Phillip Bow
Re: WDDX Deserialisation problem/bug?
49922 by: Andrei Zmievski
Interbase 'wait / no wait' support
49927 by: E. Stuart Hicks
How to find the object name in a class?
49929 by: Plutarck
49930 by: Boget, Chris
ereg_replace: Replacing only first occurrence
49932 by: Erica Douglass
Re: Method Not Allowed - Solved!!!!
49937 by: Tym Rehm
Having trouble executing unzip from PHP script
49939 by: Dexter
php install issues on IIS
49941 by: Jerry Lake
49943 by: Martin Gottlieb
How to turn off warnings ???
49942 by: Roee Rubin
49944 by: Greg Donald
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
I have read in several places that is dangerous to have register_globals on, but I
have not understood the (short) explanations given. Can anyone enlighten me?
Euan Greig
Technical Consultant
BRANN DATA
[EMAIL PROTECTED]
01285 645997
**************************************************************************
Any opinions expressed in this email are those of the individual and
not necessarily the Company. This email and any files transmitted with
it, including replies and forwarded copies (which may contain alterations)
subsequently transmitted from the Company, are confidential and solely for
the use of the intended recipient. If you are not the intended recipient
or the person responsible for delivering to the intended recipient, be
advised that you have received this email in error and that any use is
strictly prohibited.
**************************************************************************
Actually it's not "dangerous" per se.
However if can be very dangerous if you aren't being careful in your code,
for instance, consider this.
Let's say I've conditionally set $sql somewhere else in the code based upon
certain conditions, which works fine. But let's say those conditions aren't
met so $sql doesn't get set to anything since it's not really used. Now
consider this code:
if ($sql)
{
$result = mysql_query($sql);
}
Now that would be fine for all normal instances. But now what if someone
appends this onto the end of your url:
?query=
...plus something like "DROP databasename". It doesn't take too much
imagination to see what kind of things could happen if someone just had a
little bit of knowledge about how your code works.
Thus you have two options. One is of course to turn register_globals off,
but ALWAYS ALWAYS _ALWAYS_ set a default for every variable you refer to in
your script at some point before doing anything with it. So if you use $sql
be 100% sure that it has been set $sql explicitly in your code before doing
anything with it.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Greig, Euan"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have read in several places that is dangerous to have register_globals
on, but I have not understood the (short) explanations given. Can anyone
enlighten me?
>
> Euan Greig
> Technical Consultant
> BRANN DATA
> [EMAIL PROTECTED]
> 01285 645997
>
>
>
>
>
> **************************************************************************
> Any opinions expressed in this email are those of the individual and
> not necessarily the Company. This email and any files transmitted with
> it, including replies and forwarded copies (which may contain alterations)
> subsequently transmitted from the Company, are confidential and solely for
> the use of the intended recipient. If you are not the intended recipient
> or the person responsible for delivering to the intended recipient, be
> advised that you have received this email in error and that any use is
> strictly prohibited.
>
> **************************************************************************
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Hello PHPers,
The next PHP Sydney User Group meeting is tomorrow night
Tuesday
April 24, 2001
Starts at 7:00pm
At Greythorn Pty Ltd
Level 7
50 Margaret Street
Sydney NSW 2000
Just around the corner from Wynyard.
If you arrive before 6:00pm, just walk in.
Between 6:00pm and 7:00pm, someone will meet you in the foyer
and take you up to the 7th floor.
Star of the evening is Nathan Wallace
fresh from ApacheCon 2001 in Santa Clara.
Please reply with a definite yes or no
so Greythorn can arrange everything.
If you cannot make Tuesday nights, Please nominate another night.
Let other PHP users know about the meeting and send mailing list updates to
[EMAIL PROTECTED]
Greythorn are providing the premises, a projector, tea and coffee.
HelpNet are providing chocolate cookies.
Peter
Hello again,
[...]
> A bit mistakable I think.
> I'll give the translator a wink.
... if i can find a way to contact him. Anybody knows how to get a contact
for the german translation of the PHP documentation? Their names are listed
on the front page of the manual but no email addresses.
Niklas Neumann
Hi,
imap_createmailbox() does not ceate a real new unix account. It creates a
folder (speaking in Win terms, but rather mailbox) inside an account. Like
"Trash", "Drafts" etc. Physicly a file is created for each mailbox in the
users home dir.
And there is one default mailbox INBOX, where all the delivered mail is put.
Now adding new mail user is very tricky part. You can do it by either
creating a new unix accouont by some means, either running an appropriate
mail server, which would have it's own internal system of mail accounts
(sorry, but I don't recal which servers have such system).
Sigitas Paulavicius
I would like to separate the php errors generated by my scripts (quite a
lot unfortunately) from my apache log files, but can't seem to get this
to work. If this is a frequent question, please let me know a good place
to search the mailing list and I promise I'll do.
Here's what I do:
In php.ini:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
error_reporting = E_ALL ; Show all errors
log_errors = On
error_log = /logs/php.err ; log errors to specified file
the logs directory is writable by the www user, which is the uid that
apache runs as.
Please copy me in your answer, as i only subscribe to the digest.
thanks,
.ps
i have this table:
---------------------
Id Value
-- ------
a a
a b
a c
a d
b a
b b
b c
b d
c a
c b
how can i get an SQL statment that when run, i get a query result like that:
Id: Value count:
--- --------------
a 4 values
b 4 values
c 2 values
i feel that it's easy...but i'm not really good at SQL.
-elias
http://eassoft.cjb.net
that would be:
select Id, count(*) from sometable group by Id
Sigitas
At 02:33 PM 4/23/01 -0700, elias wrote:
>how can i get an SQL statment that when run, i get a query result like that:
>
>Id: Value count:
>--- --------------
>a 4 values
>b 4 values
>c 2 values
SELECT ID,COUNT(*) FROM table_name GROUP BY ID;
>i feel that it's easy...but i'm not really good at SQL.
..and you probably won't get better at it here. Try an SQL list or any
number of online tutorials or books on SQL.
- Brian
-------------------------------------
Brian S. Dunworth
Sr. Software Development Engineer
Oracle Database Administrator
The Printing House, Ltd.
(850) 875-1500 x225
<[EMAIL PROTECTED]>
-------------------------------------
Hi,
I have the following script. What I want is that when I select the
country the corresponding cities should only be listed in the second
dropdown box. Can some one guide me. Right below is my table
structure.
$searchStmt = "select name from airlines group by name order by name" ;
#$searchStmt1 = "select * from destinazione order by name" ;
$searchStmt1 = "select * from country order by country";
$searchStmt2 = "select name from airport group by name order by name" ;
$searchStmt3 = "select * from city order by city";
// connect to the db
if (!($link = mysql_pconnect($db_server, $db_login, $db_passwd))){
DisplayErrMsg(sprintf("internal error %d:%s\n",
mysql_errno(), mysql_error()));
exit() ;
}
// Selct the db
if (!mysql_select_db($db, $link)) {
DisplayErrMsg(sprintf("Error in selecting %s db", $db)) ;
DisplayErrMsg(sprintf("error:%d %s", mysql_error($link),
mysql_error($link))) ;
exit();
}
// Execute the Statement for compagnia_aerea
if (!($result = mysql_query($searchStmt, $link))) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $searchStmt));
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
mysql_error($link)));
exit();
}
// Execute the Statement for destinazione/Country
if (!($result1 = mysql_query($searchStmt1, $link))) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $searchStmt1));
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
mysql_error($link)));
exit();
}
// Execute the Statement for airports
if (!($result2 = mysql_query($searchStmt2, $link))) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $searchStmt2));
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
mysql_error($link)));
exit();
}
// Execute the Statement for city
if (!($result3 = mysql_query($searchStmt3, $link))) {
DisplayErrMsg(sprintf("Error in executing %s stmt", $searchStmt3));
DisplayErrMsg(sprintf("error:%d %s", mysql_errno($link),
mysql_error($link)));
exit();
}
$num = mysql_numrows($result);
include("header.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<body TEXT="#0000ff" bgcolor=white>
<h1 ALIGN="CENTER"><font SIZE="5" FACE="Arial">OFFERTE VOLI ENTRATA
DATI</font></h1>
<form ACTION="flight.php" METHOD="POST">
<table WIDTH="100%" BORDER="1" CELLPADDING="2" CELLSPACING="3">
<COL WIDTH="59*">
==== removed some lines to shorten the mail ================
<tr>
<td WIDTH="22%"><font SIZE="2" FACE="Arial">DESTINAZIONE</font></td>
<td WIDTH="55%"><input type=radio name=ndest
value="n" checked><select NAME="destinazione">
<?php
$i=0;
while($row1 = mysql_fetch_object($result1)) {
// Display records for destinazione/Country
echo("<option value=$row1->contid> $row1->country");
}
?>
</select>
<select name="city">
<?php
while($row3 = mysql_fetch_object($result3)) {
// Display records for city
echo("<option value=$row3->id>$row3->city");
}
?>
=================== Tables Structures ======================
city
| id | int(5) | | PRI | | auto_increment |
| city | varchar(35) | | MUL | | |
| countryid | int(5)
country
| id | int(5) | | PRI | | auto_increment |
| country | varchar(35) | | MUL | | |
| contid | int(5)
flight
| id | int(11) | | PRI | | auto_increment
| compagnia_aerea | varchar(255) | YES | | |
| contid | int(5) | | | 0 |
| cityid | int(5) | | | 0 |
| airport | varchar(40) | | | |
| partenza | date | YES | | |
| valido_fino | date | YES | | |
| prezzo_pubblicato | varchar(255) | YES | | |
| curr2 | char(3) | YES | | |
| prezzo_offerta | varchar(255)
The contid field in the country table holds unique ids for each
country. The city.id holds unique ids for each city and is linked to the
country table with the countryid.
The flight.contid and flight.cityid holds values of the the country and
city tables.
TIA
Adrian
On Mon, Apr 23, 2001 at 04:59:49PM +0530, Adrian D'Costa produced this golden nugget:
> Hi,
>
> I have the following script. What I want is that when I select the
> country the corresponding cities should only be listed in the second
> dropdown box. Can some one guide me. Right below is my table
> structure.
If you want to do this with pure php you'll need to reload the page after
the user selects the country from the dropdownbox, to get the webbrowser
to switch the cities in the city-dropdown w/o reloading you'll need to
use javascript or similar evil measures...
--
Andreas D. Landmark / noXtension
A physicist is an atom's way of knowing about atoms.
-- George Wald
hi..
annybody know how i could read the apache logfile into mysql ?
my problems is that i dont find anny reasonable "field limiters"...
like first it uses " " then it uses "\"" then again " " ....
if i would do a explode on " " it destroys the "get " index.php ""
markus
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Markus Maussner
Application Development and Operations
DISTEFORA Mobile (Germany) GmbH
Amsinckstrasse 69
D-20097 Hamburg
T: +49 (0) 40 80 80 99 - 904
F: +49 (0) 40 80 80 99 - 502
E: [EMAIL PROTECTED]
W: www.distefora.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hi,
on one of our Ultra-sparc boxes I need to get php-3.0.18 and
gd 1.8.4 running together smoothly.
I compiled gd lib from scratch (Version: 1.8.4) to have jpeg-support.
Following lines come out of the Makefile for gd:
| CFLAGS=-O -DHAVE_LIBJPEG -DHAVE_LIBPNG
| LIBS=-lgd -ljpeg -lpng -lz -lm
This should enable jpeg-support for it. the compiling of gd
runs just fine.
Now, the ./configure for php-3.0.18 comes, I use following
./configure-args:
| ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-versioning
| --with-mysql --with-gd --with-jpeg-dir
and during the configure it's saying the following:
| checking for compress in -lz... (cached) yes
| checking for png_info_init in -lpng... (cached) yes
| checking for gdImageCreateFromPng in -lgd... (cached) yes
| checking for libjpeg (needed by gd-1.8+)... yes
| checking for jpeg_read_header in -ljpeg... (cached) yes
| checking for gdImageCreateFromJpeg in -lgd... (cached) no
| checking for gdImageCreateFromGif in -lgd... (cached) no
| checking for gdImageLzw in -lgd... (cached) no
| checking for gdImageColorResolve in -lgd... (cached) yes
| checking for gdImageString16 in -lgd... (cached) yes
Somehow, there is no support for gdImageCreateFromJpeg detected...
any hints?
-fkr
--
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0
|http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE |
|all your base are belong to us | shame on me | fkr@IRCnet |
Hello !
I want to do something like
if (condition)
output this html-block
else
output that html-block
Without printig or echoing the html-block out (because the block has a
lot of ", which I all would have to slash out...)
How can I do that ?
Martin
Ah, I forgott the {} ;-)
<?php
if(strstr($HTTP_USER_AGENT,"MSIE")) {
?>
<center><b>You are using Internet Explorer</b></center>
<?
} else {
?>
<center><b>You are not using Internet Explorer</b></center>
<?
}
?>
Martin Thoma schrieb:
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
> Without printig or echoing the html-block out (because the block has a
> lot of ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
<?php
if (condition)
{
?>
HTML
<?php
{
else
{
?>
HTML
<?php
}
?>
-Stewart
-----Original Message-----
From: Martin Thoma [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 13:41
To: [EMAIL PROTECTED]
Subject: [PHP] if... then... else with HTML
Hello !
I want to do something like
if (condition)
output this html-block
else
output that html-block
Without printig or echoing the html-block out (because the block has a
lot of ", which I all would have to slash out...)
How can I do that ?
Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
On Monday 23 April 2001 14:41, Martin Thoma wrote:
if ($word != "flat") {
echo <<<OUT
lot of crap with "'s and stories about your mom
OUT;
} else {
echo <<<OUT
do the same
OUT;
}
remember not to have anything before or after OUT (or whatever other text you
use instead of OUT) or you get prase errors.
Or the html/php switiching way, a fraction slower after my tests :)
<?if ($world != "flat") {?>
html
<?} else {?>
html
<?]?>
--
php developer / CoreTrek AS | I judge a religion as being good or bad
Sandnes / Rogaland / Norway | based on whether its adherents become
web: http://www.moijk.net/ | better people as a result of practicing
<?
if (condition) {
?>
1st HTML here
<?
}
else {
?>
2nd HTML here
<?
}
?>
> -----Original Message-----
> From: Martin Thoma [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 7:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] if... then... else with HTML
>
>
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
>
> Without printig or echoing the html-block out (because the block has a
> lot of ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Something like this:
<?php
if (condition)
{
?>
output this html-block
<?php
}
else
{
?>
output that html-block
<?php
}
?>
Regards,
Avetis
Martin Thoma wrote:
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
> Without printig or echoing the html-block out (because the block has a
> lot of ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
[EMAIL PROTECTED]
ICT Specialist
UNDP, Armenia
I hope I understood your question right.
You can do like this
<?php
if () {
?>
<b>html text</b>
<?php
else {
?>
<b>other html</b>
<?php
}
?>
> -----Ursprungligt meddelande-----
> Fran: Martin Thoma [mailto:[EMAIL PROTECTED]]
> Skickat: den 23 april 2001 14:41
> Till: [EMAIL PROTECTED]
> Amne: [PHP] if... then... else with HTML
>
>
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
>
> Without printig or echoing the html-block out (because the block has a
> lot of ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
yes, consider this:
<html>
<body>
<? if (isset($name)) { ?>
your name is <?=$name?>
<? } else { ?>
<h1>name is not set!</h1>
<? } ?>
</body>
</html>
-elias
http://eassoft.cjb.net
"Martin Thoma" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello !
>
> I want to do something like
>
> if (condition)
> output this html-block
> else
> output that html-block
>
>
> Without printig or echoing the html-block out (because the block has a
> lot of ", which I all would have to slash out...)
>
> How can I do that ?
>
> Martin
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Alternatively, and this is what I would do because it would be easier to
maintain should you want to change the content later on, you could use
includes as per the following:
<?php
print("<html>\n<head>\n<title>Try This</title>\n</head>\n<body>\n");
if(condition)
include("html_block_1.html");
else
include("html_block_2.html");
print("</body>\n</html>");
?>
I suppose it would depend on how big your HTML blocks are.
Either way -- using includes or using the method below -- will work, and
with neither method will you have to escape out your special characters.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 4/23/01, 3:59:41 PM, "elias" <[EMAIL PROTECTED]> wrote
regarding Re: [PHP] if... then... else with HTML:
> yes, consider this:
> <html>
> <body>
> <? if (isset($name)) { ?>
> your name is <?=$name?>
> <? } else { ?>
> <h1>name is not set!</h1>
> <? } ?>
> </body>
> </html>
> -elias
> http://eassoft.cjb.net
> "Martin Thoma" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hello !
> >
> > I want to do something like
> >
> > if (condition)
> > output this html-block
> > else
> > output that html-block
> >
> >
> > Without printig or echoing the html-block out (because the block has a
> > lot of ", which I all would have to slash out...)
> >
> > How can I do that ?
> >
> > Martin
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Well there is one method to do this!
OpenSSL
./config --prefix=/usr/local/openssl-0.9.6 --openssl=/usr/local/openssl-0.9.
6
make
make test
make install
Mod_SSL
./configure --prefix=/usr/local/mod_ssl-2.8.0-1.3.17 --with-apache=../apache
_1.3.17 --with-ssl=../openssl-0.9.6
Apache
./configure --prefix=/usr/local/apache_1.3.17
PHP
./configure --prefix=/usr/local/php-4.0.2 --with-apache=../apache_1.3.17 --w
ith-openssl=../openssl-0.9.6 --without-mysql --enable-track-vars
Apache
SSL_BASE=../ssl
./configure --prefix=/usr/local/apache_1.3.17 --enable-module=ssl --activate
-module=src/modules/php4/libphp4.a
make
make certificate (optional)
make install
That is all you need. Apache will automatically enable the Mod_SSL and
compile it. The file path for Apache or PHP, or SSL is up to you or you
can leave hte --prefix blank.
Scott
""Toby Miller"" <[EMAIL PROTECTED]> wrote in message
029d01c0c834$b75f61f0$[EMAIL PROTECTED]">news:029d01c0c834$b75f61f0$[EMAIL PROTECTED]...
>
> ----- Original Message -----
> From: "phpman" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, April 17, 2001 4:55 PM
> Subject: [PHP] SSL SSL SSL SSL -- READ THIS!!!!!!
>
>
> > How do I establish an SSL socket connection with PHP?
> > I have PHP compiled in an Apache Mod_SSL server. Do I need to compile
PHP
> > with
> > some sort of open_ssl option? I have --enable-sockets in the command
line.
> > Please help!!!
> >
> > -dave
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I have used the PHP sort function --> sort(). When I use sort($data,
NUMERIC), it sort the data by Numeric order. But it goes in ascending
order. Is there a way to make it go in Descending order?
Thanks,
Scott
I mean, sort($data, SORT_NUMBERIC), not sort($data, NUMERIC).
""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message
9c191q$crh$[EMAIL PROTECTED]">news:9c191q$crh$[EMAIL PROTECTED]...
> I have used the PHP sort function --> sort(). When I use sort($data,
> NUMERIC), it sort the data by Numeric order. But it goes in ascending
> order. Is there a way to make it go in Descending order?
>
> Thanks,
> Scott
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
On Mon, Apr 23, 2001 at 08:57:21AM -0400, Scott Fletcher produced this golden nugget:
> I have used the PHP sort function --> sort(). When I use sort($data,
> NUMERIC), it sort the data by Numeric order. But it goes in ascending
> order. Is there a way to make it go in Descending order?
Use rsort()
(and if you looked at the manual, you would've found this yourself
instead of posting to the list ;-)
--
Andreas D. Landmark / noXtension
There is no time like the present for postponing what you ought to be
doing.
Actually, I must put my .02 in again. ODBC is not by nature slow. Some
implementations of ODBC are indeed slow, especially the ones that are
additional abstraction layers on top of a native driver, but other ODBC
drivers (OpenLink's included) can bypass the native networking layer,
producing a connection that is as fast and in some cases far faster than the
native driver.
Not that the speed would be an issue with Access, though :) I agree fully
with Geir - install a full-fledged multi-user database. If you are looking
for another 'free' one, try Virtuoso http://www.openlinksw.com/virtuoso It
is a fully functional SQL92 db and comes with a free 2 user license - enough
to give you the same scalability as Access and you have the option of
upgrading it's license later. It works quite well as a backend for PHP, and
also lets you link other databases transparently through it (so you can
access multiple database schemas as if they are a single local schema).
Best regards,
Andrew
--------------------------------------
Andrew Hill - OpenLink Software
Director Technology Evangelism
Universal Data Access Integration
http://www.openlinksw.com
> -----Original Message-----
> From: Geir Eivind Mork [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 4:07 AM
> To: Steve Maroney; Andrew Hill
> Cc: Søren Soltveit; [EMAIL PROTECTED]
> Subject: Re: [PHP] Connecting to a MS Access database
>
>
> On Sunday 22 April 2001 22:02, Steve Maroney wrote:
> > This brings up a question that I always wondered.
> > Does Access have server functionality? Where do you configure these
> > settings ?
>
> If you go over the menuchoice - file, shake your mouse, bite in the cord,
> slam your head in the monitor fifteen times and then trow a
> bucket of water
> over your computer a new option called 'server' comes up. if not,
> repeat the
> steps.
>
> Or install a database server. when using ex. asp towards an
> accessbase it's
> odbc that deals with the communication. it's slow, it's a
> bottleneck.. but it
> works :)
>
>
> --
> php developer / CoreTrek AS | Thus spake the master programmer:
> Sandnes / Rogaland / Norway | "After three days without
> programming,
> web: http://www.moijk.net/ | life becomes meaningless."
> -- Geoffrey
>
Hi!
I have users logging in on my site (they write news)..
What is the best way to show how's online?
Write to MySQL (last logged in) ?
Somehow use the sessions to this ?
---------------------------------
Fredrik A. Takle
[EMAIL PROTECTED]
Hello,
I'm new to using XML with PHP, but I think I've got it figured out for
the most part. I have created a class that reads in an XML file and
returns the data it finds to an array, but I'm running into a problem
because the array keeps coming back empty. Would you mind taking a
moment to see where I'm going wrong?
file.xml
=======================================================================
<ARTICLE>
<URL>/article1.html</URL>
<TITLE>Article 1</TITLE>
</ARTICLE>
<ATRICLE>
<URL>/article2.html</URL>
<TITLE>Article 2</TITLE>
</ATRICLE>
xml.class.php
=======================================================================
<?
class eXML
{
var $Parser;
var $theArray;
var $theArrayTopElement;
var $theArrayElements;
var $theArrayPointer;
var $theArrayGetElement;
function eXML($_PARENT_, $_CHILDREN_)
{
$this->Parser = xml_parser_create("ISO-8859-1");
xml_set_object($this->Parser, &$this);
xml_set_element_handler($this-
>Parser, "Tag_Open", "Tag_Close");
xml_set_character_data_handler($this-
>Parser, "CData");
$this->theArray = array();
$this->theArrayPointer = 0;
$this->theArrayGetElement = NULL;
$this->theArrayTopElement = $_PARENT_;
$this->theArrayElements = $_CHILDREN_;
}
function Free()
{
xml_parser_free($this->Parser);
}
function Parse_Array($_FILE_)
{
$_FP_ = fopen($_FILE_, "r") or die("Cannot Open
XML Stream");
while ($_DATA_ = fread($_FP_, 4096))
{
if (!xml_parse($this->Parser, $_DATA_,
feof($_FP_)))
{
return(FALSE);
}
}
fclose($_FP_);
var_dump($this->theArray);
return($this->theArray);
}
function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{
if ($_TAG_ == $this->theArrayTopElement)
{
$this->theArray[$this->theArrayPointer]
= "SOMETEXT";
// NOT SURE IF THIS IS NECESSARY
}
$_ELEMENTS_ = explode("::", $this-
>theArrayElements);
for ($I = 0; $I < count($_ELEMENTS_); $I++)
{
if ($_TAG_ == $_ELEMENTS_[$I])
{
$this->theArrayGetElement =
$_ELEMENTS_[$I];
}
}
}
function Tag_Close($_PARSER_, $_TAG_)
{
if ($_TAG_ == $this->theArrayTopElement)
{
$this->theArrayPointer++;
}
$this->theArrayGetElement = NULL;
}
function CData($_PARSER_, $_CDATA_)
{
if ($this->theArrayGetElement != NULL)
{
array_push($this->theArray, $_CDATA_);
$this->theArray[$this->theArrayPointer]
[$this->theArrayGetElement] = $_CDATA_;
}
}
}
?>
xml.test.php
=======================================================================
<?
$XML = new eXML("ARTICLE", "URL::TITLE");
$ARTICLES = $XML->Parse_Array("file.xml");
print_r($ARTICLES);
?>
What I expect to happen is this:
$ARTICLES[0]["URL"] == "/article1.html";
$ARTICLES[0]["TITLE"] == "Article 1";
$ARTICLES[1]["URL"] == "/article2.html";
$ARTICLES[1]["TITLE"] == "Article 2";
But the array is empty.
Thankz in advance for your help.
Robert
--
[ Swift eNetwork ] Matrix
http://matrix.swifte.net/
--
heey,
i'm currently facing the same problem as you.
i was thinking of using either xml_parse_into_struct or using
a class i found phpxml.class at http://www.phpxml.org
let me know how you did it, i'm very intrested
Serge "Zeddicus Zu'l Zorandre" Vleugels
-- freedom is the wizard's only choice --
On 23 Apr 2001 09:18:25 -0400, [EMAIL PROTECTED] wrote:
> Hello,
>
> I'm new to using XML with PHP, but I think I've got it figured out for
> the most part. I have created a class that reads in an XML file and
> returns the data it finds to an array, but I'm running into a problem
> because the array keeps coming back empty. Would you mind taking a
> moment to see where I'm going wrong?
>
>
> file.xml
> =======================================================================
>
> <ARTICLE>
> <URL>/article1.html</URL>
> <TITLE>Article 1</TITLE>
> </ARTICLE>
>
> <ATRICLE>
> <URL>/article2.html</URL>
> <TITLE>Article 2</TITLE>
> </ATRICLE>
>
>
>
> xml.class.php
> =======================================================================
>
>
> <?
>
>
> class eXML
> {
>
>
> var $Parser;
>
> var $theArray;
> var $theArrayTopElement;
> var $theArrayElements;
> var $theArrayPointer;
> var $theArrayGetElement;
>
>
> function eXML($_PARENT_, $_CHILDREN_)
> {
>
> $this->Parser = xml_parser_create("ISO-8859-1");
> xml_set_object($this->Parser, &$this);
> xml_set_element_handler($this-
> >Parser, "Tag_Open", "Tag_Close");
> xml_set_character_data_handler($this-
> >Parser, "CData");
>
> $this->theArray = array();
> $this->theArrayPointer = 0;
> $this->theArrayGetElement = NULL;
> $this->theArrayTopElement = $_PARENT_;
> $this->theArrayElements = $_CHILDREN_;
>
> }
>
>
> function Free()
> {
>
> xml_parser_free($this->Parser);
>
> }
>
>
> function Parse_Array($_FILE_)
> {
>
> $_FP_ = fopen($_FILE_, "r") or die("Cannot Open
> XML Stream");
>
> while ($_DATA_ = fread($_FP_, 4096))
> {
>
> if (!xml_parse($this->Parser, $_DATA_,
> feof($_FP_)))
> {
>
> return(FALSE);
>
> }
>
> }
>
> fclose($_FP_);
> var_dump($this->theArray);
> return($this->theArray);
>
> }
>
>
> function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
> {
>
> if ($_TAG_ == $this->theArrayTopElement)
> {
>
> $this->theArray[$this->theArrayPointer]
> = "SOMETEXT";
> // NOT SURE IF THIS IS NECESSARY
>
> }
>
> $_ELEMENTS_ = explode("::", $this-
> >theArrayElements);
> for ($I = 0; $I < count($_ELEMENTS_); $I++)
> {
>
> if ($_TAG_ == $_ELEMENTS_[$I])
> {
>
> $this->theArrayGetElement =
> $_ELEMENTS_[$I];
>
> }
>
> }
>
>
> }
>
>
> function Tag_Close($_PARSER_, $_TAG_)
> {
>
> if ($_TAG_ == $this->theArrayTopElement)
> {
>
> $this->theArrayPointer++;
>
> }
>
> $this->theArrayGetElement = NULL;
>
> }
>
>
> function CData($_PARSER_, $_CDATA_)
> {
>
> if ($this->theArrayGetElement != NULL)
> {
>
> array_push($this->theArray, $_CDATA_);
> $this->theArray[$this->theArrayPointer]
> [$this->theArrayGetElement] = $_CDATA_;
>
> }
>
> }
>
> }
>
>
> ?>
>
>
>
> xml.test.php
> =======================================================================
>
> <?
>
>
> $XML = new eXML("ARTICLE", "URL::TITLE");
> $ARTICLES = $XML->Parse_Array("file.xml");
> print_r($ARTICLES);
>
>
> ?>
>
>
> What I expect to happen is this:
>
> $ARTICLES[0]["URL"] == "/article1.html";
> $ARTICLES[0]["TITLE"] == "Article 1";
> $ARTICLES[1]["URL"] == "/article2.html";
> $ARTICLES[1]["TITLE"] == "Article 2";
>
> But the array is empty.
>
> Thankz in advance for your help.
> Robert
>
>
>
> --
>
> [ Swift eNetwork ] Matrix
> http://matrix.swifte.net/
>
> --
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Yeah right...
Sure, we can use ob_start(), but the poster of original message apparently
does not make any use of these functions ,
therefore his problem is easily solvable by just keeping track of output
start rather then creating a whole buffering system.
After all, why would you use some strange (for the poster) functions when he
can just delete the space/newline after ?> ?
Thanks for suggesting an alternative.
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 6:49 PM
To: Maxim Maletsky
Subject: RE: [PHP] PHP Error
> it says that on line 15 of settings.php there's an output.
>
> you need to set cookies BEFORE any output.
>
that's not quiet right! you can use the
output buffering functions such as ob_start()
to avoid this problem!
--
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]
Emanuel.exe
Goody, a virus. LOL
Note: According to the Virus scanner used on php.net (or on the mailing
list. whichever) Emanuel.exe is a virus. Here is the URL for information on
it:
http://vil.mcafee.com/dispVirus.asp?virus_k=98881&
Gotta hate when that happens.
--
Plutarck
Should be working on something...
...but forgot what it was.
""jessica"" <[EMAIL PROTECTED]> wrote in message
016a01c0cbff$69f1fee0$0300a8c0@acer345t">news:016a01c0cbff$69f1fee0$0300a8c0@acer345t...
Yeah right...
Sure, we can use ob_start(), but the poster of original message apparently
does not make any use of these functions ,
therefore his problem is easily solvable by just keeping track of output
start rather then creating a whole buffering system.
After all, why would you use some strange (for the poster) functions when he
can just delete the space/newline after ?> ?
Thanks for suggesting an alternative.
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 09, 2001 6:49 PM
To: Maxim Maletsky
Subject: RE: [PHP] PHP Error
> it says that on line 15 of settings.php there's an output.
>
> you need to set cookies BEFORE any output.
>
that's not quiet right! you can use the
output buffering functions such as ob_start()
to avoid this problem!
--
phpArbeitsgruppe in Gruendung - Jochen Kaechelin
Stuttgarter Str.3, D-73033 Goeppingen
Tel. 07161-92 95 94, Fax 07161-92 95 98
http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED]
----------------------------------------------------------------------------
----
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
A L E R T E V I R U S
Notre système de détection automatique anti-virus
a détecté un virus dans un message qui vous a été
envoyé par "jessica" <[EMAIL PROTECTED]>.
La distribution de ce message a été stoppée.
Veuillez vous rapprocher de l'émetteur "jessica" <[EMAIL PROTECTED]> pour
régler avec lui le problème.
***********
V I R U S A L E R T
Our anti-virus system has detected a virus in an
email sent by "jessica" <[EMAIL PROTECTED]>.
We have stopped the delivery of this email.
We invite you to contact "jessica" <[EMAIL PROTECTED]>
to solve the problem.
On Sunday 22 April 2001 21:25, Sigitas Paulavicius wrote:
> Solution #1
>
> $contents = fread ($pointer, 1000000000000);
>
>
>
> Solution #2
>
> $contents="";
> while ($partial = fread ($pointer, 8192)) {
> $contents.=$partial;
> };
But test this before you rely on it. I once did this with (IIRC) PHP
4.0.1 and it read up to several hundred junk bytes after encountering EOF.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
"World domination. Fast." (Linus Torvalds about Linux)
I think it's important to mention that my problem is not with XML, but
with my use of arrays. I have tested the variable content that comes
back with XML and the data is coming through. My problem is I am not
doing something right to make the data into an array...
> heey,
>
> i'm currently facing the same problem as you.
> i was thinking of using either xml_parse_into_struct or using
> a class i found phpxml.class at http://www.phpxml.org
> let me know how you did it, i'm very intrested
>
> Serge "Zeddicus Zu'l Zorandre" Vleugels
>
> -- freedom is the wizard's only choice --
>
>
> On 23 Apr 2001 09:18:25 -0400, [EMAIL PROTECTED] wrote:
> > Hello,
> >
> > I'm new to using XML with PHP, but I think I've got it figured out
for
> > the most part. I have created a class that reads in an XML file
and
> > returns the data it finds to an array, but I'm running into a
problem
> > because the array keeps coming back empty. Would you mind taking a
> > moment to see where I'm going wrong?
> >
> >
> > file.xml
> >
=======================================================================
> >
> > <ARTICLE>
> > <URL>/article1.html</URL>
> > <TITLE>Article 1</TITLE>
> > </ARTICLE>
> >
> > <ATRICLE>
> > <URL>/article2.html</URL>
> > <TITLE>Article 2</TITLE>
> > </ATRICLE>
> >
> >
> >
> > xml.class.php
> >
=======================================================================
> >
> >
> > <?
> >
> >
> > class eXML
> > {
> >
> >
> > var $Parser;
> >
> > var $theArray;
> > var $theArrayTopElement;
> > var $theArrayElements;
> > var $theArrayPointer;
> > var $theArrayGetElement;
> >
> >
> > function eXML($_PARENT_, $_CHILDREN_)
> > {
> >
> > $this->Parser = xml_parser_create("ISO-8859-
1");
> > xml_set_object($this->Parser, &$this);
> > xml_set_element_handler($this-
> > >Parser, "Tag_Open", "Tag_Close");
> > xml_set_character_data_handler($this-
> > >Parser, "CData");
> >
> > $this->theArray = array();
> > $this->theArrayPointer = 0;
> > $this->theArrayGetElement = NULL;
> > $this->theArrayTopElement = $_PARENT_;
> > $this->theArrayElements = $_CHILDREN_;
> >
> > }
> >
> >
> > function Free()
> > {
> >
> > xml_parser_free($this->Parser);
> >
> > }
> >
> >
> > function Parse_Array($_FILE_)
> > {
> >
> > $_FP_ = fopen($_FILE_, "r") or die("Cannot
Open
> > XML Stream");
> >
> > while ($_DATA_ = fread($_FP_, 4096))
> > {
> >
> > if (!xml_parse($this->Parser,
$_DATA_,
> > feof($_FP_)))
> > {
> >
> > return(FALSE);
> >
> > }
> >
> > }
> >
> > fclose($_FP_);
> > var_dump($this->theArray);
> > return($this->theArray);
> >
> > }
> >
> >
> > function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
> > {
> >
> > if ($_TAG_ == $this->theArrayTopElement)
> > {
> >
> > $this->theArray[$this-
>theArrayPointer]
> > = "SOMETEXT";
> > // NOT SURE IF THIS IS NECESSARY
> >
> > }
> >
> > $_ELEMENTS_ = explode("::", $this-
> > >theArrayElements);
> > for ($I = 0; $I < count($_ELEMENTS_); $I++)
> > {
> >
> > if ($_TAG_ == $_ELEMENTS_[$I])
> > {
> >
> > $this->theArrayGetElement =
> > $_ELEMENTS_[$I];
> >
> > }
> >
> > }
> >
> >
> > }
> >
> >
> > function Tag_Close($_PARSER_, $_TAG_)
> > {
> >
> > if ($_TAG_ == $this->theArrayTopElement)
> > {
> >
> > $this->theArrayPointer++;
> >
> > }
> >
> > $this->theArrayGetElement = NULL;
> >
> > }
> >
> >
> > function CData($_PARSER_, $_CDATA_)
> > {
> >
> > if ($this->theArrayGetElement != NULL)
> > {
> >
> > array_push($this->theArray, $_CDATA_);
> > $this->theArray[$this-
>theArrayPointer]
> > [$this->theArrayGetElement] = $_CDATA_;
> >
> > }
> >
> > }
> >
> > }
> >
> >
> > ?>
> >
> >
> >
> > xml.test.php
> >
=======================================================================
> >
> > <?
> >
> >
> > $XML = new eXML("ARTICLE", "URL::TITLE");
> > $ARTICLES = $XML->Parse_Array("file.xml");
> > print_r($ARTICLES);
> >
> >
> > ?>
> >
> >
> > What I expect to happen is this:
> >
> > $ARTICLES[0]["URL"] == "/article1.html";
> > $ARTICLES[0]["TITLE"] == "Article 1";
> > $ARTICLES[1]["URL"] == "/article2.html";
> > $ARTICLES[1]["TITLE"] == "Article 2";
> >
> > But the array is empty.
> >
> > Thankz in advance for your help.
> > Robert
> >
> >
> >
> > --
> >
> > [ Swift eNetwork ] Matrix
> > http://matrix.swifte.net/
> >
> > --
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]
>
>
>
--
[ Swift eNetwork ] Matrix
http://matrix.swifte.net/
--
I am having problem with PHP4 session variables. I think I misunderstood how
they work, and I can't see what I'm doing wrong. Any help would be
appreciated. I am using the version from EasyPhp 1.1.1.
Below is a short example to explain my problem. I've got two php scripts.
'test1.php' which starts a session, set a variable $sess and register it as
a
session variable. It then redirects to 'test2.php' which only displays
session variables and switches $sess[var1] between true and false on each
call.
With the code in example, I retrieve the variable set by 'test1.php' on
'test2.php', but $HTTP_SESSION_VARS['sess']['var1'] is always true.
With the same code, If I set register_globals to off in my php.ini, I get
the opposite. I never retrieve the variable set by 'test1.php' on
'test2.php', but $HTTP_SESSION_VARS['sess']['var1'] is switches correctly.
What is wrong in this code ??
If I replace
session_register('sess'); in 'test1.php'
by
$GLOBALS['HTTP_SESSION_VARS']['sess'] = $sess;
and set register_globals to off everything works. Someone could explain to
me why ??
Best regards,
Nicolas
File test1.php
<?
function initSessionVar()
{
global $sess;
// initialise sess variable for the new session
$sess = array();
$sess['user'] = "test";
$sess['var1'] = true;
session_register('sess');
}
session_start();
initSessionVar();
header('Location: http://localhost/test2.php');
exit;
?>
File test2.php
<?
session_start();
echo gettype($HTTP_SESSION_VARS['sess']) . "<BR>";
echo $HTTP_SESSION_VARS['sess']['user'] . "<BR>";
echo ($HTTP_SESSION_VARS['sess']['var1'] ? "true" : "false");
if ($HTTP_SESSION_VARS['sess']['var1']){
$HTTP_SESSION_VARS['sess']['var1'] = false;
}
else{
$HTTP_SESSION_VARS['sess']['var1'] = true;
}
?>
thanks for that , it is working fine.
keyur
----- Original Message -----
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Keyur Kalaria" <[EMAIL PROTECTED]>
Cc: "php" <[EMAIL PROTECTED]>
Sent: Saturday, April 21, 2001 9:18 PM
Subject: Re: [PHP] include file using .htaccess
> Make sure AllowOverride includes Options and put these lines in your
> .htaccess:
>
> php_value auto_prepend_file header.html
> php_value auto_append_file footer.html
>
> -Rasmus
>
> On Sat, 21 Apr 2001, Keyur Kalaria wrote:
>
> > Hello,
> >
> > How can I include any html or php file via .htaccess ?
> >
> > I want to include an html file in a site contaning around 1000 pages. I
want
> > to add header & footer dynamically on these pages .
> > Is there any way to include header & footer on these pages using
.htaccess
> > file.
> >
> >
> > thanks in advance
> >
> > keyur
> > $$$$$$$
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
Hi,
I have a site structure like:
-> root
---> includes
---> admin
---> images
I'm using headers and footers and they are in the includes directory. My
pages in the root directory include the files like:
include('includes/header.inc');
Thats woprks fine, but i want to be able ti use the same headers and footers
in the admin directory but, of course, the paths are going to be wrong.
How can i get around this?
Any ideas,
Jord
try
include('../includes/header.inc');
Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A
> -----Mensaje original-----
> De: Jordan Elver [SMTP:[EMAIL PROTECTED]]
> Enviado el: lunes 23 de abril de 2001 11:56
> Para: PHP General Mailing List
> Asunto: [PHP] Site Structure
>
> Hi,
> I have a site structure like:
>
> -> root
> ---> includes
> ---> admin
> ---> images
>
> I'm using headers and footers and they are in the includes directory. My
> pages in the root directory include the files like:
>
> include('includes/header.inc');
>
> Thats woprks fine, but i want to be able ti use the same headers and
> footers
> in the admin directory but, of course, the paths are going to be wrong.
>
> How can i get around this?
>
> Any ideas,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Or better yet:
include( "$DOCUMENT_ROOT/includes/header.inc" );
Martin Gottlieb
-----Original Message-----
From: Renzi, Sebastian [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:56 AM
To: 'Jordan Elver'; PHP General Mailing List
Subject: RE: [PHP] Site Structure
try
include('../includes/header.inc');
Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A
> -----Mensaje original-----
> De: Jordan Elver [SMTP:[EMAIL PROTECTED]]
> Enviado el: lunes 23 de abril de 2001 11:56
> Para: PHP General Mailing List
> Asunto: [PHP] Site Structure
>
> Hi,
> I have a site structure like:
>
> -> root
> ---> includes
> ---> admin
> ---> images
>
> I'm using headers and footers and they are in the includes directory. My
> pages in the root directory include the files like:
>
> include('includes/header.inc');
>
> Thats woprks fine, but i want to be able ti use the same headers and
> footers
> in the admin directory but, of course, the paths are going to be wrong.
>
> How can i get around this?
>
> Any ideas,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi,
Thanks for the reply. I can do that but then the images will not be in the
correct location?
Jordan
On Monday 23 April 2001 15:58, you wrote:
> give the include() function a complete path:
>
> include '/apache/htdocs/include/yourfile.inc.php';
>
>
> -- Ben Cairns - Head Of Technical Operations
> intasept.COM
> Tel: 01332 365333
> Fax: 01332 346010
> E-Mail: [EMAIL PROTECTED]
> Web: http://www.intasept.com
>
> "MAKING sense of
> the INFORMATION
> TECHNOLOGY age
> @ WORK......"
I would suggest putting your includes out of the web tree.
/.../website/htdocs/admin
/.../website/htdocs/images
/.../website/includes
This may be totally inappropriate for now, but is a good habit to get into.
Call the includes with the full pathname. I know this stinks, but is a good
solution if you define most of your path with a variable.
> -----Original Message-----
> From: Jordan Elver [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 10:56 AM
> To: PHP General Mailing List
> Subject: [PHP] Site Structure
>
>
> Hi,
> I have a site structure like:
>
> -> root
> ---> includes
> ---> admin
> ---> images
>
> I'm using headers and footers and they are in the includes directory. My
> pages in the root directory include the files like:
>
> include('includes/header.inc');
>
> Thats woprks fine, but i want to be able ti use the same headers
> and footers
> in the admin directory but, of course, the paths are going to be wrong.
>
> How can i get around this?
>
> Any ideas,
>
> Jord
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Jordan,
Not true. If you make your PHP includes look like this:
include("$DOCUMENT_ROOT/includes/header.inc");
Then you can make your image calls with an absolute URL like this:
<img src="/images/image.gif" width="10" height="10" border="0">
Also, it's not a good idea to use the .inc extension unless you've
associated it with PHP. The reason is if I type the URL directly to
/includes/header.inc I will get the source code for that file in text
format. However, if you named it header.inc.php it will still follow an
intelligent naming convention, but will still get interpreted if someone
tries to access it directly. This will most likely result in an error or
will just display a blank page depending on what your header file does.
Either way it doesn't open your source code up to anonymous users. This is
why Martin is suggesting you to store your include files outside of the root
web directory so people can't directly access your source code. So either do
what I've suggested or do what Martin suggested, but it is definitely worth
the effort to do one of the two.
--Toby
----- Original Message -----
From: "Jordan Elver" <[EMAIL PROTECTED]>
To: "Ben Cairns" <[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 11:28 AM
Subject: Re: [PHP] Site Structure
> Hi,
> Thanks for the reply. I can do that but then the images will not be in the
> correct location?
>
> Jordan
>
> On Monday 23 April 2001 15:58, you wrote:
> > give the include() function a complete path:
> >
> > include '/apache/htdocs/include/yourfile.inc.php';
> >
> >
> > -- Ben Cairns - Head Of Technical Operations
> > intasept.COM
> > Tel: 01332 365333
> > Fax: 01332 346010
> > E-Mail: [EMAIL PROTECTED]
> > Web: http://www.intasept.com
> >
> > "MAKING sense of
> > the INFORMATION
> > TECHNOLOGY age
> > @ WORK......"
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hi,
> Also, it's not a good idea to use the .inc extension unless you've
> associated it with PHP. The reason is if I type the URL directly to
> /includes/header.inc I will get the source code for that file in text
> format.
you don't have to keep your .inc files in the web server document
root folder at all...
Rgds,
Tfr
--==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia >==--
At 01:12 PM 4/23/2001, Toby Miller wrote:
personally i deny all access to my .inc files. with this Apache config...
works really good :-)
in httpd.conf
# The following prevents .inc file from being read by web clients
<Files ~ ".inc">
Order allow,deny
Deny from all
</Files>
~kurth
>Jordan,
>
>Not true. If you make your PHP includes look like this:
>
>include("$DOCUMENT_ROOT/includes/header.inc");
>
>Then you can make your image calls with an absolute URL like this:
>
><img src="/images/image.gif" width="10" height="10" border="0">
>
>Also, it's not a good idea to use the .inc extension unless you've
>associated it with PHP. The reason is if I type the URL directly to
>/includes/header.inc I will get the source code for that file in text
>format. However, if you named it header.inc.php it will still follow an
>intelligent naming convention, but will still get interpreted if someone
>tries to access it directly. This will most likely result in an error or
>will just display a blank page depending on what your header file does.
>Either way it doesn't open your source code up to anonymous users. This is
>why Martin is suggesting you to store your include files outside of the root
>web directory so people can't directly access your source code. So either do
>what I've suggested or do what Martin suggested, but it is definitely worth
>the effort to do one of the two.
>
>--Toby
>
>
>----- Original Message -----
>From: "Jordan Elver" <[EMAIL PROTECTED]>
>To: "Ben Cairns" <[EMAIL PROTECTED]>
>Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
>Sent: Monday, April 23, 2001 11:28 AM
>Subject: Re: [PHP] Site Structure
>
>
> > Hi,
> > Thanks for the reply. I can do that but then the images will not be in the
> > correct location?
> >
> > Jordan
> >
> > On Monday 23 April 2001 15:58, you wrote:
> > > give the include() function a complete path:
> > >
> > > include '/apache/htdocs/include/yourfile.inc.php';
> > >
> > >
> > > -- Ben Cairns - Head Of Technical Operations
> > > intasept.COM
> > > Tel: 01332 365333
> > > Fax: 01332 346010
> > > E-Mail: [EMAIL PROTECTED]
> > > Web: http://www.intasept.com
> > >
> > > "MAKING sense of
> > > the INFORMATION
> > > TECHNOLOGY age
> > > @ WORK......"
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
This is true and I do this in .htaccess or in the main Apache config file
when possible. However, for those who do not have control over the main
config file, you are at the mercy of the system operator. They could turn
off looking at your .htaccess files and not have the "<Files>" directive to
hide the .inc files and then your code you thought private is not private at
all.
The moral of this is to always assume the worst and put those .inc files
anywhere, but the web tree. However, do this only if you care about
protecting the contents.
Caveat Emptor
> -----Original Message-----
> From: Kurth Bemis [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 1:24 PM
> To: Toby Miller; Jordan Elver
> Cc: PHP General Mailing List
> Subject: Re: [PHP] Site Structure
>
>
> At 01:12 PM 4/23/2001, Toby Miller wrote:
>
> personally i deny all access to my .inc files. with this Apache config...
>
> works really good :-)
>
> in httpd.conf
>
> # The following prevents .inc file from being read by web clients
>
> <Files ~ ".inc">
> Order allow,deny
> Deny from all
> </Files>
>
>
While it is true that you don't have to put your files in the web directory
at all and it is a more secure option there is still one very large
inconvenience that prevents me from going with that option. You lose the
usefulness of just including "$DOCUMENT_ROOT/yourfolder/yourfilename". This
is the main reason that I do put my files in the root web directory. So how
do you tell all of your files where your included content is? Do you hard
code the path in every page? If so, do you also have development, stage, and
live environments that mimic the exact same directory structures? If not, do
you always change the include strings by hand every time you move from one
environment to another? Do you run into these problems? What kind of
solutions/workarounds have you implemented?
I have always used this style of including documents because it enables me
to do my mockup ideas on my Windows machine with PWS. Then I can move onto
my Linux test box and try the site in my home account. Then I can push the
exact same code to the dev server which uses www as the root web directory.
Then I can push the exact same code to the staging server for clients to see
which has wwwroot as the root web directory and the live environment mimics
the stage environment so that move makes little to no difference. Now if
someone else was working on the same project and checked the files out of
CVS they would have to tweak their copy to work in their special environment
instead of just running and developing the files. This just seems like a
whole lot of extra work to me. Correct me if I'm wrong, but the only way
anyone can see the source code of a php file if the extension is associated
with the PHP interpreter is if you provide a phps file that they can see or
if someone uninstalls the PHP interpreter (which bypasses the situation
because the first condition is no longer being met).
I'm really curious to see how other developers handle these kind of
development situations.
----- Original Message -----
From: "indrek siitan" <[EMAIL PROTECTED]>
To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
<[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 1:22 PM
Subject: RE: [PHP] Site Structure
> Hi,
>
> > Also, it's not a good idea to use the .inc extension unless you've
> > associated it with PHP. The reason is if I type the URL directly to
> > /includes/header.inc I will get the source code for that file in text
> > format.
>
> you don't have to keep your .inc files in the web server document
> root folder at all...
>
>
> Rgds,
> Tfr
>
> --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
>==--
Hmm...
Is there any way to set something like include_path on the fly, so you just
define all your possible direcories at once in what is essential a 'site
environment' variable, and then you can include/require your files without
putting any path info in?
regards,
jaxon
> -----Original Message-----
> From: Toby Miller [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 3:44 PM
> To: indrek siitan
> Cc: PHP General Mailing List
> Subject: Re: [PHP] Site Structure
>
>
> While it is true that you don't have to put your files in the web
> directory
> at all and it is a more secure option there is still one very large
> inconvenience that prevents me from going with that option. You lose the
> usefulness of just including
> "$DOCUMENT_ROOT/yourfolder/yourfilename". This
> is the main reason that I do put my files in the root web
> directory. So how
> do you tell all of your files where your included content is? Do you hard
> code the path in every page? If so, do you also have development,
> stage, and
> live environments that mimic the exact same directory structures?
> If not, do
> you always change the include strings by hand every time you move from one
> environment to another? Do you run into these problems? What kind of
> solutions/workarounds have you implemented?
>
> I have always used this style of including documents because it enables me
> to do my mockup ideas on my Windows machine with PWS. Then I can move onto
> my Linux test box and try the site in my home account. Then I can push the
> exact same code to the dev server which uses www as the root web
> directory.
> Then I can push the exact same code to the staging server for
> clients to see
> which has wwwroot as the root web directory and the live
> environment mimics
> the stage environment so that move makes little to no difference. Now if
> someone else was working on the same project and checked the files out of
> CVS they would have to tweak their copy to work in their special
> environment
> instead of just running and developing the files. This just seems like a
> whole lot of extra work to me. Correct me if I'm wrong, but the only way
> anyone can see the source code of a php file if the extension is
> associated
> with the PHP interpreter is if you provide a phps file that they
> can see or
> if someone uninstalls the PHP interpreter (which bypasses the situation
> because the first condition is no longer being met).
>
> I'm really curious to see how other developers handle these kind of
> development situations.
>
> ----- Original Message -----
> From: "indrek siitan" <[EMAIL PROTECTED]>
> To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
> <[EMAIL PROTECTED]>
> Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, April 23, 2001 1:22 PM
> Subject: RE: [PHP] Site Structure
>
>
> > Hi,
> >
> > > Also, it's not a good idea to use the .inc extension unless you've
> > > associated it with PHP. The reason is if I type the URL directly to
> > > /includes/header.inc I will get the source code for that file in text
> > > format.
> >
> > you don't have to keep your .inc files in the web server document
> > root folder at all...
> >
> >
> > Rgds,
> > Tfr
> >
> > --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
> >==--
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
You could always:
include( "$DOCUMENT_ROOT/../includes/whatever.inc" );
or better yet, define include_path and then just:
include( "whatever.inc" );
This give you the best of both worlds. You never need to worry about
different
dir. structures on dev, staging, and production servers, AND you can keep
your includes out of a web server accessible directory.
Martin Gottlieb
-----Original Message-----
From: Toby Miller [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 3:44 PM
To: indrek siitan
Cc: PHP General Mailing List
Subject: Re: [PHP] Site Structure
While it is true that you don't have to put your files in the web directory
at all and it is a more secure option there is still one very large
inconvenience that prevents me from going with that option. You lose the
usefulness of just including "$DOCUMENT_ROOT/yourfolder/yourfilename". This
is the main reason that I do put my files in the root web directory. So how
do you tell all of your files where your included content is? Do you hard
code the path in every page? If so, do you also have development, stage, and
live environments that mimic the exact same directory structures? If not, do
you always change the include strings by hand every time you move from one
environment to another? Do you run into these problems? What kind of
solutions/workarounds have you implemented?
I have always used this style of including documents because it enables me
to do my mockup ideas on my Windows machine with PWS. Then I can move onto
my Linux test box and try the site in my home account. Then I can push the
exact same code to the dev server which uses www as the root web directory.
Then I can push the exact same code to the staging server for clients to see
which has wwwroot as the root web directory and the live environment mimics
the stage environment so that move makes little to no difference. Now if
someone else was working on the same project and checked the files out of
CVS they would have to tweak their copy to work in their special environment
instead of just running and developing the files. This just seems like a
whole lot of extra work to me. Correct me if I'm wrong, but the only way
anyone can see the source code of a php file if the extension is associated
with the PHP interpreter is if you provide a phps file that they can see or
if someone uninstalls the PHP interpreter (which bypasses the situation
because the first condition is no longer being met).
I'm really curious to see how other developers handle these kind of
development situations.
----- Original Message -----
From: "indrek siitan" <[EMAIL PROTECTED]>
To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
<[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 1:22 PM
Subject: RE: [PHP] Site Structure
> Hi,
>
> > Also, it's not a good idea to use the .inc extension unless you've
> > associated it with PHP. The reason is if I type the URL directly to
> > /includes/header.inc I will get the source code for that file in text
> > format.
>
> you don't have to keep your .inc files in the web server document
> root folder at all...
>
>
> Rgds,
> Tfr
>
> --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
>==--
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I wrote a HTML page using PHP 4.0 and its session management and I am
getting very strange results.
I found out that it only happens when I use href="#1". There is no problem
with href="file.php#1".
Original code:
<table width="100%">
<tr>
<td><a href="#1">Gesuchte Tätigkeit</a></td>
<td><a href="#2">Gesuchte Tätigkeit</a></td>
<td><a href="#3">Gesuchte Tätigkeit</a></td>
</tr>
</table>
<form action="bewerbung.php" method="post">
<input type="hidden" name="cmd" value="send">
<input type="hidden" name="login" value="<? echo $login; ?>">
<a name="1">
Result in IE:
<table width="100%">
<tr>
<td><a href=" #1">Gesuchte Tätigkeit</a></td>
<td><a href=" #2">Gesuchte Tätigkeit</a></td>
<td><a href=" #3">Gesuchte Tätigkeit</a></td>
</tr>
</table>
<form action="bewerbung.php" method="post">
<input type="hidden" name="cmd" value="send">
<input type="hidden" name="login"
value="?SID=0b04e7e464152a73d8217c244bb38626" #1">Gesuchte Tätigkeit</a></td>
<td><a href=" #2">Gesuchte Tätigkeit</a></td>
<td><a href=" #3">Gesuchte Tätigkeit</a></td>
</tr>
</table>
<form action="bewerbung.php" method="post">
<input type="hidden" name="cmd" value="send">
<input type="hidden" name="login"
value="?SID=0b04e7e464152a73d8217c244bb38626" #2">Gesuchte Tätigkeit</a></td>
<td><a href=" #3">Gesuchte Tätigkeit</a></td>
</tr>
</table>
<form action="bewerbung.php" method="post">
<input type="hidden" name="cmd" value="send">
<input type="hidden" name="login"
value="?SID=0b04e7e464152a73d8217c244bb38626" #3">Gesuchte Tätigkeit</a></td>
</tr>
</table>
<form action="bewerbung.php?SID=0b04e7e464152a73d8217c244bb38626"
method="post">
<input type="hidden" name="cmd" value="send">
<input type="hidden" name="login" value="sdi3">
<a name="1">
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
I wanted to say thanks to all those that have helped me. This is really a
great language and I am doing things I never thought I'd be able to do!
Now to my question:
I am doing some form validation, where I check the values entered by the
user. If the value is correct, I format the results and print it out. If it
is not correct, I want to allow them to fix it. When I have a text field,
like first_name, I'm ok. But when I do an HTML list menu, I'm having
troubles.
Basically, this is what I want to do. If the value is correct, print the
value. If it is not correct, display the list box. Here's an example (but
you can see my else statement is wrong, and this is what I need help with):
if (my_type != "0"){
switch($my_type){
case "one":
print "<img src=\"/trillion/img/one.gif\" width=\"41\"
height=\"26\" alt=\"One\">";
print " One";
break;
case "two":
print "<img src=\"/trillion/img/two.gif\" width=\"41\"
height=\"26\" alt=\"Two\">";
print " Two";
break;
case "three":
print "<img src=\"/trillion/img/three.gif\" width=\"40\"
height=\"26\" alt=\"Three\">";
print " Three";
break;
}
}
else {
<select tabindex=13 name="my_type">
<option value="0" selected>Select a Value</option>
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
}
}
You've got some typo's
if (my_type != "0"){ --> if ($my_type != "0") {
Plus you forgot to use the print function (or to turn off php ?>) to output
the Select HTML.
-Stewart
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: 23 April 2001 16:15
To: [EMAIL PROTECTED]
Subject: [PHP] Newbie Question
I wanted to say thanks to all those that have helped me. This is really a
great language and I am doing things I never thought I'd be able to do!
Now to my question:
I am doing some form validation, where I check the values entered by the
user. If the value is correct, I format the results and print it out. If it
is not correct, I want to allow them to fix it. When I have a text field,
like first_name, I'm ok. But when I do an HTML list menu, I'm having
troubles.
Basically, this is what I want to do. If the value is correct, print the
value. If it is not correct, display the list box. Here's an example (but
you can see my else statement is wrong, and this is what I need help with):
if (my_type != "0"){
switch($my_type){
case "one":
print "<img src=\"/trillion/img/one.gif\" width=\"41\"
height=\"26\" alt=\"One\">";
print " One";
break;
case "two":
print "<img src=\"/trillion/img/two.gif\" width=\"41\"
height=\"26\" alt=\"Two\">";
print " Two";
break;
case "three":
print "<img src=\"/trillion/img/three.gif\" width=\"40\"
height=\"26\" alt=\"Three\">";
print " Three";
break;
}
}
else {
<select tabindex=13 name="my_type">
<option value="0" selected>Select a Value</option>
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Stewart-
Thanks a great deal
It works now.
Wade
""Taylor, Stewart"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You've got some typo's
> if (my_type != "0"){ --> if ($my_type != "0") {
>
> Plus you forgot to use the print function (or to turn off php ?>) to
output
> the Select HTML.
>
> -Stewart
>
> -----Original Message-----
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: 23 April 2001 16:15
> To: [EMAIL PROTECTED]
> Subject: [PHP] Newbie Question
>
>
> I wanted to say thanks to all those that have helped me. This is really a
> great language and I am doing things I never thought I'd be able to do!
>
> Now to my question:
>
> I am doing some form validation, where I check the values entered by the
> user. If the value is correct, I format the results and print it out. If
it
> is not correct, I want to allow them to fix it. When I have a text field,
> like first_name, I'm ok. But when I do an HTML list menu, I'm having
> troubles.
>
> Basically, this is what I want to do. If the value is correct, print the
> value. If it is not correct, display the list box. Here's an example (but
> you can see my else statement is wrong, and this is what I need help
with):
>
> if (my_type != "0"){
> switch($my_type){
> case "one":
> print "<img src=\"/trillion/img/one.gif\" width=\"41\"
> height=\"26\" alt=\"One\">";
> print " One";
> break;
> case "two":
> print "<img src=\"/trillion/img/two.gif\" width=\"41\"
> height=\"26\" alt=\"Two\">";
> print " Two";
> break;
> case "three":
> print "<img src=\"/trillion/img/three.gif\" width=\"40\"
> height=\"26\" alt=\"Three\">";
> print " Three";
> break;
> }
> }
> else {
> <select tabindex=13 name="my_type">
> <option value="0" selected>Select a Value</option>
> <option value="one">One</option>
> <option value="two">Two</option>
> <option value="three">Three</option>
> </select>
> }
> }
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
On Monday 23 April 2001 17:34, Taylor, Stewart wrote:
> You've got some typo's
> if (my_type != "0"){ --> if ($my_type != "0") {
if ($my_type)
if it's a check if it's true, "not-equal"-ing it to string 0 is a ugly way to
do it. just my two cents.
--
php developer / CoreTrek AS | Forest fires cause Smokey Bears.
Sandnes / Rogaland / Norway |
web: http://www.moijk.net/ |
Hi!
I am working on a project for exchanging tidal water level information, and
we are exchanging information using XML over HTTP, and decided to try PHP
for the job. PHP has been a good choice so far, and the project is nearly
finished. But there is one problem remaining that could force us to drop PHP
entirely if we do not find a good solution. And that is error handling.
The standard we are using demands that all errors must be reported using a
predefined XML format. The problem is that many of the errors generatet by
PHP are fatal errors, so we are unable to trap them. It could have been
barely acceptable to use the error_prepend_string and error_append_string
from php.ini to encapsulate the error message, but the problem is that the
error message contains tags for linebreak and bold (<br> and <b>), which
makes it an invalid xml message, and also invalid acording to the standard
we are using.
And I see no reason why we should not be allowed to handle most of the fatal
errors we get on our own. Especially annoying is the xslt_process() function
that returns something like "<br><b>Fatal error</b>: XML parser error 7:
mismatched tag in <b>/var/www/[...]". As far as I can see, this error should
not be fatal. In another programming language I would expect this type of
function to simply return false if there was an error of this kind. In my
opinion, untrapable errors should be reserved for the case where PHP really
had messed up its own internals.
So I should be really grateful if someone could help us out of this one!
Regards,
Svein Roar Nilsen
Norwegian Hydrographic Services
On Monday 23 April 2001 17:29, Svein Roar Nilsen wrote:
> And I see no reason why we should not be allowed to handle most of the
> fatal errors we get on our own. Especially annoying is the xslt_process()
> function that returns something like "<br><b>Fatal error</b>: XML parser
> error 7: mismatched tag in <b>/var/www/[...]". As far as I can see, this
http://www.php.net/manual/en/features.error-handling.php
have you taken a deeper look into this?
beside, use @ in front of the command to pipe away the current error or stop
on-screen display of errors in general.
--
php developer / CoreTrek AS | Only God can make random selections.
Sandnes / Rogaland / Norway |
web: http://www.moijk.net/ |
I've narrowed down my problem... It is building the array as it
should. I can print_r the results in the function CData(). However,
the results are no longer then at the end of GetArray(). I'm not sure
what's causing this problem...
<?
class eXML
{
var $Parser;
var $theArray;
var $theArrayTopElement;
var $theArrayElements;
var $theArrayPointer;
var $theArrayGetElement;
function eXML($_PARENT_, $_CHILDREN_)
{
$this->Parser = xml_parser_create("ISO-8859-1");
xml_set_object($this->Parser, &$this);
xml_set_element_handler($this-
>Parser, "Tag_Open", "Tag_Close");
xml_set_character_data_handler($this-
>Parser, "CData");
$this->theArray = array();
$this->theArrayPointer = 0;
$this->theArrayGetElement = NULL;
$this->theArrayTopElement = $_PARENT_;
$this->theArrayElements = $_CHILDREN_;
}
function Free()
{
xml_parser_free($this->Parser);
}
function GetArray($_FILE_)
{
$_FP_ = fopen($_FILE_, "r") or die("Cannot Open
XML Stream");
while ($_DATA_ = fread($_FP_, 4096))
{
if (!xml_parse($this->Parser, $_DATA_,
feof($_FP_)))
{
return(FALSE);
}
}
fclose($_FP_);
//print_r($this->theArray); <~~ shows empty
array
return($this->theArray);
}
function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{
$_ELEMENTS_ = explode("::", $this-
>theArrayElements);
for ($I = 0; $I < count($_ELEMENTS_); $I++)
{
if ($_TAG_ == $_ELEMENTS_[$I])
{
$this->theArrayGetElement =
$_ELEMENTS_[$I];
}
}
}
function Tag_Close($_PARSER_, $_TAG_)
{
if ($_TAG_ == $this->theArrayTopElement)
{
$this->theArrayPointer++;
}
$this->theArrayGetElement = NULL;
}
function CData($_PARSER_, $_CDATA_)
{
if ($this->theArrayGetElement != NULL)
{
$this->theArray[$this->theArrayPointer]
[$this->theArrayGetElement] = $_CDATA_;
//print_r($this->theArray); <---
shows the multi-dimentional array
}
}
}
?>
--
[ Swift eNetwork ] Matrix
http://matrix.swifte.net/
--
What's the difference between these two and is there a preference in which
one to use?
-Wade
This has been answered several times I think
check here
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40
CAA
-----Original Message-----
From: Wade [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 10:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] print and echo
What's the difference between these two and is there a preference in which
one to use?
-Wade
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Thank you!
""Angerer, Chad"" <[EMAIL PROTECTED]> wrote in message
9E35C54B0C7AD411B5C1009027DE539940B5ED@MSPMX01">news:9E35C54B0C7AD411B5C1009027DE539940B5ED@MSPMX01...
> This has been answered several times I think
>
> check here
>
> http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/40
>
> CAA
>
> -----Original Message-----
> From: Wade [mailto:[EMAIL PROTECTED]]
> Sent: Monday, April 23, 2001 10:43 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] print and echo
>
>
> What's the difference between these two and is there a preference in which
> one to use?
>
> -Wade
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
For example, lets say you had a tool site.
You wanted a standard dictionary to compare incoming user supplied
content against to prevent stuff like, "Sadomasochist implements", "F**K
YOU!", "This site is a pieces of 'merde'" etcetera out.
On Monday 23 April 2001 17:57, Dennis Gearon wrote:
> For example, lets say you had a tool site.
>
> You wanted a standard dictionary to compare incoming user supplied
> content against to prevent stuff like, "Sadomasochist implements",
> "F**K YOU!", "This site is a pieces of 'merde'" etcetera out.
Be very careful with this. IIRC CyberPatrol blocks most german students
because their email adresses contain such a "nasty" word:
[EMAIL PROTECTED]
contains "stud".
Of course that's because it's used as short version of "student" in this
context, but how can a filter differentiate between that and the "sex
bomb" meaning?
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Even idiots can handle computers, and many do.
Hi,
I am running Apache on win 2000 and when I configured PHP it automatically installed
as a CGI binary.
Is there any way I can install it as an Apache Module on win 2000 machine.
Thanks for your help,
Hasan
Download the larger Windows binary zip from the php downloads page - that
includes the Apache module.
Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org
>Choose a flavor of linux, format your HD, install, and run the that server
>like it was meant to run.
If you don't want to kill your Windooz, you could do a dualinstall. I'm not
sure it will run with XP.. never seen XP.. hope it stays that way :-)
But with W95 it runs like a dream.
Or.. use a cheap Celeronbased computer and create your own in-house testbed
server.. For most people even an old 486 or Pentium might do the job..
Bye,
B.
I decided to take my class and just turn it into some functions. It
works perfectly. I did not change any code except for removing the
class declaration and getting rid of the $this-> statements. I believe
that maybe my problem has to do with the use of xml_set_object() making
a reference to $this:
xml_set_object($this->Parser, &$this);
If this is the case, I'm not sure why it would show the correct results
in CData() but not at the end of GetArray(), but that's the only thing
I can think the problem may be.
Below is a copy of my code just as seperate functions. The code works
perfectly. I *really* wish I could find out why this won't work as a
class though...
<?
function GetArray($_FILE_)
{
global $Parser, $theArrayTopElement, $theArrayElements,
$theArrayPointer, $theArrayGetElement, $theArray;
$theArray = array();
$_FP_ = fopen($_FILE_, "r") or die("Cannot Open XML
Stream");
while ($_DATA_ = fread($_FP_, 4096))
{
if (!xml_parse($Parser, $_DATA_, feof($_FP_)))
{
return(FALSE);
}
}
fclose($_FP_);
return($theArray);
}
function Tag_Open($_PARSER_, $_TAG_, $_ATTR_)
{
global $Parser, $theArrayTopElement, $theArrayElements,
$theArrayPointer, $theArrayGetElement, $theArray;
$_ELEMENTS_ = explode("::", $theArrayElements);
for ($I = 0; $I < count($_ELEMENTS_); $I++)
{
if ($_TAG_ == $_ELEMENTS_[$I])
{
$theArrayGetElement = $_ELEMENTS_[$I];
}
}
}
function Tag_Close($_PARSER_, $_TAG_)
{
global $Parser, $theArrayTopElement, $theArrayElements,
$theArrayPointer, $theArrayGetElement, $theArray;
if ($_TAG_ == $theArrayTopElement)
{
$theArrayPointer++;
}
$theArrayGetElement = NULL;
}
function CData($_PARSER_, $_CDATA_)
{
global $Parser, $theArrayTopElement, $theArrayElements,
$theArrayPointer, $theArrayGetElement, $theArray;
if ($theArrayGetElement != NULL)
{
$theArray[$theArrayPointer]
[$theArrayGetElement] = $_CDATA_;
}
}
$theArrayTopElement = "ARTICLE";
$theArrayElements = "URL::TITLE";
$theArrayPointer = 0;
$theArrayGetElement = NULL;
$Parser = xml_parser_create("ISO-8859-1");
xml_set_element_handler($Parser, "Tag_Open", "Tag_Close");
xml_set_character_data_handler($Parser, "CData");
$NEWS = GetArray("myfile.xml");
print_r($NEWS);
?>
Hello
i have a big problem and find no answer
In /var/log/httpd/error_log if have this error
"Cannot remove module mod_php4.c: not found in module list"
i installed three times the php4.0.4
no problems with configure; make; make install
but if i would start the apache i get this error
gruß snooter
> i have a big problem and find no answer
>
> In /var/log/httpd/error_log if have this error
>
> "Cannot remove module mod_php4.c: not found in module list"
>
> i installed three times the php4.0.4
> no problems with configure; make; make install
>
> but if i would start the apache i get this error
What configure flags did you use? (see your config.nice file)
What does httpd -l show?
The easy fix is to get rid of your ClearModuleList directive in your
httpd.conf file and remove all the AddModule lines. Unless you are doing
something really complex, there is no need for these.
-Rasmus
We have an array:
$myArray = array( "joe"=>"bob", "this"=>"that" );
I know that technically, you shouldn't do the following
to print it out:
echo "Here is a $string, $myArray[joe] with $alot of PHP $variables";
If you have the highest error level on, PHP will display
an error though if you don't, it makes some assumptions
for you and goes on it's merry way. Now, supposing you
do have error level set to very high, you cannot do this:
echo "Here is a $string, $myArray['joe'] with $alot of PHP $variables";
(using single quotes)
to stop the error. You actually have to do this:
echo "Here is a $string, " . $myArray["joe"] . " with $alot of PHP
$variables";
While that works, it makes the code look very fragmented.
And if you have *alot* of stuff like that all over your page,
it could get very difficult to read.
First question: Why doesn't the single quote example work?
Second question: Is there any other way (aside from setting
the error level down; we are already doing that and these
questions are purely academic) to do this so the code doesn't
look as fragmented?
Chris
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Boget, Chris") wrote:
> Now, supposing you
> do have error level set to very high, you cannot do this:
>
> echo "Here is a $string, $myArray['joe'] with $alot of PHP $variables";
> (using single quotes)
>
> to stop the error. You actually have to do this:
>
> echo "Here is a $string, " . $myArray["joe"] . " with $alot of PHP
> $variables";
echo "Here is a $string, {$myArray['joe']} with $alot of PHP $variables";
--
CC
echo "Here is a $string, {$myArray["joe"]} with $alot of PHP $variables";
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org
Anyone know of docs in place for compiling php4 under stronghold? Its
apache based, however I was hoping that someone had put some doc into
place specific to this webserver.
Thanks- charles
Hello,
I am just wondering if someone can help me out with this. This is what I have so far,
but it isnt working:
MYSQL_CONNECT($hostname, $username, $password)
or die("Unable to connect to database");
@mysql_select_db( "$dbName")
or die( "Unable to select database");
$sql = "INSERT INTO $userstable (client, contact, email, address, city, state, zip,
phone, fax, model, country, details, type)
VALUES("$client", "$contact", "$email", "$address", "$city", "$state", "$zip",
"$phone", "$fax", "$model", "$country", "$details", "$type")";
$result = MYSQL_QUERY($sql) or die ("Couldn't execute query");
MYSQL_CLOSE();
Im new (no kidding?), so i hope this is easy, also, is there a address anyone can
point me to for a archive of this list?
Thanks in advance,
Shawn
On 4/23/2001 1:32 PM this was written:
> $sql = "INSERT INTO $userstable (client, contact, email, address, city, state,
> zip, phone, fax, model, country, details, type)
>
> VALUES("$client", "$contact", "$email", "$address", "$city", "$state", "$zip",
> "$phone", "$fax", "$model", "$country", "$details", "$type")";
Um.. You're using double-quotes inside of double quotes. You need to use
single quotes....
VALUES('$client', '$contact', '$email', '$address', '$city', '$state',
'$zip', '$phone', '$fax', '$model', '$country', '$details', '$type')";
--
Thomas Deliduka
IT Manager
-------------------------
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.com/
Concatenate your string.
"...VALUES ('".$client."','".$contact."')" (etc.)
Or just replace the double-quotes within the string with single quotes.
That should do it.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 4/23/01, 10:32:47 AM, "shawn" <[EMAIL PROTECTED]> wrote regarding
[PHP] insert data to mysql:
> Hello,
> I am just wondering if someone can help me out with this. This is what I
have so far, but it isnt working:
> MYSQL_CONNECT($hostname, $username, $password)
> or die("Unable to connect to database");
> @mysql_select_db( "$dbName")
> or die( "Unable to select database");
> $sql = "INSERT INTO $userstable (client, contact, email, address, city,
state, zip, phone, fax, model, country, details, type)
> VALUES("$client", "$contact", "$email", "$address", "$city", "$state",
"$zip", "$phone", "$fax", "$model", "$country", "$details", "$type")";
> $result = MYSQL_QUERY($sql) or die ("Couldn't execute query");
> MYSQL_CLOSE();
> Im new (no kidding?), so i hope this is easy, also, is there a address
anyone can point me to for a archive of this list?
> Thanks in advance,
> Shawn
> Concatenate your string.
>
> "...VALUES ('".$client."','".$contact."')" (etc.)
>
> Or just replace the double-quotes within the string with single quotes.
> That should do it.
I did that but it still doesnt work? Is there something else that I should be passing
to the script to let it know to write to fields within the table?
Shawn
> I did that but it still doesnt work? Is there something else that I
> should be passing to the script to let it know to write to fields
> within the table?
define "not work" like is there an error? data not inserting? also, read
and bookmark this tutorial, it'll help this and future endeavers :
http://www.zend.com/zend/tut/using-strings.php
and for kicks, right under your line that begins with $result put this :
echo mysql_error();
mysql_error() prints the last mysql error (in human readable format), you
may have one.
regards,
philip
define "not work" like is there an error? data not inserting? also, read
and bookmark this tutorial, it'll help this and future endeavers :
http://www.zend.com/zend/tut/using-strings.php
The error is that the data isnt being written to the MySQL database. This is taking
variables from a form, and emailing them to a recipient, also it is supposed to write
the data to a database. The email works fine, but it just isnt writting to the
database?
Shawn
"thanks for the link"
Hi
I am trying to compile Dmitri Dmitrienko's DBG PHP debugger on RedHat.
The docs say to put the DBG directory into the PHP ext directory,
delete the existing PHP ./configure shell script, and then create a
new configure script by running ./buildconf.
My problem is that when I try to run the ./buildconf script I get
"permission denied" from every script called. I can only run each
script by manually adding "x" to its permissions - but this surely
can't be the right way...
I am new to compiling on *nix so I am probably making an elementary
error.
Can anyone help me out?
Geoff Caplan
Greets,
I have a question about PHP and browser-side encryption. I currently
authenticate my users to an LDAP system using the PHP LDAP APIs. The user
enters their login name and password on a browser form, with the password
box being set to all '*'s for password. However, this information is sent
'plaintext' to the LDAP server, so an interloper could potentially sniff the
password off of the network.
The second issue is that I am also presented with a way in which to grab the
user's password, simply by saving the contents of the password field and
dumping it to a text file or database from the PHP code.
My question is: what is the best way for me to do an LDAP bind without
having access to the password in plaintext? Can I encrypt the password as
the user types it in on the browser window, so that no form type variables
can be "trapped" by PHP? SSL will address the encryption of the passwords
after they are sent to the LDAP server, but it is probably a little bit of
overkill to encrypt the entire stream. It also permits me to "steal"
passwords from the PHP side, which is a security consideration. What is the
best, easiest solution for me to follow?
Cheers,
Jason
Don't know much about LDAP so I can't answer those questions, but the only
way (short of creating/requiring a plug-in just to encrypt the data, which
isn't a good idea) to have the user send an encrypted password is to use SSL
on the login/creation page. That means you can't ever send their password
through the url of a non-SSL page for security, but you shouldn't do that
anyway.
That's the only "browser side" encryption that all browsers support.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Jason Mowat"" <[EMAIL PROTECTED]> wrote in message
9c1rja$5kp$[EMAIL PROTECTED]">news:9c1rja$5kp$[EMAIL PROTECTED]...
> Greets,
>
> I have a question about PHP and browser-side encryption. I currently
> authenticate my users to an LDAP system using the PHP LDAP APIs. The user
> enters their login name and password on a browser form, with the password
> box being set to all '*'s for password. However, this information is sent
> 'plaintext' to the LDAP server, so an interloper could potentially sniff
the
> password off of the network.
>
> The second issue is that I am also presented with a way in which to grab
the
> user's password, simply by saving the contents of the password field and
> dumping it to a text file or database from the PHP code.
>
> My question is: what is the best way for me to do an LDAP bind without
> having access to the password in plaintext? Can I encrypt the password as
> the user types it in on the browser window, so that no form type variables
> can be "trapped" by PHP? SSL will address the encryption of the passwords
> after they are sent to the LDAP server, but it is probably a little bit of
> overkill to encrypt the entire stream. It also permits me to "steal"
> passwords from the PHP side, which is a security consideration. What is
the
> best, easiest solution for me to follow?
>
> Cheers,
> Jason
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I'm trying to get a script working and I get a 405 Method Not Allowed error
every time I run the script. I understand this is a apache configuration
issue, but I don't know what I need to do to fix this. I'm running RH7.0,
Apache 1.3.12 and PHP3 all from RPMs. Thanks.
***********************************************************
THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL
OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN
INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT
FROM DISCLOSURE UNDER APPLICABLE LAW.
If the reader of this message is not the intended
recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution,
forwarding, or copying of this communication is strictly
prohibited. If you have received this communication in
error, please notify the sender immediately by e-mail or
telephone, and delete the original message immediately.
Thank you.
***********************************************************
Greetings:
Anyone have a clue as how to send an icq message to a given ICQ number via a
php-web-page?
TIA.
Christopher C. M. Allen
At 01:40 PM 4/23/2001 -0500, you wrote:
>Anyone have a clue as how to send an icq message to a given ICQ number via a
>php-web-page?
I think I remember seeing one on the zend.com code gallery. Do a search
there for icq.
Shawn
One way is to use the WWPager function in ICQ (check the icq helpfile or web
page for info on how it works), but people can disable such functionality in
their Security/Privacy settings.
There may be another way (I know there are applets and programs that can do
it for you), but I'm not sure about them.
--
Plutarck
Should be working on something...
...but forgot what it was.
""Christopher Allen"" <[EMAIL PROTECTED]> wrote in message
00c001c0cc24$e90ff540$[EMAIL PROTECTED]">news:00c001c0cc24$e90ff540$[EMAIL PROTECTED]...
> Greetings:
>
> Anyone have a clue as how to send an icq message to a given ICQ number via
a
> php-web-page?
>
> TIA.
>
> Christopher C. M. Allen
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> I wasn't able to find this in the docs, so could someone
> tell me exactly how --enable-trans-sid is supposed to work
> behind the scenes?
> while it won't for this url:
>
> <a href="/interactive/direct_apply/resident.php"
> target="_top">here</a>
I've also tried...
<a href="/interactive/direct_apply/resident.php"
target="_blank">here</a>
> > It makes no sense to me...
> Any help would be greatly appreciated!!
Ok, I found one of my problems but I didn't find the other.
Again, I have 2 frames. The above link is in the left frame.
In the frame, in the actual page, I'm printing out the the
value of $PHPSESSID and it is showing a value. So I know
the session has been started. I click on the above link to
get to the next page and the next page isn't getting the
$PHPSESSID passed to it.
I have --enable-trans-sid turned on and it's working in most
places. However, it's not working in all places. Can anybody
guess as to what is going on? Why wouldn't PHP automagically
transmit the SID to the next page (append it to the href) as
it should with --enable-trans-sid turned off.
One last thing of note - this works when cookies are turned
on. The $PHPSESSID gets set as a cookie and it's all good.
Now, I'm going through my pages with cookies turned off
to make sure that nothing in the site breaks... I want to
make sure users w/cookies turned off can use my site, too.
In doing this I made the following configuration settings:
IE: Tools->Internet Options->Security->Custom Level->
Cookies and I said disable for both:
"Allow cookies that are stored on your computer"
"Allow per session cookies"
NS: Edit->Preferences->Advanced->Disable Cookies
Again, any help would be greatly appreciated!
Chris
Hello,
I recently took an ANSI SQL class to better familiarize my self with SQL in
general. In the class we used MSSQL SERVER 7 and to do queries we used the
Query Analyzer. Does anyone know of a PHP script that works like the Query
Analyzer so I can test Queries in a Browser? Like A Text Area where I can
put the query and a simple form that sends it to MySQL.
Thanks,
Brandon
At 02:56 PM 4/23/2001, Brandon Orther wrote:
teh guys a phpwizzard.net wrote phpmyadmin...its a wonderful db admin
tool...and it has a feature like what your describing.....check it
out...http://www.phpwizzards.net
~kurth
>Hello,
> I recently took an ANSI SQL class to better familiarize my self
> with SQL in
>general. In the class we used MSSQL SERVER 7 and to do queries we used the
>Query Analyzer. Does anyone know of a PHP script that works like the Query
>Analyzer so I can test Queries in a Browser? Like A Text Area where I can
>put the query and a simple form that sends it to MySQL.
>
>Thanks,
>Brandon
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
If you want to input SQL querries through a text box, you can just build an
easy one in PHP. Note: it's extremely unsecure to use for anything more than
personal use.
Just create an HTML form with a textarea and a submit button. Set the action
to the php page and on the PHP page do something like this (we'll say the
textarea name is "query"):
if ($query)
{
$result = mysql_query($query);
}
if (!$result)
{
echo mysql_error();
} else
{
for ($res_num = 1; $row = mysql_fetch_assoc($result); $res_num++)
{
echo "Result number $rew_num: ";
print_r($row);
}
}
Sure it ain't pretty and you should change the print_r() call to a more
controllable function, but it works just fine. You'll of course have to
connect to the database and all before doing this, and change the database
functions to fit your chosen database, but you get the idea.
phpMyAdmin has a more fully featured type deal though, and the above works
only for SELECT statements in MySQL.
--
Plutarck
Should be working on something...
...but forgot what it was.
"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
> I recently took an ANSI SQL class to better familiarize my self with SQL
in
> general. In the class we used MSSQL SERVER 7 and to do queries we used
the
> Query Analyzer. Does anyone know of a PHP script that works like the
Query
> Analyzer so I can test Queries in a Browser? Like A Text Area where I can
> put the query and a simple form that sends it to MySQL.
>
> Thanks,
> Brandon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Brandon:
Search www.freshmeat.net for phpmyadmin. It's a great little tool to help
you administer MySQL, including executing arbitrary SQL statements.
There are several others there as well. Freshmeat has plenty of tools to
get you going.
hth
Chris
-----Original Message-----
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 1:56 PM
To: PHP User Group
Subject: [PHP] Query Analyzer For MySQL with PHP?
Hello,
I recently took an ANSI SQL class to better familiarize my self with SQL in
general. In the class we used MSSQL SERVER 7 and to do queries we used the
Query Analyzer. Does anyone know of a PHP script that works like the Query
Analyzer so I can test Queries in a Browser? Like A Text Area where I can
put the query and a simple form that sends it to MySQL.
Thanks,
Brandon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Use the mysql monitor, from shell :
mysql -u username -p dbname
That'll log you in, now run some queries :
mysql>SELECT * FROM tablename;
At this point everything is selected and displayed from table tablename.
In otherwords, we can run and view SQL queries from this console, much
like MySQL does it for PHP. Here are a couple tutorials that should help :
MySQL Monitor Tutorial :
http://www.mysql.com/doc/T/u/Tutorial.html
MySQL Tutorial (demonstrates monitor) :
http://www.devshed.com/Server_Side/MySQL/Intro/
Also, phpMyAdmin has a place to enter and view such queries via a form.
phpMyAdmin :
http://www.phpwizard.net/projects/phpMyAdmin/
Regards,
Philip
On Mon, 23 Apr 2001, Brandon Orther wrote:
> Hello,
> I recently took an ANSI SQL class to better familiarize my self with SQL in
> general. In the class we used MSSQL SERVER 7 and to do queries we used the
> Query Analyzer. Does anyone know of a PHP script that works like the Query
> Analyzer so I can test Queries in a Browser? Like A Text Area where I can
> put the query and a simple form that sends it to MySQL.
>
> Thanks,
> Brandon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Create a mysql odbc acces and download the winsql.exe program that works
with odbc connections ,its a great sql client !!
Sebastián Renzi
Consultoría & Desarrollo de Sistemas.
CODES S.A
> -----Mensaje original-----
> De: Philip Olson [SMTP:[EMAIL PROTECTED]]
> Enviado el: lunes 23 de abril de 2001 16:47
> Para: Brandon Orther
> CC: PHP User Group
> Asunto: Re: [PHP] Query Analyzer For MySQL with PHP?
>
>
> Use the mysql monitor, from shell :
>
> mysql -u username -p dbname
>
> That'll log you in, now run some queries :
>
> mysql>SELECT * FROM tablename;
>
> At this point everything is selected and displayed from table tablename.
> In otherwords, we can run and view SQL queries from this console, much
> like MySQL does it for PHP. Here are a couple tutorials that should help :
>
> MySQL Monitor Tutorial :
> http://www.mysql.com/doc/T/u/Tutorial.html
>
> MySQL Tutorial (demonstrates monitor) :
> http://www.devshed.com/Server_Side/MySQL/Intro/
>
> Also, phpMyAdmin has a place to enter and view such queries via a form.
>
> phpMyAdmin :
> http://www.phpwizard.net/projects/phpMyAdmin/
>
>
> Regards,
> Philip
>
>
>
> On Mon, 23 Apr 2001, Brandon Orther wrote:
>
> > Hello,
> > I recently took an ANSI SQL class to better familiarize my self with
> SQL in
> > general. In the class we used MSSQL SERVER 7 and to do queries we used
> the
> > Query Analyzer. Does anyone know of a PHP script that works like the
> Query
> > Analyzer so I can test Queries in a Browser? Like A Text Area where I
> can
> > put the query and a simple form that sends it to MySQL.
> >
> > Thanks,
> > Brandon
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
Furthermore, it's also buggy. If the user submits an empty string the if()
will consider it to be not equal to "0", which will execute whatever is in
the if statement.
Not only that, but if the user submits the number 0 it invites bugs because
the string "0" is not equal to the number 0. Even if you are the one setting
the value of $my_type don't do it. What's more, it's very bad programming
practice to quote a number. Only quote strings.
You could do:
if ($my_type != true)
But it's a bad idea because it's so weird. Far easier to read is:
if (!$my_type)
Easier to type too, and it's nearly bug proof. I say "nearly", because if
PHP you want to pass the number zero inside of a string PHP may or may not
evaluate it to true.
So if you are _really_ serious about seing if the user submitted a field,
use:
if (!$my_type && !isempty($my_type))
I've never accepted the number 0 as a valid field, so I've never had a
problem with it, but it's something you should known.
One more thing you'd benefit from knowing. Your original:
if (my_type != "0")
Isn't bad syntax, but it is bad form to get used to. The better is:
if (MY_TYPE)
It's a rarely used feature in PHP known as a constant, but it's very useful
(on rare occasions, anyway. so rare, actually, that I've never needed to use
it). Check the manual for the define() function. To make the above if
statement work the MY_TYPE constant must exist. Execute this code:
define(MY_TYPE, "Aren't constants neet?");
if (MY_TYPE)
{
echo "The following is a constant: " . MY_TYPE;
} else
{
echo "The constant MY_TYPE does not exist.";
}
Neet, no? But here's something that's really weird about PHP. Try commenting
out the line with define() on it.
Isn't that weird? To my knowledge, a string that appears after echo must be
quoted, but in practice PHP handles unquoted strings with echo just fine.
Could be a bug, but I doubt it.
Furthermore, the above loop is always true, even if MY_TYPE has not been set
to a value. Now that should be (and probably is) a bug. But what do I know
:)
--
Plutarck
Should be working on something...
...but forgot what it was.
"Geir Eivind Mork" <[EMAIL PROTECTED]> wrote in message
0104231749060K.05150@maria">news:0104231749060K.05150@maria...
> On Monday 23 April 2001 17:34, Taylor, Stewart wrote:
> > You've got some typo's
> > if (my_type != "0"){ --> if ($my_type != "0") {
>
> if ($my_type)
>
> if it's a check if it's true, "not-equal"-ing it to string 0 is a ugly way
to
> do it. just my two cents.
> --
> php developer / CoreTrek AS | Forest fires cause Smokey Bears.
> Sandnes / Rogaland / Norway |
> web: http://www.moijk.net/ |
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
I asked when the new version of PHP was comming out at the beginning of the
month and some one told me that it was comming out the week after. Haven't
seen it yet, anyone knows the release date??
Dominique Paquin
On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
> I asked when the new version of PHP was comming out at the beginning of the
> month and some one told me that it was comming out the week after. Haven't
> seen it yet, anyone knows the release date??
RC7 got out a few days ago (Thursday I believe), and I think I recall that unless
lot's of things went wrong this is the last RC....
-fkr
ps. I guess, it's released once it works fine :)
--
gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0
|http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE |
|all your base are belong to us | shame on me | fkr@IRCnet |
On Lun 23 Abr 2001 22:13, Felix Kronlage wrote:
> On Mon, Apr 23, 2001 at 03:00:07PM -0700, Dominique Paquin wrote:
> > I asked when the new version of PHP was comming out at the beginning of
> > the month and some one told me that it was comming out the week after.
> > Haven't seen it yet, anyone knows the release date??
>
> RC7 got out a few days ago (Thursday I believe), and I think I recall that
> unless lot's of things went wrong this is the last RC....
>
> -fkr
>
> ps. I guess, it's released once it works fine :)
Why don't the publicate the RC's. I had a hard time getting RC5.
Saludos... :-)
--
El mejor sistema operativo es aquel que te da de comer.
Cuida tu dieta.
-----------------------------------------------------------------
Martin Marques | [EMAIL PROTECTED]
Programador, Administrador | Centro de Telematica
Universidad Nacional
del Litoral
-----------------------------------------------------------------
Hello people,
I am having a peculiar problem with my mailing list and hope you can help me
out. I have a mySQL database with a table of email addresses for the mailing
lists. I have many lists, and my (PHP) code runs various queries on this
table to generate lists of email addresses to which the mail has to be sent.
The email body is combined with this generated list, and then I use mail()
to send this message out to each recipient. I also add on a few headers such
as From:, Errors-To, Reply-To and Return-Path to the message.
Now the problem is that every recipient of my mail is getting two copies of
the message. I am positive that it's not my code which is causing the
problem, the script runs once and terminates. I've also tried to send mail
by opening a socket connection to port 25 on the mail machine and sending
SMTP commands, but still the result is the same. And there is no SMTP error
generated.
Can anybody help me out here? or perhaps suggest a more efficient way of
sending out mail to my users? I'm really in a spot here...
- Nikhil
Whenever you are positive its nto your code then check it again. That being
said are there any SMTP logs you can check? Have you monitored the exact
data being sent to the SMTP server(maybe set up a dummy socket that repeats
back the data sent to it then have your program try to connect to that)?
--
phill
""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
9c1ujm$868$[EMAIL PROTECTED]">news:9c1ujm$868$[EMAIL PROTECTED]...
> Hello people,
>
> I am having a peculiar problem with my mailing list and hope you can help
me
> out. I have a mySQL database with a table of email addresses for the
mailing
> lists. I have many lists, and my (PHP) code runs various queries on this
> table to generate lists of email addresses to which the mail has to be
sent.
>
> The email body is combined with this generated list, and then I use mail()
> to send this message out to each recipient. I also add on a few headers
such
> as From:, Errors-To, Reply-To and Return-Path to the message.
>
> Now the problem is that every recipient of my mail is getting two copies
of
> the message. I am positive that it's not my code which is causing the
> problem, the script runs once and terminates. I've also tried to send mail
> by opening a socket connection to port 25 on the mail machine and sending
> SMTP commands, but still the result is the same. And there is no SMTP
error
> generated.
>
> Can anybody help me out here? or perhaps suggest a more efficient way of
> sending out mail to my users? I'm really in a spot here...
>
> - Nikhil
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Yes, that is a sound approach. However I've checked it again, and again, and
again, and nothing pops up. It would be easier if I had an error generated.
I'll try to get my hands on the SMTP logs, will talk to the server admin
about that. My code is sending data to the SMTP socket and monitoring
responses for the SMTP server, and no error there. Here is how it goes
HELO xxx
MAIL FROM: (me)
RCPT TO: (recipient 1)
DATA
(body)
.
RSET
MAIL FROM: (me)
RCPT TO: (recipient 2)
DATA
(body)
.
(and so on...)
QUIT
I've noticed that the error shows up when the server load is high: for e.g.
when I am sending out emails to the lists, generally the first list goes
through without a problem (i.e. one email per person). But when it moves on
to the second list, it starts sending two copies. But sometimes the second
list goes okay, and the third generates duplicates.
What _is_ the best way to send one email body to a dynamically generated
list of email addresses???
""Phillip Bow"" <[EMAIL PROTECTED]> wrote in message
9c2570$56q$[EMAIL PROTECTED]">news:9c2570$56q$[EMAIL PROTECTED]...
> Whenever you are positive its nto your code then check it again. That
being
> said are there any SMTP logs you can check? Have you monitored the exact
> data being sent to the SMTP server(maybe set up a dummy socket that
repeats
> back the data sent to it then have your program try to connect to that)?
> --
> phill
>
> ""Nikhil Goyal"" <[EMAIL PROTECTED]> wrote in message
> 9c1ujm$868$[EMAIL PROTECTED]">news:9c1ujm$868$[EMAIL PROTECTED]...
> > Hello people,
> >
> > I am having a peculiar problem with my mailing list and hope you can
help
> me
> > out. I have a mySQL database with a table of email addresses for the
> mailing
> > lists. I have many lists, and my (PHP) code runs various queries on this
> > table to generate lists of email addresses to which the mail has to be
> sent.
> >
> > The email body is combined with this generated list, and then I use
mail()
> > to send this message out to each recipient. I also add on a few headers
> such
> > as From:, Errors-To, Reply-To and Return-Path to the message.
> >
> > Now the problem is that every recipient of my mail is getting two copies
> of
> > the message. I am positive that it's not my code which is causing the
> > problem, the script runs once and terminates. I've also tried to send
mail
> > by opening a socket connection to port 25 on the mail machine and
sending
> > SMTP commands, but still the result is the same. And there is no SMTP
> error
> > generated.
> >
> > Can anybody help me out here? or perhaps suggest a more efficient way of
> > sending out mail to my users? I'm really in a spot here...
> >
> > - Nikhil
> >
> >
> >
> >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Ok, I'm trying to compile php with both zlib (1.1.3) and t1lib.
When I do:
./configure --with-t1lib --with-zlib (etc)
it fails with:
checking whether to include zlib support... yes
checking for gzgets in -lz... no
configure: error: Zlib module requires zlib >= 1.0.9.
But if I omit the --with-1tlib it works fine.
In a strangeness thing, if I ./configure --with-zlib and then ./configure
--with-t1lib --with-zlib it actually finishes the configure (but if I
erase config.cache it still fails).
It seems that something during the configuring of t1-lib is messing with
the later configure for zlib. I know nadda about configure scripts so I'm
hoping one of you developer-types can help.
Shawn
---
Shawn J. Wallace ([EMAIL PROTECTED])
Justweb Inc. - http://www.justweb.com
(519)652-6599 or (800)343-9312
Hi
I wanted o ask u about a problem regarding my project. The project is related to
"Cyber Cafe Authentication". Here we have to chk whether a set of user name & password
is valid and if valid allow this user access to internet. All the scripitng has been
done in PHP and the operating system is linux. Now we just have to link "IP CHAINS" to
our php script. That is when the user is allowed to access internet, ip chains should
start running through the script. However we are stuck at this problem & cannot find a
sound solution. Can u plz help us? That would be very nice :)
Waiting anxiuosly for ur reply.....
Regards
Faryal
At 12:18 AM 4/24/2001 -0700, you wrote:
>I wanted o ask u about a problem regarding my project. The project is
>related to "Cyber Cafe Authentication". Here we have to chk whether a set
>of user name & password is valid and if valid allow this user access to
>internet. All the scripitng has been done in PHP and the operating system
>is linux. Now we just have to link "IP CHAINS" to our php script. That
>is when the user is allowed to access internet, ip chains should start
>running through the script. However we are stuck at this problem & cannot
>find a sound solution. Can u plz help us? That would be very nice :)
Something to think about - apache doesn't run as root, ipchains requires
that you be root. I suppose you could suid it, but that's an evil
solution. Other than that, I'd recommend reading up on ipchains... there's
a decent HOWTO at www.linux.org
Shawn
Hello,
I am looking for a good shopping cart / catalog system open source solution
to be implemented for an ecommerce web site.
Any recommendation will be appreciated.
Thanks in advance.
Roee Rubin
Irubin Consulting
www.irubin.com
check out:
www.fishcart.org
I would also suggest searching sourceforge for shopping cart apps.
-----Original Message-----
From: Roee Rubin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 3:26 PM
To: Php-General
Subject: [PHP] looking for a good shopping cart - catalog system
Hello,
I am looking for a good shopping cart / catalog system open source solution
to be implemented for an ecommerce web site.
Any recommendation will be appreciated.
Thanks in advance.
Roee Rubin
Irubin Consulting
www.irubin.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
if you looking for a ready out-of-the box solution, this is one of the best
I've seen:
www.theexchangeproject.org
you may also want to look into the following:
http://www.phpshop.org
http://share.whichever.com/index.php?SCREEN=freetrade
-----Original Message-----
From: Roee Rubin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 12:26 PM
To: Php-General
Subject: [PHP] looking for a good shopping cart - catalog system
Hello,
I am looking for a good shopping cart / catalog system open source solution
to be implemented for an ecommerce web site.
Any recommendation will be appreciated.
Thanks in advance.
Roee Rubin
Irubin Consulting
www.irubin.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
I have a bunch of variables (through a POST form) that I need to
loop through and check for content. Right now, each one is being
evaluated separately:
if ($var1 == '') {
$url .= "&var1=";
$error = 1;
} else {
$url .= "&var1=".urlencode(stripslashes($var1))."";
}
Then repeat for $var2, $var3, etc., etc...
Is there a better way of doing this looping instead of writing the
same routine over and over again?
AMK4
--
H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP!
|____________________________________________________________________
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
Director of Internet Operations / SysAdmin . 800.441.3873 x130
Photo Craft Laboratories, Inc. . eFax 248.671.0909
http://www.pcraft.com . 3550 Arapahoe Ave, #6
.................. . . . . Boulder, CO 80303, U.S.A.
All of the POST variables will be stored in the HTTP_POST_VARS array which
you can loop through once rather than manually doing each seperate variable.
--
phill
""Ashley M. Kirchner"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I have a bunch of variables (through a POST form) that I need to
> loop through and check for content. Right now, each one is being
> evaluated separately:
>
> if ($var1 == '') {
> $url .= "&var1=";
> $error = 1;
> } else {
> $url .= "&var1=".urlencode(stripslashes($var1))."";
> }
>
> Then repeat for $var2, $var3, etc., etc...
>
> Is there a better way of doing this looping instead of writing the
> same routine over and over again?
>
> AMK4
>
> --
> H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP!
> |____________________________________________________________________
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
> Director of Internet Operations / SysAdmin . 800.441.3873 x130
> Photo Craft Laboratories, Inc. . eFax 248.671.0909
> http://www.pcraft.com . 3550 Arapahoe Ave, #6
> .................. . . . . Boulder, CO 80303, U.S.A.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
PHP WDDX doesn't support recordsets.
> I'm using wddx_deserialize($packet) and what I'm getting returned does not
> seem right in the slightest
>
> my code is:
>
> $values = wddx_deserialize($packet);
>
> Packet:
> <wddxPacket version='1.0'><header></header><data><recordset rowCount='2'
> fieldNames='Title,description,bondref'><field name='Title'><string>Senior
> Legal Adviser</string><string>Head of Litigation</string></field><field
> name='description'><string>blah blah blah</string><string>blah blah
> blah</string></field><field
> name='bondref'><number>234</number><number>236</number></field></recordset><
> /data></wddxPacket>
>
> when I run wddx_deserialize on my packet, I'm getting a string with the
> contents "Senior Legal Adviser"
>
> i.e. the first value of the first field
>
> I was expecting a nice associative array, what am I doing wrong?
>
> FWIW the packet is coming through fine
-Andrei
* Anything will fit if you push hard enough *
Do the current Interbase functions support allowing the programmer to choose
whether he/she wants to open a transaction in 'wait' or 'no wait' status?
If not, which status are transactions opened as?
I've been using a function to output HTML to the user's browser, and now my
use has made it neccessary to put it all inside a class.
All's going find and dandy and I've got it all working. However one of it's
variables is $front_page.
Now in other pages there are references to $front_page, and I want to change
them to something like $objectname->front_pagee.
The problem is that I can't know what the object will be named ahead of
time!
So my hack-around is in the class constructor I set a global variable called
$pge with the value submitted to the constructor. So someone would do this:
$somename = new Display(somename);
But if someone typos the and the name of the variable is different from the
one submitted to the constructor, all the code will break! That's because
I'm using a variable variable to refer to $front_page, like this:
${$pge}->front_page
I told you it was a hack-around, and it isn't a good one.
So is there ANY way to get the name of the object in PHP code without
knowing the name of the object ahead of time?
I'm really stumped!
--
Plutarck
Should be working on something...
...but forgot what it was.
> So is there ANY way to get the name of the object in PHP code without
> knowing the name of the object ahead of time?
I went through this exact thing not too long ago with an error class
I wrote. Unfortunately, there is no way to know. What you can do,
however, is do a check to see if that object exists before you access
the variable. Other than that, I think you're outta luck. :/
Chris
I want to only replace the first occurrence of a string in a file using
ereg_replace. Should I use a loop to do this? Any suggestions? Please email
me at [EMAIL PROTECTED] with suggestions.
Thanks,
Erica
I feel soo dumb. The problem was that the mod_php.rpm wasn't installed. I
installed it, restarted apache and the scripts worked. I also upgraded to
PHP4 while I was at it. Hope this will help someone.
----- Original Message -----
From: "Tym Rehm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 2:36 PM
Subject: [PHP] Method Not Allowed
> I'm trying to get a script working and I get a 405 Method Not Allowed
error
> every time I run the script. I understand this is a apache configuration
> issue, but I don't know what I need to do to fix this. I'm running RH7.0,
> Apache 1.3.12 and PHP3 all from RPMs. Thanks.
>
> ***********************************************************
> THIS MESSAGE IS INTENDED ONLY FOR THE USE OF THE INDIVIDUAL
> OR ENTITY TO WHICH IT IS ADDRESSED AND MAY CONTAIN
> INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL, AND EXEMPT
> FROM DISCLOSURE UNDER APPLICABLE LAW.
> If the reader of this message is not the intended
> recipient, or the employee or agent responsible for
> delivering the message to the intended recipient, you are
> hereby notified that any dissemination, distribution,
> forwarding, or copying of this communication is strictly
> prohibited. If you have received this communication in
> error, please notify the sender immediately by e-mail or
> telephone, and delete the original message immediately.
> Thank you.
> ***********************************************************
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
Hi PHP ers,
Cant unzip a file from a PHP script. It does nothing.
It works on the command line. Added paths to both the zip file and unzip program
nothing happens
exec("/usr/bin/unzip $IMAGE_TEMP_DIR/phpxXTN3T ");
Thanks
Dexter
Some of my co-workers are trying to install
php and when I run
phpinfo() I get this error, any ideas ?
I've only setup php on unix systems, so I am
at a loss here.
HTTP Error 403
403.1 Forbidden: Execute Access Forbidden
This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed.
Please contact the Web server's administrator if the problem persists.
Jerry Lake - [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
You probably need to go into the IIS console ( mmc ) and go to
properties on the directory in question and make sure either the
"execute" or "script" checkbox is checked. You may also need to
verify the actual file permissions, but I believe this is more of
a configuration issue.
Martin Gottlieb
-----Original Message-----
From: Jerry Lake [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 5:51 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php install issues on IIS
Some of my co-workers are trying to install
php and when I run
phpinfo() I get this error, any ideas ?
I've only setup php on unix systems, so I am
at a loss here.
HTTP Error 403
403.1 Forbidden: Execute Access Forbidden
This error can be caused if you try to execute a CGI, ISAPI, or other
executable program from a directory that does not allow programs to be
executed.
Please contact the Web server's administrator if the problem persists.
Jerry Lake - [EMAIL PROTECTED]
Web Designer
Europa Communications - http://www.europa.com
Pacifier Online - http://www.pacifier.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
Hello,
I am a newbie to PHP and I am trying to get a number of scripts to work.
Whenever I try to execute some code I receive 'warnings', that basically
clutter up the screen. Since I am assuming that these are not fatal - is
there any way to turn them off?
Any help would be appreciated.
Roee Rubin
Irubin Consulting
[EMAIL PROTECTED]
www.irubin.com
> I am a newbie to PHP and I am trying to get a number of scripts to work.
>
> Whenever I try to execute some code I receive 'warnings', that basically
> clutter up the screen. Since I am assuming that these are not fatal - is
> there any way to turn them off?
>
> Any help would be appreciated.
The manual details the settings for the php.ini here:
http://www.php.net/manual/en/configuration.php
You may want to alter your error reporting level there, or at the top of
each script as needed.
------------------------------------------------------------------------
destiney - (des-ti-ny) - n. 1. deity of all things "html", 2. common
internet addict, 3. lover of late 80's heavy metal music, 4. Activist
for the terminally un-elite; see also - cool guy, des, mr. php...
It's 4:00am, your web site is still up, why are you?
http://phplinks.org/ http://destiney.com/
------------------------------------------------------------------------