php-general Digest 13 Dec 2003 08:15:53 -0000 Issue 2470
Topics (messages 172591 through 172630):
Re: Checking a URL string.
172591 by: Mike
not parsing php files, giving us a save dialog.....
172592 by: Ryan A
172594 by: Jay Blanchard
172596 by: Chris Shiflett
172598 by: Ryan A
172600 by: Chris Shiflett
Re: error in mysql SQL syntax
172593 by: Chris W. Parker
Re: passing arrays?
172595 by: motorpsychkill
172617 by: motorpsychkill
Sync Outlook with MySQL via PHP
172597 by: Cesar Cordovez
172601 by: Vail, Warren
172626 by: Mike
Re: not parsing php files..(SOLVED)
172599 by: Ryan A
Re: Fatal Error: PDFlib error ...
172602 by: Matthias Nothhaft
session var not being passed?
172603 by: Jas
172615 by: Jason Wong
(0/T) executeing script below public
172604 by: Ryan A
172606 by: Jay Blanchard
172608 by: Jay Blanchard
172609 by: Chris Shiflett
172611 by: Ryan A
172613 by: Chris Shiflett
172621 by: Jeremiah Weaver
172622 by: Ryan A
172624 by: Jas
The best way ...
172605 by: Philip J. Newman
172607 by: Jay Blanchard
172610 by: Chris Shiflett
Bad characters in a text field
172612 by: Manuel Ochoa
172614 by: Daniel Purdy
Re: (0/T) executeing script below public (Conclusion)
172616 by: Ryan A
What is a XSS attacks?
172618 by: orlandopozo.icnet.com.ve
172619 by: Richard Davey
172620 by: Sam Masiello
Re: Palm OS Processor
172623 by: Stephen Craton
ereg is failing on this simple test
172625 by: Manuel Ochoa
172627 by: Dave G
172628 by: Mike
172630 by: Eugene Lee
count the elements of each dimension of the array
172629 by: orlandopozo.icnet.com.ve
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]
----------------------------------------------------------------------
--- Begin Message ---
try the PEAR Validate class
you can do Validate::url($websiteUrl);
by the way, preg is quicker than ereg
Mike
Philip J. Newman wrote:
I would like to check if i have a correct url enterend
<?php
eregi("^http://[([0-9a-zA-Z-]+\.)+[a-zA-Z]{2,6}$", $websiteUrl);
?>
---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
Hi,
We were running php files prefectly well a little while back, then we
restarted apache and now the php files are not executing, instead its giving
us a save dialog box...
What to do and what do you think is wrong.
Please help.
Thanks,
-Ryan
http://Bestwebhosters.com
--- End Message ---
--- Begin Message ---
[snip]
We were running php files prefectly well a little while back, then we
restarted apache and now the php files are not executing, instead its
giving us a save dialog box...
What to do and what do you think is wrong.
[/snip]
Why did you restart Apache? Is your php.ini intact?
--- End Message ---
--- Begin Message ---
--- Ryan A <[EMAIL PROTECTED]> wrote:
> the php files are not executing, instead its giving us a save dialog
> box...
Add this to your httpd.conf:
AddType application/x-httpd-php .php
Make sure that the right httpd.conf is being used by the Web server you
are requesting from, and also make sure that the file extension indicated
in httpd.conf corresponds to the extension of the file you are requesting.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Hi,
Thanks for replying.
We are on a freebsd account, the way we are setup is:
../apache/httpd.conf
../apache/virtual_hosts/www.sitename.tld.conf
we basically had to add some directives to one of the domains, which we
added and then put it back in the virtual_hosts directory, we later took out
the directives and restarted with the same results...
We didnt touch the httpd.conf or the php.ini files.
I dont know if my php.ini is "intact" but we have not touched it and it was
working before.
I did find this: AddType application/x-httpd-php .php
in my httpd.conf so that is not the problem, and this was working perfectly
till we restarted...
Any ideas?
Thanks,
-Ryan
> --- Ryan A <[EMAIL PROTECTED]> wrote:
> > the php files are not executing, instead its giving us a save dialog
> > box...
>
> Add this to your httpd.conf:
>
> AddType application/x-httpd-php .php
>
> Make sure that the right httpd.conf is being used by the Web server you
> are requesting from, and also make sure that the file extension indicated
> in httpd.conf corresponds to the extension of the file you are requesting.
>
> Hope that helps.
>
> Chris
>
> =====
> Chris Shiflett - http://shiflett.org/
>
> PHP Security Handbook
> Coming mid-2004
> HTTP Developer's Handbook
> http://httphandbook.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
--- Ryan A <[EMAIL PROTECTED]> wrote:
> we basically had to add some directives to one of the domains, which
> we added and then put it back in the virtual_hosts directory, we
> later took out the directives and restarted with the same results...
But you restarted now, and you didn't get the same results.
I'd look into the "we later took out the directives" part.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
on Friday, December 12, 2003 12:43 AM said:
First I'm going to +1 Jason's comment.
Then I'm going to give you a tip.
> Could somebody tell me way I am getting an error in this SQL syntax.
> $query = "insert into majordomoaliases
> (domain,address)values(\"$domname\",\"$virtdomain-majordomo:
\"|$wrapper
> majordomo -C $domaincf\")";
I think one of your problems is very bad code formatting. Try cleaning
it up as well as replacing all the \" with ' and see what happens.
hth,
Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
--- End Message ---
--- Begin Message ---
Thank you Al for the pointers. This has been very helpful!
-m
> -----Original Message-----
> From: Al [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 11, 2003 10:28 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Re: passing arrays?
>
>
> > $level = '$level_' . $_SESSION['user']['level'];
> > //Where $_SESSION['user']['level'] can equal "1" or "2"
> >
> > $level_1 = array("PN", "GALUP", "VP", "PUBUP", "STATS", "MCI",
> "CONLIST",
> > "CP", "OAFS", "LO");
> > $level_2 = array("PN", "GALUP", "VP", "PUBUP", "MCI", "CONLIST", "CP",
> > "OAFS", "LO");
>
> I can see two problems with your code:
>
> 1) The syntax for assigning to $level is wrong.
> Rather than:
> $level = '$level_' . $_SESSION['user']['level'];
> your code should read:
> $level = ${'level_' . $_SESSION['user']['level']};
> For more information on this syntax, see:
> http://us2.php.net/manual/en/language.variables.variable.php
>
> 2) You are assigning $level_1 or $level_2 (depending on the value of
> $_SESSION['user']['level']) to $level *before* you have assigned
> $level_1 or
> $level_2 any values. There's no point making $level = $level_1 if $level_1
> hasn't been defined yet.
>
> Working code would be:
>
> $level_1 = array("PN", "GALUP", "VP", "PUBUP", "STATS", "MCI", "CONLIST",
> "CP", "OAFS", "LO");
> $level_2 = array("PN", "GALUP", "VP", "PUBUP", "MCI", "CONLIST", "CP",
> "OAFS", "LO");
> $level = ${'level_' . $_SESSION['user']['level']};
>
> Hope it helps,
>
> Al
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Thank you Mike for your recommendations as well. I've certainly learned a
few tricks from this thread. Thanks to all those concerned!
-m
> -----Original Message-----
> From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 2:41 AM
> To: 'motorpsychkill'; Php General List
> Subject: RE: [PHP] passing arrays?
>
>
> On 12 December 2003 06:07, motorpsychkill wrote:
>
> > Thanks Tom, that worked! I knew that $$level had something
> > to do with it,
> > just wasn't sure what exactly. Thanks again.
> >
> > -m
> >
> > -----Original Message-----
> > From: Tom Rogers [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 11, 2003 9:34 PM
> > To: motorpsychkill
> > Subject: Re: [PHP] passing arrays?
> >
> > Always use isset() to check if something exists before trying
> > to use it if
> > originates externally to the running script.
> >
> > you probabley need something like this
> >
> > $level_0 = array('NONE');
> > $level_1 = array("PN", "GALUP", "VP", "PUBUP", "STATS", "MCI",
> > "CONLIST","CP", "OAFS", "LO");
> > $level_2 = array("PN", "GALUP", "VP", "PUBUP", "MCI", "CONLIST",
> > "CP", "OAFS", "LO");
> >
> > if(isset($_SESSION['user']['level'])){
> > $level = 'level_'.$_SESSION['user']['level']; }else{
> > $level = 'level_0'; //catchall value
> > }
> > foreach($$level as $value){
> > echo $value.'<br>';
> > }
>
>
> Actually, I'd like to suggest that a variable variable is the
> wrong tool for
> this, and an array should be used instead -- something like:
>
> $level = array(1 => array("PN", "GALUP", "VP", "PUBUP",
> "STATS", "MCI", "CONLIST","CP",
> "OAFS", "LO"),
> 2 => array("PN", "GALUP", "VP", "PUBUP",
> "MCI", "CONLIST", "CP", "OAFS",
> "LO")
> );
>
> if (isset($_SESSION['user']['level'])
> && isset($level[$_SESSION['user']['level']])):
> foreach ($level[$_SESSION['user']['level']] as $value):
> echo $value.'<br>';
> endforeach;
> else:
> // invalid level
> endif;
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford, Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS, LS6 3QS, United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi List.
I need to know how to sync Outlook with MySQL via PHP. I know this is
an old topic, but I cant find a clue (is it friday?). Please advise.
Thanks, Cesar
--- End Message ---
--- Begin Message ---
????
Outlook is a Personal Email Client/Calendar/Contact Application.
MySQL is a SQL Database Server Application.
PHP is usually a Web Based Scripting Language Processor.
What do you want to synchronize? Email? Calendar? Contacts? Something
else?
If you are running your PHP on a Windows machine you might read;
http://www.php.net/manual/en/ref.com.php
just to get started.....
Warren Vail
-----Original Message-----
From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 11:26 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Sync Outlook with MySQL via PHP
Hi List.
I need to know how to sync Outlook with MySQL via PHP. I know this is
an old topic, but I cant find a clue (is it friday?). Please advise.
Thanks, Cesar
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Cesar Cordovez wrote:
Hi List.
I need to know how to sync Outlook with MySQL via PHP. I know this is
an old topic, but I cant find a clue (is it friday?). Please advise.
Thanks, Cesar
First you need to reverse engineer the outlook file format, then create
a database which can store this information. Then use php to read and
decode the format, adding this to the database as it goes.
No problem,
Mike
--- End Message ---
--- Begin Message ---
Hi,
Thanks to everyone who replied.
I still dont know what was wrong but heres what I did and PHP is working
again,
I went back in, stopped apache, called the domain from my browser...then
waited a minute, started, and it worked.
Only thing is, i dont know what caused it.....
(It even accepted the directives)
Cheers,
-Ryan
--- End Message ---
--- Begin Message ---
Evan Nemerson wrote:
On Wednesday 10 December 2003 09:08 pm, Matthias Nothhaft wrote:
Hi,
I'm trying to get the pdflib work...
[....]
Fatal error: PDFlib error: function 'PDF_begin_page' must not be called
in 'object' scope in /var/www/Software/cms4rent/pdftest.php on line 5
Why is that?
google (including quotes): "must not be called in 'object' scope"
result #2: http://www.alt-php-faq.org/local/87/
Rather cryptic error message... hmpf.
Thanks, but this didn't solve my problem, what else could be?
Any ideas?
Regards,
Matthias
Any help would be great.
Regards,
Matthias
--- End Message ---
--- Begin Message ---
New set of eyes maybe or maybe I am indeed regressing...
Page calling functions looks like such...
<?php
require 'sessions.php';
require 'inc.php';
if (($_SESSION['user'] == "") || ($_SESSION['pass'] == "") ||
($_SESSION['lvl'] == "")) {
$_SESSION['msg_01'] = "You have not entered the correct authorization
information. Please enter your user name, password & department ID.";
$_SESSION['msg'] = $dberrors[1];
call_user_func("db_logs");
//call_user_func("exit_app");
} elseif (($_SESSION['user'] != "") || ($_SESSION['pass'] != "") ||
($_SESSION['lvl'] != "")) {
if ((strlen($_SESSION['user'] >= 255)) || (strlen($_SESSION['pass'] >=
255)) || (strlen($_SESSION['lvl'] >= 255))) {
$_SESSION['msg'] = $dberrors[3];
call_user_func("db_logs");
call_user_func("exit_app");
} elseif ((strlen($_SESSION['user'] <= 255)) ||
(strlen($_SESSION['pass'] <= 255)) || (strlen($_SESSION['lvl'] <= 255))) {
$_SESSION['msg'] = $dberrors[10];
call_user_func("db_logs");
call_user_func("menu");
} else {
$_SESSION['msg'] = $dberrors[11];
call_user_func("db_logs");
call_user_func("exit_app"); }
} else {
$_SESSION['msg'] = $dberrors[8];
call_user_func("db_logs");
call_user_func("exit_app"); }
?>
Then in body of page I call <?php call_user_func("dhcp_vlans"); ?>
Now the contents of inc.php is below (at least the "menu" and
"dhcp_vlans" functions)
<?php
function menu() {
$lvl = base64_decode($_SESSION['lvl']);
if ($lvl == "view") {
$_SESSION['menu'] = "custom menu 01";
$_SESSION['lvl'] = base64_encode($lvl);
} elseif ($lvl == "user") {
$_SESSION['menu'] = "custom menu 02";
$_SESSION['lvl'] = base64_encode($lvl);
} elseif ($lvl == "admin") {
$_SESSION['menu'] = "custom menu 03";
$_SESSION['lvl'] = base64_encode($lvl);
} else {
$_SESSION['menu'] = "custom menu 04"; }
$_SESSION['lvl'] = base64_encode($lvl); // recreate session variable
for more checks
}
function vlans_dhcp() {
$lvl = base64_decode($_SESSION['lvl']); // this session variable is
dissapearing from the second nested if / elseif statement?
if ($lvl != "admin") {
$_SESSION['lvl'] = base64_encode($lvl);
$_SESSION['msg'] = $dberrors[12];
call_user_func("db_logs");
} elseif ($lvl == "admin") {
$_SESSION['lvl'] = base64_encode($lvl);
if ($_POST == "") {
$_SESSION['lvl'] = base64_encode($lvl);
session_unset($_SESSION['list']);
,....create automatic form...";
$_SESSION['lvl'] = base64_encode($lvl);
//unset($table,$sql,$db_vlans,$vlans,$x);
} elseif ($_POST != "") || (isset(var)) { //What happened to my session
'lvl' var?
...creat different form...
} elseif ($_POST != "") {
session_unset($_SESSION['list']);
require 'dbase.php';
$table = "subnets";
$_SESSION['list'] = "...different form again...";
//unset($table,$db_vlans,$vlans,$i,$x);
} else {
$_SESSION['lvl'] = base64_encode($lvl);
header("Location: login.vlans.php"); }
} else {
$_SESSION['lvl'] = base64_encode($lvl);
$_SESSION['msg'] = $dberrors[12];
call_user_func("db_logs"); }
}
?>
--- End Message ---
--- Begin Message ---
On Saturday 13 December 2003 05:48, Jas wrote:
> New set of eyes maybe or maybe I am indeed regressing...
>
> Page calling functions looks like such...
[snip]
> session_unset($_SESSION['list']);
[snip]
You seem to be mistaken as to what session_unset() actually does. For a start
it does not take any parameters. If you want to unset a single variable then
use unset().
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Pickle's Law:
If Congress must do a painful thing,
the thing must be done in an odd-number year.
*/
--- End Message ---
--- Begin Message ---
Hi,
Am a bit puzzled here, we have to run a script to start/stop a server....but
we have to run the script below the public folder!
this is our structure /blah/theServer/public_html/
the script is located in /blah/theServer/
I noticed one funny thing about this script, it starts with: #!/bin/sh
right on top but does not have a file extention...what kind of a file is
this?
According to the documentation the script has to be executed like so
<scriptname> start
(or)
<scriptname> stop
How do I do that?
Thanks,
-Ryan
--- End Message ---
--- Begin Message ---
[snip]
#!/bin/sh
<scriptname> start
(or)
<scriptname> stop
[/snip]
It is a shell script. They are usually placed in /usr/local/bin/ and
chmod'd to execute. To run it you type this at the command line;
scriptname start
(or)
scriptname stop
This script accepts one argument, either 'stop' or 'start'
--- End Message ---
--- Begin Message ---
[snip]
#!/bin/sh
<scriptname> start
(or)
<scriptname> stop
[/snip]
It is a shell script. They are usually placed in /usr/local/bin/ and
chmod'd to execute. To run it you type this at the command line;
scriptname start
(or)
scriptname stop
This script accepts one argument, either 'stop' or 'start'
[/snip]
I should have added that you can run them from other folders using the
'./scriptname arg' from the command line. Depends on OS
--- End Message ---
--- Begin Message ---
--- Ryan A <[EMAIL PROTECTED]> wrote:
> Am a bit puzzled here, we have to run a script to start/stop a
> server....but we have to run the script below the public folder!
> this is our structure /blah/theServer/public_html/
> the script is located in /blah/theServer/
For future reference, the script in question is in fact not "below"
(under) document root. In fact, it is quite the opposite; it is outside of
document root.
The only things that you have to have under document root are those things
that need to be referenced via a URL. That's it.
> I noticed one funny thing about this script, it starts with: #!/bin/sh
> right on top but does not have a file extention...what kind of a file
> is this?
A shell script.
> According to the documentation the script has to be executed like so
> <scriptname> start
> (or)
> <scriptname> stop
>
> How do I do that?
If the script is named foo, type this from the directory where it is
located:
./foo start
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Hey,
Thanks for replying.
The server is on Linux and is remotely hosted, my local machine is on win2k
pro.
A client wants me to set this up, I have setup the whole thing but this
needs to be started....
you keep mentioning "command line", what command line?
You mean I should SSH in?
(As you can see, am a newbie in shell scripts and ssh etc - kindly excuse)
Kindly reply.
Thanks,
-Ryan
[snip]
#!/bin/sh
<scriptname> start
(or)
<scriptname> stop
[/snip]
It is a shell script. They are usually placed in /usr/local/bin/ and
chmod'd to execute. To run it you type this at the command line;
scriptname start
(or)
scriptname stop
This script accepts one argument, either 'stop' or 'start'
[/snip]
I should have added that you can run them from other folders using the
'./scriptname arg' from the command line. Depends on OS
--- End Message ---
--- Begin Message ---
--- Ryan A <[EMAIL PROTECTED]> wrote:
> you keep mentioning "command line", what command line?
> You mean I should SSH in?
Yes, that's the command line he was talking about.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
Hi,
I am a bit puzzled here, I have to wipe my a$$ after
taking a $hit...but I have to wipe while i'm on the
toilet!
My usual way is to stand up and do it.
I noticed one funny thing about this way, its hard to
get all that crap in one swipe...what kind of $hit is
this?
According to the documentation, the a$$ should be
wiped in one of two motions like so
Place toilet paper at forward most side of anus and
wipe backward
(or)
Place toilet paper at backward most side of anus and
wipe forward
How do I do that?
Thanks,
-Riene
fyi- my toilet is a flush-master 3001, if that
matters.
-----Original Message-----
From: Ryan A [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 4:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] (0/T) executeing script below public
Hi,
Am a bit puzzled here, we have to run a script to
start/stop a server....but
we have to run the script below the public folder!
this is our structure /blah/theServer/public_html/
the script is located in /blah/theServer/
I noticed one funny thing about this script, it starts
with: #!/bin/sh
right on top but does not have a file extention...what
kind of a file is
this?
According to the documentation the script has to be
executed like so
<scriptname> start
(or)
<scriptname> stop
How do I do that?
Thanks,
-Ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--- End Message ---
--- Begin Message ---
One wonders how two retards got together to give birth to a bigger retard
like you.
> Hi,
>
> I am a bit puzzled here, I have to wipe my a$$ after
> taking a $hit...but I have to wipe while i'm on the
> toilet!
>
> My usual way is to stand up and do it.
>
> I noticed one funny thing about this way, its hard to
> get all that crap in one swipe...what kind of $hit is
> this?
>
> According to the documentation, the a$$ should be
> wiped in one of two motions like so
> Place toilet paper at forward most side of anus and
> wipe backward
> (or)
> Place toilet paper at backward most side of anus and
> wipe forward
>
> How do I do that?
>
> Thanks,
> -Riene
>
> fyi- my toilet is a flush-master 3001, if that
> matters.
>
>
> -----Original Message-----
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 12, 2003 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] (0/T) executeing script below public
>
>
> Hi,
>
> Am a bit puzzled here, we have to run a script to
> start/stop a server....but
> we have to run the script below the public folder!
>
> this is our structure /blah/theServer/public_html/
> the script is located in /blah/theServer/
>
> I noticed one funny thing about this script, it starts
> with: #!/bin/sh
> right on top but does not have a file extention...what
> kind of a file is
> this?
>
> According to the documentation the script has to be
> executed like so
> <scriptname> start
> (or)
> <scriptname> stop
>
> How do I do that?
>
> Thanks,
> -Ryan
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
LMAO, I am in concordance.
Jas
Ryan A wrote:
One wonders how two retards got together to give birth to a bigger retard
like you.
Hi,
I am a bit puzzled here, I have to wipe my a$$ after
taking a $hit...but I have to wipe while i'm on the
toilet!
My usual way is to stand up and do it.
I noticed one funny thing about this way, its hard to
get all that crap in one swipe...what kind of $hit is
this?
According to the documentation, the a$$ should be
wiped in one of two motions like so
Place toilet paper at forward most side of anus and
wipe backward
(or)
Place toilet paper at backward most side of anus and
wipe forward
How do I do that?
Thanks,
-Riene
fyi- my toilet is a flush-master 3001, if that
matters.
-----Original Message-----
From: Ryan A [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 4:08 PM
To: [EMAIL PROTECTED]
Subject: [PHP] (0/T) executeing script below public
Hi,
Am a bit puzzled here, we have to run a script to
start/stop a server....but
we have to run the script below the public folder!
this is our structure /blah/theServer/public_html/
the script is located in /blah/theServer/
I noticed one funny thing about this script, it starts
with: #!/bin/sh
right on top but does not have a file extention...what
kind of a file is
this?
According to the documentation the script has to be
executed like so
<scriptname> start
(or)
<scriptname> stop
How do I do that?
Thanks,
-Ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
what is the best way to remove extra \'s from strings ... would be ?
---
Philip J. Newman
Master Developer
PhilipNZ.com [NZ] Ltd.
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
[snip]
what is the best way to remove extra \'s from strings ... would be ?
[/snip]
http://www.php.net/stripslashes but depends on how many extras
--- End Message ---
--- Begin Message ---
--- "Philip J. Newman" <[EMAIL PROTECTED]> wrote:
> what is the best way to remove extra \'s from strings ... would be?
The best way is to not put them there in the first place. :-)
I guess the second best way would be stripslashes().
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
--- End Message ---
--- Begin Message ---
I have a form with a "text area" that when submited, get stored in a "text" type field
of a MySQL database. Occasionaly some of our users copy data from a DOS program and
paste it in the text area which results in unwanted characters getting stored in the
text field. What function can I use to strip out all but valid characters?
For example: I want to allow a-z ,A-Z, 0-9 and some others and strip out everything
else.
--- End Message ---
--- Begin Message ---
<snip>
For example: I want to allow a-z ,A-Z, 0-9 and some others and strip out
everything else.
</snip>
You probably just want to use a regular expression. Check out
http://www.php.net/ereg
HTH!
--- End Message ---
--- Begin Message ---
Thanks guys,
Will ask the owner/host for a SSH login and privilages and get back to ya if
things go wrong.
This list and the people in it really rock.
Cheers,
-Ryan
--- End Message ---
--- Begin Message ---
What is a XSS attacks?
thanks in advanced, bye.
--- End Message ---
--- Begin Message ---
Hello orlandopozo,
Saturday, December 13, 2003, 12:04:02 AM, you wrote:
oicv> What is a XSS attacks?
Cross Site Scripting Attack I think.
Like when people insert malicious HTML/JS code into your site as a
result of your code not checking inputs properly.
--
Best regards,
Richard mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
That is correct.
http://www.derkeiler.com/Mailing-Lists/securityfocus/bugtraq/2003-11/006
5.html
--Sam
Richard Davey wrote:
> Hello orlandopozo,
>
> Saturday, December 13, 2003, 12:04:02 AM, you wrote:
>
> oicv> What is a XSS attacks?
>
> Cross Site Scripting Attack I think.
> Like when people insert malicious HTML/JS code into your site as a
> result of your code not checking inputs properly.
>
> --
> Best regards,
> Richard mailto:[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
If you ever do decide to start, be sure to cover Pocket PC as well. I think
you could even sell this for a great deal.
----- Original Message -----
From: "Galen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Evan Nemerson" <[EMAIL PROTECTED]>
Sent: Friday, December 12, 2003 1:34 AM
Subject: Re: [PHP] Palm OS Processor
> If I'm not mistaken, I would need to do a bunch of re-writing of PHP to
> get it to compile for the Palm, and I'd probably need to write a front
> end of some type. I'm not that kind of programmer, but I could deal
> with compiling from source myself if it were that simple. Thoughts?
> Comments? Anybody want to help start "palm-php" on sourceforge? (I'm
> half joking about the last thing, but I am also half serious - anybody
> interested?)
>
> As far as the Sharp Zaurus, yes, I have looked into it. Linux in the
> pocket is pretty appealing. But the Palm is much more ubiquitous and
> available in more forms (many sizes of pdas, cell phones, even watches
> now), so php for the Palm would be more useful. Plus, they already have
> source and binaries of php, apache, etc for the Zaurus, but not for the
> Palm, at least that I can find.
>
> Any other ideas?
>
> -Galen
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
--- End Message ---
--- Begin Message ---
Why is this test failing?
$data = "A Simple test.";
If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
echo "Valid text";
}
else {
echo "Not valid text";
}
I'm running PHP 4.34 on a windows pc. This function is new to me, any help would be
appreciated.
--- End Message ---
--- Begin Message ---
> Why is this test failing?
> If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
I'm very new to PHP, so I may be barking up the wrong tree, but what is
that "s" doing after the slash? I don't know if it's the cause of the
problem, but as far as I know it's superfluous.
--
Yoroshiku!
Dave G
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
it works if you remove the last $ from the expression, also I think the
. needs escaping
unless you have a special reason, use preeg_* as it is supposed to be
quicker
Mike
Manuel Ochoa wrote:
Why is this test failing?
$data = "A Simple test.";
If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
echo "Valid text";
}
else {
echo "Not valid text";
}
I'm running PHP 4.34 on a windows pc. This function is new to me, any help would be appreciated.
--- End Message ---
--- Begin Message ---
On Fri, Dec 12, 2003 at 07:54:16PM -0800, Manuel Ochoa wrote:
:
: Why is this test failing?
:
: $data = "A Simple test.";
: If (ereg("^[a-zA-Z0-9\s.\-_']+$", $data)) {
: echo "Valid text";
: }
: else {
: echo "Not valid text";
: }
You can't use the character class "\s" within a range. And you need to
escape a few special characters. The working version should be:
$data = 'A Simple test.';
#if (ereg("^[a-zA-Z0-9\s.\-_']+$", $data))
if (ereg("^[a-zA-Z0-9[:space:]\.\-_']+$", $data))
{
echo "Valid text\n";
}
else
{
echo "Not valid text\n";
}
--- End Message ---
--- Begin Message ---
I have this script:
<?
$ojpp[] = "1";
$ojpp[] = "2";
$ojpp[] = "3";
$ojpp[] = "4";
$ojpp[][] = "1";
$ojpp[][] = "2";
$ojpp[][] = "3";
$ojpp[][][] = "1";
$ojpp[][][] = "2";
$test1 = count($ojpp); // first dimension
$test2 = count($ojpp[0]); // second dimension
$test3 = count($ojpp[0][0])"; // third dimension
echo $test1;
echo $test2;
echo $test3;
?>
I want to count the elements of each dimension, but the script give me an error,
thanks in advanced for any help.
--- End Message ---