|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Subject: php3 Digest 14 Feb 2000 06:00:02 -0000 Issue 1477
From: php3-digest-help
lists.php.netDate: Mon Feb 14 2000 - 00:00:02 CST
- Next message: php3-digest-help
lists.php.net: "php3 Digest 14 Feb 2000 18:00:01 -0000 Issue 1478"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 13 Feb 2000 18:00:01 -0000 Issue 1476"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
php3 Digest 14 Feb 2000 06:00:02 -0000 Issue 1477
Topics (messages 75862 through 75923):
Viewing source for databased source code
75862 by: "Paul Meagher" <paul
datavore.com>
75869 by: "NickM" <terado
hotmail.com>
Email File Attachment!!!
75863 by: "Absm" <abbs
telinco.co.uk>
75866 by: Gianluca Baldo <webmaster
albasoftware.com>
Email File attachment
75864 by: "Absm" <abbs
telinco.co.uk>
Php and Bookmarks
75865 by: Harry Hoffman <moebius
ip-solutions.net>
fasttemplate in php4
75867 by: "Christian Calloway" <cubadc
earthlink.net>
75868 by: Paul K Egell-Johnsen <paulken
metaphor.no>
75870 by: "NickM" <terado
hotmail.com>
75891 by: Paul K Egell-Johnsen <paulken
metaphor.no>
75893 by: Paul K Egell-Johnsen <paulken
metaphor.no>
75905 by: Steve Edberg <sbedberg
ucdavis.edu>
reading Multiple Image Buttons
75871 by: "NickM" <terado
hotmail.com>
Sorting an array numerically with sort()?
75872 by: Lars Torben Wilson <torben
pinc.com>
MS SQL and PHP on Linux/Unix
75873 by: Franck Martin <Franck
sopac.org.fj>
75874 by: rasmus
php.net
75876 by: "Dave VanHorn" <dvanhorn
cedar.net>
MySQL Files - In Use
75875 by: Steve Edberg <sbedberg
ucdavis.edu>
Image problem
75877 by: rasmus
php.net
magic_quotes_gpc
75878 by: rasmus
php.net
Virtual()
75879 by: "Jeremy Coates: Mailing Lists" <lists
co-comp.co.uk>
75882 by: rasmus
php.net
75890 by: "Jeremy Coates: Mailing Lists" <lists
co-comp.co.uk>
75920 by: rasmus
php.net
SetCookie in PHP3..help!
75880 by: Karen Griffin <hogwash
earthlink.net>
75881 by: rasmus
php.net
mSQL and php
75883 by: Lindsay Adams <lindsay
dingos.net>
About subcribe/unsubcribe function on http://www.php.net/support.php3
75884 by: Richard Lynch <rlynch
ignitionstate.com>
Binary Data + MySQL + PHP
75885 by: Richard Lynch <rlynch
ignitionstate.com>
75895 by: "Dave VanHorn" <dvanhorn
cedar.net>
Database question
75886 by: Richard Lynch <rlynch
ignitionstate.com>
Does PHP3 have News Group?
75887 by: Richard Lynch <rlynch
ignitionstate.com>
leading zeroes
75888 by: Carolyn Campbell <carolyn
btti.com>
75889 by: operator <vandal
superprivate.com>
75919 by: rasmus
php.net
String Munging
75892 by: Richard Lynch <rlynch
ignitionstate.com>
[Newbie] Passing parameters to dynamic image
75894 by: Thomas Merlin <thomas.merlin
mixad.com>
Premature end of script headers & Win2000
75896 by: "Michael Cochrane" <cochrane
world-net.co.nz>
php script to run in the background?
75897 by: Jen Hall <jhall
websofwonder.com>
75898 by: "Peter Kocks" <peter.kocks
baygate.com>
Code won't work. No errors, no nothing......
75899 by: CDitty <mail
redhotsweeps.com>
Auto-show message based on today's date?
75900 by: Derek Sivers <list
hitmedia.com>
75903 by: "Dave 'Duke of URL' Weiner" <davew
webmast.com>
75904 by: Tom <tomhenry
direct-connection.com>
75906 by: "Rossi Designs" <webmaster
rossidesigns.net>
75909 by: Jeremy Gaddis <jgaddis
m-net.arbornet.org>
Entering info into DB through "drop down" list
75901 by: "Rossi Designs" <webmaster
rossidesigns.net>
PHP3 + MySQL Database Design
75902 by: "Chris Fankhauser" <chrisf
swdata.com>
75916 by: "Andrew Sheh" <andrew
dmetechnologies.com>
75917 by: "Chris Fankhauser" <chrisf
swdata.com>
75923 by: "Andrew Sheh" <andrew
dmetechnologies.com>
PHP ini file
75907 by: "Dave VanHorn" <dvanhorn
cedar.net>
75908 by: rasmus
php.net
determine age from birth day
75910 by: Pablo Pasqualino <coolio
mdq.com>
75911 by: David Coulson <technoir
linux.com>
75914 by: Pablo Pasqualino <coolio
mdq.com>
Configuration (?) problem
75912 by: Margie Wiers <wiers
willard-oh.com>
why so many problems???
75913 by: prgr
u5.com
Constructor Question
75915 by: YATES Simon <Simon.Yates
afma.gov.au>
Sending mail with mail()
75918 by: "Dave VanHorn" <dvanhorn
cedar.net>
What goes here? Code Help needed
75921 by: Boz <Boz
musheen.com>
Compiling PHP
75922 by: "Tom Kevich" <php
artcenter.ac>
Administrivia:
To subscribe to the digest, e-mail:
php3-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php3-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php3
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I am putting php source code into a database and now want to display it
to the end user.
I can't use show_source() because this only works for files.
I have tried this:
$source = htmlspecialchars($source_from_db);
echo "$source";
It echos the source but it doesn't preserve the original formatting of the source code (as
it appears in text box where I entered it).
I can probably do this:
$source = htmlspecialchars($source_from_db);
echo "<textarea rows=10 cols=60>$source</textarea>";
But I would rather have the source appear as a natural part of my
text rather than set off in a text box.
Anybody have any other ideas how I can pull source code (PHP & HTML) from a
db and present the source in a way that perserves the way it looks in the text
input box.
Regards,
Paul Meagher
attached mail follows:
Why not output it straight to a temp file and show source this then just
remove it.
Nick
----- Original Message -----
From: "Paul Meagher" <paul
datavore.com>
To: "PHPMailing List" <php3
lists.php.net>
Sent: Sunday, February 13, 2000 7:03 PM
Subject: [PHP3] Viewing source for databased source code
> I am putting php source code into a database and now want to display it
> to the end user.
>
> I can't use show_source() because this only works for files.
>
> I have tried this:
>
> $source = htmlspecialchars($source_from_db);
> echo "$source";
>
> It echos the source but it doesn't preserve the original formatting of the
source code (as
> it appears in text box where I entered it).
>
> I can probably do this:
>
> $source = htmlspecialchars($source_from_db);
> echo "<textarea rows=10 cols=60>$source</textarea>";
>
> But I would rather have the source appear as a natural part of my
> text rather than set off in a text box.
>
> Anybody have any other ideas how I can pull source code (PHP & HTML) from
a
> db and present the source in a way that perserves the way it looks in the
text
> input box.
>
> Regards,
> Paul Meagher
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hi
Working on a submit form whereby a submitter of the form needs to attach an
image and send onto me using email notification
For e.g.
part of the php script:
/* Send relevant emails */
mail("$email", "Your request for information",
"$name\nThank you for your interest!\n");
mail("$adminaddress","Visitor request for info.","
$name requested for information.\n
The email address is $email. \n The Photo $photo \n");
Part of the submitform:
picture<br>
<input type="File" name="photo" size="25"> <br><P>
From the above i only receive the filename for the image and not the image
itself.
How could the image be attached to the email notification aswell. This is
the question???
Please can anyone help
thankyou
abbs1
x-stream.co.uk
attached mail follows:
A> How could the image be attached to the email notification aswell.
Go here: ftp://ftp.albasoftware.com/pub/mail_attach_bin.txt and
download the file.
Those are three functions (initially written by someone to attach text documents
to e-mail messages - sorry I have lost the author) I modified to
attach base64 encoded files as well.
At the very bottom of the file there's a short USAGE note.
I used the functions only with jpg and gif files but it looks like
they work with any kind of file.
Someone told me under PHP4 they do not work.
I hope this helps.
Regards,
Gianluca
-- ALBASOFTWARE C/ Aribau 70 - 5º 1ª 08011 Barcelona (Spain) Tel. +34 93454009 - +34 934549324 Fax. +34 934541979ICQ 47323154
webmaster
albasoftware.com http://www.albasoftware.com http://www.phpauction.org http://www.gianlucabaldo.com
attached mail follows:
Hi
Working on a submit form whereby a submitter of the form needs to attach an image and send onto me using email notification
For e.g.
part of the php script:
/* Send relevant emails */ mail("$email", "Your request for information", "$name\nThank you for your interest!\n"); mail("$adminaddress","Visitor request for info."," $name requested for information.\n The email address is $email. \n The Photo $photo \n");
Part of the submitform:
picture<br> <input type="File" name="photo" size="25"> <br><P>
From the above i only receive the filename for the image and not the image itself.
How could the image be attached to the email notification aswell. This is the question???
Please can anyone help
thankyou
abbs1
x-stream.co.uk
attached mail follows:
Hey All, I was wondering if anyone has done something similar to this. I would like to be able to pull the current URL out of the main browser window and submit it to a database which would then become that members online bookmark collection. I have seen bookmarkers that do something similar but I would like to have a drop down list in a remote window (Javascript) that feeds the main window (I have already found this part). Any suggestions would be greatly appreciated. Thanks,
Harry Hoffman Product Systems Specialist Restaurants Unlimited Inc. Seattle WA 206 634 3082 x. 270
attached mail follows:
Hey, has anyone used the FastTemplate class from www.thewebmasters.com/php . I find that it works great in php3, but it has had a bunch of problems in php4 b3. Has anyone else experienced this, or are my problems isolated?
attached mail follows:
Sunday, February 13, 2000, 7:57:53 PM, Christian:
> Hey, has anyone used the FastTemplate class from www.thewebmasters.com/php . I find that it works great in php3, but it has had a bunch of problems in php4 b3. Has anyone else experienced this, or > are my problems isolated?
Isolated, I guess. I use FastTemplate on a project here at home, and it works fine. What exactly is your problem?
The only problem I have with fast templates is that I find them somewhat strange to use, ie. counter-intuitive in some cases. Put I'm using them and they work.
-- Best regards, Paul Metaphor Systems as mailto:paulkenmetaphor.no
attached mail follows:
How come when I go to the address you gave I get a load of porno sites, is this a joke on your part or have they been broken in to, or maybe have I been broken in to!!!
Nick
----- Original Message -----
From: Christian Calloway
To: php3
lists.php.net
Sent: Sunday, February 13, 2000 7:57 PM
Subject: [PHP3] fasttemplate in php4
Hey, has anyone used the FastTemplate class from www.thewebmasters.com/php . I find that it works great in php3, but it has had a bunch of problems in php4 b3. Has anyone else experienced this, or are my problems isolated?
attached mail follows:
Sunday, February 13, 2000, 9:34:37 PM, NickM:
> How come when I go to the address you gave I get a load of porno sites, is this a joke on your part or have they been broken in to, or maybe have I been broken in to!!!
Strange that the address do direct to porn sites...I'm pretty sure that the address which Christian sent was the correct one and the one I've been using myself.
I would have sworn it was the correct address.
-- Best regards, Paul Metaphor Systems as mailto:paulkenmetaphor.no
attached mail follows:
Sunday, February 13, 2000, 7:57:53 PM, Christian:
> Hey, has anyone used the FastTemplate class from www.thewebmasters.com/php . I find that it works great in php3, but it has had a bunch of problems in php4 b3. Has anyone else experienced this, or > are my problems isolated?
I think the correct address should be http://www.thewebmasters.net/php/, a perfectly honest mistake, and I think that's all which is behind this little conondrum.
-- Best regards, Paul Metaphor Systems as mailto:paulkenmetaphor.no
attached mail follows:
I think that should be
http://www.thewebmasters.net/php
not .com
- steve
At 9:34 PM +0100 2/13/00, NickM wrote:
>How come when I go to the address you gave I get a load of porno
>sites, is this a joke on your part or have they been broken in to,
>or maybe have I been broken in to!!!
>
>Nick
>
>
>----- Original Message -----
>From: <mailto:cubadc
earthlink.net>Christian Calloway
>To: <mailto:php3
lists.php.net>php3
lists.php.net
>Sent: Sunday, February 13, 2000 7:57 PM
>Subject: [PHP3] fasttemplate in php4
>
>Hey, has anyone used the FastTemplate class from
><http://www.thewebmasters.com/php>www.thewebmasters.com/php . I find
>that it works great in php3, but it has had a bunch of problems in
>php4 b3. Has anyone else experienced this, or are my problems
>isolated?
+---------------- Splurk! Glort! Klikrunk! Ploip! Katoong!---------------+
| Steve Edberg University of California, Davis |
| sbedberg
ucdavis.edu (530)754-9127 |
| Computer Consultant http://aesric.ucdavis.edu/ |
+------------------ Don Martin 18 May 1931 - 7 Jan 2000 -----------------+
attached mail follows:
Try: isset ($pbHistory_x)
Note the _, bit of a kludge in my opinion but that's how they do it.
Nick
----- Original Message -----
From: "Tony Hall" <tonyhall
vcash.com>
To: <php3
lists.php.net>
Sent: Monday, February 14, 2000 12:37 PM
Subject: [PHP3] reading Multiple Image Buttons
> I have an application I am trying to develop using Images instead of
> pushbuttons
> The code goes like this
> <FORM METHOD=GET ACTION=test.php3>
> <table cellpadding=0 cellspacing=0 border=0 width='100%'
bgcolor='#0000FF'>
> <tr align='center'>
> <td>
> <INPUT Name=pbNotes TYPE=Image SRC=notes.gif WIDTH=80 ALT='View
> Current Notes' >
> <B>
> </td>
>
> <td>
> <INPUT Name=pbHistory TYPE=Image SRC=history.gif WIDTH=80
> ALT='Show History' >
> </td>
> </table>
> </FORM>
>
> Clicking on the History Button produces the following
> http://www.mydomain.com/test.php3?&pbHistory.x=45&pbHIstory.y=11
> Similarly with the Notes
>
> my problem is this
>
> How do I tell what button (image) was pressed
> I cannot test for
> isset($pbHistory)
> and
> isset ($pbHistory.x) returns an error
>
>
> Tnanks in advance
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Martin Edelius writes: > Hi. > > ><?php > >function cmp( $c1, $c2 ) { > > return (int) ( $c1 - $c2 ); > >} > > > >$list = '12,11,1,24,2,22,3,30,23,0'; > >$list = explode( ',', $list ); > > > >usort( $list, 'cmp' ); > >?> > > This setup almost works. I'm generating the string/array dynamically, adding > new numbers as a user reloads the page. The setup above works if I add > numbers in a row; 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 and so on. It sorts > them in numerical order. But if I add an arbitrary (larger) integer to the > list, like; 1,2,3,4,9 it stops sorting and stacks the rest of the numnbers > on afterwards without sorting in the 9; 1,2,3,4,9,5,6,7,8... > > Maybe I'm misunderstanding the sorting routine but shouldn't it compare 9 > and 5 and thusly move 5 before 9 and so on until I add 10? > > Any and all ideas are *very* much appreciated... > > > Best regards, > Martin Edelius
Well, the comparison function itself can be anything you like; for your script, the requirements are a) cast to int somewhere in there, and b) sort in ascending order.
If I run any of the strings you give through usort() I get a sorted string back. To be frank, it sounds like when you're addin values to the end of the string it's not going through the sort again.
Can you show a short script which duplicates the problem?
-- +----------------------------------------------------------------+ |Torben Wilson <torbenphp.net> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben
netmill.fi| +----------------------------------------------------------------+
attached mail follows:
It seems that PHP3 on Linux is not able to contact an MS SQL database without a third party commercial driver:-(
Someone told me that PHP4 will be able to contact an MS SQL database. I downloaded the code and had a look. It still seems that this capability is reserved for the win32 version of PHP....
Can someone shed some light on the issue and if there is something which is getting developed.
Who has a php4.rpm for linux/redhat/mandrake ?
Please reply directly to me as I'm on the digest list.
Franck Martin
Network and Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: franck
sopac.org.fj <mailto:franck
sopac.org.fj>
Web site: www.sopac.org.fj <http://www.sopac.org.fj>
attached mail follows:
> It seems that PHP3 on Linux is not able to contact an MS SQL database > without a third party commercial driver:-(
Sure it can. See the FreeTDS project (www.freetds.org). It works nicely.
-Rasmus
attached mail follows:
> Who has a php4.rpm for linux/redhat/mandrake ?
I tried the RPM method in RH6.1, without success. :( What I did to make it go is described in: http://www.cedar.net/users/dvanhorn/lamp-install.html
attached mail follows:
At 9:32 AM +0000 2/13/00, Martin E. Koss wrote: >Hi, >Does anyone know the answer to this: > >My backup system runs every night to backup all my work from c:\Apache; >c:\php3 and c:\mysql but I always get messages saying that loads of ISD and >ISM files could not be backed up because the files are in use... > >So the question is, even after hours of no database files being used, why do >these files remain active? And more importantly, does this work the same on >a Linux server? > >If it's just a windows thing then I'm not worried, but with persistent >connections I thought the connection to the database was terminated after >the entire script/page had completed. > >Regards, > >Martin E. Koss >Active Media Solutions >
Are you stopping MySQL? I believe it'll keep the index files and mysql database open to avoid the overhead of reopening these files constantly. If you're using MySQL as an NT service, then stick a
net stop MySQL
before backing up starts in your backup script to stop it. This will avoid attempts at database updates while you're backing up, too. This has worked fine for me.
- steve
+---------------- Splurk! Glort! Klikrunk! Ploip! Katoong!---------------+
| Steve Edberg University of California, Davis |
| sbedberg
ucdavis.edu (530)754-9127 |
| Computer Consultant http://aesric.ucdavis.edu/ |
+------------------ Don Martin 18 May 1931 - 7 Jan 2000 -----------------+
attached mail follows:
> This is the source code of a test script where i TRIED to create an image : > > <? > > Header("Content-type: image/gif"); > $image=imagecreate(468,60); > $string="this is a test"; > imagefill($image,10,10,$white); > imagestring($image,20,50,50,$string,$black); > imageline($image,0,0,468,60,$blue); > imagegif($image); > echo "$image"; > > ?> > > how come the image is totally black, and not filled with an lines or characters and a white rectangle ?
You never defined $white, $black and $blue, so they all become 0. See the ImageColorAllocate() function.
-Rasmus
attached mail follows:
> Hello all. I have a virtual server and I need to set magic_quotes_gpc. When i try to edit my .htaccess i get server error. What do i do wrong? > This is what i tryed: > > magic_quotes_gpc yes > magic_quotes_gpc true > php_magic_quotes_gpc yes > php_magic_quotes_gpc true
It is php3_magic_quotes_gpc
attached mail follows:
Hi All,
I'm having trouble with the PHP virtual command eg. <?php virtual("index_body.shtml"); ?> this should call the .shtml file as if Apache called an <--#include virtual ... style command.
It gives the following error:
"Call to unsupported or undefined function virtual() in /home/username/public_html/index.php3 on line 17"
I currently get round this using an include, but then I don't get the SSI sections of the .shtml file - which kind of defeats the object.
The server uses PHP 3.0.7 not sure of apache version.
Is this a problem with the server or my calling of the function.
Any ideas?
Jeremy
--
Co-Comp
Turn-key computing and internet solutions
Web: http://www.co-comp.co.uk
Email: enquiry
co-comp.co.uk
RiscStation Registered Dealer Tel: +44 (0)7970 064479
Authorised RISCOS Installer Fax: +44 (0)7971 434612
attached mail follows:
> "Call to unsupported or undefined function virtual() > in /home/username/public_html/index.php3 on line 17"
Perhaps you are using the CGI version of PHP? virtual() only works in the Apache module version.
-Rasmus
attached mail follows:
In article <Pine.WNT.4.21.0002131735180.-302405
vaio.php.net>,
<rasmus
php.net> wrote:
> > "Call to unsupported or undefined function virtual()
> > in /home/username/public_html/index.php3 on line 17"
> Perhaps you are using the CGI version of PHP? virtual() only works in > the Apache module version.
How can I tell?
I've run phpinfo() which didn't give too many clues (or rather that I knew to look for!)
Apache is V.1.3.3 (Unix). PHP core shows as CFLAGS=-g -02 -02 HSREGEX=yes if any of that helps.
TIA, Jeremy
--
Co-Comp
Turn-key computing and internet solutions
Web: http://www.co-comp.co.uk
Email: enquiry
co-comp.co.uk
RiscStation Registered Dealer Tel: +44 (0)7970 064479
Authorised RISCOS Installer Fax: +44 (0)7971 434612
attached mail follows:
> > Perhaps you are using the CGI version of PHP? virtual() only works in > > the Apache module version. > > How can I tell? > > I've run phpinfo() which didn't give too many clues (or rather that I knew > to look for!) > > Apache is V.1.3.3 (Unix). > PHP core shows as CFLAGS=-g -02 -02 HSREGEX=yes if any of that helps.
Is there an Apache section in the phpinfo() output? Sounds like you are running the CGI version to me.
-Rasmus
attached mail follows:
I have read and tested and read and tested some more, but cannot get the following code to set a cookie. Someone please tell me what I am doing wrong!
<?
mysql_connect('localhost','usr','passwrd');
mysql_select_db('dbname');
mysql_query("insert into table
(pid,uname,uemail,uphone,usrname,upass,nid) values
(1,'$uname','$uemail','$uphone','$usrname','$upass',$news)");
$id = mysql_insert_id();
if ($setcky == 1){
SetCookie("CookieName",$id,time()+94608000,"/",".domain.org",0); // 3
years
}
?>
$setcky is a variable passed from a form on a previous page. When I echo $setcky I get a value and when I echo $id I get a value ( I am doing this AFTER SetCookie), so it is not that these variables are not set. I am not getting any error messages either.
I am able to set the following cookie fine on a different page:
<? $cookie = md5(uniqid(rand())); SetCookie("CookieName2",$cookie, time()+3600, "/", ".domain.org",0); ?>
Why is the first set of code not working?
Please help me end my struggle with this....
attached mail follows:
> <?
> mysql_connect('localhost','usr','passwrd');
>
mysql_select_db('dbname');
> mysql_query("insert into table
> (pid,uname,uemail,uphone,usrname,upass,nid) values
> (1,'$uname','$uemail','$uphone','$usrname','$upass',$news)");
> $id = mysql_insert_id();
> if ($setcky == 1){
> SetCookie("CookieName",$id,time()+94608000,"/",".domain.org",0); // 3
> years
> }
> ?>
>
> $setcky is a variable passed from a form on a previous page. When I
> echo $setcky I get a value and when I echo $id I get a value ( I am
> doing this AFTER SetCookie), so it is not that these variables are not
> set. I am not getting any error messages either.
Put a phpinfo() call in your script after your SetCookie() call and look at the response headers listed at the bottom of that output. Do you see your cookie?
-Rasmus
attached mail follows:
My ISP has php installed as an apache module. They also have mSQL installed for me in my Virtual Server directory
What they don't have installed is any of the msql() functions for php.
is there a library that i can load using dl() to add these?
Alternately, i have compiled on my isp's server, the php cgi binary it works great from the command line, and connects to the msql db with no problems, but it won't do it through the web browser. it will do any other php command that i desire, except the msql_connect
recap: using the provided apache module on my isp, it states that msql_connect is an unkown function using the cgi, it won't connect, but it does know the function.
Ideas for making the cgi work?
Lindsay Adams
Dingos.net
lindsay
dingos.net
attached mail follows:
At 01:15 AM 2/13/00 +0800, you wrote: >Dear all: > I am a new user of PHP3, I am very interesting to the >source code of http://www.php.net/support.php3 ,anyone who could let me know >how to develop the "subscripe/unsubcribe mailing List"function on >http://www.php.net/support.php3 ??
There's not a whole lot to it...
<?php
if (isset($submit)){
mail('php3-subscribe
lists.php.net', 'subscribe', 'subscribe', "From:
$victim\r\nReply-To: $victim\r\n");
}
?>
<FORM ACTION=thispage.php3 METHOD=POST>
Victim: <INPUT NAME=victim><BR>
<INPUT TYPE=SUBMIT NAME=submit VALUE="Subscribe Victim">
</FORM>
-- "TANSTAAFL" http://CHaTMusic.com http://EmphasisEntertainment.com http://L-I-E.com http://JadeMaze.com http://CatCatalani.com http://MGMH.com http://VoodooKings.net http://UncommonGround.com Need Work? Graphic Design: http://L-I-E.com/jobs.htm#GraphicDesign Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
attached mail follows:
At 12:33 AM 2/12/00 -0800, you wrote: >Of course, here's the catch: if the document is large, >the viewer is in for a long wait.
True. You could store them in a file instead of in your database, and store the path to them instead. It might improve performance drastically.
>I came up with what seems like a really "crude" way of >accomplishing this. When someone requests a document, >use a key to tell which page they are on. Then you just >skip through each line in the document until you reach >the page they are on, print the next 50 lines (or however >many lines) to their browser and exit.
Ewwwwww.
>The reasons why this seems so "crude" is that the work >load gets greater the further into the document the >person gets. If it's a 30 page document, it's quick the >first time, then longer, and then forever by the time you >get to page 30. Plus, I would imagine that this puts a >large load on the server. > >Sooo... after that long winded description *grin*, I'm >writing to see what other approaches you'd recommend on >doing this. Any ideas or helpfull suggestions (especially >examples) would be greatly appreciated =)
Well, since the bottleneck would seem to be the breaking of the text into nice-size chunks, why not simply do that when it is entered? IE: Instead of a single BLOB storing the whole article, store each article in "chunks" of a known number of lines (30, or whatever) and then spew out a given chunk on demand.
You'd need to record some meta-info, of course, and it would increase the article intake time (ie, a decrease in performance on insertion) but would certainly make it feasible to view the articles page by page.
You could, of course, combine *BOTH* methods :-)
-- "TANSTAAFL" http://CHaTMusic.com http://EmphasisEntertainment.com http://L-I-E.com http://JadeMaze.com http://CatCatalani.com http://MGMH.com http://VoodooKings.net http://UncommonGround.com Need Work? Graphic Design: http://L-I-E.com/jobs.htm#GraphicDesign Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
attached mail follows:
If you made each document a table, and each page a record in the table, then you could use the MySQL limit clause to snap to the right page immediately.
You'd have to do something going in to parse the pages into the records, but that only happens once.
(just a newbie thought :)
attached mail follows:
At 10:08 PM 2/12/00 -0800, you wrote: >> Hello, > >I read alot on this list about PHP3/4 with mysql. Is PHP a wonderful marriage >mysql only? What I mean is, does PHP work as nicely with say SQL or ORACLE or >Informix?? > >The thing is, I want to get into a technology (learn) that is expandable and >accomodates a wide range of solutions and is scalable.. > >any opinions???
MySQL is what many use because it's free and screams in speed.
Many people start with MySQL thinking they'll have to upgrade some day, and never do.
Unless you have more than a million records in your tables or need transactions/cursors, or have been brain-washed by proprietary database manufacturers into believing stored procedures are the bomb(1), MySQL is pretty much all you could ask for.
I use PostgreSQL myself, since that's what my ISP had handy.
PHP works just fine with Oracle, Sybase, MS-SQL, etc.
Obviously there are going to be differing experiences and performance/integration issues.
But there's certainly nothing remotely similar to PHP that's *more* flexible in terms of integration with databases.
(1) I'm no expert, and maybe if I was doing some massive database administration, I'd think differently but I've never seen a use of stored procedures that wasn't a direct result of: o Bad dba design o Broken database/SQL vendor (eg, need the auto-numbered ID returned on a per-connection basis like MySQL will do) o Brain-washing
-- "TANSTAAFL" http://CHaTMusic.com http://EmphasisEntertainment.com http://L-I-E.com http://JadeMaze.com http://CatCatalani.com http://MGMH.com http://VoodooKings.net http://UncommonGround.com Need Work? Graphic Design: http://L-I-E.com/jobs.htm#GraphicDesign Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
attached mail follows:
At 09:06 AM 2/13/00 +0900, you wrote: > If PHP3 have News Group, I want to join. I want to know PHP3 News Group >address. Thank you!
Dig around on http://www.php.net and look under "Support" and "Links" for mention of the news groups. Check out both, since I think one is no longer maintained.
-- "TANSTAAFL" http://CHaTMusic.com http://EmphasisEntertainment.com http://L-I-E.com http://JadeMaze.com http://CatCatalani.com http://MGMH.com http://VoodooKings.net http://UncommonGround.com Need Work? Graphic Design: http://L-I-E.com/jobs.htm#GraphicDesign Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
attached mail follows:
I need to format a number so that it always has three digits: 002 instead of 2. Any suggestions?
Carolyn Campbell
attached mail follows:
Dear Carolyn,
<?
$what = sprintf("%03d", 2); echo $what; // prints 002
?>
exit
On Sun, 13 Feb 2000, Carolyn Campbell wrote:
> I need to format a number so that it always has three digits: 002 instead > of 2. Any suggestions? > > Carolyn Campbell
attached mail follows:
> I need to format a number so that it always has three digits: 002 instead > of 2. Any suggestions?
printf('%03d',$number);
-Rasmus
attached mail follows:
So, I'm pretty sure that:
<?php $foo = 'test'; echo $foo[2]; ?>
is documented as kosher, though I'll be damned if I can find it in the manual at the moment...
But what about:
<?php $foo = 'test'; $foo[2] = 'x'; echo $foo; ?>
And when a string is passed to a function... Is destructive modification of string contents kosher, verboten, or undocumented or?...
-- "TANSTAAFL" http://CHaTMusic.com http://EmphasisEntertainment.com http://L-I-E.com http://JadeMaze.com http://CatCatalani.com http://MGMH.com http://VoodooKings.net http://UncommonGround.com Need Work? Graphic Design: http://L-I-E.com/jobs.htm#GraphicDesign Printer Driver: http://L-I-E.com/jobs.htm#PrinterDriver
attached mail follows:
Hello,
How is it possible to send parameters to a dynamic image ? This web page I'm working on has an image that I would like to create on the fly, using one parameter that is defined in my page. I noticed that the code in my .gif file doesn't take in account the variables defined in the rest of the page. I tried passing the variable through a cookie, wasn't much more successful, any hints ?
Thanks,
Thomas.
attached mail follows:
Well after your message I went and undated my installation to latest version of PHP3 and Apache 1.3.11 and I don't seem to have any problems. I'm running on Win2000 Advanced server.
Is PHP working from the command line? like "php.exe somefile.php3". The only thing I did in the http.conf to make things work was add:
ScriptAlias /php3/ "c:/program files/php3/" AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3 .phtml Action application/x-httpd-php3 "/php3/php.exe"
to the bottom of the file. I have php3 installed in c:\program files\php3\. I have played around a bit with some settings and can't recreate your error message.
Hope something in there helps
Mike
> Greetings, > > I wasn't able to get PHP3 to run on a Apache 1.3.11 / Win2000 System. Plain > HTML-Sites work fine, but when interpreting a php3-script, Apache returns a > error 500. The logs say it's a 'Premature end of script headers' error. > > What's the problem here? > > Thanks for your help, > > Markus Wilthaner
attached mail follows:
Hi there I have a script that I'd like to have run as a background process. I'd like a visitor to be able to go to my site, click on a link, and a PHP script will run in the background, so if the user wants to go away, the script keeps doing it's thing. Is this possible? I'm in a unix environment. (I do not have a php.cgi, my ISP has installed php as a mod)
thanks -jen .
attached mail follows:
Use the register_shutdown_function() to call the function you want run in the background.
You might want to also check out
ignore_user_abort() and
set_time_limit()
so that your background processes does not get killed if it runs too long.
--pk
> -----Original Message-----
> From: Jen Hall [mailto:jhall
websofwonder.com]
> Sent: Sunday, February 13, 2000 4:27 PM
> To: php3 Mailing List
> Subject: [PHP3] php script to run in the background?
>
>
> Hi there
> I have a script that I'd like to have run as a background process.
> I'd like a visitor to be able to go to my site, click on a link, and a
> PHP script will run in the background, so if the user wants to go away,
> the script keeps doing it's thing.
> Is this possible?
> I'm in a unix environment.
> (I do not have a php.cgi, my ISP has installed php as a mod)
>
> thanks
> -jen
> .
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
Can someone look at the code below and tell me why it won't work? I am using the same code on several pages and yet this page won't work. No errors and nothing is entered in the DB.
Any help is appreciated.
Thanks
CDitty
<?php
$db = mysql_connect("localhost", "root"); mysql_select_db("sweeps", $db);
if ($submit) { if(!$name) { $error = "Sorry! You must fill in all the fields.";
// Check email address
} elseif(!eregi("^[0-9a-z_\-\.]+
{1}[0-9a-z_\-\.]+\.{1}[a-z]{2,4}$",$email)) {
$error = "Please verify your email address.";
} else {
// Process form
$sql = "INSERT INTO answer_me_this
(name, email, enterdate, answer_1, answer_2)
VALUES
('$name', '$email', '$enterdate', '$answer_1', '$answer_2')";
$result = mysql_query($sql) or die(mysql_error());;
echo "<META HTTP-EQUIV=\"refresh\"; content=\"0; url=/thanks.htm\">";
}
}
?>
<?php $today = date( "Ymd His" ); ?>
<?php if ($error) { print "<font size=+1 color=#FF0000><center><b>"; echo $error; print "<b></center></font>"; } ?>
<form method="post" action="<?php echo $PHP_SELF?>"> <div align="center"><center><table border="0"> <tr> <td colspan="2">Name:</td> <td></td> <td colspan="2"><input type="text" name="name" size="20" value="<?php echo $name ?>"></td> </tr> <tr> <td colspan="2">Email address: </td> <td></td> <td colspan="2"><input type="text" name="email" size="20" value="<?php echo $email ?>"></td> </tr> <tr> <td colspan="2">Answer #1: </td> <td></td> <td colspan="2"> <select name="answer_1"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> <option value="d">D</option> </select> </td> </tr> <tr> <td colspan="2">Answer #2:<br><small>(if applicable, not required)</small> </td> <td></td> <td colspan="2"> <select name="answer_2"> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> <option value="d">D</option> </select> </td> </tr> </table> </center></div> <div align="center"><center><p> <input type="submit" value="Submit"><input type="reset" value="Reset"></p> </center></div> </form>
<center><hr size="1" width="640" align="center"> <table border=0 width="100%"> <td align=center><b><i><small><small>Listings provided on our pages are in no way affiliated with nor endorsed by Red Hot Sites or its agents. Every <br>effort is made to verify the accuracy of the information presented, but no guarantee is provided nor implied. <br>Copyright: Red Hot Sites 1998</small></small></i></td> </tr> </table> </table>
attached mail follows:
I'm sure someone's done this. Please send any advice.
I want to have 365 messages in a MySQL table. (done)
And I want the website to automatically show one at a time based on today's date. (Switching at midnight.) Example: record #30 shows on February 1st all day. Record #31 shows on February 2nd, all day.
What MySQL query would I use to do this?
Or is it the job of PHP to customize the query?
I've got it all figure out (the basic "select" query to show the data) - except for the auto-changing date feature.
Any advice appreciated! Thanks!
Derek Sivers
list
hitmedia.com
attached mail follows:
> I'm sure someone's done this. Please send any advice.
>
> I want to have 365 messages in a MySQL table. (done)
>
> And I want the website to automatically show one at a time based on
today's
> date. (Switching at midnight.)
> Example: record #30 shows on February 1st all day. Record #31 shows on
> February 2nd, all day.
>
> What MySQL query would I use to do this?
>
> Or is it the job of PHP to customize the query?
>
> I've got it all figure out (the basic "select" query to show the data) -
> except for the auto-changing date feature.
>
> Any advice appreciated! Thanks!
>
>
>
> Derek Sivers
> list
hitmedia.com
I'm going to have to do something very similar very soon. The way I plan on doing it (this is untested, but should work... :D) is to use the Julian date. You have 365 (actually, you should have 366 to allow for the leap year this year!) messages in the MySQL db, each with a key of 1 to 366. When the page loads, it converts the current date on the server into the Julian date (which is a number between 1 and 366 - how convenient!), and then use that in the while clause of the sql - select message from messages were messageid=[julian date].
Dave
attached mail follows:
It's the query that needs attention
Show the actual (cut and paste) databvase query code. please.
At 02:09 AM 2/14/00 +0100, Derek Sivers wrote:
>I'm sure someone's done this. Please send any advice.
>
>I want to have 365 messages in a MySQL table. (done)
>
>And I want the website to automatically show one at a time based on
>today's date. (Switching at midnight.)
>Example: record #30 shows on February 1st all day. Record #31 shows on
>February 2nd, all day.
>
>What MySQL query would I use to do this?
>
>Or is it the job of PHP to customize the query?
>
>I've got it all figure out (the basic "select" query to show the data) -
>except for the auto-changing date feature.
>
>Any advice appreciated! Thanks!
>
>
>
>Derek Sivers
>list
hitmedia.com
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
how about $today = date("z"); "... WHERE message_number = '$today'";
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: Derek Sivers <list
hitmedia.com>
To: <php3
lists.php.net>
Sent: Sunday, February 13, 2000 8:09 PM
Subject: [PHP3] Auto-show message based on today's date?
| I'm sure someone's done this. Please send any advice.
|
| I want to have 365 messages in a MySQL table. (done)
|
| And I want the website to automatically show one at a time based on
today's
| date. (Switching at midnight.)
| Example: record #30 shows on February 1st all day. Record #31 shows on
| February 2nd, all day.
|
| What MySQL query would I use to do this?
|
| Or is it the job of PHP to customize the query?
|
| I've got it all figure out (the basic "select" query to show the data) -
| except for the auto-changing date feature.
|
| Any advice appreciated! Thanks!
|
|
|
| Derek Sivers
| list
hitmedia.com
|
|
| --
| PHP 3 Mailing List <http://www.php.net/>
| To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
| To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
| To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
| To contact the list administrators, e-mail: php-list-admin
lists.php.net
|
|
attached mail follows:
At 02:09 AM 2/14/00 +0100, Derek Sivers wrote:
>And I want the website to automatically show one at a time based on today's >date. (Switching at midnight.) >Example: record #30 shows on February 1st all day. Record #31 shows on >February 2nd, all day. > >What MySQL query would I use to do this? > >Or is it the job of PHP to customize the query? > >I've got it all figure out (the basic "select" query to show the data) - >except for the auto-changing date feature.
While you could use PHP to get find out what day of the year it is, it might be easier to just add a DATE field to your table, set to the date that you want it to be displayed. Then you could do:
SELECT message FROM table WHERE date = CURDATE();
Hope this helps.
-- Jeremy Gaddis <jgaddism-net.arbornet.org>
attached mail follows:
give the option a name
Rossi Designs
(904) 226-8979
P.O. Box 1084, Holly Hill, Florida 32125-1084
http://rossidesigns.net
----- Original Message -----
From: WL <will
localads.net>
To: Brian Clark <brianj
ais.ais-gwd.com>
Cc: <php3
lists.php.net>
Sent: Sunday, February 13, 2000 5:46 AM
Subject: Re: [PHP3] Entering info into DB through "drop down" list
|
| >
| >
| > Are you using $rights as the value? Explain how you know it doesn't
work.
| >
| >
| > # <select name="rights">
| > # <option value="upload">Can Upload</option>
| > # <option value="admin">Admin</option>
| > # <option value="view">View only</option>
| > # </select>
| > #
| > # There's the code. Any help appreciated.
|
|
| The reason it doesn't work is because I have been choosing the value
| "upload" which is the text I want to be entered into the database. By
| replacing the "rights" field in the database with the "rights" value
| submiited by the form above, it achieves nothing because essentially
| "$rights" is empty here.
|
| Any suggestions?
|
| Will
|
|
|
| --
| PHP 3 Mailing List <http://www.php.net/>
| To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
| To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
| To search the mailing list archive, go to:
http://www.php.net/mailsearch.php3
| To contact the list administrators, e-mail: php-list-admin
lists.php.net
|
|
attached mail follows:
This is more of a MySQL question than PHP3, but..
I am building a series of backend/frontend scripts for a gaming league which I am running. I plan on having two databases, one for "clan" information, the other for "battle" information. These two databases will be linked by battle id and clan id. Assuming that one clan participates in more than one battle (thus having more than one battle id), how could I set this up? I plan on having everything linked to each other, so that I can have a page which will list the battles for a certain clan, and all information therein.
Chris Fankhauser Meridian Digital Media http://www.meridime.com
attached mail follows:
> -----Original Message-----
> From: Chris Fankhauser [mailto:chrisf
swdata.com]
> Sent: Sunday, February 13, 2000 5:22 PM
> To: php3
lists.php.net
> Subject: [PHP3] PHP3 + MySQL Database Design
>
>
> This is more of a MySQL question than PHP3, but..
>
> I am building a series of backend/frontend scripts for a gaming
> league which
> I am running. I plan on having two databases, one for "clan" information,
> the other for "battle" information. These two databases will be linked by
> battle id and clan id. Assuming that one clan participates in
> more than one
> battle (thus having more than one battle id), how could I set this up? I
> plan on having everything linked to each other, so that I can have a page
> which will list the battles for a certain clan, and all
> information therein.
>
> Chris Fankhauser
> Meridian Digital Media
> http://www.meridime.com
>
You probably need only one database and two tables; and probably you will
also need an individual playerID. This might not be what you are thinking
about, but...
Anyways, on the Battle table store the ClanID. ClanID can repeat, but I would assume ClanID and BattleID (or the player)together cannot repeat on one table.-- same player playing twice. Then you do a simple
Select * from Battle, Clan Where ClanID = BattleID.
Andrew
DME Technologies -- Displays Made Easy
andrew
dmetechnologies.com
attached mail follows:
whoops - excuse me, I meant one database and two tables :) And the individual players don't need to be involved, just the clans and battles.
Chris Fankhauser Meridian Digital Media http://www.meridime.com
-----Original Message-----
From: Andrew Sheh [mailto:andrew
dmetechnologies.com]
Sent: Sunday, February 13, 2000 8:29 PM
To: Chris Fankhauser; php3
lists.php.net
Subject: RE: [PHP3] PHP3 + MySQL Database Design
> -----Original Message-----
> From: Chris Fankhauser [mailto:chrisf
swdata.com]
> Sent: Sunday, February 13, 2000 5:22 PM
> To: php3
lists.php.net
> Subject: [PHP3] PHP3 + MySQL Database Design
>
>
> This is more of a MySQL question than PHP3, but..
>
> I am building a series of backend/frontend scripts for a gaming
> league which
> I am running. I plan on having two databases, one for "clan" information,
> the other for "battle" information. These two databases will be linked by
> battle id and clan id. Assuming that one clan participates in
> more than one
> battle (thus having more than one battle id), how could I set this up? I
> plan on having everything linked to each other, so that I can have a page
> which will list the battles for a certain clan, and all
> information therein.
>
> Chris Fankhauser
> Meridian Digital Media
> http://www.meridime.com
>
You probably need only one database and two tables; and probably you will
also need an individual playerID. This might not be what you are thinking
about, but...
Anyways, on the Battle table store the ClanID. ClanID can repeat, but I would assume ClanID and BattleID (or the player)together cannot repeat on one table.-- same player playing twice. Then you do a simple
Select * from Battle, Clan Where ClanID = BattleID.
Andrew
DME Technologies -- Displays Made Easy
andrew
dmetechnologies.com
attached mail follows:
Reply at bottom
> -----Original Message-----
> From: Chris Fankhauser [mailto:chrisf
swdata.com]
> Sent: Sunday, February 13, 2000 6:39 PM
> To: php3
lists.php.net
> Subject: RE: [PHP3] PHP3 + MySQL Database Design
>
>
> whoops - excuse me, I meant one database and two tables :) And the
> individual players don't need to be involved, just the clans and battles.
>
> Chris Fankhauser
> Meridian Digital Media
> http://www.meridime.com
>
>
> -----Original Message-----
> From: Andrew Sheh [mailto:andrew
dmetechnologies.com]
> Sent: Sunday, February 13, 2000 8:29 PM
> To: Chris Fankhauser; php3
lists.php.net
> Subject: RE: [PHP3] PHP3 + MySQL Database Design
>
>
>
> > -----Original Message-----
> > From: Chris Fankhauser [mailto:chrisf
swdata.com]
> > Sent: Sunday, February 13, 2000 5:22 PM
> > To: php3
lists.php.net
> > Subject: [PHP3] PHP3 + MySQL Database Design
> >
> >
> > This is more of a MySQL question than PHP3, but..
> >
> > I am building a series of backend/frontend scripts for a gaming
> > league which
> > I am running. I plan on having two databases, one for "clan"
> information,
> > the other for "battle" information. These two databases will
> be linked by
> > battle id and clan id. Assuming that one clan participates in
> > more than one
> > battle (thus having more than one battle id), how could I set
> this up? I
> > plan on having everything linked to each other, so that I can
> have a page
> > which will list the battles for a certain clan, and all
> > information therein.
> >
> > Chris Fankhauser
> > Meridian Digital Media
> > http://www.meridime.com
> >
> You probably need only one database and two tables; and probably you will
> also need an individual playerID. This might not be what you are thinking
> about, but...
>
> Anyways, on the Battle table store the ClanID. ClanID can repeat, but I
> would assume ClanID and BattleID (or the player)together cannot repeat on
> one table.-- same player playing twice. Then you do a simple
>
> Select * from Battle, Clan Where ClanID = BattleID.
>
> Andrew
> DME Technologies -- Displays Made Easy
> andrew
dmetechnologies.com
>
Chris, do you mean the table setup?
Maybe something like: CREATE TABLE clantable ( ClanID varchar(5) NOT NULL, BattleID varchar(5) NOT NULL, PRIMARY KEY (ClanID, BattleID), UNIQUE BattleID (BattleID, ClanID) // avoids same clanID in same battle field ); // of course other clans can be in teh same battle field.
Andrew Sheh
DME Technologies -- Displays Made Easy
andrew
dmetechnologies.com
attached mail follows:
I finally need to tweak the PHP ini file, and I just discovered I don't have one!
It is looking in /usr/local/lib according to the variable dump. I found a php3.ini on my system, and copied it to /usr/local/lib, named it php.ini, and made the appropriate changes for the sendmail path, and when I killed HTTPD, I was unable to restart it.
Removing my php.ini file allowed httpd to start normally.
Is there an example config file for php4 somewhere I can use?
attached mail follows:
> Is there an example config file for php4 somewhere I can use?
php.ini-dist in the PHP4 distribution.
attached mail follows:
hi... I have a form that ask for birth day...
$day_of_birth $month_of_birth $year_of_birth
now.... I want to know how old the user is...
can anybody help?
maybe is a stupid question... but... i had to do it :)
-- Saludos, Pablo mailto:cooliomdq.com
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Sun, 13 Feb 2000, Pablo Pasqualino wrote:
> hi... > I have a form that ask for birth day... > > $day_of_birth > $month_of_birth > $year_of_birth > > now.... I want to know how old the user is... > > can anybody help?
use mktime() to create a unix time of their second of birth (lets assume they were born at midnight). Then do
time()-$birthtime
to get the number of seconds they've been alive. You can then use date() to produce a Y/M/D style thing.
- --
__ ___ . . |"|
\ \ / /_\ Linux Systems * ( * _|_|_
\ V / _ \ * . * (o o)
+-\_/_/-\_\--{ David Coulson }--{ technoir
linux.com }---ooO--(_)--Ooo-+
+--{ themes.org Lead Developer }------{ http://technoir.themes.org/ }--+
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use Comment: PGP Public Key - http://technoir.themes.org/public-key.txt Charset: noconv
iQA/AwUBOKdjLmvDGUu9kKufEQJUrgCg0Pis231q9RNxzl/y7wN6el2hEzsAn3Rs 9+/9hhpi8K8kphLCf6BjqtMg =ah2m -----END PGP SIGNATURE-----
attached mail follows:
Hola David,
El Sunday, February 13, 2000, a las 11:06:34 PM escribistes:
>> hi... >> I have a form that ask for birth day... >> >> $day_of_birth >> $month_of_birth >> $year_of_birth >> >> now.... I want to know how old the user is... >> >> can anybody help?
DC> use mktime() to create a unix time of their second of birth (lets assume DC> they were born at midnight). Then do
DC> time()-$birthtime
DC> to get the number of seconds they've been alive. You can then use DC> date() to produce a Y/M/D style thing.
I can't find how to determine his age since his seconds of live... :(
-- Saludos, Pablo mailto:cooliomdq.com
attached mail follows:
Hello eAll--
I am trying to set up Apache / MySQL / PHP3 on Windows 95. I have everything installed and am following phpbuilder's configuration according to Heath Boutwell's column. (Thanks to listmember Brian.)
I followed all Heath's directions, including additions/changes for configuration:
renamed the php3-ini-dist to php3.ini extension_dir = c:\php3 extension = php3_mysql.dll browscap = c:\windows\browscap.ini
Also the Apache configuation additions/changes according to Heath:
ServerName http://localhost ScriptAlias /php3/ "c:/php3/" AddType application/x-httpd-php3 .php3 Action application/x-httpd-php3 "/php3/php.exe" DocumentRoot "C:/usr/bin/html" <Directory "C:/usr/bin/html">
So now I made a test page called hello.php3 [test page below], and put it in c:/usr/bin/html. But when I went to open it in
nothing was there.
Heath suggested a test in his phpbuilder column, but it involved DOS, in which I am *not at all* comfortable.
I know there is something obvious here that I am missing. Can anyone help?
Thanks, Margie
____________________________________________ HTML>
<HEAD> <TITLE>PHP Test</TITLE> </HEAD>
<BODY> <?php echo "Hello World<P>"; ?> </BODY>
</HTML> ______________________________________________
attached mail follows:
Hi!
Well, one reason why you see "many problems" is surely that if you never have problems you don't feel the need of mailing much. I would be such an example myself. You just don't mail saying: "Today I have had no problems!" :-)
PHP is installed on more than one mio. servers (Netcraft).
If we - just for fun - say that
- there is 1 programmer pr. server using PHP every day - they all would mail once here in case of a problem (where else would you mail? :-) - there are 100 problem-mails pr. day
we get that (100/1000000) of the programmers - or 0.01% - has a daily problem with PHP3!
Of course such a primitive calculation does not prove anything. But how wrong are the figures? Even a factor one hundred would still support what I and intensively PHP-using friends find:
"PHP problems? - never/hardly ever"!
- - -
Other newer technologies have their problems too, that I know. Whether they are less than PHP's? It's not my impression at all.
Enjoy!
Best regards
Frank
At 12:06 AM 00/02/12 -0800, you wrote:
>Hello,
>
>I have two questions...the second is to follow in another email.
>
>Why is it that almost a third of all the emails that come thru this list
>talk about all the errors and problems they are having with PHP3 and one
>thing or another in terms of installation and compatibility. I am in no
>way dogging PHP, cause I am actually learning it myself. But I get to
>thinking that maybe its not as stable as other technologies...ie.. PERL,
>ASP, JSP??? I don't know, can someone "enlighten me"
>
>thanks,
>dean
>
>
>--
>PHP 3 Mailing List <http://www.php.net/>
>To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
>To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
>To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
>To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
attached mail follows:
Thanks
I think I worked out a couple minutes after posting the question. You have to use $this for every member function call within the class. Found an example in the manual.
Simon
> ----------
> From: Philip Strnad[SMTP:pdstrnad
syr.edu]
> Sent: Friday, 11 February 2000 17:44
> To: YATES Simon
> Subject: Re: [PHP3] Constructor Question
>
> I think you have to do $this->set_test_var(3) in your constructor. Not
> 100% sure, but I think that's it.
>
> -Philip
>
>
> YATES Simon wrote:
> >
> > Any ideas as to why I get Fatal error on line 7: Call to unsupported or
> > undefined function set_test_var() in the code snippet below when
> calling a
> > member function within a constructor?
> >
> > <?
> > class test {
> > var $test_var;
> >
> > function test () {
> >
> > set_test_var (3);
> > }
> >
> > function set_test_var ($value_arg) {
> >
> > $this->test_var = $value_arg;
> > }
> > }
> >
> > $test_instance = new test;
> >
> > ?>
> >
> > Just asking out of interest sake.
> >
> > Thanks
> >
> > Simon
> >
> > --
> > PHP 3 Mailing List <http://www.php.net/>
> > To unsubscribe, send an empty message to php3-unsubscribe
lists.php.net
> > To subscribe to the digest, e-mail: php3-digest-subscribe
lists.php.net
> > To search the mailing list archive, go to:
> http://www.php.net/mailsearch.php3
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Nothing's happening, what else can I check?
PHP is reading my php.ini file, and is pointing at /usr/sbin/sendmail -t according to the variable dump
I call mail as:
$C_Email = "To: ".$Contact_Email."\n";
$From = "From: SpamWhack Automated Signup Engine\n";
$Reply_To = "Reply-to: dvanhorn
spamwhack.com\n";
$Subject = "Subject: Spamwhack Automated Signup Request\n";
$Priority = "X-Priority: 1\n";
$Mailer = "X-Mailer: PHP-4.0b3\n\n";
$Headers = ($From.$Reply_to.$Mailer.$Priority);
mail ($C_Email, $Subject, $Contact_message, $Headers);
My debug dump shows $Contact_Email as dvanhorn
cedar.net
and $Contact message has a long string in it, with \n in the appropriate
places.
The script executes without errors, but no mail ever arrives. :(
Is there some way to debug this?
attached mail follows:
I have been wracking my brain over this code till my eyes are burning anyone got an extra set that can tell me the missing code. The goal is a
very SIMPLE html template variable repalcement. The missing part has got
to be something with variable variable syntax or something but nothing I
have tried is working. Basically all I need at this point is something to change $repped to the contents of each one of HP_ varibles
Any help welcome.
Template follows code listing
PS This is running on php4b3 and html files are parsed as php
<<<<<<<<<<<<<<<<<<< test.html >>>>>>>>>>>>>>>>>>>>>>>>> <?php
function DoTemplate(){ $numargs = func_num_args(); $filename = func_get_arg(0); $arg_list = func_get_args(); $tempfile = fopen($filename, "r");
while(!feof($tempfile)){ $templine=fgets($tempfile, 255); for( $i = 0; $i < $numargs; $i++ ) { $finder = "%%" . $arg_list[$i] . "%%";
SOMEWHERE IN HERE $repped should be equal to the "contents" of the variable that is named the same as the name of the element in $arg_list[$i] through each loop
$templine = ereg_replace($finder, $repped, $templine); } print($templine); } fclose($tempfile); }
$HP_bgcolor="BLACK"; $HP_text="WHITE"; $HP_info="some stuff to print";
DoTemplate("test.tpl","HP_bgcolor","HP_text","HP_info");
?> <<<<<<<<<<<<<<<<<<<<<<<<<<< end test.html >>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<< test.tpl >>>>>>>>>>>>>>>>>>>> <html> <head> <title></title> </head> <body bgcolor="%%HP_bgcolor%%" text="%%HP_text%%">
%%HP_info%% </body> </html> <<<<<<<<<<<<<<<<<<<<<<<<< end test.tpl >>>>>>>>>>>>>>>>>>>>
attached mail follows:
> Wait for the Zend commer$ial add-on to allow you to compile PHP into > distributable binaries and buy that.
Does anyone know the estimate?
- Next message: php3-digest-help
lists.php.net: "php3 Digest 14 Feb 2000 18:00:01 -0000 Issue 1478"
- Previous message: php3-digest-help
lists.php.net: "php3 Digest 13 Feb 2000 18:00:01 -0000 Issue 1476"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]