php-general Digest 29 Jun 2003 01:56:58 -0000 Issue 2145
Topics (messages 153259 through 153303):
pspell
153259 by: Tularis
Re: <?xml ?> parsing problem
153260 by: Tularis
Re: 'Cannot send Headers' Problem!! MOre..
153261 by: Daryl Meese
153262 by: PHPSpooky
Re: 'Cannot send Headers' Problem!! AT LAST!!!!
153263 by: PHPSpooky
Can't PHP handle more than one java objekt????
153264 by: Jan Bro
Re: Sorting problem
153265 by: Sparky Kopetzky
153266 by: Daryl Meese
Full Text Search of M$ Office Documents
153267 by: Feroze Md. Arif
oci8 ad oracle 91
153268 by: Reuben D. Budiardja
Re: @import
153269 by: Brian V Bonini
session handling works on local server, but not when uploaded to ISP
153270 by: anders thoresson
153271 by: Tularis
153273 by: Bobby Patel
Re: PHP Web Based File Management and Security
153272 by: Dean E. Weimer
153303 by: Justin French
Re: Newbie and learning
153274 by: Bobby Patel
Re: Weird comparison error.
153275 by: Bobby Patel
153290 by: Lars Torben Wilson
Re: Why Can't I get this to work
153276 by: Ron Clark
153278 by: Ray Hunter
function doesn't return value
153277 by: anders thoresson
153282 by: Jason Wong
153286 by: anders thoresson
153295 by: electroteque
differences in session handling between 4.1.1 and 4.3.1
153279 by: anders thoresson
153280 by: Bobby Patel
153283 by: Tularis
153285 by: anders thoresson
Re: Compile php
153281 by: Manuel Lemos
Re: include question
153284 by: John Luxford
Another newbie
153287 by: Jay Fitzgerald
153289 by: Daniel J. Rychlik
153292 by: Chris Hayes
153302 by: David Otton
session problem solved.
153288 by: anders thoresson
Here we go with PATHS - again!!
153291 by: Beauford.2005
153293 by: Andrew McCombe
PHP and Macromedia Flash
153294 by: Daniel J. Rychlik
153296 by: Andrew McCombe
153297 by: electroteque
153298 by: Daniel J. Rychlik
153299 by: Daniel J. Rychlik
New PCRE features
153300 by: Andrei Zmievski
MY SINCERE GREETING
153301 by: DR MIKE FAVOUR
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 ---
does anyone know how to check what Dictionaries for pspell/aspell are
present on the system? since I will need to do that dynamically ;)
thanks
- Tu
--- End Message ---
--- Begin Message ---
David Otton wrote:
On Sat, 28 Jun 2003 12:33:27 +0200, you wrote:
I have problem in including this text in my PHP parsed file for XHTML
definition:
It works if I remove the first line:
<?xml version="1.0" encoding="iso-8859-1"?>
So, I am assuming PHP has problems with the <? ?> symbols, as they are
recognised to be PHP code delimiters.
Yup.
try
<? echo ('<?xml version="1.0" encoding="UTF-8"?>' . "\r\n"); ?>
or turning short tags off.
use <?php instead of <? for php, the first one is xml-compliant, and the
2nd one isn't
--- End Message ---
--- Begin Message ---
Ok, It is not the location of the <?php include("global.inc.php");?> that
matters here. I assume the login function included below is called from the
function is_admin that is called in your code somewhere around line 54.
That means that HTML has already been output (everything above line 54) and
therefore the header and setcookie functions will fail. Try moving the
$admin = is_admin() call above all the HTML in your pages. Maybe right
after the include line.
Daryl
-----Original Message-----
From: PHPSpooky [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 28, 2003 2:22 AM
To: 'Rasmus Lerdorf'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..
Glory!
I have two files, directory.php and global.inc.php
In directory.php ... this is the first line :
<?php include("global.inc.php"); $admin = is_admin();?>
followed by the HTML tags..
<HTML>
<HEAD>
and at Line 54 begins the php code in this page..
<?php
$return = numlinks_array(); // Build array of number of links in each
category
$numlinks = $return[0];
$numlinkstree = $return[1];
$thematrix="1";
________________
Now, in global.inc.php, this is the function in question, the Admin
Login function, which contains lines 533, 534 & 535 ..
function login($username, $password)
{
setcookie("Links_Cookie_User", $username, time() + 3600);
setcookie("Links_Cookie_Pass", $password, time() + 3600);
header("Location: directory.php");
exit;
}
On trying to login, I get this error..
Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:4) in
/home/unbreaka/public_html/mjs/global.inc.php on line 533
Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:4) in
/home/unbreaka/public_html/mjs/global.inc.php on line 534
Warning: Cannot modify header information - headers already sent by
(output started at /home/unbreaka/public_html/mjs/directory.php:4) in
/home/unbreaka/public_html/mjs/global.inc.php on line 535
Upon 'View Source' of this page.. I have all the HTML tags that I have
in directory.php .. which begin after the include function, but make up
the interface of the page.
Line 4 of Directory.php currently is..
<META http-equiv=Keywords content="michael, jackson, mj, michael
jackson, king of pop, king, pop, bad, dangerous, music, r&b, off the
wall, history, thriller, scream, invincible, gloria brown, rahul s
johari, album, songs, grammy, awards, you rock my world, cry, black or
white, world, earth, pop, mp3, guestbook, mailing list, directory,
guide, countries, sites, websites, list, site" name=Keywords>
I have tried a lot of things.. moved the incude function to the top,
given all HTML statements in echo .. things like that.. nothing has
worked so far.
Thanks,
PHPSpooky
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 28, 2003 11:50 AM
> To: PHPSpooky
> Cc: 'Marek Kilimajer'; [EMAIL PROTECTED]
> Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..
>
> First, where is your header call? And when you do a view source on
the
> page with the error, what do you see before that error is shown?
>
> -Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Glory!
In the entire php code? Or the part till the include function? Because
there is no white space there.. the entire php code is pretty lengthy..
PHPSpooky
> -----Original Message-----
> From: electroteque [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 28, 2003 5:09 PM
> To: Rasmus Lerdorf; PHPSpooky
> Cc: 'Marek Kilimajer'; [EMAIL PROTECTED]
> Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..
>
> there is a possible problem if there is whitespace before or after a
php
> tag
> check that !!
--- End Message ---
--- Begin Message ---
Glory Daryl!!
THANK YOU THANK YOU THANK YOU!!!!
AT LAST!!!
After 48 hours, countless emails, and so many heads .. finally!! It
works!! Your suggestion worked!!!
It was actually a login() function that was calling.. I moved that to
the top, alongwith the include function.. and the errors were gone!! I
thought if I did do that, probably the contents would also move up above
the HTML coding to the top of the page in display.. but that didn't
happen.. so it worked out fine! I got a lot of advise and suggestions,
but I didn't get this one, about moving the function itself..
Gosh! Thank you so much man.. you're a miracle.
Thanks,
PHPSpooky
> -----Original Message-----
> From: Daryl Meese [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 28, 2003 7:08 PM
> To: [EMAIL PROTECTED]; 'Rasmus Lerdorf'
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] 'Cannot send Headers' Problem!! MOre..
>
> Ok, It is not the location of the <?php include("global.inc.php");?>
that
> matters here. I assume the login function included below is called
from
> the
> function is_admin that is called in your code somewhere around line
54.
> That means that HTML has already been output (everything above line
54)
> and
> therefore the header and setcookie functions will fail. Try moving
the
> $admin = is_admin() call above all the HTML in your pages. Maybe
right
> after the include line.
>
> Daryl
--- End Message ---
--- Begin Message ---
Hi, I've got the following code:
<?php
$instan = new Java("DBUser");
echo "$instan";
$system = new Java("java.util.Vector");
echo"$system ";
?>
If I comment one of the two java object lines, I get no error.
If I use'em both, It creates a nasty error message, after which
php.exe is closed down.
Has any of you an idea on how to solve this?
thx
Jan
--- End Message ---
--- Begin Message ---
Yes, I need the key to remain associated with the value as the key links the
value to a directory. Can't have files going into the wrong places. So if
asort does the job, I'll try that and see if the code breaks or not.
Sparky
----- Original Message -----
From: "Daryl Meese" <[EMAIL PROTECTED]>
To: "David Otton" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, June 27, 2003 19:17
Subject: RE: [PHP] Sorting problem
> David,
>
> See what you mean. I guess we need some clarification on the original
> question?
>
> Thanks
>
> -----Original Message-----
> From: David Otton [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 8:09 PM
> To: Daryl Meese
> Cc: PHP General
> Subject: Re: [PHP] Sorting problem
>
>
> On Fri, 27 Jun 2003 19:45:27 -0500, you wrote:
>
> >ckeck out asort and arsort
>
> I'm looking...
>
> My understanding was that the original poster wanted to sort an array by
> "value"|"key" ("sort an array and have the key 'follow' the value")
>
> eg
>
> 'pear' => 'green',
> 'orange' => 'orange',
> 'banana' => 'yellow',
> 'tangerine' => 'orange',
> 'apple' => 'green'
>
> becomes
>
> 'apple' => 'green',
> 'pear' => 'green',
> 'orange' => 'orange',
> 'tangerine' => 'orange',
> 'banana' => 'yellow'
>
> However, asort() produces (here, anyway) :
>
> 'apple' => 'green',
> 'pear' => 'green',
> 'tangerine' => 'orange',
> 'orange' => 'orange',
> 'banana' => 'yellow'
>
> It's not explicitly stated in the manual, but it seems that when the
values
> are the same, the order of the keys associated with them is not defined.
> Even if it happened to produce correct output on one system, I wouldn't
> trust it in production code.
>
> Of course, I could have mis-read the original question... I can see how
> "have the key 'follow' the value" could be read as "have the key maintain
> it's association with the value".
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
asort should do the trick.
Good Luck
Daryl
-----Original Message-----
From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 28, 2003 9:50 AM
To: Daryl Meese; David Otton
Cc: PHP General
Subject: Re: [PHP] Sorting problem
Yes, I need the key to remain associated with the value as the key links the
value to a directory. Can't have files going into the wrong places. So if
asort does the job, I'll try that and see if the code breaks or not.
Sparky
----- Original Message -----
From: "Daryl Meese" <[EMAIL PROTECTED]>
To: "David Otton" <[EMAIL PROTECTED]>
Cc: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, June 27, 2003 19:17
Subject: RE: [PHP] Sorting problem
> David,
>
> See what you mean. I guess we need some clarification on the original
> question?
>
> Thanks
>
> -----Original Message-----
> From: David Otton [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 27, 2003 8:09 PM
> To: Daryl Meese
> Cc: PHP General
> Subject: Re: [PHP] Sorting problem
>
>
> On Fri, 27 Jun 2003 19:45:27 -0500, you wrote:
>
> >ckeck out asort and arsort
>
> I'm looking...
>
> My understanding was that the original poster wanted to sort an array by
> "value"|"key" ("sort an array and have the key 'follow' the value")
>
> eg
>
> 'pear' => 'green',
> 'orange' => 'orange',
> 'banana' => 'yellow',
> 'tangerine' => 'orange',
> 'apple' => 'green'
>
> becomes
>
> 'apple' => 'green',
> 'pear' => 'green',
> 'orange' => 'orange',
> 'tangerine' => 'orange',
> 'banana' => 'yellow'
>
> However, asort() produces (here, anyway) :
>
> 'apple' => 'green',
> 'pear' => 'green',
> 'tangerine' => 'orange',
> 'orange' => 'orange',
> 'banana' => 'yellow'
>
> It's not explicitly stated in the manual, but it seems that when the
values
> are the same, the order of the keys associated with them is not defined.
> Even if it happened to produce correct output on one system, I wouldn't
> trust it in production code.
>
> Of course, I could have mis-read the original question... I can see how
> "have the key 'follow' the value" could be read as "have the key maintain
> it's association with the value".
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi,
I am looking for a solution that will allow full text search of M$Office
files (Word, Powerpoint, EXCEL), PDF, HTML and Text files.
I am working on a project that involves uploading of the above files to a
server. After uploading, the Users should be able to search for key words or
phrases in the file. The search should throw up a list like the ones we get
on Google.
Should I use Open Source Search Engines such as HTDig, Swish or Namazu? Can
these be integrated into a PHP application? I would appreciate it very much
if someone could provide me with some information on this.
Best Regards
Feroze
===========================
Jar Jar Binks will be Jedi!
--- End Message ---
--- Begin Message ---
Is it compatible? Can I use oci8 functions to access oracle 9i? What are the
drawbacks?
Thanks.
RDB
--- End Message ---
--- Begin Message ---
On Sat, 2003-06-28 at 00:59, electroteque wrote:
> why php ? why not just use a .css file like everyone else ?
Because I wanted to be able to generate dynamically generated styles.
And, while I realize I can just "include" the document in theory @import
should work exactly as expected.
The problem turned out to be that having default_mimetype text/html set
in php.ini seemed to be overriding any attempt I made to set the mime
type to text/css via the header function. I thought you are supposed to
be able to over ride the global configs via ini_set or that defining the
mime type via header() would over ride it on a per file basis but
apparently not or at least not for me... Still trying to figure out why,
but, it is working now..
>
> -----Original Message-----
> From: Brian V Bonini [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 28, 2003 11:02 AM
> To: Leif K-Brooks
> Cc: PHP Lists
> Subject: Re: [PHP] @import
>
>
> On Fri, 2003-06-27 at 20:21, Leif K-Brooks wrote:
> > Brian V Bonini wrote:
> >
> > >Can anyone make this work with Mozilla?
> > >
> > ><style type="text/css" xml:lang="en" lang="en">
> > >@import url("site.css.php");
> > ></style>
> > >
> > >No matter what I try , header("Content-type: text/css")
> > >or ini_set to will not output anything other then text/html
> > >
> > >
> > >
> > >
> > This has nothing to do with PHP.
>
> Actually, it does. The only reason it does not work is that I can not
> get php to output anything other then text/html for .php files so it
> fails because of this.... Mozilla needs to see a text/css mimetype
> for this instance of site.css.php in order to render it correctly.
--- End Message ---
--- Begin Message ---
Hi,
I've a login script that works fine on my local server, but when I runs it
from my ISP I get the following error:
Warning: Cannot send session cookie - headers already sent by (output
started at /export/home/thore/public_html/phptest/reporter_view.php:5) in
/include/accesscontrol.php on line 9
Warning: Cannot send session cache limiter - headers already sent (output
started at /export/home/thore/public_html/phptest/reporter_view.php:5) in
/include/accesscontrol.php on line 9
If I had made any mistake in my handling with the session functions,
shouldn't that be the case also at my local server?
--
anders thoresson
--- End Message ---
--- Begin Message ---
... and line 5 of reporter_view.php reads what? =/
Anders Thoresson wrote:
Hi,
I've a login script that works fine on my local server, but when I runs
it from my ISP I get the following error:
Warning: Cannot send session cookie - headers already sent by (output
started at /export/home/thore/public_html/phptest/reporter_view.php:5)
in /include/accesscontrol.php on line 9
Warning: Cannot send session cache limiter - headers already sent
(output started at
/export/home/thore/public_html/phptest/reporter_view.php:5) in
/include/accesscontrol.php on line 9
If I had made any mistake in my handling with the session functions,
shouldn't that be the case also at my local server?
--- End Message ---
--- Begin Message ---
It could be a warning in your script. On your local server, maybe you have
error reporting set to minimal (ie. don't report warnings), whereas the ISP
server might have it turned up higher by default.
near the top of your script reporter_view.php put in the line
error_reporting(E_ALL); ie.
<?php
error_reporting(E_ALL);
.... PHP code
?>
Maybe line 5 is causing a warning? After you have error_reporting on full
you may be able to solve the problem on your local server.
For more info checkout error_reporting() on php.net
Bobby
"Anders Thoresson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I've a login script that works fine on my local server, but when I runs
it
> from my ISP I get the following error:
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at /export/home/thore/public_html/phptest/reporter_view.php:5) in
> /include/accesscontrol.php on line 9
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at /export/home/thore/public_html/phptest/reporter_view.php:5) in
> /include/accesscontrol.php on line 9
>
> If I had made any mistake in my handling with the session functions,
> shouldn't that be the case also at my local server?
>
> --
> anders thoresson
--- End Message ---
--- Begin Message ---
> Don't allow them to run php scripts in the public_html directory
I would like to give them the option of using PHP. I will also be making
mySQL available to the users.
>
> What is the point of the web based file manager?
To eliminate Local Accounts, and so that they don't have to upload files
via ftp or ssh.
Plain ftp is very unsecure, and using a secure ftp server can be very
confusing to less advanced users. Also if a user wants to edit web pages
on their lunch hour, they may be behind a corporate firewall that will not
allow them to connect to a secure ftp server, or use ssh, but http is
always available.
>
> So they don't have to use ftp or ssh to uploads files?
>
> Jim Lucas
> ----- Original Message -----
> From: "Dean E. Weimer" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 27, 2003 4:04 PM
> Subject: [PHP] PHP Web Based File Management and Security
>
>
>> I was starting to make and test some pages for web based file management
>> using PHP (4.3.2) with Apache (2.0.46) on a FreeBSD (4.8) Server.
>>
>> The pages of course would be secured with ssl and use .htaccess files
>> combined with mod_auth_pgsql to provide logins.
>>
>> Apache is running as user nobody, so I had switch the directories and
>> files be owned by user nobody, with security of 0744 on files and 0755
>> on
>> directories.
>>
>> Since users will not be given local login access or ftp access, my first
>> thought was that this is OK.
>>
>> But what is to stop user1 from uploading a PHP script that will delete,
>> modify files in user2's directory??
>>
>> I realize that I could make this somewhat harder buy placing users files
>> behind randomly generated directory names. Making it harder for user1
>> to
>> guess that user2's files are in a directory named 370261, but this is
>> only
>> makes it a little more difficult.
>>
>>
>> --
>> Thanks,
>> Dean E. Weimer
>> http://www.dwiemer.org/
>> [EMAIL PROTECTED]
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Thanks,
Dean E. Weimer
http://www.dwiemer.org/
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
on 29/06/03 4:12 AM, Dean E. Weimer ([EMAIL PROTECTED]) wrote:
>> What is the point of the web based file manager?
> To eliminate Local Accounts, and so that they don't have to upload files
> via ftp or ssh.
> Plain ftp is very unsecure, and using a secure ftp server can be very
> confusing to less advanced users. Also if a user wants to edit web pages
> on their lunch hour, they may be behind a corporate firewall that will not
> allow them to connect to a secure ftp server, or use ssh, but http is
> always available.
Bleh. I hope you're not charging for this service, because every time a
service provider has forced me to use a web-based file upload system for
anything more than one or two files, rather than something clean, quick and
to the point like FTP, I've turned away really quick.
Can you imagine trying to update 10 or even 100 files via a web based file
upload system? Every file has to be selected from it's own file input. You
were talking about confusion? I'd say this takes the cake.
Also, I wouldn't use "Plain ftp is very unsecure" as an argument, because so
is http, and I can only imagine how much slower this sort of app would run
under https.
If this is something free you're offering, geocities style, then that's
fine, but on a paid-for service, there is a certain level of simplicity and
speed which users expect. FTP being the obvious answer.
Justin
--- End Message ---
--- Begin Message ---
I wanted to attach one more point (esp. since this is an ecomm solution),
you should also check your POST variables (in addition to the GET varaibles)
to make sure they are clean and what are expected. It's not that hard to
change posted values.
Bobby
"Daniel J. Rychlik" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> PHP is, arguably, the better way to go when developing an ecomm solution.
> This list is full of very intelligent programmers that will help or direct
> you to the proper documentation.
> If you use $_GET you will be able to pass value pairs in the url. Make
sure
> that in your data check script that you specifically assign variables to
> your $_GET in order to prevent malicious use. $HTTP_POST_VARS is probably
a
> better way to go here. Its cross platform and will almost guarantee that
> you will be able to use on any server.
>
> $HTTP_POST_VARS['name'];
> $HTTP_POST_VARS['email'];
>
>
> Good Luck!
> -Dan
>
> ----- Original Message -----
> From: "Larry R. Sieting" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 27, 2003 5:22 PM
> Subject: [PHP] Newbie and learning
>
>
> > Hello All,
> >
> > I have been reading and digesting information from this list for about
two
> > weeks now.
> >
> > I am doing some work and testing (both) and learning php on the way.
> >
> > Now I have seen several replies about using $_GET[] and $_POST[] and
that
> > if you ARE sending variables using the URL you _should_ use $_GET[]
> whereas
> > if you are _not_ passing variables in the URL you should use $_POST[].
> >
> > Is this correct? I just want to make sure I have it in my mind so that
> > when I start passing info via url I use the right method. I ask this
> > because I have a friend that wants to have me setup an e-commerce site
for
> > him. I am trying to decide if I should use ASP (gasp) or PHP (yeah).
It
> > will be a db driven site which will have images in the db and probably
> > multiple tables with inner and outer joins and search systems.
> >
> > Yes, I have the 4000+ (pdf) page manual on my system and refer to it and
> > read sections of it at a time (chunk). And I hope that I will be able
to
> > answer most of my own questions there or in other resources before I
have
> > to submit to the list.
> >
> > Thanks.
> >
> > Larry R. Sieting
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
--- End Message ---
--- Begin Message ---
In PHP there are two operators for comparisons, the double and triple
equivalance.
Double equivalance just check's the boolean type so if (0 == 'n') is
translated to if (False == False), where as triple equivalance checks the
data types as well so if (0==='n') becomes if (Int(False)==String(False))
but since the data types don't match that would be False.
to get a better reference check PHP.net for 'Bolean Types' , because I
think I dodn't explain the double equivalance right, and also it will
clarify situations of the Null type.
Bobby
"Rob Adams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I don't need anything fixed, I'm just curious about something I noticed.
>
> I'm doing a comparison between a variable and a hard coded char. Like
this:
> if ($k1 == "n")
>
> The variable is usually the first key in an array (0) so it should usually
> evaluate false, but it was true every time until I changed it to:
> if ($k1 === "n")
>
> So I'm assuming that it decided that since $k1 was an int to convert "n"
to
> an int (which would be 0) and conclude that 0 does indeed equal "n". So I
> decided for fun to try:
> if ("n" == $k1)
>
> And it still was true everytime. So why does it always try convert my
> literal to an int instead of use the variable as a string?
>
> Just curious. Thanks.
>
> -- Rob
>
>
--- End Message ---
--- Begin Message ---
On Sat, 2003-06-28 at 11:28, Bobby Patel wrote:
> In PHP there are two operators for comparisons, the double and triple
> equivalance.
>
> Double equivalance just check's the boolean type so if (0 == 'n') is
> translated to if (False == False), where as triple equivalance checks the
> data types as well so if (0==='n') becomes if (Int(False)==String(False))
> but since the data types don't match that would be False.
>
> to get a better reference check PHP.net for 'Bolean Types' , because I
> think I dodn't explain the double equivalance right, and also it will
> clarify situations of the Null type.
>
> Bobby
You got pretty close, but not quite. :) In the case of the equality
operator '==', there is nothing specific to do with boolean evaluation
going on. It just converts the string to its integer value implicitly
before checking for equality, and according to the string->integer
conversion rules, the string ends up being (int) 0 so the whole thing
matches.
Also, it might be easier to think about the identical operator '===' as
just testing whether two values are identical, meaning that they are
both of the same type, and that they both have the same value.
More information:
http://www.php.net/manual/en/language.types.type-juggling.php
http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion
...in fact, the whole 'Language' section of the manual has a bunch of
stuff on this.
Hope this helps,
Torben
--
Torben Wilson <[EMAIL PROTECTED]> +1.604.709.0506
http://www.thebuttlesschaps.com http://www.inflatableeye.com
http://www.hybrid17.com http://www.themainonmain.com
-----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----
--- End Message ---
--- Begin Message ---
OK, normally I do not respond to my own posts, but I have been shown that I
did not get the whole script. So here it is:
for ($i=0; $i<$number_of_alerts; $i++) {
// Split each line
$line = explode(" ", $ipfwlog[$i]);
$line[1] = intval($line[1]);
$IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel,
fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port,
direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]',
'$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]',
'$line[9]', '$line[10]', '$line[11]', '$line[12]')";
$results = mysql_query($IPFWsql) or die ("Could not execute query");
}
Again, any help with this issue is appreciated.
Thanks,
Ron Clark
"Ron Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello all,
>
> I have a php script that reads a flat text file with fields seperated by a
> space. I explode them into an array just fine, but when I try then to load
> that array into a mysql database, it doesn't work. Here is my script:
>
> for ($i=0; $i<$number_of_alerts; $i++) {
> // Split each line
> $line = explode(" ", $ipfwlog[$i]);
>
> $line[1] = intval($line[1]);
>
> $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel,
> fw_engine, rule_number, action, protocol, src
> $results = mysql_query($IPFWsql) or die ("Could not execute query");
>
> }
>
> Any ideas why this does not work? I am completely stuck.
>
> Thanks in advance,
> RonC
>
>
--- End Message ---
--- Begin Message ---
It depends on what data types are your fields in the database. U are
quoting each value which might not be the case. You should check the
mysql_error function to see what error the database is giving back to
you..
--
BigDog
On Sat, 2003-06-28 at 12:42, Ron Clark wrote:
> OK, normally I do not respond to my own posts, but I have been shown that I
> did not get the whole script. So here it is:
>
> for ($i=0; $i<$number_of_alerts; $i++) {
>
> // Split each line
>
> $line = explode(" ", $ipfwlog[$i]);
>
> $line[1] = intval($line[1]);
>
> $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel,
> fw_engine, rule_number, action, protocol, src_ip_port, dst_ip_port,
> direction, via, interface) VALUES ('$line[0]', '$line[1]', '$line[2]',
> '$line[3]', '$line[4]', '$line[5]', '$line[6]','$line[7]', '$line[8]',
> '$line[9]', '$line[10]', '$line[11]', '$line[12]')";
>
> $results = mysql_query($IPFWsql) or die ("Could not execute query");
>
> }
>
>
>
> Again, any help with this issue is appreciated.
>
>
>
> Thanks,
>
> Ron Clark
>
>
>
>
>
> "Ron Clark" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Hello all,
> >
> > I have a php script that reads a flat text file with fields seperated by a
> > space. I explode them into an array just fine, but when I try then to load
> > that array into a mysql database, it doesn't work. Here is my script:
> >
> > for ($i=0; $i<$number_of_alerts; $i++) {
> > // Split each line
> > $line = explode(" ", $ipfwlog[$i]);
> >
> > $line[1] = intval($line[1]);
> >
> > $IPFWsql = "INSERT INTO Firewall_Logs (month, date, time, fw_name, kernel,
> > fw_engine, rule_number, action, protocol, src
> > $results = mysql_query($IPFWsql) or die ("Could not execute query");
> >
> > }
> >
> > Any ideas why this does not work? I am completely stuck.
> >
> > Thanks in advance,
> > RonC
> >
> >
>
>
--- End Message ---
--- Begin Message ---
Hi,
After a new user has filled in a form to register for my site, I check
that she has entered the same password twice by calling a homemade
function. Like this:
$u_pwd = validate_password($_POST['u_pwd'],$_POST['u_pwd1']);
And the function looks like this:
function validate_password($unchecked_password1, $unchecked_password2,
$errortype = 1, $errormessage = "Password must contain just letters and
figures.") {
if(!($unchecked_password1 == $unchecked_password2)) {
error("Passwords entered doesn't match!");
}
if(!ereg("(^[a-zA-ZåÅäÄöÖ0-9]{6,15}$)", $unchecked_password2)) {
if($errortype == 1) {
error($errormessage);
}
Return 1;
}
}
I have verified that $_POST['u_pwd'] and $_POST['u_pwd1'] as well as
$unchecked_password1 and $unchecked_password2 contains the entered values,
but $u_pwd is empty.
Why?
As with my previous problems this evening, it works on my local server,
but not on my ISP's. At home I'm running Windows 2000 and PHP 4.3.1, while
my ISP is on SunOS 5.7 with PHP 4.1.1.
--
anders thoresson
--- End Message ---
--- Begin Message ---
On Sunday 29 June 2003 02:53, anders thoresson wrote:
> After a new user has filled in a form to register for my site, I check
> that she has entered the same password twice by calling a homemade
> function. Like this:
>
> $u_pwd = validate_password($_POST['u_pwd'],$_POST['u_pwd1']);
>
> And the function looks like this:
>
> function validate_password($unchecked_password1, $unchecked_password2,
> $errortype = 1, $errormessage = "Password must contain just letters and
> figures.") {
>
> if(!($unchecked_password1 == $unchecked_password2)) {
> error("Passwords entered doesn't match!");
> }
>
> if(!ereg("(^[a-zA-ZåÅäÄöÖ0-9]{6,15}$)", $unchecked_password2)) {
> if($errortype == 1) {
> error($errormessage);
> }
> Return 1;
> }
>
> }
>
> I have verified that $_POST['u_pwd'] and $_POST['u_pwd1'] as well as
> $unchecked_password1 and $unchecked_password2 contains the entered values,
> but $u_pwd is empty.
>
> Why?
AFAIK in PHP, if you don't specifically return something from a function, the
function will not return anything.
--
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
------------------------------------------
/*
Smear the road with a runner!!
*/
--- End Message ---
--- Begin Message ---
AFAIK in PHP, if you don't specifically return something from a function,
the function will not return anything.
True. I'm so frustrated over here that I miss the most obvious things.
Thank's.
Strange thing is that it worked at my localhost, though.
--
anders thoresson
--- End Message ---
--- Begin Message ---
try return true;
-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 5:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] function doesn't return value
On Sunday 29 June 2003 02:53, anders thoresson wrote:
> After a new user has filled in a form to register for my site, I check
> that she has entered the same password twice by calling a homemade
> function. Like this:
>
> $u_pwd = validate_password($_POST['u_pwd'],$_POST['u_pwd1']);
>
> And the function looks like this:
>
> function validate_password($unchecked_password1, $unchecked_password2,
> $errortype = 1, $errormessage = "Password must contain just letters and
> figures.") {
>
> if(!($unchecked_password1 == $unchecked_password2)) {
> error("Passwords entered doesn't match!");
> }
>
> if(!ereg("(^[a-zA-ZåÅäÄöÖ0-9]{6,15}$)", $unchecked_password2)) {
> if($errortype == 1) {
> error($errormessage);
> }
> Return 1;
> }
>
> }
>
> I have verified that $_POST['u_pwd'] and $_POST['u_pwd1'] as well as
> $unchecked_password1 and $unchecked_password2 contains the entered values,
> but $u_pwd is empty.
>
> Why?
AFAIK in PHP, if you don't specifically return something from a function,
the
function will not return anything.
--
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
------------------------------------------
/*
Smear the road with a runner!!
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Are there any big differences in session handling between 4.1.1 and 4.3.1
of PHP. Almost nothing works like it should since I have moved my site from
my local server (4.3.1 on Win2000) to my ISP (4.1.1 on SunOS 5.7).
I just started to dump my four $_SESSION-variables on top of every page,
and to my big suprise they changes all the time.
At login is store the users userid in $_SESSION['u_id']. At later times,
I'm working with $_POST['u_id'] when for example changing administrators
for different parts of the site. When I'm doing this, also
$_SESSION['u_id'] changes.
And at my localhost, $_SESSION's stays put.
I'm going crazy here.
--
anders thoresson
--- End Message ---
--- Begin Message ---
maybe compare the php settings for both servers (using phpinfo()). Also
check the register globals setting. I know this might not be a big help,
but it's a start.
good luck
Bobby
"Anders Thoresson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Are there any big differences in session handling between 4.1.1 and 4.3.1
> of PHP. Almost nothing works like it should since I have moved my site
from
> my local server (4.3.1 on Win2000) to my ISP (4.1.1 on SunOS 5.7).
>
> I just started to dump my four $_SESSION-variables on top of every page,
> and to my big suprise they changes all the time.
>
> At login is store the users userid in $_SESSION['u_id']. At later times,
> I'm working with $_POST['u_id'] when for example changing administrators
> for different parts of the site. When I'm doing this, also
> $_SESSION['u_id'] changes.
>
> And at my localhost, $_SESSION's stays put.
>
> I'm going crazy here.
>
> --
> anders thoresson
--- End Message ---
--- Begin Message ---
I would also advise to check for register_globals, since I have the
faint feeling it was OFF on your old version and ON in your new (though
most logcial would be viceversa :P)
Bobby Patel wrote:
maybe compare the php settings for both servers (using phpinfo()). Also
check the register globals setting. I know this might not be a big help,
but it's a start.
good luck
Bobby
"Anders Thoresson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Are there any big differences in session handling between 4.1.1 and 4.3.1
of PHP. Almost nothing works like it should since I have moved my site
from
my local server (4.3.1 on Win2000) to my ISP (4.1.1 on SunOS 5.7).
I just started to dump my four $_SESSION-variables on top of every page,
and to my big suprise they changes all the time.
At login is store the users userid in $_SESSION['u_id']. At later times,
I'm working with $_POST['u_id'] when for example changing administrators
for different parts of the site. When I'm doing this, also
$_SESSION['u_id'] changes.
And at my localhost, $_SESSION's stays put.
I'm going crazy here.
--
anders thoresson
--- End Message ---
--- Begin Message ---
I would also advise to check for register_globals, since I have the faint
feeling it was OFF on your old version and ON in your new (though most
logcial would be viceversa :P)
register_globals are on in 4.1.1 and off in 4.3.1. So, your faint feeling
was wrong (which I'm sorry for, cause any feeling that helps me, no matter
how faint, are wanted. I'm going crazy here. ;-))
--
anders thoresson
--- End Message ---
--- Begin Message ---
Hello,
On 06/28/2003 01:56 AM, J.F.Kishor wrote:
I have a doubt, is there a way to compile php as a class file,
so that it would be more secured.
And I should be able to be invoked by a HTML client interface.
Sure, Turck does exactly what you want:
http://www.turcksoft.com/en/e_mmc.htm
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--- End Message ---
--- Begin Message ---
Hi Blake,
If you're using Apache, try this:
http://ca3.php.net/virtual
Cheers,
Lux
On Friday, June 27, 2003, at 01:05 PM, Blake Schroeder wrote:
Hey all
I used to include a perl script via Sever Side Include how could I do
this in php?
example:
<!--#include virtual=" /cgi-bin/something.pl?data=something"-->
--
Blake Schroeder
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
John Luxford
President and Chief Developer
______________________________
SIMIAN systems
Driving Web Content Management
______________________________
web : http://www.simian.ca/
email : [EMAIL PROTECTED]
phone : 204.942.8630
fax : 309.218.3874
--- End Message ---
--- Begin Message ---
I have been writing PHP for almost a year now and someone on phpfreaks told
me the other day that my code was very sloppy.
Since I want to more more into programming than design, can anyone
recommend where to learn how to make sure your code is clean, optimized and
as error-free as it can get? Even if it is the style of how to write the
code, please let me know....I know noone can be the perfect programmer, but
I would at least like to be a decent programmer :)
Jay
--- End Message ---
--- Begin Message ---
Take a close look at OO programming. Class objects are great for reusing
code and making cleaner code. The art of designing code is a mastered art
which is why my white board is always messy ;) . Never the less, oject
oriented programming is definately the way to go. Chapter 6 in the PHP and
MySQL Web Development book has great real world examples on how class
objects relate to one another.
Lots of Luck!
-Dan
----- Original Message -----
From: "Jay Fitzgerald" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 3:10 PM
Subject: [PHP] Another newbie
> I have been writing PHP for almost a year now and someone on phpfreaks
told
> me the other day that my code was very sloppy.
>
> Since I want to more more into programming than design, can anyone
> recommend where to learn how to make sure your code is clean, optimized
and
> as error-free as it can get? Even if it is the style of how to write the
> code, please let me know....I know noone can be the perfect programmer,
but
> I would at least like to be a decent programmer :)
>
> Jay
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
At 22:10 28-6-2003, you wrote:
I have been writing PHP for almost a year now and someone on phpfreaks
told me the other day that my code was very sloppy.
Some people can be pretty rude on the net, so don't take it too hard.
Since I want to more more into programming than design, can anyone
recommend where to learn how to make sure your code is clean, optimized
and as error-free as it can get? Even if it is the style of how to write
the code, please let me know....I know noone can be the perfect
programmer, but I would at least like to be a decent programmer :)
On ZEND are some articles that you could read, but always keep in mind
these are _opinions_ , and even though they are very _educated_ opinions,
you may have a reason to do it your way anyway. Think independent. (this
goes for all mentioned links)
Top 21 PHP Programming Mistakes:
Part I: Seven Textbook Mistakes:
http://www.zend.com/zend/art/mistake.php
Part 2: Seven Serious Mistakes:
http://www.zend.com/zend/art/mistake1.php
Part 3: Seven Deadly Mistakes:
http://www.zend.com/zend/art/mistake2.php
Some basic PHP guidelines, very basic but still often forgotten, e.g. with
the single and double quotes:
http://www.evolt.org/article/PHP_Guidelines/17/26440/?format=print
An example of a strict coding style, very important when more people work
together, so variables names are consistent, indents look the same on
everybodies editor, and so on:
http://pear.php.net/manual/en/standards.php (pretty strict)
http://www.phpbuilder.com/columns/tim20010101.php3 (with a lot of explanations)
Just another one on coding style:
http://www.developer.com/lang/php/article.php/2193341
Google has 129.000 hits on 'coding style php'.
Then there are off course also helpful pages on how to organize a larger
PHP project. But i lost them links... which shows in my code :(
Chris
--- End Message ---
--- Begin Message ---
On Sat, 28 Jun 2003 15:10:03 -0500, you wrote:
>Since I want to more more into programming than design, can anyone
>recommend where to learn how to make sure your code is clean, optimized and
>as error-free as it can get? Even if it is the style of how to write the
>code, please let me know....I know noone can be the perfect programmer, but
>I would at least like to be a decent programmer :)
I'd just like to put in a word for refactoring - improving working code
without adding new functionality - as a learning tool. Take a script you
wrote a few months back, read the code, then write it again. Try to identify
common functionality and extract it into external functions to be reused.
Make functions more generic, remove magic numbers. Seperate business logic
and display elements. Consider what could go wrong, and how your script will
fail when it does.
You might be surprised at how much of an improvement you can make just
moving from v1 to v2.
--- End Message ---
--- Begin Message ---
At some places, I was using $_SESSION['u_uname'] as variable name, at other
$_SESSION['uname']. Changing to $_SESSION['uname'] through all my
accesscontrol.php solved the problem. Now it works on my ISP's server.
Question is, though: Why does the faulty script work on my localhost? Next
step is to try the script that work at my ISP's server at my localhost. ;-)
--
anders thoresson
--- End Message ---
--- Begin Message ---
I hope someone can put this to rest for good, cause this is just
bullshit. Every time I try to do something using any thing other than
the root directory of my website - I get these stupid path problems.
Here is the problem this time. First off I am not using frames (if it
matters) and this particular site is on Windows 2000. The website
resides in d:\Apache\htdocs\supreme and in this directory I have a .js
file for my drop-down menu - there is also another file which I am
including using the php include directive called menu.inc. The graphics
for the menu are in a directory called images. When I go to the main
page of the site everything is great, but as soon as I try to get the
menu to work from another directory it can't find the graphics.
I have tried d:\Apache\htdocs\supreme\image.gif.
I have tried http://www.mysite.com/images/image.gif.
I have tried ../file.js (this is to load the menu)
I have even tried putting menu.inc in my php include directory.
You get the picture - but no matter what I try it just doesn't work. I
mean really - is this that hard to figure out. Like this is every time I
work on a site I get these path problems. Am I just not getting
something here.
Other than putting everything in the root directory (which I don't want
to do) I have no idea how to solve this. It just gives me a headache.
TIA
--- End Message ---
--- Begin Message ---
On Sat, 2003-06-28 at 23:27, Beauford.2005 wrote:
> I hope someone can put this to rest for good, cause this is just
> bullshit. Every time I try to do something using any thing other than
> the root directory of my website - I get these stupid path problems.
>
> Here is the problem this time. First off I am not using frames (if it
> matters) and this particular site is on Windows 2000. The website
> resides in d:\Apache\htdocs\supreme and in this directory I have a .js
> file for my drop-down menu - there is also another file which I am
> including using the php include directive called menu.inc. The graphics
> for the menu are in a directory called images. When I go to the main
> page of the site everything is great, but as soon as I try to get the
> menu to work from another directory it can't find the graphics.
>
> I have tried d:\Apache\htdocs\supreme\image.gif.
>
> I have tried http://www.mysite.com/images/image.gif.
>
> I have tried ../file.js (this is to load the menu)
>
> I have even tried putting menu.inc in my php include directory.
>
> You get the picture - but no matter what I try it just doesn't work. I
> mean really - is this that hard to figure out. Like this is every time I
> work on a site I get these path problems. Am I just not getting
> something here.
>
> Other than putting everything in the root directory (which I don't want
> to do) I have no idea how to solve this. It just gives me a headache.
>
> TIA
Try escaping your paths with double slashes, ie,
d:\\Apache\\htdocs\\supreme\\image.gif or
d://Apache//htdocs//suprem//image.gif
might work.
Regards
Andrew McCombe
--- End Message ---
--- Begin Message ---
Does anyone know if you can dynamically update a flash swf file with a PHP script ?
For instance in menu navigation I was thinking of using a flash object to display an
interactive menu and have in my main class a way to update the links or buttons from
page to page.
Thanks in advance,
Dan
--- End Message ---
--- Begin Message ---
On Sun, 2003-06-29 at 00:00, Daniel J. Rychlik wrote:
> Does anyone know if you can dynamically update a flash swf file with a PHP script ?
>
> For instance in menu navigation I was thinking of using a flash object to display an
> interactive menu and have in my main class a way to update the links or buttons from
> page to page.
>
> Thanks in advance,
> Dan
Yes you can. I'm currently writing a script that uses php to pull info
in from a mysql db and passes the results back to flash as xml.
Don't ask me how the flash part works though, i don't do that part.
Regards
Andrew McCombe
--- End Message ---
--- Begin Message ---
message me offlist for a xml actionscript example
-----Original Message-----
From: Andrew McCombe [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 9:09 AM
To: Daniel J. Rychlik
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP and Macromedia Flash
On Sun, 2003-06-29 at 00:00, Daniel J. Rychlik wrote:
> Does anyone know if you can dynamically update a flash swf file with a PHP
script ?
>
> For instance in menu navigation I was thinking of using a flash object to
display an interactive menu and have in my main class a way to update the
links or buttons from page to page.
>
> Thanks in advance,
> Dan
Yes you can. I'm currently writing a script that uses php to pull info
in from a mysql db and passes the results back to flash as xml.
Don't ask me how the flash part works though, i don't do that part.
Regards
Andrew McCombe
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Well, at least I know its possible. Im guessing that an action script of
some kind pulls the the xml data and displays the new information or button.
I wish that you could just pass it directly to the flash object, that would
be nice....
-Dan
----- Original Message -----
From: "Andrew McCombe" <[EMAIL PROTECTED]>
To: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 6:09 PM
Subject: Re: [PHP] PHP and Macromedia Flash
> On Sun, 2003-06-29 at 00:00, Daniel J. Rychlik wrote:
> > Does anyone know if you can dynamically update a flash swf file with a
PHP script ?
> >
> > For instance in menu navigation I was thinking of using a flash object
to display an interactive menu and have in my main class a way to update the
links or buttons from page to page.
> >
> > Thanks in advance,
> > Dan
>
> Yes you can. I'm currently writing a script that uses php to pull info
> in from a mysql db and passes the results back to flash as xml.
>
> Don't ask me how the flash part works though, i don't do that part.
>
> Regards
> Andrew McCombe
>
>
>
--- End Message ---
--- Begin Message ---
Anyone have any experience with PHPObject from
http://ghostwire.com/resources/phpobject/
----- Original Message -----
From: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, June 28, 2003 6:13 PM
Subject: Re: [PHP] PHP and Macromedia Flash
> Well, at least I know its possible. Im guessing that an action script of
> some kind pulls the the xml data and displays the new information or
button.
> I wish that you could just pass it directly to the flash object, that
would
> be nice....
>
> -Dan
>
> ----- Original Message -----
> From: "Andrew McCombe" <[EMAIL PROTECTED]>
> To: "Daniel J. Rychlik" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, June 28, 2003 6:09 PM
> Subject: Re: [PHP] PHP and Macromedia Flash
>
>
> > On Sun, 2003-06-29 at 00:00, Daniel J. Rychlik wrote:
> > > Does anyone know if you can dynamically update a flash swf file with a
> PHP script ?
> > >
> > > For instance in menu navigation I was thinking of using a flash object
> to display an interactive menu and have in my main class a way to update
the
> links or buttons from page to page.
> > >
> > > Thanks in advance,
> > > Dan
> >
> > Yes you can. I'm currently writing a script that uses php to pull info
> > in from a mysql db and passes the results back to flash as xml.
> >
> > Don't ask me how the flash part works though, i don't do that part.
> >
> > Regards
> > Andrew McCombe
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Some news on PCRE front:
1. I've upgraded the bundled PCRE library to version 4.3 which has some
interesting new features.
2. I added new parameter to preg_match* functions that can be used to
specify the starting offset of the subject string to start matching
from. The offset can be positive or negative, like for substr().
3. Also implemented support for named subpatterns (introduced with PCRE
4.3). This means you can do something like:
<?
preg_match('!(\d+)(?P<ahh>\.\d+)?!', 'ab 55.5 bb', $match);
var_dump($match);
?>
With the result being:
array(4) {
[0]=>
string(4) "55.5"
[1]=>
string(2) "55"
["ahh"]=>
string(2) ".5"
[2]=>
string(2) ".5"
}
Note that the named subpattern is also available under a positional
numeric key, as before. What this means for backwards compatibility
is that you should not do count($match) anymore to obtain the number
of captured subpatterns or number of matches. For latter, use the
return value of preg_match* functions, and for former, you should
already know how many subpatterns you have from your regexp.
4. You can use \Q..\E to ignore regexp metacharacters in the pattern.
For example:
!\w+\Q.$.\E$!
Will match one or more word characters, followed by literals .$. and
anchored at the end of the string.
5. You can use possesive quantifiers, similar to Java's regexps. These
are:
?+, *+, ++, and {,}+
See PCRE docs or Java docs for more information.
6. There is now support for recursive calls to individual subpatterns.
That is, instead of using (?R) you can use (?1), (?2) and so on. Or
use named subpatterns: (?P>foo) will refer recursively to named
subpattern 'foo'. Once again see PCRE docs for more info.
7. There is a new feature by the name of "callouts", but there is not
interface to it yet. Basically, it allows user to receive control at
a specified matching point in the pattern and inspect, continue, or
interrupt the matching. I'm not sure how useful this would be for PHP
users as the information provided is fairly low-level. See
'pcrecallout' PCRE man page for more info. If there are enough
interested people, I will add support for it.
That's about it for now.
-Andrei
"What's a polar bear?"
"A rectangular bear after a coordinate transform."
-- Bill White ([EMAIL PROTECTED])
--- End Message ---
--- Begin Message ---
DR MIKE FAVOUR
BRANCH MANAGER,
UNITED BANK FOR AFRICA PLC
ILUPEJU BRANCH
LAGOS NIGERIA
ATTN: PRESIDENT/C.E.O
I am pleased to get across to you for a very urgent
and profitable business proposal, though I don't know
you neither have I seen you before but my confidence
was reposed on you when the Chief Executive of Lagos
State chamber of Commerce and Industry handed me your
contact for a confidential business.
I am the manager of United Bank for Africa Plc (UBA),
Ilupeju branch, Lagos Nigeria.
The intended business is thus; We had a customer, a
Foreigner (a Turkish) resident in Nigeria, he was a
Contractor with one of the Government Parastatals.He
has in his Account in my branch the sum of US 38.6
Million (Thirty Eight Million, Six Hundred Thousand
U.S. Dollars).
Unfortunately, the man died four years ago until today
non-of his next of kin has come forward to claim the
money.
Having noticed this, I in collaboration with two other
top Officials of the bank have covered up the account
all this while.
Now we want you (being a foreigner) to be fronted as
one of his next of kin and forward your account and
other relevant documents to be advised to you by us to
attest to the Claim.
We will use our positions to get all internal
documentations to back up the claims .The whole
procedures will last only five working days to get the
fund retrieved successfully without trace even now or
in future.
Your response is only what we are waiting for as we
have arranged all necessary things. As soon as this
message comes to you kindly get back to me indicating
your interest, then I will furnish you with the whole
procedures to ensure that the deal is successfully
concluded.
For your assistance we have agreed to give you twenty
five percent (25%) of the Total sum at the end of the
transaction while 65% would be for my colleagues and I
and the remaining 10% would be for any form of
expenses that may be incurred during the course of the
transaction which would be given to us when the money
is transferred into your account before splitting the
balance on the agreed percentage of 65% to 25%.
In order to get all the legal documents from the
court, kindly send the following information to us
immediately.
Your full name,telephone,mobile and fax numbers as
well as your resident or company address.
I await your earliest response.
Thanks,
Yours Sincerely
DR MIKE FAVOUR
--- End Message ---