|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Mon Feb 12 2001 - 13:58:27 CST
php-general Digest 12 Feb 2001 19:58:27 -0000 Issue 508
Topics (messages 39182 through 39254):
Can anyone help me on nntp ?
39182 by: James Hsieh
39185 by: Ankur Verma
Re: "wide open"
39183 by: Rick Hodger
39197 by: Carsten Gehling
39214 by: Dan Harrington
Re: passthru environment variables
39184 by: Tim Ward
39222 by: Rich Puchalsky
Re: comparisons
39186 by: PHPBeginner.com
Re: afraid !
39187 by: PHPBeginner.com
39189 by: PHPBeginner.com
Re: Search & replace text
39188 by: PHPBeginner.com
Re: To The Hacker: CodeBoy
39190 by: PHPBeginner.com
39225 by: Philip Olson
Re: way to save data
39191 by: PHPBeginner.com
Re: checking for presnet file name
39192 by: PHPBeginner.com
Re: unsubscribe php-general
39193 by: PHPBeginner.com
Re: Preserve variables between page loads?
39194 by: PHPBeginner.com
Re: column into array?
39195 by: Tim Ward
Re: A way to duplicate data across databases
39196 by: Tim Ward
COM vs ???
39198 by: Ghislain Bruyere
Apache/mod_rewrite for User Tracking
39199 by: jdwright.mmm.com
Run a script for 20minutes
39200 by: Martin E. Koss
39201 by: Dominick Vansevenant
39203 by: Martin E. Koss
39206 by: Andy Woolley
39207 by: Carsten Gehling
39212 by: Charlie Llewellin
money maths
39202 by: Michael Hall
39204 by: Martin E. Koss
39205 by: Michael Hall
ssl
39208 by: andreas \(.work\)
Newbie dummy questions..... error messages
39209 by: Brian V Bonini
Re: XML Parsing The Sequel II
39210 by: Dave
39248 by: Steve Haemelinck
39253 by: Steve Haemelinck
Re: fscanf problem
39211 by: John Vanderbeck
Capturing Emails
39213 by: Website4S.aol.com
39220 by: jason cox
39251 by: Jamie Alessio
header() in apache/CGI mode PHP
39215 by: Aaron Held
39242 by: PHPBeginner.com
Cannot get PHP w/GD to compile with Apache on RH
39216 by: Greg Kopp
39219 by: jason cox
Re: [PHP-INST] Cannot get PHP w/GD to compile with Apache on RH
39217 by: Rasmus Lerdorf
PHP BOF in Stockholm
39218 by: Rasmus Lerdorf
Problem with enctype=multipart/form-data forms
39221 by: System Administrator
Time in php problem....
39223 by: Ng Kok Chun
39227 by: Dave VanAuken
39243 by: PHPBeginner.com
39249 by: Web master
MySQL fields
39224 by: Brandon Orther
39226 by: Christopher Allen
39245 by: PHPBeginner.com
Include files
39228 by: Conover, Ryan
39240 by: Alexander Wagner
39246 by: PHPBeginner.com
character problem
39229 by: John P. Donaldson
39230 by: Dave VanAuken
39236 by: Philip Olson
MySQL
39231 by: Brandon Orther
39235 by: Brandon Orther
39237 by: Philip Olson
What Does This Mean?
39232 by: Ben Ocean
Regex help needed...
39233 by: Jesse Swensen
39244 by: Jason Stechschulte
39247 by: PHPBeginner.com
Re: imagecolorallocate / imagesetpixel / palette size?
39234 by: Matt McClanahan
39239 by: Dan Harrington
39241 by: Brian V Bonini
Here you have, ;o)
39238 by: ajay arora
How to send email
39250 by: Emmanuel Halphen
incorrct behavior w/ persistent connection
39252 by: Michael George
curl - USERPWD
39254 by: Benji Spencer
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
Hi!
I want to know if I want to post a message to some newsgroup, is there any
sample or function available ?
Can you kindly point out where should I go or maybe give me an example for
this ?
Thanks.
James
attached mail follows:
I guess there is a NNTP class avaailable at
http://phpclasses.upperdesign.com/
regards
Ankur Verma
HCL Technologies
A1CD, Sec -16
Noida, UP
India
----- Original Message -----
From: "James Hsieh" <james
080.net>
To: <php-general
lists.php.net>
Sent: Monday, February 12, 2001 1:53 PM
Subject: [PHP] Can anyone help me on nntp ?
> Hi!
> I want to know if I want to post a message to some newsgroup, is there any
> sample or function available ?
> Can you kindly point out where should I go or maybe give me an example for
> this ?
>
> Thanks.
>
> James
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Dan Harrington <dan
tudan.net> wrote in message
news:Pine.BSF.4.21.0102111934370.84700-100000
tudan.net...
>
> > 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 a couple
> inches, the physical act of pushing the door open so that one can enter
> the door is defined as "breaking and entering".
>
> "Harmlessly" pushing an unlocked door open, and walking in and writing on
> a whiteboard "Gangstaboy was here" is just as much of a crime as
> unauthorizedly logging into a machine, no matter how "wide open" it is,
> even if "harm" is not done.
I will freely admit I have seen and peeked into "wide open" websites in the
past, either through server misconfiguration or faulty scripts. But I have
never gone much further than maybe figuring out what was wrong and sending
an email to the owner. Most people are pretty receptive if you just send
them a kindly worded email.
-- Rick Hodger
attached mail follows:
From: "Jason Murray" <Jason.Murray
melbourneit.com.au>
Sent: Monday, February 12, 2001 3:44 AM
> My *point* was that he should be glad that all he did was add an entry > to the database instead of deleting every damn table in there, hence > the bit about "someone with *malicious* intent".
I disagree. If Codeboy had sent him an email describing what was wrong, instead of this "Killroy was here" stuff, rswfire *maybe* should be glad.
An intruder leaving small traces shoving that he's been inside your system, is IMHO not something to be glad about or grateful for. I know that is the general consensus, a sort of "pride between hackers": Show that you were there but do no other harm. But it's bull. They're not heros, they're every bit as criminal as the rest.
Sorry for the harsh tone but this subject is really one that upsets me.
- Carsten ~~~~~~~~~~~~~~~~
attached mail follows:
> > "Harmlessly" pushing an unlocked door open, and walking in and writing on > > a whiteboard "Gangstaboy was here" is just as much of a crime as > > unauthorizedly logging into a machine, no matter how "wide open" it is, > > even if "harm" is not done. > > I will freely admit I have seen and peeked into "wide open" websites in the > past, either through server misconfiguration or faulty scripts. But I have > never gone much further than maybe figuring out what was wrong and sending > an email to the owner. Most people are pretty receptive if you just send > them a kindly worded email.
I agree
attached mail follows:
fpassthru doesn't include the code in your php code. In just dumps the file to output as it runs. Anything defined in PHP (inluding variables and functions) in the file passed through will not be available to the calling program. You need include();
Tim Ward Senior Systems Engineer
Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Rich Puchalsky [mailto:rpuchalsky1
mediaone.net]
> Sent: 11 February 2001 05:52
> To: php-general
lists.php.net
> Subject: [PHP] passthru environment variables
>
>
> 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 words, if a user typed "Smith" into the last_name
> field in a form,
> the PHP program called by that form starts out with
> $last_name = "Smith",
> and I would like the external program called by passthru
> within the PHP
> program to have a shell environment variable last_name = "Smith".
>
> Does anyone know an easy way to do this?
>
>
>
>
>
attached mail follows:
Tim Ward <tim.ward
stivesdirect.com> wrote:
> fpassthru doesn't include the code in your php code. In just dumps the
file
> to output as it runs.
I was using the command "passthru", which is supposed to pass the *output* of an external program through to standard out. In other words, let's say I wanted people to be able to see how long my system was up, I could have a PHP program display other information and then call the Linux command "uptime" and pass the result to the user's browser. For the application that I'm working on, I need to use "passthru" (or possibly "system") rather than having a line or two of output passed back to the PHP program because the external program I'm using will produce up to hundreds of pages of output.
>Anything defined in PHP (inluding variables and > functions) in the file passed through will not be available to the calling > program.
I want the variables in the PHP program to be available to the external program through the shell environment of the forked external program.
attached mail follows:
try this first:
if((strlen($pick1)==strlen(pick2))and($pick1==$pick2)) echo 'they are equal'; else echo 'they aren\'t at least in length';
However, it seens to me as a very slicky style ... whay not to make them somehow different .... let's say using an array, or having a letter instead of 0 ...
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Curtis Maurand [mailto:curtis
canon.maurand.com]
Sent: Monday, February 12, 2001 3:48 AM
To: php-general
lists.php.net
Subject: [PHP] comparisons
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 ($mypick1 == $mypick2) { $error = 1; $errorstring[1] = "Your first pick and second pick are the same."; }
However, I get the error that they are equal.
If I call the comparison as foloows:
if(strval($mypick1) == strval($mypick2) { $error = 1; $errorstring[1] = "Your first pick and second pick are the same."; }
I still get the error. Anyone have any ideas? These two valuse mustbe evaluated as different.
Thanks in advance Curtis
attached mail follows:
Yes, or you can use a software written in PHP such as phpMyAdmin (search google) that will be easier , and online..
mySQL is good enough, and believe me, easier then Oracle.
the perfect couple (and our best friends) are: Linux, Apache, PHP, mySQL ... this is how most of us live.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: php php [mailto:php_kk
hotmail.com]
Sent: Monday, February 12, 2001 4:18 AM
To: php-general
lists.php.net
Subject: [PHP] afraid !
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 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 from the commend line? Thanks a lot _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
and BTW:
get yourself a non-2MB-limited email address... hotmail will stop working for you within approximately .....hmm .... 1 week?
there are 5.000 subscribers to this list and it's volume often get's to few hundreds emails a day.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: php php [mailto:php_kk
hotmail.com]
Sent: Monday, February 12, 2001 4:18 AM
To: php-general
lists.php.net
Subject: [PHP] afraid !
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 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 from the commend line? Thanks a lot _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
instead of writing to you the code I'll give you an idea:
1. you open the file and read it line-by-line assigning it to an array, 2. you loop that array parsing it line by line changing it's values with RegEx the way you want. 3. you open the same file and, looping the array writing it down overriding any existing data in the file.
You are now set.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: CDitty [mailto:mail
redhotsweeps.com]
Sent: Monday, February 12, 2001 5:12 AM
To: php-general
lists.php.net
Subject: [PHP] Search & replace text
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 point.
Also, at what point should I start writing the file out? Wouldn't there be a permissions error if I was reading and writing at the same time?
Thanks CDitty
$oldemail = "email1
mydomain.com";
$newemail = "email2
mydomain.com";
$user = "cditty";
$file = fopen("/path/to/the/user/file/$user.dat", "r");
if(!$file){
echo "<p>Unable to open remote file.\n";
exit;
}else{
echo "Success<br>";
}
while (!feof($file)) {
$line = fgets($file, 255);
if(eregi($oldemail, $line, $out)) {
str_replace($oldemail, $newemail, $line);
}
echo $line . "<BR>"; } fclose($file)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I agree with Jason,
Are you guys nuts? He was just trying to be cool, and in order to be cool he needed to mention: THAT WAS ME!!!
He's not a hacker (hey, no offence Jonathon) ... a real hacker will never post any threaten message on a 5000 users mailing list. A beginner(amateur) hacker however will.
Don't worry about him Phillip. And you Jonathon erase all these files and contact Phillip *personally* telling him more what his security wholes are, so he'll be grateful to you.
Just came to my mind: my Hacking story:
I once had a website which was some sort of search engine. The users were submitting their sites and we were validating for credibility. (no fancy homepages ect....)
One guy submitted a site which when I was validating gave a JavaScript alert. That alert had a button which when you click calls other alert and so on ... my explorer had frozen (on my old win98 1-ed), and I had to reboot my PC completely losing all unsaved data.... lots of it... of a project I was working for a while...
Man, I got mad.
I started my PC again, went to the validation section of my site and, looked at the password he inputted during the submission of his site. Guess what? It matched the password he had on his angelfire site!!!
I f***ng moved all he got up there in folder called :"Do_not_do_this_anymore"!
.....uff..... what e relieve....
I never contacted him of course, but I wasn't even a hacker.
my sweet story .... "god I love to tell'em"
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Jason Murray [mailto:Jason.Murray
melbourneit.com.au]
Sent: Monday, February 12, 2001 9:11 AM
To: 'rswfire'; Jonathan Sharp
Cc: php-general
lists.php.net
Subject: RE: [PHP] To The Hacker: CodeBoy
> 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 sparked your > interest because you went to work on finding out my IP > Address so that you could break into my system.
One would probably guess the URL of the site you were working on was in the screenshots. You don't need to "find" an IP address at that point.
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.
And lastly ... if he was *really* going to do anything, would he really be so stupid as to leave his commonly-known pseudonym, which can be (as you proved) easily traced back to himself?
I think this whole issue has been blown out of proportion enough on the list now, and as it's no longer a PHP-related discussion I suggest you move it to private mail.
And, try some valium for loss of sleep. :)
Jason
-- Jason Murray jasonmmelbourneit.com.au Web Design Team, Melbourne IT Fetch the comfy chair!
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
> Don't worry about him Phillip. And you Jonathon erase all these files and > contact Phillip *personally* telling him more what his security wholes are, > so he'll be grateful to you.
Just to clear things up, my only comments mentioned that this is silly and calling someone a "hacker" publically is very bad, whether it's true or false it's still very very bad. I wasn't the crackee or cracker. So, regarding the above : s/Phillip/rswfire/g
No biggy ... this whole ordeal seems over.
Regards,
Philip
attached mail follows:
then you are on the right way:
use SQL languages. They are fast, secure and reliable. Plus even easier to play with.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: McShen [mailto:webmaster
celebritieszones.com]
Sent: Monday, February 12, 2001 12:46 PM
To: php-general
lists.php.net
Subject: [PHP] way to save data
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
$PHP_SELF will give you the file name rlative to your Document Root
http://www.php.net/manual/language.variables.predefined.php
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: John LYC [mailto:john
edlabs.com]
Sent: Monday, February 12, 2001 2:23 PM
To: PHP List
Subject: [PHP] checking for presnet file name
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: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
nope .... you have to write it here: php-general-unsubscribe
lists.php.net
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: John McKown [mailto:joarmc
swbell.net]
Sent: Monday, February 12, 2001 11:40 AM
To: php-general
lists.php.net
Subject: [PHP] unsubscribe php-general
unsubscribe php-general
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: For additional commands, e-mail: php-general-helplists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Why don't you use sessions?
php.net/sessions
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Chuck Mayo [mailto:res035gp
gte.net]
Sent: Monday, February 12, 2001 2:24 PM
To: php-general
lists.php.net
Subject: [PHP] Preserve variables between page loads?
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 can comfortably url-encode in the hyperlink. If all these paging links were submit buttons I could pass anything I wanted in hidden form fields, but since they're hyperlinks I don't seem to have that option.
Is there a way to selectively preserve variables between iterations? Something like variables that are global to PHP, as opposed to being global within the script?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
if ($result = mysql_db_query($database, $sql, $link_id);) { while ($thisrow = mysql_fetch_array($result)) { $array[] = $thisrow("field"); }; };
... or something like that
Tim Ward Senior Systems Engineer
Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: andrew [mailto:andrew
salamander.net]
> Sent: 12 February 2001 05:52
> To: PHP General
> Subject: help: column into array?
>
>
> 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 third
> 2 fourth
> 2 fifth
>
> how can I do something like this:
>
> $array=mysql_db_query($database, $sql, $link_id);
>
> echo array[0]; //I want this to print "first"
> echo array[1]; //I want this to print "second"
>
> I know mysql_fetch_array pulls a ROW into an array, but in
> this case the row
> is only one item wide, so I essentially want column results
> in an indexed
> array.
>
> TIA!
> andrew
>
>
>
attached mail follows:
you should be able to query the structure of the database in php/mysql. this should then give you everything you need to build your create table statement dynamically so you can build a black-box function that takes source and target databases and table name. You can proably find the tables in a database so your function becomes one call database copier.
Tim Ward Senior Systems Engineer
Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Carsten Gehling [mailto:carsten
sarum.dk]
> Sent: 11 February 2001 21:22
> To: php-general
lists.php.net
> Subject: A way to duplicate data across databases
>
>
> 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 data should
> get new primary
> keys which are auto-incremented. No problem there.
>
> However, the process is tedious. I have tables that contains
> some 30 fields
> and it's just a bore selecting all fields from one table, and
> then writing a
> complete insert statement with all the fields except the PK.
>
> Is there an easier way? Remember 1) It's PHP 2) It's across databases.
>
> I have to script it, since I need the new keys on other places.
>
> - Carsten
>
>
>
attached mail follows:
Hello,
I would like make some componnent on linux wich I can use on php. Like I create a COM object on Windows and use it with a asp pages and reuse it in a vb application without code duplicate,.... I would like install PHP on a linux and not on a Windows.
Thanks
Have a nice day
Ghislain
attached mail follows:
I'm not sure how off-topic this may be, but I'll carry on anyway...
I wan't to create a user tracking system on the web site, that I can use in PHP. I've had a look at mod_rewrite, and would like to implemet something like the following:
I have a few scripts, say 'home', 'search', 'help', etc. and all are force mapped onto PHP 4. If someone calls this scripts (without entering the site through the front door), then they are sent back, set a user tracking value, and sent back to the page. Before now, I have cookies and IP address for user tracking. If someone could accept a cookie (I used a self-referring script to check) then they are given a cookie, and they can be tracked. They can also be tracked over many visits with a cookie.
If they don't then I make a note of their IP address, and their address is used. With IP addresses, you can't record return visits, so it just tracks one visit. With some ISP's they seam to use variying IP addresses, so then each page checked for a valid user, they didn't find one, and forwarded then back to 'index' to set a user session, and come back. But they seamed (to the server/PHP) to have different IP's over these steps, and the visitor was locked into a HTTP Redirect cycle (until the broswer stop with a fail).
What I would like to do now is track the user with the URL. When someone calls the site, (ether through the front door, or sent back to get an ID), they are given an ID like so: 'KjsiHdbEyu8G645Dus96Sy54GD'. They are then sent to say, http://localhost/KjsiHdbEyu8G645Dus96Sy54GD/home.
Using mod_rewrite, I can then get the tracking var (KjsiHdbEyu8G645Dus96Sy54GD), and rewrite the URL to http://localhost/home, and call the script. I know this is possible. Something like /^\/([a-zA-Z0-9]{80})\/(.*)/$1?$2/ could work for the rewrite rule, but rather than use $HTTP_SERVER_VARS["QUERY_STRING"] to get the var, as I use a GET vars for some functions, could I get a var which is sent to Apache, and then PHP accesses the var from there, and the rest is as normal?
That's what I would prefer to do, but I'm not sure if it's possible (and explained it well enough). If I had to do something like /^\/([a-zA-Z0-9]{80})\/(.*)/$1?$2/ I would just have to develop to that instead. Failing that, any suggestions?
Thanks in advance..
Jonathan Wright.. Webmaster http://www.kjtoombs.co.uk/ (http://www.kjtoombs.co.uk/home)
attached mail follows:
Hi, I have PHP3 and MySQL on Win98 and am trying to run a script that loops through a file making process and it needs about 20 - 30 minutes to run. It generates static HTML files based on content in a database. I've increased Internet Explorer's timeout to allow for this but for some reason only about half the processing is done before everything seems to just stop.
Does anyone know of a very basic way of executing a PHP script on a Win98 machine without the need for a browser? Or, another way of running this script that will take some time and create some 22,000 files through the process.
Thanks,
Martin.
attached mail follows:
I think there are timeouts on php as well:
This is taken from the php.ini file.
max_execution_time = 30 ; Maximum execution time of each script, in seconds
I hope this helps you, you can find php.ini in your windows directory.
If you are using a database, also check that for timeouts.
D.
-----Original Message-----
From: Martin E. Koss [mailto:mek
mek.co.uk]
Sent: maandag 12 februari 2001 12:51
To: php-windows
lists.php.net; php-general
lists.php.net
Subject: [PHP] Run a script for 20minutes
Hi, I have PHP3 and MySQL on Win98 and am trying to run a script that loops through a file making process and it needs about 20 - 30 minutes to run. It generates static HTML files based on content in a database. I've increased Internet Explorer's timeout to allow for this but for some reason only about half the processing is done before everything seems to just stop.
Does anyone know of a very basic way of executing a PHP script on a Win98 machine without the need for a browser? Or, another way of running this script that will take some time and create some 22,000 files through the process.
Thanks,
Martin.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I'm using a mySQL database but to be honest I think the only thing that was timing out was the browser, since hacking the registry to eliminate that timeout the only thing I can do is wonder why it only finishes half what it is supposed to do.
I'll try it on a faster machine later - it's on a AMD K6-2/366 with 128mb ram. I have a Athlon 900 that I could run it on but that's not a machine I want to tinker too much with - will go for a trusty old 450 first.
Is it a surprise that it might take up to 20 or 30 minutes to build over 20,000 simple HTML files?
Martin.
-----Original Message-----
From: Dominick Vansevenant [mailto:dv
mobyus.com]
Sent: 12 February 2001 11:54
To: Martin E. Koss; php-windows
lists.php.net; php-general
lists.php.net
Subject: RE: [PHP] Run a script for 20minutes
I think there are timeouts on php as well:
This is taken from the php.ini file.
max_execution_time = 30 ; Maximum execution time of each script, in seconds
I hope this helps you, you can find php.ini in your windows directory.
If you are using a database, also check that for timeouts.
D.
-----Original Message-----
From: Martin E. Koss [mailto:mek
mek.co.uk]
Sent: maandag 12 februari 2001 12:51
To: php-windows
lists.php.net; php-general
lists.php.net
Subject: [PHP] Run a script for 20minutes
Hi, I have PHP3 and MySQL on Win98 and am trying to run a script that loops through a file making process and it needs about 20 - 30 minutes to run. It generates static HTML files based on content in a database. I've increased Internet Explorer's timeout to allow for this but for some reason only about half the processing is done before everything seems to just stop.
Does anyone know of a very basic way of executing a PHP script on a Win98 machine without the need for a browser? Or, another way of running this script that will take some time and create some 22,000 files through the process.
Thanks,
Martin.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Something doesn't seem right here.
I've executed scripts that have taken 4 hours to complete in the past and the only thing I had to set was:
set_time_limit(0);
Are you echoing anything to the screen, if not maybe you should after every loop increment, you may also need to use the flush() command.
Hope this helps.
Andy Woolley www.databasewatch.com
----- Original Message -----
From: "Martin E. Koss" <mek
mek.co.uk>
To: "Dominick Vansevenant" <dv
mobyus.com>; <php-windows
lists.php.net>;
<php-general
lists.php.net>
Sent: Monday, February 12, 2001 12:08 PM
Subject: RE: [PHP] Run a script for 20minutes
> I'm using a mySQL database but to be honest I think the only thing that
was
> timing out was the browser, since hacking the registry to eliminate that
> timeout the only thing I can do is wonder why it only finishes half what
it
> is supposed to do.
>
> I'll try it on a faster machine later - it's on a AMD K6-2/366 with 128mb
> ram. I have a Athlon 900 that I could run it on but that's not a machine I
> want to tinker too much with - will go for a trusty old 450 first.
>
> Is it a surprise that it might take up to 20 or 30 minutes to build over
> 20,000 simple HTML files?
>
> Martin.
>
> -----Original Message-----
> From: Dominick Vansevenant [mailto:dv
mobyus.com]
> Sent: 12 February 2001 11:54
> To: Martin E. Koss; php-windows
lists.php.net; php-general
lists.php.net
> Subject: RE: [PHP] Run a script for 20minutes
>
>
> I think there are timeouts on php as well:
>
> This is taken from the php.ini file.
>
> max_execution_time = 30 ; Maximum execution time of each script, in
> seconds
>
> I hope this helps you, you can find php.ini in your windows directory.
>
> If you are using a database, also check that for timeouts.
>
> D.
>
> -----Original Message-----
> From: Martin E. Koss [mailto:mek
mek.co.uk]
> Sent: maandag 12 februari 2001 12:51
> To: php-windows
lists.php.net; php-general
lists.php.net
> Subject: [PHP] Run a script for 20minutes
>
>
> Hi,
> I have PHP3 and MySQL on Win98 and am trying to run a script that loops
> through a file making process and it needs about 20 - 30 minutes to run.
It
> generates static HTML files based on content in a database. I've increased
> Internet Explorer's timeout to allow for this but for some reason only
about
> half the processing is done before everything seems to just stop.
>
> Does anyone know of a very basic way of executing a PHP script on a Win98
> machine without the need for a browser? Or, another way of running this
> script that will take some time and create some 22,000 files through the
> process.
>
> Thanks,
>
> Martin.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
From: "Martin E. Koss" <mek
mek.co.uk>
Sent: Monday, February 12, 2001 1:08 PM
> Is it a surprise that it might take up to 20 or 30 minutes to build over > 20,000 simple HTML files?
Maybe you shouldn't run your script through the browser. To me it sounds like you're doing a one-time process that dosen't really send any output back to the browser. Instead it saves all the generates html-files on disk, right?
Try running:
php.exe <your script's name here>
or
php.exe /q <your script's name here>
to avoid the standard php-headers
- Carsten ~~~~~~~~~~~~~~~~
attached mail follows:
If you don't want to run the script from the command line you can use ignore_user_abort with set_time_limit(?) in the script to allow you to close the browser and let it do its thing.
> I have PHP3 and MySQL on Win98 and am trying to run a script that loops > through a file making process and it needs about 20 - 30 minutes to run. It > generates static HTML files based on content in a database. I've increased > Internet Explorer's timeout to allow for this but for some reason only about > half the processing is done before everything seems to just stop. > > Does anyone know of a very basic way of executing a PHP script on a Win98 > machine without the need for a browser? Or, another way of running this > script that will take some time and create some 22,000 files through the > process. > >
attached mail follows:
I'm building a demo shopping cart and have sorted out most things but this:
I have php work out subtotals by multiplying $quantity * $price ... this works fine except that 14.95 * 2 comes out as 29.9 not 29.90. In other words, how to add a zero so that there are always two decimal places. Any solution to this, including regex? I can't find anything among the maths functions.
Thanks
Mick
attached mail follows:
Try the number_format example: $Price = number_format($BasePrice,2);
Martin.
-----Original Message-----
From: Michael Hall [mailto:lists
mulga.com.au]
Sent: 12 February 2001 10:35
To: PHP List
Subject: [PHP] money maths
I'm building a demo shopping cart and have sorted out most things but this:
I have php work out subtotals by multiplying $quantity * $price ... this works fine except that 14.95 * 2 comes out as 29.9 not 29.90. In other words, how to add a zero so that there are always two decimal places. Any solution to this, including regex? I can't find anything among the maths functions.
Thanks
Mick
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Brilliant! Once again this list proves to be one of the wonders of the world. Problem solved in 10 minutes or less. Thanks again.
On Mon, 12 Feb 2001, Martin E. Koss wrote:
> Try the number_format
> example:
> $Price = number_format($BasePrice,2);
>
> Martin.
>
> -----Original Message-----
> From: Michael Hall [mailto:lists
mulga.com.au]
> Sent: 12 February 2001 10:35
> To: PHP List
> Subject: [PHP] money maths
>
>
>
> I'm building a demo shopping cart and have sorted out most things but
> this:
>
> I have php work out subtotals by multiplying $quantity * $price ... this
> works fine except that 14.95 * 2 comes out as 29.9 not 29.90. In other
> words, how to add a zero so that there are always two decimal places. Any
> solution to this, including regex? I can't find anything among
> the maths functions.
>
> Thanks
>
> Mick
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
hi all,
is there anything we should be aware of if we like that our php/mysql pages are working with an ssl-server ?
thank you
andre
attached mail follows:
I get the following on one of my pages,
Warning: Use of undefined constant month - assumed 'month' in /usr/local/etc/httpd/vhosts/eastcoastbicycles.com/htdocs/index.php on line 121
Warning: Use of undefined constant mday - assumed 'mday' in /usr/local/etc/httpd/vhosts/eastcoastbicycles.com/htdocs/index.php on line 122
Warning: Use of undefined constant year - assumed 'year' in /usr/local/etc/httpd/vhosts/eastcoastbicycles.com/htdocs/index.php on line 123
and the offending lines are;
$month = $today[month]; $mday = $today[mday]; $year = $today[year];
So I change them to;
$month = $today['month']; $mday = $today['mday']; $year = $today['year'];
and the problem goes away... simple enough I suppose but what baffles me is.....
This site ran error free before, only after adding "Phorum" (anyone familiar with it?) do the original pages start to return these errors. Even more strange is they only return these error if one of the "phorum" pages is the referring page.....
I was also getting a lot of stuff like 'undefined variable' when doing;
if ($brand == 'nut') { $item = "Chris King 2nut Headset"; }
So I changed it to;
if (isset($brand)) { if ($brand == 'nut') { $item = "Chris King 2nut Headset"; } }
and it's fine, but again, I'd only get the error if one of the "phorum" pages was the referring page.....
Any thoughts/insight, anyone?
BSDI BSD/OS 4.0.1 PHP Version 4.0B2 Zend Engine v0.90
-Brian ************
attached mail follows:
here is come code (not exactly what you need) that sends an XML file(variable) to an XML server, and then gets the XML response from the server and writes it out to a file, returning the filename as the function return for the php file to resume its processing of the file in the XML parser (yet another function)
Tried to cut out totally irrelavent or site specific stuff, and added a few quick comments. Hopefuly you can follow the logic.
Dave
#### in main PHP file #### <? include("./Shipping/shipping.php"); include("./Shipping/shipping2.php"); # process variables and submit = outputs to file, get file name $xmlFile = ShippingQuote($variables,$to,$pass,$to,$function); # process file $xmlOutput = ShippingParse($xmlFile); ?>
#### in ./shipping/shipping.php #### <? function ShippingQuote($variables,$to,$pass,$to,$function) { #use database and variables to format and send XML document $sockPointer = fsockopen("123.456.789.0",50000, &$errNo, &$errStr, 30); if (!$sockPointer) { echo "$errStr ($errNo)<br>\n"; } else { $xmlTransmit="<?xml version=\"1.0\" ?>\n # assembing and formatting the XML document for transmission \n"; fputs ($sockPointer, $xmlTransmit); # # get the response from the server # while (!feof($sockPointer)) { $socketResponse=fgets($sockPointer,4096); $xmlResponse="$xmlResponse".$socketResponse; } fclose($sockPointer); } # # here is the stuff you were really interested in # # get a timestamp to save the temp file as $xmlFile=time(); # create the temp file $xmlFile="./shipping/".$xmlFile.".xml"; $xfp=fopen($xmlFile,"w"); # write the temp file from the response variable fwrite($xfp,$xmlResponse); fclose($xfp); # return the temp filename for the parser to process return $xmlFile; }
#### in ./shipping/shipping2.php ####
<?
function ShippingParse($xmlFile) {
# Do your parsing
# clean up the temp file
system("rm $xmlFile");
# dump reformatted XML > HTML file out of the function
return $returnShipTable;
}
?>
-----Original Message-----
From: Steve Haemelinck [mailto:steve.haemelinck
pandora.be]
Sent: Sunday, February 11, 2001 9:12 AM
To: 'Dave'
Cc: PHP Mailing Listl (E-mail)
Subject: RE: [PHP] XML Parsing The Sequel II
But how can I automate the saving locally of the file !!!
-----Original Message-----
From: Dave [mailto:dave
hawk-systems.com]
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 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 from a variable, then just pass the read variable to your parser.
Dave <clipped>
attached mail follows:
-----Original Message-----
From: Steve Haemelinck [mailto:steve.haemelinck
pandora.be]
Sent: zondag 11 februari 2001 11:13
To: PHP Mailing Listl (E-mail)
Subject: [PHP] XML Parsing The Sequel II
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';
This works perfectly, but If you want to get the XML files from Nasdaq you have to say
$xml_file = http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=NETA;
This however doe not work !!!
Why? How can I overcome this problem?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I think I found the problem.
Because I am behind a proxy I can not connect to http://quotes.nasdaq.com. And get the data !!!
-----Original Message-----
From: Steve Haemelinck [mailto:steve.haemelinck
pandora.be]
Sent: zondag 11 februari 2001 11:13
To: PHP Mailing Listl (E-mail)
Subject: [PHP] XML Parsing The Sequel II
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';
This works perfectly, but If you want to get the XML files from Nasdaq you have to say
$xml_file = http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=NETA;
This however doe not work !!!
Why? How can I overcome this problem?
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Hmm..noone has any ideas on this one? Its really driving me crazy
- John Vanderbeck - Admin, GameDesign
----- Original Message -----
From: "John Vanderbeck" <agathorn
cfl.rr.com>
To: <php-general
lists.php.net>
Sent: Sunday, February 11, 2001 10:01 PM
Subject: [PHP] fscanf problem
> 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 "<P CLASS=Normal>$new_item created</P>";
> }
>
> READ FROM FILE:
> $item_file = fopen("$thisdir/item.dat", "r");
> fscanf($item_file, "%s\n%s\n%s\n%s", $display, $asin, $description,
> $link);
> fclose($item_file);
>
> PROBLEM:
> $display comes out correct, but $asin, $descrition and $link are always
> empty
>
> SAMPLE FILE:
> MyItem
> 11517
> ThisIsMyDecriptionWithoutSpaces
> amazon
>
> - John Vanderbeck
> - Admin, GameDesign
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Hi,
What is the best way to capture an email sent to a server so that I can copy it and send it to a number of emails selected from a db. I can do the scripting except for the capturing part (Presuming I have no idea when the email is sent to the server)
Any links regarding this subject would be gratefully recieved.
Thanks Ade
attached mail follows:
Ade,
If you're running Unix/Linux, I would recommend using Procmail. It does the local delivery for mail. You would setup processing rules and can work with copies of emails for processing without disturbing delivery.
Useful Procmail links Top site: http://www.ii.com/internet/robots/procmail/ Mini-tutorial: http://www.linuxgazette.com/issue14/procmail.html Manual pages: http://www.voicenet.com/~dfma/intro.html Mailing list searchable archives: http://www.xray.mpe.mpg.de/mailing-lists/procmail/
Hope that helps,
Jason
--- Website4S
aol.com wrote:
> Hi,
>
> What is the best way to capture an email sent to a
> server so that I can copy
> it and send it to a number of emails selected from a
> db. I can do the
> scripting except for the capturing part (Presuming I
> have no idea when the
> email is sent to the server)
>
> Any links regarding this subject would be gratefully
> recieved.
>
> Thanks
> Ade
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
attached mail follows:
> What is the best way to capture an email sent to a server so > that I can copy it and send it to a number of emails selected from a db. > Here's one way to do it: - You'll need to compile PHP as a cgi executable (http://php.net/manual/en/install.commandline.php). - If you are using sendmail you can set up an alias that will direct the email to a program (you can get this same behavior with other mail delivery agents as well). - Have a PHP script that reads from standard input to get the email message (http://www.php.net/manual/en/function.fopen.php). - From there you can do whatever you need to with the email.
If you need to parse the email into pieces and/or deal with HTML email, attachments, etc. then you can check out the source code that runs http://www.p3mail.com/ He has a number of libraries available that will help take care of that.
- Jamie
attached mail follows:
I recently moved a site to a host that only supports PHP as a CGI, not mod_php. I cannot seem to set any headers using the header() function, so I can't set cookies either.
Where can I find additional documentation as to the differences between the mod_php and CGI/commandline versions of PHP in apache?
Thanks, -Aaron =================================================================== As Isaac Newton would say now: If I see further than others, it is because I stand on the shoulders of giants too dumb to patent their discoveries. (Gregory Palast, http://www.observer.co.uk/ )
attached mail follows:
I think you can just search the archives for it.
I am sure it was covered here many times.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Aaron Held [mailto:aaron
metrony.com]
Sent: Tuesday, February 13, 2001 12:21 AM
To: php-general
lists.php.net
Subject: [PHP] header() in apache/CGI mode PHP
I recently moved a site to a host that only supports PHP as a CGI, not mod_php. I cannot seem to set any headers using the header() function, so I can't set cookies either.
Where can I find additional documentation as to the differences between the mod_php and CGI/commandline versions of PHP in apache?
Thanks, -Aaron =================================================================== As Isaac Newton would say now: If I see further than others, it is because I stand on the shoulders of giants too dumb to patent their discoveries. (Gregory Palast, http://www.observer.co.uk/ )
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I am having trouble getting PHP, GD and apache compiled. I have successfully compiled PHP plus options with Apache, but can't seem to get this to work. I need to get ImageCreateFromJPEG working. I have searched the digest, newsgroups, etc., and haven;t found a solution that seems to work.
I am using these components:
OS: RedHat Linux 6.2
RPMs: gd-1.8.3-4 gd-devel-1.8.3-4 gd-progs-1.8.3-4 libjpeg-devel-6b-13 libjpeg-6b-13
PHP source: php-4.0.4pl1 Apache source: apache_1.3.14
I installed the RPM's above and then started the recompile of PHP (the last two lines I added for this option):
./configure \ --with-mysql \ --with-apache=../apache_1.3.14 \ --with-mcrypt \ --enable-track-vars \ --with-xml \ --with-curl \ --with-pspell \ --with-dom=/usr/include/libxml \ --with-gd \ --with-jpeg-dir=/usr/lib
Durring the configure process, I do see:
checking whether to include GD support... yes (static) checking for gdImageString16 in -lgd... (cached) yes checking for gdImagePaletteCopy in -lgd... (cached) yes checking for gdImageColorClosestHWB in -lgd... (cached) yes checking for compress in -lz... (cached) yes checking for png_info_init in -lpng... (cached) yes checking for gdImageColorResolve in -lgd... (cached) yes checking for gdImageCreateFromPng in -lgd... (cached) yes checking for gdImageCreateFromGif in -lgd... (cached) no checking for gdImageWBMP in -lgd... (cached) yes checking for gdImageCreateFromJpeg in -lgd... (cached) yes checking for gdImageCreateFromXpm in -lgd... (cached) yes checking whether to include FreeType 1.x support... yes checking for T1lib support... no
Which leads me to believe the gd-1.8.3 RPM already has a link to the libjpeg libraries. (BTW, I have tried clearing the config.cache just to make sure, and it comes up fine even with a blank cache).
PHP copntinues and compiles fine with no errors. (make, make install)
Then I try and compile apache using the same configure script I always use:
SSL_BASE=../openssl-0.9.6 \ RSA_BASE=../rsaref-2.0/local \ EAPI_MM=../mm-1.1.3 \ ./configure \ --enable-module=ssl \ --prefix=/usr/local/apache \ --enable-shared=ssl \ --activate-module=src/modules/php4/libphp4.a \ --activate-module=src/modules/perl/libperl.a \ --enable-module=vhost_alias \ --enable-module=rewrite
And durring the make process, I get:
-o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php4/libphp4.a modules/perl/libperl.a main/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib -rdynamic -L/usr/local /lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -lpam -ldl -lpspell -lmcrypt -lmcrypt -lz -lxml -lcurl -lresolv -lm -ldl -lcrypt -lnsl -lresolv -L/usr/include/libxml/lib -lz -lm -lcrypt -lndbm -rdynamic -L/usr/local/lib /usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/pe rl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcrypt -lmm -ldl modules/php4/libphp4.a(gd.o): In function `php_free_gd_image': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:198: undefined reference to `gdImageDestroy' modules/php4/libphp4.a(gd.o): In function `php_if_imagecreate': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:460: undefined reference to `gdImageCreate' modules/php4/libphp4.a(gd.o): In function `_php_image_create_from_string': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:525: undefined reference to `gdNewDynamicCtx' modules/php4/libphp4.a(gd.o): In function `php_if_imagecreatefromstring': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:567: undefined reference to `gdImageCreateFromJpegCtx' /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:576: undefined reference to `gdImageCreateFromPngCtx' /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:594: undefined reference to `gdImageCreateFromWBMPCtx' modules/php4/libphp4.a(gd.o): In function `_php_image_create_from': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:676: undefined reference to `gdNewDynamicCtx'
<snip>
modules/php4/libphp4.a(gdttf.o): In function `tweenColorFetch': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:628: undefined reference to `gdImageColorResolve' modules/php4/libphp4.a(gdttf.o): In function `gdttf': /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:778: undefined reference to `TT_Init_FreeType' collect2: ld returned 1 exit status make[2]: *** [target_static] Error 1 make[2]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14' make: *** [build] Error 2
Can someone give me some insight as to what I need to do? I have tried compiling gd, libjpeg, etc. from sources and get worse results (PHP doesn't see the ImageCreateFromJPEG function as well as most of the others that GD should be including).
Any help would be greatly appreciated.
Greg
-- PHP Install Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-install-unsubscribelists.php.net For additional commands, e-mail: php-install-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Greg,
I've done this many a time and haven't ever been able to do it from rpms. I install the gd stuff including libjpeg and libpng into the same directory. In my case it's /usr/local/gd. Then you should specify the path like --with-gd=/usr/local/gd . This has always worked for me.
Jason
--- Greg Kopp <gkopp
gregkopp.com> wrote:
> I am having trouble getting PHP, GD and apache
> compiled. I have successfully
> compiled PHP plus options with Apache, but can't
> seem to get this to work. I
> need to get ImageCreateFromJPEG working. I have
> searched the digest,
> newsgroups, etc., and haven;t found a solution that
> seems to work.
>
> I am using these components:
>
> OS: RedHat Linux 6.2
>
> RPMs:
> gd-1.8.3-4
> gd-devel-1.8.3-4
> gd-progs-1.8.3-4
> libjpeg-devel-6b-13
> libjpeg-6b-13
>
> PHP source: php-4.0.4pl1
> Apache source: apache_1.3.14
>
> I installed the RPM's above and then started the
> recompile of PHP (the last
> two lines I added for this option):
>
> ./configure \
> --with-mysql \
> --with-apache=../apache_1.3.14 \
> --with-mcrypt \
> --enable-track-vars \
> --with-xml \
> --with-curl \
> --with-pspell \
> --with-dom=/usr/include/libxml \
> --with-gd \
> --with-jpeg-dir=/usr/lib
>
> Durring the configure process, I do see:
>
> checking whether to include GD support... yes
> (static)
> checking for gdImageString16 in -lgd... (cached) yes
> checking for gdImagePaletteCopy in -lgd... (cached)
> yes
> checking for gdImageColorClosestHWB in -lgd...
> (cached) yes
> checking for compress in -lz... (cached) yes
> checking for png_info_init in -lpng... (cached) yes
> checking for gdImageColorResolve in -lgd... (cached)
> yes
> checking for gdImageCreateFromPng in -lgd...
> (cached) yes
> checking for gdImageCreateFromGif in -lgd...
> (cached) no
> checking for gdImageWBMP in -lgd... (cached) yes
> checking for gdImageCreateFromJpeg in -lgd...
> (cached) yes
> checking for gdImageCreateFromXpm in -lgd...
> (cached) yes
> checking whether to include FreeType 1.x support...
> yes
> checking for T1lib support... no
>
> Which leads me to believe the gd-1.8.3 RPM already
> has a link to the libjpeg
> libraries. (BTW, I have tried clearing the
> config.cache just to make sure,
> and it comes up fine even with a blank cache).
>
> PHP copntinues and compiles fine with no errors.
> (make, make install)
>
> Then I try and compile apache using the same
> configure script I always use:
>
> SSL_BASE=../openssl-0.9.6 \
> RSA_BASE=../rsaref-2.0/local \
> EAPI_MM=../mm-1.1.3 \
> ./configure \
> --enable-module=ssl \
> --prefix=/usr/local/apache \
> --enable-shared=ssl \
> --activate-module=src/modules/php4/libphp4.a \
> --activate-module=src/modules/perl/libperl.a \
> --enable-module=vhost_alias \
> --enable-module=rewrite
>
> And durring the make process, I get:
>
> -o httpd buildmark.o modules.o
> modules/standard/libstandard.a
> modules/php4/libphp4.a modules/perl/libperl.a
> main/libmain.a
> ./os/unix/libos.a ap/libap.a
> lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib
> -rdynamic -L/usr/local
> /lib -Lmodules/php4 -L../modules/php4
> -L../../modules/php4 -lmodphp4 -lpam
> -ldl -lpspell -lmcrypt -lmcrypt -lz -lxml -lcurl
> -lresolv -lm -ldl -lcrypt
> -lnsl -lresolv -L/usr/include/libxml/lib -lz -lm
> -lcrypt -lndbm -rdynamic
> -L/usr/local/lib
>
/usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a
> -L/usr/lib/pe
> rl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm
> -lc -lposix -lcrypt -lmm
> -ldl
> modules/php4/libphp4.a(gd.o): In function
> `php_free_gd_image':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:198:
> undefined reference
> to `gdImageDestroy'
> modules/php4/libphp4.a(gd.o): In function
> `php_if_imagecreate':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:460:
> undefined reference
> to `gdImageCreate'
> modules/php4/libphp4.a(gd.o): In function
> `_php_image_create_from_string':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:525:
> undefined reference
> to `gdNewDynamicCtx'
> modules/php4/libphp4.a(gd.o): In function
> `php_if_imagecreatefromstring':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:567:
> undefined reference
> to `gdImageCreateFromJpegCtx'
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:576:
> undefined reference
> to `gdImageCreateFromPngCtx'
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:594:
> undefined reference
> to `gdImageCreateFromWBMPCtx'
> modules/php4/libphp4.a(gd.o): In function
> `_php_image_create_from':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:676:
> undefined reference
> to `gdNewDynamicCtx'
>
> <snip>
>
> modules/php4/libphp4.a(gdttf.o): In function
> `tweenColorFetch':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:628:
> undefined
> reference to `gdImageColorResolve'
> modules/php4/libphp4.a(gdttf.o): In function
> `gdttf':
>
/usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:778:
> undefined
> reference to `TT_Init_FreeType'
> collect2: ld returned 1 exit status
> make[2]: *** [target_static] Error 1
> make[2]: Leaving directory
> `/usr/src/apache-php-mysql/apache_1.3.14/src'
> make[1]: *** [build-std] Error 2
> make[1]: Leaving directory
> `/usr/src/apache-php-mysql/apache_1.3.14'
> make: *** [build] Error 2
>
> Can someone give me some insight as to what I need
> to do? I have tried
> compiling gd, libjpeg, etc. from sources and get
> worse results (PHP doesn't
> see the ImageCreateFromJPEG function as well as most
> of the others that GD
> should be including).
>
> Any help would be greatly appreciated.
>
> Greg
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-install-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-install-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe
lists.php.net
> For additional commands, e-mail:
> php-general-help
lists.php.net
> To contact the list administrators, e-mail:
php-list-admin
lists.php.net
__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
attached mail follows:
You should be using: --with-jpeg-dir=/usr Also make sure that you don't have the old gd.h from gd-1.3 lying around. ie. locate gd.h and make sure you only have one. rpm -qa | grep gd
-Rasmus
On Mon, 12 Feb 2001, Greg Kopp wrote:
> I am having trouble getting PHP, GD and apache compiled. I have successfully
> compiled PHP plus options with Apache, but can't seem to get this to work. I
> need to get ImageCreateFromJPEG working. I have searched the digest,
> newsgroups, etc., and haven;t found a solution that seems to work.
>
> I am using these components:
>
> OS: RedHat Linux 6.2
>
> RPMs:
> gd-1.8.3-4
> gd-devel-1.8.3-4
> gd-progs-1.8.3-4
> libjpeg-devel-6b-13
> libjpeg-6b-13
>
> PHP source: php-4.0.4pl1
> Apache source: apache_1.3.14
>
> I installed the RPM's above and then started the recompile of PHP (the last
> two lines I added for this option):
>
> ./configure \
> --with-mysql \
> --with-apache=../apache_1.3.14 \
> --with-mcrypt \
> --enable-track-vars \
> --with-xml \
> --with-curl \
> --with-pspell \
> --with-dom=/usr/include/libxml \
> --with-gd \
> --with-jpeg-dir=/usr/lib
>
> Durring the configure process, I do see:
>
> checking whether to include GD support... yes (static)
> checking for gdImageString16 in -lgd... (cached) yes
> checking for gdImagePaletteCopy in -lgd... (cached) yes
> checking for gdImageColorClosestHWB in -lgd... (cached) yes
> checking for compress in -lz... (cached) yes
> checking for png_info_init in -lpng... (cached) yes
> checking for gdImageColorResolve in -lgd... (cached) yes
> checking for gdImageCreateFromPng in -lgd... (cached) yes
> checking for gdImageCreateFromGif in -lgd... (cached) no
> checking for gdImageWBMP in -lgd... (cached) yes
> checking for gdImageCreateFromJpeg in -lgd... (cached) yes
> checking for gdImageCreateFromXpm in -lgd... (cached) yes
> checking whether to include FreeType 1.x support... yes
> checking for T1lib support... no
>
> Which leads me to believe the gd-1.8.3 RPM already has a link to the libjpeg
> libraries. (BTW, I have tried clearing the config.cache just to make sure,
> and it comes up fine even with a blank cache).
>
> PHP copntinues and compiles fine with no errors. (make, make install)
>
> Then I try and compile apache using the same configure script I always use:
>
> SSL_BASE=../openssl-0.9.6 \
> RSA_BASE=../rsaref-2.0/local \
> EAPI_MM=../mm-1.1.3 \
> ./configure \
> --enable-module=ssl \
> --prefix=/usr/local/apache \
> --enable-shared=ssl \
> --activate-module=src/modules/php4/libphp4.a \
> --activate-module=src/modules/perl/libperl.a \
> --enable-module=vhost_alias \
> --enable-module=rewrite
>
> And durring the make process, I get:
>
> -o httpd buildmark.o modules.o modules/standard/libstandard.a
> modules/php4/libphp4.a modules/perl/libperl.a main/libmain.a
> ./os/unix/libos.a ap/libap.a
> lib/expat-lite/libexpat.a -Wl,-rpath,/usr/local/lib -rdynamic -L/usr/local
> /lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -lpam
> -ldl -lpspell -lmcrypt -lmcrypt -lz -lxml -lcurl -lresolv -lm -ldl -lcrypt
> -lnsl -lresolv -L/usr/include/libxml/lib -lz -lm -lcrypt -lndbm -rdynamic
> -L/usr/local/lib
> /usr/lib/perl5/5.00503/i386-linux/auto/DynaLoader/DynaLoader.a -L/usr/lib/pe
> rl5/5.00503/i386-linux/CORE -lperl -lnsl -ldl -lm -lc -lposix -lcrypt -lmm
> -ldl
> modules/php4/libphp4.a(gd.o): In function `php_free_gd_image':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:198: undefined reference
> to `gdImageDestroy'
> modules/php4/libphp4.a(gd.o): In function `php_if_imagecreate':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:460: undefined reference
> to `gdImageCreate'
> modules/php4/libphp4.a(gd.o): In function `_php_image_create_from_string':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:525: undefined reference
> to `gdNewDynamicCtx'
> modules/php4/libphp4.a(gd.o): In function `php_if_imagecreatefromstring':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:567: undefined reference
> to `gdImageCreateFromJpegCtx'
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:576: undefined reference
> to `gdImageCreateFromPngCtx'
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:594: undefined reference
> to `gdImageCreateFromWBMPCtx'
> modules/php4/libphp4.a(gd.o): In function `_php_image_create_from':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gd.c:676: undefined reference
> to `gdNewDynamicCtx'
>
> <snip>
>
> modules/php4/libphp4.a(gdttf.o): In function `tweenColorFetch':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:628: undefined
> reference to `gdImageColorResolve'
> modules/php4/libphp4.a(gdttf.o): In function `gdttf':
> /usr/src/apache-php-mysql/php-4.0.4pl1/ext/gd/gdttf.c:778: undefined
> reference to `TT_Init_FreeType'
> collect2: ld returned 1 exit status
> make[2]: *** [target_static] Error 1
> make[2]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14/src'
> make[1]: *** [build-std] Error 2
> make[1]: Leaving directory `/usr/src/apache-php-mysql/apache_1.3.14'
> make: *** [build] Error 2
>
> Can someone give me some insight as to what I need to do? I have tried
> compiling gd, libjpeg, etc. from sources and get worse results (PHP doesn't
> see the ImageCreateFromJPEG function as well as most of the others that GD
> should be including).
>
> Any help would be greatly appreciated.
>
> Greg
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-install-unsubscribe
lists.php.net
> For additional commands, e-mail: php-install-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP Install Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-install-unsubscribe
lists.php.net
> For additional commands, e-mail: php-install-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
There will be a PHP BOF at the Nordu2001 (www.nordu.org) conference on Thursday Feb.15 at the Stockholm City Conference Center room 355 from 17:00 to 18:00. You do not need to need to be registered for the conference to attend the BOF.
Also, I am giving a full day PHP tutorial tomorrow (Tuesday Feb.13) from 09:00 to 17:00 here at Nordu2001. See http://www.nordu.org/NordU2001/ for details.
-Rasmus
attached mail follows:
Hi,
I'm having a weird problem with a recently upgraded box. Its a RedHat + PHP4.0.4pl1-3 + Apache-1.3.14-3 box (All packages were installed from RedHat official RPMs)
I have a very simple form with enctype=multipart/form-data. This will allow some users to upload files. This code was working perfectly with previous versions and now that I've updated PHP and Apache I get he following:
After the submit, the script that receives field contents reports an extra \r BEFORE the real field content, indicated by users on previous script (with the form). With plain text fields it would be no problem, I can use ltrim and discard the extra \r, but what happens with the file field is more complicated, I can't trim this field, but with the extra \r it doens't validate as a valid file.
I've seen a post very similar in phpbuilder.com with the same exact problem and with the same exact versions of Apache/PHP. I don't exactly know if this a PHP issue or Apache problem. Maybe some of you could enlighnten me on this question.
TIA.
--- System Administrator (adminzbit.pt) ZBit - Software, Lda. (http://www.zbit.pt) Rua Ponte de Pau, N.º 19 3510-100 VISEU Tel./FAX: 232 428 753
attached mail follows:
hi... i need some help...
currently i doing web base programming ( econsultant )using php, apache and mysql as well... now i facing a problem which i need : 1) get time when consultant log on 2) get time when consultant log off 3) calculate how long for the specified consultant been log on to the web 4) accumulate all the time everyday 5) then multiple accumulate with working rate ( X ). 6.) finally output to web ( html form )
pls help ! thanks !
attached mail follows:
almost didn't respond to this given the wide dissemination and the broad nature of the question
can't be done with any accuracy.
you could, create a session or uservariable... have that transmitted with a screen refresh, or anytime your consultant moves within the site resetting an internal timestamp.
failure to retransmit via refresh or movement within a specified time would cause expirey, have a function that logs the expirey date and perform your other functions from there (thats the easy part)
This doesn't prevent your consultant from keeping a browser window open so that it can refresh. You could use javascipt code on your page with a popup window where your consultant would have to press submt to be logged in as online every so often, but the annoyance factor would be absurd.
In short, try pounding out a base from whence to work from... you are likely to get specific responses to specific questions or problems... what you are currently asking for is a prepackaged solutions.
Dave
-----Original Message-----
From: Ng Kok Chun [mailto:ramnkc
yahoo.com]
Sent: Tuesday, February 13, 2001 3:11 AM
To: php-general
lists.php.net; ts
cape.com;
tgolden
checkfreeinvsvcs.com; john
edlabs.com; andre.feld
gmx.de;
"mailto:webmaster"
dark-library.com; tomb
atlantic.net
Subject: [PHP] Time in php problem....
hi... i need some help...
currently i doing web base programming ( econsultant )using php, apache and mysql as well... now i facing a problem which i need : 1) get time when consultant log on 2) get time when consultant log off 3) calculate how long for the specified consultant been log on to the web 4) accumulate all the time everyday 5) then multiple accumulate with working rate ( X ). 6.) finally output to web ( html form )
pls help ! thanks !
attached mail follows:
All I can tell is that there's a pain of calculating when the user leaves the site.
Let's say his connection drops. What's then? How do you know he didn't spend on that page 7 hours?
I think you should have a file included in every page he visits which, using sessions, adds the TimeStamp to the database. Then you can see - if session exists means he continues, if not then this is the first time he is in. Something like that. Put all in the database and play with it later-on.
As of the rest, I think you can do it all. The only concern is for you to accept that his last record is a hit of a page (or log-of button) and not his closing window.
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Ng Kok Chun [mailto:ramnkc
yahoo.com]
Sent: Tuesday, February 13, 2001 5:11 PM
To: php-general
lists.php.net; ts
cape.com;
tgolden
checkfreeinvsvcs.com; john
edlabs.com; andre.feld
gmx.de;
"mailto:webmaster"
dark-library.com; tomb
atlantic.net
Subject: [PHP] Time in php problem....
hi... i need some help...
currently i doing web base programming ( econsultant )using php, apache and mysql as well... now i facing a problem which i need : 1) get time when consultant log on 2) get time when consultant log off 3) calculate how long for the specified consultant been log on to the web 4) accumulate all the time everyday 5) then multiple accumulate with working rate ( X ). 6.) finally output to web ( html form )
pls help ! thanks !
attached mail follows:
I think you can do all of these using the session. In your log on script, after validating his uid and pwd, insert a row with current timestamp and his id. Either during log off or session close insert another row with uid and current time stamp. (This part I never done) Rest is to manipulate the values the log table information. (may be develop a admin screen, which manipulates the log table)
Hope this helps.
Ng Kok Chun wrote:
> hi... i need some help... > > currently i doing web base programming ( econsultant )using php, apache and mysql as well... now i facing a problem which i need : > 1) get time when consultant log on > 2) get time when consultant log off > 3) calculate how long for the specified consultant been log on to the web > 4) accumulate all the time everyday > 5) then multiple accumulate with working rate ( X ). > 6.) finally output to web ( html form ) > > pls help ! > thanks ! >
attached mail follows:
Hello,
What type of field should I use if I don't want it to have a max length of characters?
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
attached mail follows:
text field
> Hello, > > What type of field should I use if I don't want it to have a max length of > characters? > > Thank you, >
attached mail follows:
Text field will support something over 65,000 characters.... read the docs on mySQL...
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Brandon Orther [mailto:brandon
webintellects.com]
Sent: Tuesday, February 13, 2001 1:19 AM
To: PHP User Group
Subject: [PHP] MySQL fields
Hello,
What type of field should I use if I don't want it to have a max length of characters?
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I have an include file foo.inc. I want to call a function that is in another include file,say anotherfoo.inc, from the foo.inc.
//Foo.inc
include "c:\\...\\anotherfoo.inc";
//other code
//end of include
can I call an include from another include?
I tried the above but it fails opening the other include.
Should I have the ' "include"c:\\...\\anotherfoo.inc" ' in the file that includes the Foo.inc?
ryan
attached mail follows:
Conover, Ryan wrote: > I have an include file foo.inc. I want to call a function that is in > another include file,say anotherfoo.inc, from the foo.inc.
[..]
> can I call an include from another include?
Sure.
> I tried the above but it fails opening the other include. > > Should I have the > ' "include"c:\\...\\anotherfoo.inc" ' > in the file that includes the Foo.inc?
No, you can include what and where you want (provided it's valid PHP), but if you use relative paths, the paths all have to be relativ to the original file, the file that is called by the browser (or whatever you use to call your scripts).
regards Wagner
-- Three may keep a secret, if two of them are dead.
attached mail follows:
Yes, you can include foo.php which has another include in it and another and another .... they will all appear to you as a one single file.
But, be careful though, do not reinclude them, or you'll create an infinite loop.. use include_once instead
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Conover, Ryan [mailto:Rconover
americanbridge.net]
Sent: Tuesday, February 13, 2001 1:46 AM
To: php-general
lists.php.net
Subject: [PHP] Include files
I have an include file foo.inc. I want to call a function that is in another include file,say anotherfoo.inc, from the foo.inc.
//Foo.inc
include "c:\\...\\anotherfoo.inc";
//other code
//end of include
can I call an include from another include?
I tried the above but it fails opening the other include.
Should I have the ' "include"c:\\...\\anotherfoo.inc" ' in the file that includes the Foo.inc?
ryan
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I've created a PHP script that is called from a form to send an email. The contents of the email is a hidden value in the form named "info," and is typically a paragraph of text. It works fine, however, for some reason, the apostrophy character always gets emailed looking like this: /'
I've tried everything to get around this. Any ideas? Here's my script and form:
Form:
<form name="form1" method="GET" action="emailsender.php"> <p>Email this product info to a friend</p> <input type="text" name="email"> <input type="submit" name="Submit" value="Email Info"> <input type="hidden" name="info" value="This is the text that gets emailed. I'm having problems with the apostrophe character in this text though"> </form>
Script file named emailsender.php:
<?php print "<p>The product info has been mailed to: <b>$email</b>";
$to = $email;
$sender ="info
challenger.org";
MAIL( "$email", # address to send $info email to "Product Info", # subject "$info", # hidden form field containing text to email "From: $sender\nX-Mailer: PHP/" . phpversion());
?>
Thanks in advance, John
__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
attached mail follows:
PHP is doing what it should to your form input. It automatically performs "addslashes" to all form input so that the variables are parsed correctly on the receiveing end.
do a "stripslashes" to get rid of it.
read the manual on these two and it will all be explained.
Dave
-----Original Message-----
From: John P. Donaldson [mailto:johnpdonaldson
yahoo.com]
Sent: Monday, February 12, 2001 11:42 AM
To: php-general
lists.php.net
Subject: [PHP] character problem
I've created a PHP script that is called from a form to send an email. The contents of the email is a hidden value in the form named "info," and is typically a paragraph of text. It works fine, however, for some reason, the apostrophy character always gets emailed looking like this: /'
I've tried everything to get around this. Any ideas? Here's my script and form:
Form:
<form name="form1" method="GET" action="emailsender.php"> <p>Email this product info to a friend</p> <input type="text" name="email"> <input type="submit" name="Submit" value="Email Info"> <input type="hidden" name="info" value="This is the text that gets emailed. I'm having problems with the apostrophe character in this text though"> </form>
Script file named emailsender.php:
<?php print "<p>The product info has been mailed to: <b>$email</b>";
$to = $email;
$sender ="info
challenger.org";
MAIL( "$email", # address to send $info email to "Product Info", # subject "$info", # hidden form field containing text to email "From: $sender\nX-Mailer: PHP/" . phpversion());
?>
Thanks in advance, John
__________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Mon, 12 Feb 2001, Dave VanAuken wrote: > PHP is doing what it should to your form input. It automatically > performs "addslashes" to all form input so that the variables are > parsed correctly on the receiveing end. > > do a "stripslashes" to get rid of it.
Yes and it's doing this via the magic_quotes_gpc setting which is currently set to 'on' within the server. Read about this setting here :
http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc
As stated by Dave, you want stripslashes() before mailing and consequently, addslashes() adds them.
Regards,
Philip
> -----Original Message-----
> From: John P. Donaldson [mailto:johnpdonaldson
yahoo.com]
> Sent: Monday, February 12, 2001 11:42 AM
> To: php-general
lists.php.net
> Subject: [PHP] character problem
>
>
> I've created a PHP script that is called from a form
> to send an email. The contents of the email is a
> hidden value in the form named "info," and is
> typically a paragraph of text. It works fine,
> however, for some reason, the apostrophy character
> always gets emailed looking like this: /'
>
> I've tried everything to get around this. Any ideas?
> Here's my script and form:
>
> Form:
>
> <form name="form1" method="GET"
> action="emailsender.php">
> <p>Email this product info to a friend</p>
> <input type="text" name="email">
> <input type="submit" name="Submit" value="Email Info">
> <input type="hidden" name="info" value="This is the
> text that gets emailed. I'm having problems with the
> apostrophe character in this text though">
> </form>
>
>
> Script file named emailsender.php:
>
> <?php
> print "<p>The product info has been mailed to:
> <b>$email</b>";
>
> $to = $email;
> $sender ="info
challenger.org";
>
> MAIL(
> "$email", # address to send $info email to
> "Product Info", # subject
> "$info", # hidden form field containing text to email
> "From: $sender\nX-Mailer: PHP/" . phpversion());
>
> ?>
>
>
> Thanks in advance,
> John
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hello,
I am new to MySql and I am trying to make a simple script get info from a table. Can someone please look at the below code and tell me if they see what is wrong? The error I get is: Couldn't execute query.
Code:
<? // create connection $connection = mysql_connect("localhost","*****","*****") or die("Couldn't make connection.");
// select database $db = mysql_select_db("nasty_db", $connection) or die("Couldn't select database.");
// create SQL statement $sql = "SELECT keywords, text, ref_num FROM tech ORDER BY last_name ASC";
// execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($sql_result)) { $keywords = $row["keywords"]; $text = $row["text"]; $ref_num = $row["ref_num"];
echo "Keywords: $keywords<BR>\n"; echo "Text: $text<BR>\n"; echo "Refrence Number: $ref_num<BR>\n"; }
// free resources and close connection mysql_free_result($sql_result); mysql_close($connection);
?>
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
attached mail follows:
I fixed it,
Me so stupid, I had it order by a field that wasn't there.
-----Original Message-----
From: Brandon Orther [mailto:brandon
webintellects.com]
Sent: Monday, February 12, 2001 9:15 AM
To: PHP User Group
Subject: [PHP] MySQL
Hello,
I am new to MySql and I am trying to make a simple script get info from a table. Can someone please look at the below code and tell me if they see what is wrong? The error I get is: Couldn't execute query.
Code:
<? // create connection $connection = mysql_connect("localhost","*****","*****") or die("Couldn't make connection.");
// select database $db = mysql_select_db("nasty_db", $connection) or die("Couldn't select database.");
// create SQL statement $sql = "SELECT keywords, text, ref_num FROM tech ORDER BY last_name ASC";
// execute SQL query and get result $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query.");
while ($row = mysql_fetch_array($sql_result)) { $keywords = $row["keywords"]; $text = $row["text"]; $ref_num = $row["ref_num"];
echo "Keywords: $keywords<BR>\n"; echo "Text: $text<BR>\n"; echo "Refrence Number: $ref_num<BR>\n"; }
// free resources and close connection mysql_free_result($sql_result); mysql_close($connection);
?>
Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
For this sort of thing, replacing statements such as :
or die("Couldn't execute query.");
With :
or die(mysql_error());
Would have instantly told you the problem, in nice human readable format.
Regards,
Philip
On Mon, 12 Feb 2001, Brandon Orther wrote:
> I fixed it,
>
> Me so stupid, I had it order by a field that wasn't there.
>
> -----Original Message-----
> From: Brandon Orther [mailto:brandon
webintellects.com]
> Sent: Monday, February 12, 2001 9:15 AM
> To: PHP User Group
> Subject: [PHP] MySQL
>
>
> Hello,
>
> I am new to MySql and I am trying to make a simple script get info from a
> table. Can someone please look at the below code and tell me if they see
> what is wrong? The error I get is: Couldn't execute query.
>
> Code:
>
> <?
> // create connection
> $connection = mysql_connect("localhost","*****","*****")
> or die("Couldn't make connection.");
>
> // select database
> $db = mysql_select_db("nasty_db", $connection)
> or die("Couldn't select database.");
>
> // create SQL statement
> $sql = "SELECT keywords, text, ref_num
> FROM tech
> ORDER BY last_name ASC";
>
> // execute SQL query and get result
> $sql_result = mysql_query($sql,$connection)
> or die("Couldn't execute query.");
>
> while ($row = mysql_fetch_array($sql_result)) {
> $keywords = $row["keywords"];
> $text = $row["text"];
> $ref_num = $row["ref_num"];
>
> echo "Keywords: $keywords<BR>\n";
> echo "Text: $text<BR>\n";
> echo "Refrence Number: $ref_num<BR>\n";
> }
>
> // free resources and close connection
> mysql_free_result($sql_result);
> mysql_close($connection);
>
> ?>
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon
webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi; I just ran into the following error while doing maintenance on my RedHat box: >>> Unsatisfied dependencies for mod-php3-mysql-3.0.8-2: mod-php3 >= 3.0.8 <<< What does this mean and how do I fix it? TIA, BenO
attached mail follows:
This should be a quick one, but I can't seem to wrap my brain around it. All I need to do is replace leading or trailing spaces with underscores. If there is spaces in between words, leave them alone.
Suggestions?
-- Jesse Swensen swensenjbellsouth.net
attached mail follows:
On Mon, Feb 12, 2001 at 12:15:04PM -0500, Jesse Swensen wrote: > This should be a quick one, but I can't seem to wrap my brain around it. > All I need to do is replace leading or trailing spaces with underscores. If > there is spaces in between words, leave them alone.
$fix = ereg_replace("(^ )|( $)", "_", $checkme);
-- Jason Stechschulte jpstechunoh.edu -- /* This bit of chicanery makes a unary function followed by a parenthesis into a function with one argument, highest precedence. */ -- Larry Wall in toke.c from the perl source code
attached mail follows:
rtrim()
www.php.net/rtrim
Sincerely,
Maxim Maletsky Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
maxim
phpbeginner.com
www.phpbeginner.com
-----Original Message-----
From: Jesse Swensen [mailto:swensenj
bellsouth.net]
Sent: Tuesday, February 13, 2001 2:15 AM
To: php-general
lists.php.net
Subject: [PHP] Regex help needed...
This should be a quick one, but I can't seem to wrap my brain around it. All I need to do is replace leading or trailing spaces with underscores. If there is spaces in between words, leave them alone.
Suggestions?
-- Jesse Swensen swensenjbellsouth.net
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Sun, Feb 11, 2001 at 01:40:11AM -0700, Dan Harrington wrote:
(snip)
> Its like the "palette" only holds 256 pixels or something, what's > the deal with that? > > Anyone experienced this before? I've looked through the GD library > documentation > at boutell.com, i've looked through php.net, and every search engine on the > internet, and I can't seem to find out what is going on.
You're right, the palette only holds 256 colors. The reason for this is that GD was originally written for GIFs only. JPEGs were added on later, and then PNGs were put in as a drop-in replacement for GIFs (Patent issues). But the library was never extended to support high color.
If you're using Unix, one alternative could be php_imlib.
Matt
attached mail follows:
You are kidding me, right? I can't believe it. In this age, 256 colors just doesn't cut the mustard. Oh well, free is free, ya get what ya pay for. And here I was all excited about the GD library.
Thanks Dan
-----Original Message-----
From: Matt McClanahan [mailto:cardinal
dodds.net]
Sent: Monday, February 12, 2001 10:16 AM
To: Dan Harrington
Cc: php-general
lists.php.net
Subject: Re: [PHP] imagecolorallocate / imagesetpixel / palette size?
On Sun, Feb 11, 2001 at 01:40:11AM -0700, Dan Harrington wrote:
(snip)
> Its like the "palette" only holds 256 pixels or something, what's > the deal with that? > > Anyone experienced this before? I've looked through the GD library > documentation > at boutell.com, i've looked through php.net, and every search engine on the > internet, and I can't seem to find out what is going on.
You're right, the palette only holds 256 colors. The reason for this is that GD was originally written for GIFs only. JPEGs were added on later, and then PNGs were put in as a drop-in replacement for GIFs (Patent issues). But the library was never extended to support high color.
If you're using Unix, one alternative could be php_imlib.
Matt
attached mail follows:
That's because it was originally designed for gif's. Gif's only have a 256 color palette......
> -----Original Message-----
> From: Dan Harrington [mailto:dan
harringtons.net]
> Sent: Monday, February 12, 2001 12:30 PM
> To: Matt McClanahan
> Cc: php-general
lists.php.net
> Subject: RE: [PHP] imagecolorallocate / imagesetpixel / palette size?
>
>
> You are kidding me, right?
> I can't believe it. In this age, 256 colors just doesn't cut the mustard.
> Oh well, free is free, ya get what ya pay for.
> And here I was all excited about the GD library.
>
> Thanks
> Dan
>
>
attached mail follows:
Hi: Check This!
attached mail follows:
Hi,
I have a big problem.
I am trying to send email by php on a server which doesn't have sendmail installed. In fact, we don't like to install it.
I use the 4.0.4pl1 version of PHP, and I have understand that the function imap_mail doesn't work any more in this version.
Is there another option for me to send email ?
Thanks a lot for your help.
Emmanuel
attached mail follows:
Hello all!
I'm VERY new to PHP+MySQL, but I've been writing software for years. Anyway, I have a simple question to see if anyone else has had this problem.
I have a PHP app that creates a table and makes entries to it. Those entries can then be edited. I've found that if I hit the "add" button too fast (more than 1x every 2 sec or so), I will get bad results as the table is printed.
The table printed shows the wrong number of rows for the table (as compared to the SELECT run from the mysql command line. Sometimes more, sometimes less. It also happens that clicking on an item to edit it might also return an empty result set from the table.
I tried clearing the cache on Nutscrape, but that didn't seem to help. However, connecting to the database w/ mysql_connect() rather that mysql_pconnect() seems to have made the problem disappear.
Has anyone else noticed this inconsistent persistent behavior?
Red Hat Linux 7.0 Kernel 2.2.16 Apache 1.3.14 MySQL 3.23.32 PHP 4.0.4pl1
-Michael
--
No, my friend, the way to have good and safe government, is not to trust it
all to one, but to divide it among the many, distributing to every one exactly
the functions he is competent to. It is by dividing and subdividing these
republics from the national one down through all its subordinations, until it
ends in the administration of every man's farm by himself; by placing under
every one what his own eye may superintend, that all will be done for the
best.
-- Thomas Jefferson, to Joseph Cabell, 1816
attached mail follows:
Has anyone successfully used CURL_USERPWD?
When using this, it returns a "Document contains no data", and a "segmentation fault" is written to the apache error_logs. I can produce slightly different results by leaving the username:password field empty. It at least writes a "password:" line to the error log.
Some details of the configuration: Apache 1.3.12 PHP 4.0.4pl1 libmcrypt 2.2.x (I think it is 2.2.6 and 2.2.7) Linux and Sun boxes
the php script...
<?php $ch=curl_init(); curl_setopt($ch,CURLOPT_URL, "http://$url/$page"); $user="someone"; $pass="someplace"; curl_setopt($ch,CURLOPT_USERPWD, "$user:$pass"); curl_exec($ch); curl_close($ch); ?>
ideas of what I am missing? I want the output to go straight to the browser (used to retrieve images..other suggestions for grabbing images are welcome)
benji
--- Ben Spencer Web Support bspencermoody.edu x 2288
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]