php-general Digest 12 Feb 2001 07:44:46 - Issue 507
Topics (messages 39137 through 39181):
Re: afraid !
39137 by: Joe Stump
39168 by: Kath
39169 by: Jaxon
Search & replace text
39138 by: CDitty
39155 by: David Robley
Re: comparisons
39139 by
Fatal error: input in flex scanner failed in /var/www/html/gcdb/lang on
line 1
Using gcdb version 1.1.4 (see: http://sourceforge.net/projects/gcdb/)
I get the error listed above... I believe the error is arising from this
code (from gcdb.php):
if(!(isset($sess_lang))) {
$db = getDBConn
On Sun, Feb 11, 2001 at 03:51:33PM -0800, rswfire wrote:
> I am not a hacker. I do not try to hack and
> don't know how people go about doing it. I'm a
> programmer. To me, those two are very different.
> A programmer is constructive. A programmer
> likes to take a problem and turn it into a
You could try a two step query:
$querywords="CREATE TABLE temptable SELECT ... ";
$sel_querywords=mysql_query($querywords);
$search = "SELECT count(search_table.word) as score,
search_table.qid,page_data.contents
FROM search_table,page_data,temptable
WHERE page_data.pID = search_table
Hi guys,
I need to write a regular expression search that can search through a block
of HTML code and find anything similar to these:
And return what I want in an array.
I need the search or piece of code to be able to differ as to which one it
is using, ie/ with align or wit
try using session variables.
take a look at phplib if you are using PHP3 or
http://www.php.net/manual/en/ref.session.php
if you are using PHP4
hope that helps
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
- Original Message -
From: "Chuck Mayo" <[EMAIL PROTECTED]>
To: <
try using
$PHP_SELF
and
$REQUEST_URI
regards
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
- Original Message -
From: "John LYC" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Monday, February 12, 2001 10:52 AM
Subject: [PHP] checking for presnet file na
try using "\r\n" instead of a simple "\n".
hope that helps
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 6:51 AM
Subject: [PHP] newline processing problem?
>
> I have so
Hi PHPers!
how can I reference a result set by array index numbers???
this $sql="select field from table where id_field = 1";
would return a result like this:
field
---
first
second
third
from this table
id_field field
|
1 first
1 second
1
This may have crossed the list a bazillion times, but I couldn't really find
anything appropriate in the archives... maybe I just didn't look hard enough.
In a MySQL app, I have the usual row of paging links at the bottom of the page
and need to pass to the next iteration more variables than I ca
is there a pre-defined variable that return present php file name...
for example...
url : www.domain.com/mypage.php
$var == "mypage";
thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Thank You Frank it worked but the FDF Toolkit seems to have a problem with
4.0.4p11 so I had to roll back to 4.0.3p11 and eveything seems to be running
ok.
Kurt
wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Kurt,
I fought with this same problem for about an hour today. For me
Well, I was trying to fix one bug, not introduce others. If you read the
documentation for get_meta_tags you will see that it returns an associative
array that is keyed by the value of the NAME attribute while the value is
the data within the CONTENT attribute.
If other members of the developers
[Sun, 11 Feb 2001] Sterling Hughes said:
>
> > elixer Sat Feb 10 18:38:40 2001 EDT
> >
> > Modified files:
> > /php4/ext/standard file.c file.h
> > Log:
> > Fix for bug #4556
> > # This is pretty much a total rewrite of get_meta_tags using a simple
> > # handwritten
hi
I realized that there are 2 ways to save data. Using mySQL or a textfile.
Which do you think is better? i like using myysql instead a textfile cuz
it's faster and it's securier.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comma
anyone try myphpPagetool?
it seems to be of the same camp.
regards,
jaxon
On 2/11/01 10:28 PM, "Kath" <[EMAIL PROTECTED]> wrote:
> Hell yes to phpmyadmin, IMHO.
>
> I use it on all my servers.
>
> - Kath
>
> - Original Message -
> From: "php php" <[EMAIL PROTECTED]>
> To: <[EMAIL PR
Hell yes to phpmyadmin, IMHO.
I use it on all my servers.
- Kath
- Original Message -
From: "php php" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 2:17 PM
Subject: [PHP] afraid !
> Hi!
> i've just joined ur mailing list!
> i used to work on asp with orac
Hello Niel,
On 08-Feb-01 10:12:15, you wrote:
>I'm looking for a way to have a "next 10 records" "previous 10 records" type
>of sinario, extracting records from a database. Now the only problem is that
>I want to do it in Interbase. I know mysql has a seek option and a method of
>only returning
my code...
WRITE TO FILE:
if ($item_file = fopen("$thisdir/item.dat", "w"))
{
fwrite($item_file, "$new_item\n$asin\n$description\namazon");
fclose($item_file);
echo "$new_item created";
}
READ FROM FILE:
$item_file = fopen("$thisdir/item.dat", "r");
fscanf(
Actually IIRC pushing open a door that's ajar is not breaking and
entering, but trespass :)
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
- Original Message -
From: "Jaso
> > Furthermore, Jonathan stated that he didn't "break into" your
> > system - you left phpMyAdmin *wide* open, which is frankly
> > asking for trouble. Imagine how much fun you'd have had if
> > someone with *malicious* intent had found it.
>
> --in the physical world, if a door is left unlocked
unsubscribe php-general
--
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, Jonathan stated that he didn't "break into" your
> system - you left phpMyAdmin *wide* open, which is frankly
> asking for trouble. Imagine how much fun you'd have had if
> someone with *malicious* intent had found it.
--in the physical world, if a door is left unlocked, even ajar
Hi ,
Does anyone know how to change user password in NIS using PHP?
Any help is appreciated.
Pls mail to my e-mail address.
Many thanks in advance.
Thanks and regards,
Karu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
look at the syntax for locking the tables.
Curtis
- Original Message -
From: "Christian Dechery" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 7:14 PM
Subject: [PHP] transactions
> Hi,
>
> I was reading mysql's manual, about transactions and all... and I di
> that will work, but I prefer
> Can I also write that like the following?
>
> if (!strcmp($pick1,$pick2))
> {
>perform some action;
> }
Thanks. That works for me.
Curtis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
aj Sun Feb 11 16:38:28 2001 EDT
Modified files:
/php4/pear CMD.php
Log:
Fixed indentation problems related to use of TAB instead of spaces
Index: php4/pear/CMD.php
diff -u php4/pear/CMD.php:1.1 php4/pear/CMD.php:1.2
--- php4/pear/CMD.php:1.1 Sun
Hi...
I am trying to install PHP 4.0.4pl1 on RedHat 6.2 with Apache 1.3.17
and MySQL 3.23.32
I already compiled MySQL and it works fine
Now I am trying to compile PHP, but the problem is that when I run
"make", nothing happends...
First, I have runned ./configure on the Apache source dir... an
Hi Guys,
I understand that as of version 3.24, MySQL will support subselects. But
untill then (because 3.23 is the latest stable release) I need to convert
this SQL satement into something that can be used with v3.2? - the version
just before the latest release.
$search = "SELECT count(search_ta
Hi Guys,
I understand that as of version 3.24, MySQL will support subselects. But
untill then (because 3.23 is the latest stable release) I need to convert
this SQL satement into something that can be used with v3.2? - the version
just before the latest release.
$search = "SELECT count(search_ta
On Mon, 12 Feb 2001 06:41, CDitty wrote:
> Hello all. I am trying to search through a text file on my server to
> replace the user email. I can open the file and read it, but cannot
> get it to "find" the actual string and replace it. Can someone look
> over my code and see what the problem is?
> Furthermore, below you stated I posted a URL. That URL was
> to a geocities.com site. That site has nothing to do with
> PHP and has nothing to do with my local computer. In fact,
> that geocities.com site only showed screenshots of what I
> had been working on. Obviously, it must have sp
Hello.
I need an explanation of this error message please.
This is the entire result of my upload of a jpg to a blob and I get the
open_basedir error on straight uploads also. Although they do get uploaded.
On this one I started from scratch with some 5 star directions and still flunk
out.
Jonathon,
I apologize for making a big deal out of this.
But to me, this is a big deal. I found your
actions very threatening. And even days later I
have actually lost sleep over it and been in a
relatively bad mood because of it.
Furthermore, below you stated I posted a URL.
That URL was t
I've got a real weird problem happening after building 4.0.4pl1 and mysql
3.23.32 on my test machine. I previously had 4.0.1 up and running with an
earlier version of mysql - I think it was 3.22.xx - and this combination
worked fine.
I *seem* to successfully connect to my mysql database... it's
Hi,
I was reading mysql's manual, about transactions and all... and I didn't
find what they said about 'atomic operations' being as safe as transactions.
I couldn't figure out HOW to update 5 tables at a time ENSURING that ALL
will be update or NONE. How can this be done without transactions? W
At 12:04 9/02/2001 -0600, Jeff Oien wrote:
>What does IDE stand for?
"Integrated Development Environment"
Usually means you have (at least ) an editor, compiler and debugger
all tightly integrated together into the one application.
-
Brian White
Step Two Designs Pty Lt
Can I also write that like the following?
if (strcmp($pick1,$pick2) == 0)
{
perform some action;
}
that will work, but I prefer
Can I also write that like the following?
if (!strcmp($pick1,$pick2))
{
perform some action;
}
Cheers
Phil
--
PHP General Mailing List (http://www.php.net
Lonnie,
Try something like this:
create a file called db_connection_params.inc - I do this maintainability :)
(change to match your specifics)
Here is a sample page with connection/query:
There are lot's of different ways to do this, check out the mysql functions:
http://www.php.net/manu
Hi,
Fifteen years ago I did lots of Informix SQL on Unix -- including transaction
processing -- BUT I find there isn't a lot of immediate help from that experience -- I
tried using some webmonkey examples as "basic training" for php with MySQL and got
nowhere.
I'm on Red Hat with Apache 1.3.9
aj Sun Feb 11 13:39:13 2001 EDT
Added files:
/php4/pear CMD.php
Log:
The Cmd:: class implements an abstraction for various ways
of executing commands (directly using the backtick operator,
as a background task after the script has terminated using
ack.
ignore me.
not enough coffee.
the 'while' was in the wrong place.
also dropped the array() in favor of array_name[] to ensure I keep it
associative.
$array = mysql_fetch_array($result, MYSQL_ASSOC);
while (list ($key,$value) = each($array))
{
$key ="~" . $key;
$tagged_arr
I'm making a script that generates test sites usíng dummy data stored in one
MySql database ("uwebsitebase")
Now, using php-scripting, I'm copying these data to a demo-database
("uwebdemo"). The structure is the same - the same tables with the same
fields. Only difference will be that the copied
does mysql auto_increment always has to be 1 by 1, can't I set it to go 10
by 10, or something like that?
and is there a way I can tell him to START (the first record) with a number
or do I have to put a bogus record or even alter it's value so the next
insertion is incremented from that...
__
Okay, I don't have it :)
This should be recreating a 3 row array of key:value pairs with a "~"
character prepended to each key, but is only echoing _one_ key:value pair -
anyone see why?
while($array = mysql_fetch_array($result, MYSQL_ASSOC))
{
list($key, $value) = each($array);
$key
rasmus Sun Feb 11 12:50:36 2001 EDT
Modified files:
/CVSROOTavail cvsusers gen_acl_file.m4
Log:
CVS account for David Guerizec
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.81 CVSROOT/avail:1.82
--- CVSROOT/avail:1.81 Sun Feb 11 05:31:20 2001
+++ CVSROO
Hello. I'll keep short. Does any of you guys out there know why
"imagecreatefromjpeg" cannot open remote files ? I have php-4.0.4pl1-Win32 with
default gd lib. All other gd-things work fine, and I DO have the access rights to the
file.
"thank you for your cooperation" :)
CT
Fortunes are being made online everyday! Now is your chance to become involved with
one of the most explosive Internet industries...Internet Gaming!
But wait there is much more...LIVE Webcast Lotto and Bingo, International Sports
Betting, and Virtual Stock Trading.
We are PLAYING GAMES, HAVING
That was the solution. It worked like a charm.
$cmpresult = strcmp($pick1,$pick2);
if $cmpresult == 0)
{
my code;
}
Can I also write that like the following?
if (strcmp($pick1,$pick2) == 0)
{
perform some action;
}
Will that work?
Curtis
- Original Message -
From: "Ph
Hello all. I am trying to search through a text file on my server to
replace the user email. I can open the file and read it, but cannot get it
to "find" the actual string and replace it. Can someone look over my code
and see what the problem is? I am afraid that ereg is not my strongest
p
Heaven forbid you use a command line. I wouldn't trade my *NIX prompt for
anything. Once you learn it you're set. MySQL's prompt is much like Oracle's
prompt and we all know Access has NO business anywhere near "enterprise"
software.
I'd recommend learning the command prompt (which an hour's re
magic_quotes_gpc always default to off in in php3, at least as far
as i've looked. the switch was added to configure.in in october 1997.
http://cvs.php.net/viewcvs.cgi/php3/configure.in.diff?r1=1.77&r2=1.78
php4 does have a different default, it was changed very early
in the php4 cycle.
http://
php-general Digest 11 Feb 2001 19:36:44 - Issue 506
Topics (messages 39109 through 39136):
imagecolorallocate / imagesetpixel / palette size?
39109 by: Dan Harrington
Re: mod_rewrite starts driving me crazy ...
39110 by: Richard Lynch
Re: Parsing XML
39111 by: Rich
From: "php php" <[EMAIL PROTECTED]>
Sent: Sunday, February 11, 2001 8:17 PM
> i'm afraid of using mysql with php cause i'm in hurry and that i
discovered
> that mysql interface is not as good and easy as of oracle and access! is
it
> true that if i want to insert data to a table i have to do it
In spite of yor best efforts here, PHP converts the string values to numbers (because
the strings look like numbers) before doing the comparison.
Force a string comparison by using strcmp and everything will work fine - remember
that strcmp returns true if the strings are not equal and false if
At 19:17 11/2/2001 +, you wrote:
>Hi!
>i've just joined ur mailing list!
>i used to work on asp with oracle and access!
>i'm working on windont NT but i want to publish my site at a provider that
>has linux? do i have to change my code for that ?
>do u know any provider that accepts acces and
Hi!
i've just joined ur mailing list!
i used to work on asp with oracle and access!
i'm working on windont NT but i want to publish my site at a provider that
has linux? do i have to change my code for that ?
do u know any provider that accepts acces and mysql with php4?
i'm afraid of using mysql
PLease... I need some help from u gurus on this.
I have a table of gas stations (and a whole lot other tables, for stuff
connected to them), and I have a table with 'assets' of each of these gas
stations (or other stuff)... so I have to make a form so when inserting the
user can select with of
Hello,
I'm having a rather strange problem. I'm trying to compare two values. "01" and
"1". The variables names that they are submitted under are pick1 and pick2. i use
the following code
$mypick1 = strval($pick1);
$mypick2 = strval($pick2);
I then perform the following comparison:
if
Having written loads of stuff in PHP, I find myself having for the first
time to generate binary data in memory - I actually need to build a native
file for a drawing program in memory. The data consists mainly of lists of
32bit little endian integers - some signed and some unsigned. I've started
On Sunday 11 February 2001 17:21, akio wrote:
> $thestring = "\"Hello everyone\" bye";
>
> What I want to extract is: Hello everyone. Instead I get: bye.
> I use this command
>
> ereg("([^\"\"]*)$",$thestring,$regs)
>
> and echo $regs[1].
>
> How can I extract what's within double quotes?
Hmm,
"Rich Puchalsky" <[EMAIL PROTECTED]> wrote in message
966dad$pkm$[EMAIL PROTECTED]">news:966dad$pkm$[EMAIL PROTECTED]...
> "Richard Lynch" <[EMAIL PROTECTED]> wrote:
> > http://php.net/setenv
>
> Thanks! But when I try this link, or the "Quick Ref" button on the PHP
home
> page, I can't find any
Hello everyone,
I have a string like
$thestring = "\"Hello everyone\" bye";
What I want to extract is: Hello everyone. Instead I get: bye.
I use this command
ereg("([^\"\"]*)$",$thestring,$regs)
and echo $regs[1].
How can I extract what's within double quotes?
TIA
Regards
--
PHP Gen
"Richard Lynch" <[EMAIL PROTECTED]> wrote:
> http://php.net/setenv
Thanks! But when I try this link, or the "Quick Ref" button on the PHP home
page, I can't find anything about setenv. And the manual doesn't have
anything about it under Program Execution Functions. Is it undocumented?
--
The problem seems to be solved.
Some suggestions didn't work, in my application at least, but what I found from
a combination of them was that I can eliminate the problem using a character
entity for the apostrophe. It prints a single quote but does not parse as a
single quote.
$text = (
Hi,
I've read through the archives and still must be missing something. I
need to execute a cgi script from php. This seems fairly trivial, but I
can't get it to work.
the cgi script is clean -- executes from the command line without issue
and is 755
from php the follwing is used:
chdir("../..
elixer Sun Feb 11 06:38:25 2001 EDT
Modified files:
/php4 NEWS
Log:
Added note about get_meta_tags bugfix
Index: php4/NEWS
diff -u php4/NEWS:1.586 php4/NEWS:1.587
--- php4/NEWS:1.586 Wed Feb 7 06:10:13 2001
+++ php4/NEWS Sun Feb 11 06:38:25 200
But how can I automate the saving locally of the file !!!
-Original Message-
From: Dave [mailto:[EMAIL PROTECTED]]
Sent: zondag 11 februari 2001 14:44
To: PHP Mailing Listl (E-mail)
Subject:RE: [PHP] XML Parsing The Sequel II
here is some logic, I'm sure you can flesh o
What I think you should do is to use php's build-in function addslashes()
It helps .
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Anna [mailto:[EMAIL PROTECTED]]
Sent: Sun
sorry, ignore that last
hit reply to the wrong friggin message (late night last night)
cheers,
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
here is some logic, I'm sure you can flesh out the code.
fopen -r the URL
read the results into a variable, fopen -w to write a local temp file
(if the parser you build actially requires a "file")
save it locally and pass the filename variable to your XML parser
function
if your parser can work
rasmus Sun Feb 11 05:31:21 2001 EDT
Modified files:
/CVSROOTavail gen_acl_file.m4
Log:
More karma for Emile
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.80 CVSROOT/avail:1.81
--- CVSROOT/avail:1.80 Sun Feb 11 01:43:27 2001
+++ CVSROOT/avail Sun F
here is some logic, I'm sure you can flesh out the code.
fopen -r the URL
read the results into a variable, fopen -w to write a local temp file
(if the parser you build actially requires a "file")
save it locally and pass the filename variable to your XML parser
function
if your parser can work
or ...
if(ereg("[[:alnum:]_ ]", $name))
result = 1;
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: zbynek [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 11, 2001 9
On Sunday 11 February 2001 13:09, zbynek wrote:
> I want to check if given username consists only of letters of English
> alphabet, numbers, or "_".
> Wouldn't it be simpler to use regular expressions? How would I do it?
if (preg_match ('/^\w+$/', $Username))
echo "'$Username' is ok";
e
Hi there!
I want to check if given username consists only of letters of English
alphabet, numbers, or "_".
I can go through the string and check every character.
Wouldn't it be simpler to use regular expressions? How would I do it?
These usernames are OK: _john_, 0123bla, foo
These are wrong: x#
Hi, does someone know some class/script for setup a code repositery?
I have tried to find it on hotscripts.com or php.resourceindex.com but I
have not find nothing.
Tnx in advance.
--
Il tuo programma più importante prende più memoria di quella che hai.
Se hai abbastanza memoria, non hai abba
Ok, yesterday I had problems parsing an XML from Nasdaq.
Thx to Matt these problems have been solved and I am know able to parse any
XML without problems (I hope).
But I have one question:
In order to parse an XML you have to tell your parser where to find the
document:
$xml_file = ''test.xml';
rasmus Sun Feb 11 01:43:28 2001 EDT
Modified files:
/CVSROOTavail cvsusers gen_acl_file.m4
Log:
CVS account for Emiliano Heyns (Midgard Project)
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.79 CVSROOT/avail:1.80
--- CVSROOT/avail:1.79 Fri Feb 9 03:42:
Hrm.. When was this changed in PHP 3? It used to be on by default. And
it is on by default in PHP 4.
-Rasmus
On Sat, 10 Feb 2001, Jim Winstead wrote:
> jimw Sat Feb 10 11:43:58 2001 EDT
>
> Modified files:
> /php3 php3.ini-dist
> Log:
> we claim php3.ini documents the
> elixer Sat Feb 10 18:38:40 2001 EDT
>
> Modified files:
> /php4/ext/standard file.c file.h
> Log:
> Fix for bug #4556
> # This is pretty much a total rewrite of get_meta_tags using a simple
> # handwritten tokenizer. It might be overkill, but it works.
I'd say th
> I'm trying to use passthru in a PHP program to have an external program
> display some data. The problem is that I was trying to have the external
> program's environment pick up the form field variables automatically
passed
> into the PHP program as shell environment variables.
>
> In other wo
> I have some code which generates a large string to be used by the mail()
> function. At the same point in the string each time, PHP stops processing
> "\n" correctly and instead of a newline outputs nothing, so the text
starts to
> get run together.. but it doesn't seem to happen on every "\n".
> I want to parse an XML from nasdaq, but I allways get a blank page when
> doing so.
You're gonna have to provide more info than that...
> I also get the notice: undefined index when parsing. What does this mean?
If error_reporting is set to include E_NOTICE, and if you attempt to access
an a
> This works perfectly, however what I really need to do is to make it work
> not only with /index.html but with everything typed in your browser...
> (index.html was only a test to let me know I am in a right direction)
>
> I tried:
>
> RewriteRule ^(.*) /start.php?go=$1
> RewriteRule ^(.*)$
Here is something weird going on. Why is it that imagecolorallocate dies
after 256 colors have been allocated? Note, this doesn't matter if
you write a jpg or png, it all produces the same result (see attached
graphic).
Yes, the colors are randomly made, and they all go in a straight, diagonal
86 matches
Mail list logo