php-general Digest 15 Dec 2001 08:18:40 -0000 Issue 1053
Topics (messages 77772 through 77814):
Re: Sending out mass mail without having timeout problems ..
77772 by: Paul Roberts
Re: Filenames with spaces in them
77773 by: Mike Eheler
77775 by: Mike Eheler
Re: PHPhish Logo
77774 by: Andrew Chase
Re: PHP command for issuing UNIX command???
77776 by: Scott Fletcher
77812 by: J.F.Kishor
Function to parse the data from Integer to String
77777 by: Scott Fletcher
file upload problem - Warning: Max file size of 8 bytes exceeded
77778 by: Lee Philip Reilly
Opening a new window.
77779 by: Brandon Orther
77780 by: Mehmet Kamil ERISEN
77782 by: Mark Charette
77786 by: Brandon Orther
77787 by: Mehmet Kamil ERISEN
77788 by: Richard S. Crawford
77789 by: Richard S. Crawford
77790 by: Mark Charette
77791 by: Richard S. Crawford
77796 by: Michael J. Seely
Re: Logo proposal - first thought
77781 by: Brian Clark
Miscount
77783 by: Daniel Alsén
77785 by: Kevin Stone
77793 by: Daniel Alsén
Re: echo vs. print() performance?
77784 by: Jim Lucas
MySQL date and NULL problems
77792 by: sgibbs.vt.globalhealth.org
Is PHP up to task?
77794 by: René Fournier
preg match question
77795 by: phantom
Re: Session storage and the --with-mm option
77797 by: John Lim
What is the best way to reorder table columns...temp tables?
77798 by: J. Roberts
php4apache.dll please !!!!
77799 by: rick
77801 by: Gaylen Fraley
DOM XML?
77800 by: Daniele Baroncelli
77807 by: Yasuo Ohgaki
Unable to return object references from functions
77802 by: Manuel Lemos
77806 by: Yasuo Ohgaki
seg fault with snmp
77803 by: Kancha .
77804 by: Rasmus Lerdorf
77805 by: Kancha .
77808 by: Yasuo Ohgaki
77809 by: Brian Clark
77811 by: Kancha .
77813 by: Brian Clark
77814 by: Kancha .
Logout problem - help me out....!
77810 by: J.F.Kishor
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
how do I do that on a virtual server? (Linux+apache, I'm just a user not
admin)
the con is that I can't afford the phone bill, I'm on a dial up (56K).
Paul Roberts
[EMAIL PROTECTED]
++++++++++++++++++++++++
----- Original Message -----
From: "jimtronic" <[EMAIL PROTECTED]>
To: "Paul Roberts" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 9:13 PM
Subject: Re: [PHP] Sending out mass mail without having timeout problems ..
>
> Wouldn't it be easier (better) to create a sendmail alias include
> file that has all the addresses in it and let sendmail or majordomo
> or qmail or whatever handle it?
>
> I'm not knocking your method as much as I'm looking for the pros and
> cons of the different methods.
>
> jim
>
> >the way I handle this is to send a response to the browser before sending
> >any mail you can then close the browser window and the script will carry
on
> >while you do something else. I get the script to send me an email when
its
> >finished 2-3 hours later. (I have around 6000 newsletters that are sent
out)
> >
> >Paul Roberts
> >[EMAIL PROTECTED]
> >++++++++++++++++++++++++
> >----- Original Message -----
> >To: "bain" <[EMAIL PROTECTED]>
> >Cc: <[EMAIL PROTECTED]>
> >Sent: Tuesday, December 11, 2001 8:39 AM
> >Subject: [PHP] Sending out mass mail without having timeout problems ..
> >
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> Jim Musil
> ---------
> Multimedia Programmer
> Nettmedia
> -------------
> 212-629-0004
> [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
I'll note that the erroneous command is the is_dir($file).. this causes
the problem.
Mike
Mike Eheler wrote:
> Consider this code for traversing through a directory structure:
>
> <?php
>
> function traverse($path='.') {
> $path = realpath($path);
> $dir = opendir($path);
>
> echo "\nDirectory : $path\n";
> echo str_pad('',76,'-')."\n";
>
> while (false !== ($file = readdir($dir))) {
> if (is_dir($file) && $file != '.' && $file != '..') {
> traverse("$path/$file");
> echo $file;
> }
> }
>
> closedir($dir);
> }
>
> echo '<pre>';
> traverse();
> echo '</pre>';
>
> ?>
>
> Now when I run it in a directory that has a file with spaces in it's
> name.. for examples purposes, the file willbe called "file name with
> spaces".
>
> Directory : /home/mike/php/test
> ----------------------------------------------------------------------------
>
> Warning: stat failed for file name with spaces (errno=2 - No such file
> or directory) in /home/mike/php/dirdump.php on line 10
>
> Any ideas why this error happens and what I can do to get around it?
>
> Mike
>
--- End Message ---
--- Begin Message ---
Ahh forget it .. I figured it out
change to is_dir("$path/$file").. *smack*
ignore this altogether
mike
Mike Eheler wrote:
> Consider this code for traversing through a directory structure:
>
> <?php
>
> function traverse($path='.') {
> $path = realpath($path);
> $dir = opendir($path);
>
> echo "\nDirectory : $path\n";
> echo str_pad('',76,'-')."\n";
>
> while (false !== ($file = readdir($dir))) {
> if (is_dir($file) && $file != '.' && $file != '..') {
> traverse("$path/$file");
> echo $file;
> }
> }
>
> closedir($dir);
> }
>
> echo '<pre>';
> traverse();
> echo '</pre>';
>
> ?>
>
> Now when I run it in a directory that has a file with spaces in it's
> name.. for examples purposes, the file willbe called "file name with
> spaces".
>
> Directory : /home/mike/php/test
> ----------------------------------------------------------------------------
>
> Warning: stat failed for file name with spaces (errno=2 - No such file
> or directory) in /home/mike/php/dirdump.php on line 10
>
> Any ideas why this error happens and what I can do to get around it?
>
> Mike
>
--- End Message ---
--- Begin Message ---
Already used by PostgreSQL :)
http://www.postgresql.org
> -----Original Message-----
> From: John Lim [mailto:[EMAIL PROTECTED]]
>
> P for Pachyderm!
--- End Message ---
--- Begin Message ---
Found the problem! It's not hte file permission for those files you try to
work with. You have to go up one directory and set the file permission of
hte folder where those files are in and Viola! Weird? Isn't it?
Scott
"Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I decided to try your suggestion and I did have a response.
>
> The response I got is ...
>
> -- clip --
>
> sh[2]: drwxr-xr-x: not found.
>
> sh[3]: drwxr-xr-x: not found.
>
> sh[4]: -rwxrwxrwx: not found.
>
> sh[5]: drwxr-xr-x: not found.
>
> sh[6]: -rwxrwxrwx: not found.
>
> sh[7]: -rw-r--r--: not found.
>
> sh[8]: -rwxrwxrwx: not found.
>
> -- clip --
>
> Anyone know what it meant and what should I do?
>
> Thanks,
>
> Scott
>
> "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Wait a minute! I checked the Apache Error Log and it said file access
> > permission do not allow the specified action. It can use the "cp"
command
> > and the original file. But it can not create the new file as result of
> hte
> > copy command. Why is that? What are the way around?
> >
> > Thanks,
> > Scott
> >
> >
> > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi!
> > >
> > > When I use those PHP function, 1) "exec()", 2) "passthru()" and 3)
> > > "system()", they don't work. I suspect that I would need to enter the
> > > Environment Variable so I did the "putenv()" for the PATH, BASH, etc.
> But
> > > still does not work. Check file Permission and so on. (Can't use
fopen()
> > to
> > > create a file due to permission error).
> > >
> > > What am I missing here?
> > >
> > > Thanks,
> > >
> > > Scott
> > >
> > > "Scott Fletcher" <[EMAIL PROTECTED]> wrote in message
> > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Hi!
> > > >
> > > > I wanted to know if there is a PHP code or function that would
> allow
> > > the
> > > > PHP to issue the UNIX command.
> > > >
> > > > What I'm doing here is I'm trying to tell PHP to create a file
by
> > > > issuing hte UNIX command then I can use the PHP to open the file to
> > enter
> > > > the data. Once I'm done with the file, I can use the UNIX to run
the
> > > script
> > > > in the file to communicate with the modem by executing the file.
When
> > I'm
> > > > done then I can open an another file to grab the data that had be
> > received
> > > > by the modem and do the PHP things to do something with hte data.
> When
> > > > done, then I can use the PHP to tell UNIX to delete the file and
> Voila!
> > > >
> > > > Thanks,
> > > > Scott
> > > >
> > > >
> > >
> > >
> >
> >
>
>
--- End Message ---
--- Begin Message ---
hello scott,
Yes..! you can use system() comand
It goes like this
system("touch filename.ext"); // creates a file and file will be owned by
nobody
If you want to change the file permission do the following
chmod("filepath/filename", 755); decimal; probably incorrect
chmod("filepath/filename", 0755); correct value of mode
if you want to change the file owner
chown(string filename, mixed user);
Attempts to change the owner of the file filename to user user. Only
the superuser may change the owner of a file.
Returns true on success; otherwise returns false.
Note : Windows does nothing it just returns true
same as above you can also change the group
chgrp(string filename, mixed group);
Attempts to change the group of the file filename to group. Only the
superuser may change the group of a file arbitrarily; other users may
change the group of a file to any group of which that user is a member.
Returns true on success; otherwise returns false.
Note : Windows does nothing it just returns true
since you want to create a file temporarily you can keep the file owned as
nobody. After your work is over you can remove it.
system("rm -f filename");
for more informations about the above commands go through the manuals
cheers
- JFK
On Fri, 14 Dec 2001, Scott Fletcher wrote:
> Hi!
>
> I wanted to know if there is a PHP code or function that would allow the
> PHP to issue the UNIX command.
>
> What I'm doing here is I'm trying to tell PHP to create a file by
> issuing hte UNIX command then I can use the PHP to open the file to enter
> the data. Once I'm done with the file, I can use the UNIX to run the script
> in the file to communicate with the modem by executing the file. When I'm
> done then I can open an another file to grab the data that had be received
> by the modem and do the PHP things to do something with hte data. When
> done, then I can use the PHP to tell UNIX to delete the file and Voila!
>
> Thanks,
> Scott
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
HI!
What's the PHP function that will parse the integer data to a string?
The problem I'm having is that I use the date() and microtime() and assigned
it to a variable. Later on, when I use this same variable but it have
different time, meaning hte clock is still ticking inside the variable. I
just want a one time timestamp, so I would need to convert it to a string.
So what's the php function for converting it to a string?
Thanks,
Scott
--- End Message ---
--- Begin Message ---
Hi,
I have an HTML form containing a file upload form object called 'file'.
When I submit the form (either holiding a path to a 1kb file or a 7MB
file) I get the following error:
-----
Warning: Max file size of 8 bytes exceeded - file [file] not saved in
Unknown on line 0
-----
I had hoped that by changing the upload_max_filesize value in the
php.ini this problem would be resolved, but it hasn't. I expect some
people have had similar problems in the past; can anyone suggest what
the problem is? Some additional info at the foot of this message.
Thanks in advance!
- Best regards,
Lee
Windows 2000; PHP4; Apache V1.3
PHP.INI reads:
-=-=-==-=-=-=-=
; Maximum allowed size for uploaded files.
upload_max_filesize = 8M
-=-=-==-=-=-=-=
Simplified PHP script reads:
-=-=-==-=-=-=-=
if ($file!=""){
@copy("$file", "c:\Program Files\Apache Group\Apache\htdocs\sasdap\v4"
or die ("Could not copy the file.");
}
else {
die("No input file specified");
}
-=-=-==-=-=-=-=
.HTML's file upload name = "file"
--- End Message ---
--- Begin Message ---
Does anyone know how I could have php open a new windows with the url I
specify?
Thanx,
Brandon
--- End Message ---
--- Begin Message ---
I would use javascript for that.
--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Does anyone know how I could have php open a new windows
> with the url I
> specify?
>
> Thanx,
> Brandon
>
=====
Mehmet Erisen
http://www.erisen.com
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
I would use "target="_blank" in the anchor tag so it would work just fine
_without_ javascript ...
Mark C.
-----Original Message-----
From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
I would use javascript for that.
--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Does anyone know how I could have php open a new windows
> with the url I
> specify?
>
> Thanx,
> Brandon>
--- End Message ---
--- Begin Message ---
I wanted to know how I could have php open a window. Like can I have it
print out some javascript to open a new window? Instead of someone
having to click a link.
Thanks Brandon
-----Original Message-----
From: Mark Charette [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 14, 2001 2:08 PM
To: PHP User Group
Subject: RE: [PHP] Opening a new window.
I would use "target="_blank" in the anchor tag so it would work just
fine
_without_ javascript ...
Mark C.
-----Original Message-----
From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
I would use javascript for that.
--- Brandon Orther <[EMAIL PROTECTED]> wrote:
> Does anyone know how I could have php open a new windows
> with the url I
> specify?
>
> Thanx,
> Brandon>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
that's a great point. Can you specify the target browser
properties using html?
Lise the Location bar, or the toolbar?
I was actually using little popups with jscript. If I can
get rid of JS that would be great.
--- Mark Charette <[EMAIL PROTECTED]> wrote:
> I would use "target="_blank" in the anchor tag so it
> would work just fine
> _without_ javascript ...
>
> Mark C.
>
> -----Original Message-----
> From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
>
> I would use javascript for that.
> --- Brandon Orther <[EMAIL PROTECTED]> wrote:
> > Does anyone know how I could have php open a new
> windows
> > with the url I
> > specify?
> >
> > Thanx,
> > Brandon>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
>
=====
Mehmet Erisen
http://www.erisen.com
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
Do you mean having it open a window as the page is loading? Just include
the javascript to open the new window in the <body> tag, using the onLoad
attribute.
Of course, once the page has been loaded, you have to rely on JavaScript to
do everything, because PHP only works on the server and not the
browser. But, of course, you already knew that.
At 02:59 PM 12/14/2001, Brandon Orther wrote:
>I wanted to know how I could have php open a window. Like can I have it
>print out some javascript to open a new window? Instead of someone
>having to click a link.
>
>Thanks Brandon
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
--- End Message ---
--- Begin Message ---
You can't really specify target window properties in straight HTML without
getting rid of JavaScript.
For what it's worth, here is a bit of JavaScript that I use on my home page
to spawn a small window:
function my_win()
{
window.open('mailsend.html','mywindow','width=333,height=410,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=yes');
}
The window that is spawned is 333 pixels wide, by 410 pixels high, has no
toolbar, no location bar, no directory bar, no menu bar, no scrollbars, and
no status bar, though it can be resized.
Why do you want to get rid of JavaScript?
At 03:06 PM 12/14/2001, Mehmet Kamil ERISEN wrote:
>that's a great point. Can you specify the target browser
>properties using html?
>Lise the Location bar, or the toolbar?
>I was actually using little popups with jscript. If I can
>get rid of JS that would be great.
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
--- End Message ---
--- Begin Message ---
Nope - just opens a new window.
Of course, personally, I'd like to take those people who turn off the
toolbars and back buttons and whatevers on _my_ windows and put them in a
speeding car down some highway with no brakes, no steering, a locked down
accelerator, and no door handles ... "hey, buddy, what's the problem? No
controls? But the radio works just fine, and that's all I'm gonna give 'ya
to play with ... we know best."
mark C.
> From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
>
> that's a great point. Can you specify the target browser
> properties using html?
> Lise the Location bar, or the toolbar?
> I was actually using little popups with jscript. If I can
> get rid of JS that would be great.
> --- Mark Charette <[EMAIL PROTECTED]> wrote:
> > I would use "target="_blank" in the anchor tag so it
> > would work just fine
> > _without_ javascript ...
--- End Message ---
--- Begin Message ---
Generally, I agree with you. Sometimes a small, no-controls window can be
useful, though, if all it is is a spinoff form that closes as soon as it
passes data to a CGI-script.
At 03:00 PM 12/14/2001, Mark Charette wrote:
>Nope - just opens a new window.
>
>Of course, personally, I'd like to take those people who turn off the
>toolbars and back buttons and whatevers on _my_ windows and put them in a
>speeding car down some highway with no brakes, no steering, a locked down
>accelerator, and no door handles ... "hey, buddy, what's the problem? No
>controls? But the radio works just fine, and that's all I'm gonna give 'ya
>to play with ... we know best."
Sliante,
Richard S. Crawford
http://www.mossroot.com
AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford
MSN: [EMAIL PROTECTED]
"It is only with the heart that we see rightly; what is essential is
invisible to the eye." --Antoine de Saint Exupéry
"Push the button, Max!"
--- End Message ---
--- Begin Message ---
HI Brandon,
It's actually easy to do this is PHP. A <FORM> tag will take a
TARGET window attribute that will let you control what happens after
the form is processed. The resultant page can appear in a new
window, in the parent window, to the same window the form was used,
to the full browser window or to some named frame, i.e.,
TARGET=_blank or _parent or _self or _top or FrameName.
If you don't want to use the normal <INPUT TYPE=SUBMIT> tag to make
the window change happen, you can use a .gif or .jpg image to start
the page change.
<IMAGE TYPE="IMAGE" NAME="SUBMIT" SRC="CoolButton.jpg" WIDTH="20"
HEIGHT="12" HSPACE="4" BORDER="0" ALT="Do It"></FORM>
Obviously, since you are using php, you can make this very simple,
just to make the window change or you can make the form processing do
extra things, i.e., remember the persons name, some ID, ...
Another not well known fact is that you can have multiple <FORMS> on
a single page.
I've seen a calendar that uses this technique with dozens of forms to
make "edit" buttons for each event. Different INPUT type=hidden tags
were used in each form to pass the date and event ID info.
Good Luck
Mike
>I wanted to know how I could have php open a window. Like can I have it
>print out some javascript to open a new window? Instead of someone
>having to click a link.
>
>Thanks Brandon
>
>-----Original Message-----
>From: Mark Charette [mailto:[EMAIL PROTECTED]]
>Sent: Friday, December 14, 2001 2:08 PM
>To: PHP User Group
>Subject: RE: [PHP] Opening a new window.
>
>I would use "target="_blank" in the anchor tag so it would work just
>fine
>_without_ javascript ...
>
>Mark C.
>
>-----Original Message-----
>From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
>
>I would use javascript for that.
>--- Brandon Orther <[EMAIL PROTECTED]> wrote:
>> Does anyone know how I could have php open a new windows
>> with the url I
>> specify?
>>
>> Thanx,
>> Brandon>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Michael Seely 408-777-9949
--- End Message ---
--- Begin Message ---
* Billy Harvey ([EMAIL PROTECTED]) [Dec 14. 2001 08:42]:
> >> http://www.heathermccullough.com/php_logo.gif
>
> > I don't know, usually when something common can be found on a design
> > there's a little mod added.
>
> Perhaps the addition of a small red stinger would that extra visual
> "bite".
Couldn't this whole ant thing be considered a little "buggy"? <g>
--
-Brian Clark
--- End Message ---
--- Begin Message ---
Hi guys,
still seem to have some trouble with this code. I solved the earlier issues,
with your valuable help. But when i echo the results of the query it gives
me the wrong results. I have never encountered a faulty count from mysql
earlier. Are there any issues with the query i should consider?
$t = 6;
$shot_counts = "SELECT COUNT(*) FROM statistik WHERE
shooter='$shooter_login' && shot_one = '$t' || shooter='$shooter_login' &&
shot_two = '$t' || shooter='$shooter_login' && shot_three = '$t' ||
shooter='$shooter_login' && shot_four = '$t' || shooter='$shooter_login' &&
shot_five = '$t'";
$results = mysql_query($shot_counts);
$bam = mysql_fetch_array($results);
# Daniel Alsén | www.mindbash.com #
# [EMAIL PROTECTED] | +46 704 86 14 92 #
# ICQ: 63006462 | +46 8 694 82 22 #
# PGP: http://www.mindbash.com/pgp/ #
--- End Message ---
--- Begin Message ---
I do not know if this will solve your problem but you should enclose each
logical query segment with parenthesies...
$shot_counts = "SELECT COUNT(*) FROM statistik WHERE
(shooter='$shooter_login' && shot_one = '$t') ||
(shooter='$shooter_login' && shot_two = '$t') ||
(shooter='$shooter_login' && shot_three = '$t') ||
(shooter='$shooter_login' && shot_four = '$t') ||
(shooter='$shooter_login' && shot_five = '$t')";
> Hi guys,
>
> still seem to have some trouble with this code. I solved the earlier
issues,
> with your valuable help. But when i echo the results of the query it gives
> me the wrong results. I have never encountered a faulty count from mysql
> earlier. Are there any issues with the query i should consider?
>
> $t = 6;
> $shot_counts = "SELECT COUNT(*) FROM statistik WHERE
> shooter='$shooter_login' && shot_one = '$t' || shooter='$shooter_login' &&
> shot_two = '$t' || shooter='$shooter_login' && shot_three = '$t' ||
> shooter='$shooter_login' && shot_four = '$t' || shooter='$shooter_login'
&&
> shot_five = '$t'";
> $results = mysql_query($shot_counts);
> $bam = mysql_fetch_array($results);
>
> # Daniel Alsén | www.mindbash.com #
> # [EMAIL PROTECTED] | +46 704 86 14 92 #
> # ICQ: 63006462 | +46 8 694 82 22 #
> # PGP: http://www.mindbash.com/pgp/ #
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--- End Message ---
--- Begin Message ---
Nope,
that didn´t help. I am baffled here.
One more interesting thing is that these two queries deliver different
results.
$num_vals = array ();
for ($i=0; $i<10; $i++)
{
$shot_count = "SELECT COUNT(*) FROM statistik WHERE
(shooter='$shooter_login' && shot_one = '$i') ||
(shooter='$shooter_login' && shot_two = '$i') ||
(shooter='$shooter_login' && shot_three = '$i') || (shooter='$shooter_login'
&& shot_four = '$i') || (shooter='$shooter_login' && shot_five = '$i')";
$result = mysql_query($shot_count);
$num_vals[$i] = mysql_fetch_array($result);
}
$t = 7;
$shot_counts = "SELECT COUNT(*) FROM statistik WHERE
(shooter='$shooter_login' && shot_one = '$t') ||
(shooter='$shooter_login' && shot_two = '$t') ||
(shooter='$shooter_login' && shot_three = '$t') || (shooter='$shooter_login'
&& shot_four = '$t') || (shooter='$shooter_login' && shot_five = '$t')";
I am really stuck. Any suggestions?
- Daniel
> -----Original Message-----
> From: Kevin Stone [mailto:[EMAIL PROTECTED]]
> Sent: den 14 december 2001 23:53
> To: Daniel Alsén; PHP
> Subject: Re: [PHP] Miscount
>
>
> I do not know if this will solve your problem but you should enclose each
> logical query segment with parenthesies...
--- End Message ---
--- Begin Message ---
I have a way of performance logging anything with php. Let me know what
type of performance data you would like to see and I will do my best to get
the data ready rather quickly. I will gather the data that I have collect
over the past few months. It is a performance log of every part of php that
my site uses. I will try an get that data together by the first of next
week.
it will show microsecond time lines of include(), requires(), print()
echo"", <?=?>, and other related functions.
Lets me know what you would like to see.
Jim Lucas
----- Original Message -----
From: "Jack Dempsey" <[EMAIL PROTECTED]>
To: "Jon Niola" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, December 13, 2001 11:50 PM
Subject: Re: [PHP] echo vs. print() performance?
> not as a criticism, but this is among the top 10 questions asked ...or
used
> to be for a while...anyway, there's tons of info on the mailing lists,
> marc.theaimsgroup.com
> the short answer is that echo is SLIGHTLY faster being a language
construct
> rather than a function...then again, i believe i remember someone proving
the
> opposite...in general, you'll never notice a differenece between the
two...
>
> Jon Niola wrote:
>
> > Someone on this list once mentioned a performance difference between
using
> > echo and print(). Is there any evidence to back this up? I am really
> > curious to see if it would make a difference to use one over the other.
> >
> > --Jon
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
Hi again,
A few days ago, I sent in an inquiry (see below) about how to make the date
field in mysql read NULL when the corresponding form field was empty. I
tried the suggestions I received and the following if statements all seem to
still result in a default 0000-00-00 instead of NULL.
/ this enters NULL if event_date is empty
if ($event_date == "") $event_date = '\0';
if ($event_date == "") $event_date = "\0";
if ($event_date == "") $event_date = \0;
if ($event_date == "") $event_date = NULL;
if ($event_date == "") $event_date = '\0';
// here's the insert statement
mysql_db_query("$db", "insert into $table (id,
approved, author, title,
featured, keywords, description, content, type, category, datetime, country,
region, event_date) values(null, '$approved', $author, '$title',
date_add('$datetime', interval $featured day), '$keywords', '$description',
'$content', '$type', '$category', '$datetime', '$country', '$region',
'$event_date')");
I'd really appreciate your suggestions and help. I can work around this
result, but it's really bugging me now why I can't get the word 'NULL' in
the date field when the corresponding form field is empty.
thank you, Shawna
> ----------
> From: [EMAIL PROTECTED]
> Sent: Tuesday, December 4, 2001 5:31 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Simple Question: PHP, MySQL, HTML Form and NULL
>
> I have added a new column in an existing MYSQL table called "event_date"
> -
> type: DATE, Null - yes ; default - NULL.
>
> This database field will be filled if and when the field in the HTML form
> is
> complete. When I added the new field to MySQL, it automatically assigned
> NULL to all the existing records - which is what I wanted it to do.
>
> I tested the HTML form, and when someone enters a date in the HTML form,
> the
> date appears correctly in the table field. Perfect.
>
> Now my question: When the HTML form date field is left blank and the form
> is submitted, instead of putting "NULL" in the MySQL event_date field, I
> found: 0000-00-00. Is this because the form is submitting an " " to the
> database field?
>
> Is there some kind of if/then statement I should use so that when the
> field
> is empty, "NULL" will be entered into that table field?
>
> Thank you, Shawna
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
--- End Message ---
--- Begin Message ---
(Now that I have your attention... :-)
Here's the situation: All the navigational buttons in the site I'm
working on have three different states (for mousovers--normal,
mouseover, onClick). What I don't like: When I mouse over one button, it
takes a second or two for the page to fetch the mouseover state of the
button from the server. Now, normally, I would just write a
preloadimages() function in JavaScript and preload all the button states
when the pages load. BUT, this is a little harder, since this is a
fairly big site (or will be) and it's not always the same buttons that
need to be loaded; they can change from page to page (say, between
sections, with subnav bars). That being said, I've kept one thing
simple: All the buttons (and their states) are stored in the same
directory, and in fact only button images are in that directory ("/nav").
So here's what I would like to know: Is it possible for PHP to read the
contents of a directory--all the files--and then take that array and
generate some javascript preload() statements? (Of course, I'm sure it
IS possible, but I would appreciate any pointers you might have before I
undertake it. Maybe there's even a better way than what I can see!) What
I was thinking was to preload all the nav buttons and their states in
the header.inc.
Thanks.
...Rene
---
René Fournier
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I am passing a string and making sure all the characters in that string
are valid.
Example:
For a persons age I am using:
if (!preg_match("/^[0-9]+$/", $Age)) echo "Enter numeric value for age".
But how would I include the following characters as permissible in preg
match
~!@#$%^&*()-=_+,.?/\|{}[]
since some of these characters have special meaning in PCRE regrex syntax??
--- End Message ---
--- Begin Message ---
This doesn't explain why mm is causing such a memory bloat though.
Mark, are you storing big arrays as session variables? I am using
mm myself for sessions and never have these problems (I only store
less than 1K of data in sessions anyway).
Regards, John
Jeremy Allen <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Sessions by default will use the file system to store session data.
> Using the file system on a site that utilizes sessions moderately can
> be negative as far as performance goes.
>
> Using shared memory simply means that session data is now stored
> in shared memory. Shared memory is a bit more efficient than using
> the file system. Where session data is stored is supposed to be
> sort of black box and transparent to the actual use of sessions.
>
> You can also define a group of custom session handling functions
> to use any device your mind can imagine for session storage. Anything
> PHP can easily connect to (Java, RDBMS, ...) the sky is the limit.
>
> Take a look at session_set_save_handler (for custom session handling
> routines).
>
> Once you get your session save handler working it is transparent
> to the use of sessions. If your having performance troubles with
> sessions using the file system, shared memory may be the best way
> to go.
>
> Take a look at this page http://www.php.net/manual/en/ref.session.php
>
> To actually use shared memory you must modify the option
> session.save_handler in the php.ini file.
>
> Thanks
>
> Jeremy Allen
>
>
>
>
>
>
>
> -----Original Message-----
> From: Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 14, 2001 10:38 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session storage and the --with-mm option
>
>
>
> I'm trying to cut down on the amount of memory that my apache
> proceeses use, I've noticed that when I have the --with-mm option set
> when I configure and compile PHP that the apache process goes up by
> about 40MB or more on the process table:
>
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 23102 0.0 2.5 54588 12972 ? S Dec11 0:13
> /usr/sbin/httpd
> nobody 11242 0.0 2.7 55040 14408 ? S Dec13 0:16
> /usr/sbin/httpd
> nobody 11244 0.0 2.7 55076 14216 ? S Dec13 0:16
> /usr/sbin/httpd
> ....
>
> I understand that not each process is using up that much ram, but I'd
> still like to cut down the usage since without having --with-mm enabled
> makes the processes more like this:
>
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 29415 0.0 0.7 13988 5844 ? S Dec13 0:02
> /usr/sbin/httpd
> nobody 31719 0.0 0.7 14140 6096 ? S 04:02 0:00
> /usr/sbin/httpd
> nobody 31720 0.0 0.7 14140 6096 ? S 04:02 0:00
> /usr/sbin/httpd
> ....
>
> So my question is this. What is the --with-mm option for? The only
> real documentation I can find about it anywhere is on the PHP site where
> they have a complete list of configuration options:
>
> ----------------------------------------------------------
> --with-mm[=DIR]
>
> PHP 3: Option not available in PHP 3
>
> PHP 4: Include mm support for session storage
> ----------------------------------------------------------
>
> Well, that's not really helpful. Does this option affect how sessions
> work under PHP? I think some of the users on my system have been using
> sessions successfully without this option. Also, since this gets
> compiled in the ext/sessions directory, would I be able to compile it as
> a module that could be loaded into PHP at run time?
>
> Any help would be appretiated. Thanks,
>
> --
> mark.krenz
> [EMAIL PROTECTED]
>
____________________________________________________________________________
> ___
> Their snazzy page and friendly installation process don't make up for damn
> trickery.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
--- End Message ---
--- Begin Message ---
I'm trying to update a report generator I have, using php and mysql.
The setup is essentially listing employees and production data.
What I did when I created it was for the column headers, made them links
to requery the database..sample link follows (inside an anchor tag):
"reports.php?userid=<?php echo $userid; ?>&date_start=<?php echo
$date_start; ?>&date_end=<?php echo $date_end;
?>&orderby=trans_per_req%20desc&groupby=<?php echo $groupby;
?>&type=other&daterange=<?php echo $daterange; ?>"
As you can see that is very ugly, and inefficient.
I was thinking that one way to get around passing so many parameters was
after the initial query, have that inserted into a temporary table. Then
all that would need to be passed with the query string would be an ORDER BY
clause, at which time I would do a SELECT * FROM TEMP_TABLE ORDER BY
$orderby.
One thing im not sure about, is if temporary tables are unique to each user.
That is to say if two people were running reports at the same time with
different
parameters, would that work? If so, how long before the connection dies?
If
it is at the end of script execution, that wouldn't be much help.
Does anyone have any better ideas as well? I thought about using a
multi-dimensional
array, but was told that that would be a bad idea to keep a large array
alive
in memory.
Thanks,
-Jamison
(hope this makes some sense)
--- End Message ---
--- Begin Message ---
hi guys ,
could you tell me please , Where I can find the
php4apache.dll ?
Thanks ,
Ricardo
--- End Message ---
--- Begin Message ---
Assuming your php folder is php,
/php/sapi
--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/
"Rick" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
hi guys ,
could you tell me please , Where I can find the
php4apache.dll ?
Thanks ,
Ricardo
--- End Message ---
--- Begin Message ---
Hello,
I would like to restyle one big site in XML and I would like some brief
straight info/suggestions.
I am definitely interested in DOM XML, but as far as I can understand, the
module is still experimental and there to main risks:
- The module is not completely stable
- The functions are likely to change
Are you able to confirm me these?
As an alternative, it seems the only safe way to develop XML in PHP is by
using the Expat module.
Is this your view too?
In any case, are you able to indicate some good web references for XML in
PHP ?
Really thanks for the help.
Daniele
--- End Message ---
--- Begin Message ---
Daniele Baroncelli wrote:
> Hello,
>
> I would like to restyle one big site in XML and I would like some brief
> straight info/suggestions.
>
> I am definitely interested in DOM XML, but as far as I can understand, the
> module is still experimental and there to main risks:
> - The module is not completely stable
> - The functions are likely to change
>
> Are you able to confirm me these?
You are right about this.
But please use it and report bugs if you find one.
The more users, it will be more stable quickly.
Please also try latest snapshot for experimental modules/functions.
http://snaps.php.net/
>
>
> As an alternative, it seems the only safe way to develop XML in PHP is by
> using the Expat module.
>
> Is this your view too?
I would say yes, but you may experience problem(s).
>
> In any case, are you able to indicate some good web references for XML in
> PHP ?
>
I don't know this one ;)
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
Hello,
I am trying to return a reference from an object created inside a
function and at the same time have the object stored in a global
variable.
It seems that when I try doing it by assigning the object reference to a
function argument that is passed by reference, nothing is returned in
that variable despite inside the function the argument variable seems to
have the right value.
Is this a PHP bug or this is not the right way to do it?
Try the example below.
Manuel Lemos
<?
class test_class
{
var $dummy="nothing";
};
Function not_assigning(&$not_returned,&$copy)
{
global $object;
$object=new test_class;
$object->dummy="original";
$success=1;
$not_returned= &$object;
$copy=$object;
$copy->dummy="copy";
var_dump("In the function",$success,$not_returned,$copy,$object);
return $success;
}
$success=not_assigning($not_returned,$copy);
var_dump("Out the function",$success,$not_returned,$copy,$object);
?>
--- End Message ---
--- Begin Message ---
Manuel Lemos wrote:
> Hello,
>
> I am trying to return a reference from an object created inside a
> function and at the same time have the object stored in a global
> variable.
>
> It seems that when I try doing it by assigning the object reference to a
> function argument that is passed by reference, nothing is returned in
> that variable despite inside the function the argument variable seems to
> have the right value.
>
> Is this a PHP bug or this is not the right way to do it?
No this is not a bug, but issue.
Please ask this kind of question only to php-general.
Thank you.
PS: Read manaul sections (Object and Reference.
It's explained ;)
--
Yasuo Ohgaki
>
> Try the example below.
>
> Manuel Lemos
>
> <?
> class test_class
> {
> var $dummy="nothing";
> };
>
> Function not_assigning(&$not_returned,&$copy)
> {
> global $object;
>
> $object=new test_class;
> $object->dummy="original";
> $success=1;
> $not_returned= &$object;
> $copy=$object;
> $copy->dummy="copy";
> var_dump("In the function",$success,$not_returned,$copy,$object);
> return $success;
> }
>
> $success=not_assigning($not_returned,$copy);
>
> var_dump("Out the function",$success,$not_returned,$copy,$object);
>
> ?>
>
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
I get segmentation fault when i try to execute
snmpwalk or any other snmp related functions. I'm
running php 4.1.0 on RH linux 7.2 with ucd-snmp that
comes along with the linux distribution. I compiled
php with --with-snmp and the compilation was error
free. phpinfo() alsow displyas the snmp information.
any answers ??
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
Backtrace? Works just fine for me on a RH-7.2 box.
On Fri, 14 Dec 2001, Kancha . wrote:
> I get segmentation fault when i try to execute
> snmpwalk or any other snmp related functions. I'm
> running php 4.1.0 on RH linux 7.2 with ucd-snmp that
> comes along with the linux distribution. I compiled
> php with --with-snmp and the compilation was error
> free. phpinfo() alsow displyas the snmp information.
>
> any answers ??
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
>
--- End Message ---
--- Begin Message ---
i had compiled php with following configure
parameters.
./configure --with-apxs=/usr/sbin/apxs
--enable-calendar --with-pgsql --with-snmp
--enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
--with-sysvshm --enable-inline-optimization
--enable-ftp --with-gd --enable-gd-native-ttf
--with-openssl
--- Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
> Backtrace? Works just fine for me on a RH-7.2 box.
>
> On Fri, 14 Dec 2001, Kancha . wrote:
>
> > I get segmentation fault when i try to execute
> > snmpwalk or any other snmp related functions. I'm
> > running php 4.1.0 on RH linux 7.2 with ucd-snmp
> that
> > comes along with the linux distribution. I
> compiled
> > php with --with-snmp and the compilation was error
> > free. phpinfo() alsow displyas the snmp
> information.
> >
> > any answers ??
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Check out Yahoo! Shopping and Yahoo! Auctions for
> all of
> > your unique holiday gifts! Buy at
> http://shopping.yahoo.com
> > or bid at http://auctions.yahoo.com
> >
> >
>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
--- End Message ---
--- Begin Message ---
Kancha . wrote:
> i had compiled php with following configure
> parameters.
>
> ./configure --with-apxs=/usr/sbin/apxs
> --enable-calendar --with-pgsql --with-snmp
> --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
> --with-sysvshm --enable-inline-optimization
> --enable-ftp --with-gd --enable-gd-native-ttf
> --with-openssl
>
Rasmus is asking backtrace. Read following link to get
one ;)
http://bugs.php.net/bugs-generating-backtrace.php
--
Yasuo Ohgaki
>
>
> --- Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
>
>>Backtrace? Works just fine for me on a RH-7.2 box.
>>
>>On Fri, 14 Dec 2001, Kancha . wrote:
>>
>>
>>>I get segmentation fault when i try to execute
>>>snmpwalk or any other snmp related functions. I'm
>>>running php 4.1.0 on RH linux 7.2 with ucd-snmp
>>>
>>that
>>
>>>comes along with the linux distribution. I
>>>
>>compiled
>>
>>>php with --with-snmp and the compilation was error
>>>free. phpinfo() alsow displyas the snmp
>>>
>>information.
>>
>>>any answers ??
>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Check out Yahoo! Shopping and Yahoo! Auctions for
>>>
>>all of
>>
>>>your unique holiday gifts! Buy at
>>>
>>http://shopping.yahoo.com
>>
>>>or bid at http://auctions.yahoo.com
>>>
>>>
>>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Check out Yahoo! Shopping and Yahoo! Auctions for all of
> your unique holiday gifts! Buy at http://shopping.yahoo.com
> or bid at http://auctions.yahoo.com
>
--
Yasuo Ohgaki
--- End Message ---
--- Begin Message ---
* Kancha . ([EMAIL PROTECTED]) [Dec 15. 2001 01:46]:
> i had compiled php with following configure
> parameters.
>
> ./configure --with-apxs=/usr/sbin/apxs
> --enable-calendar --with-pgsql --with-snmp
> --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
> --with-sysvshm --enable-inline-optimization
> --enable-ftp --with-gd --enable-gd-native-ttf
> --with-openssl
Do this:
<http://bugs.php.net/bugs-generating-backtrace.php>
Then file a bug here:
<http://bugs.php.net/report.php>
(Be sure to take note of all the little comments on that page)
*With* the backtrace information included in your report. You'll get
much better help from that system with oddball issues like that.
--
-Brian Clark
--- End Message ---
--- Begin Message ---
I did not get a core dump. I got following in my apache error log file
[Sat Dec 15 13:35:19 2001] [notice] child pid 15278 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15277 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15276 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15275 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15274 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15273 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15272 exit signal Segmentation
fault (11)
[Sat Dec 15 13:35:19 2001] [notice] child pid 15271 exit signal Segmentation
fault (11)
On Saturday 15 December 2001 13:01, Brian Clark wrote:
> * Kancha . ([EMAIL PROTECTED]) [Dec 15. 2001 01:46]:
> > i had compiled php with following configure
> > parameters.
> >
> > ./configure --with-apxs=/usr/sbin/apxs
> > --enable-calendar --with-pgsql --with-snmp
> > --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
> > --with-sysvshm --enable-inline-optimization
> > --enable-ftp --with-gd --enable-gd-native-ttf
> > --with-openssl
>
> Do this:
>
> <http://bugs.php.net/bugs-generating-backtrace.php>
>
> Then file a bug here:
>
> <http://bugs.php.net/report.php>
>
> (Be sure to take note of all the little comments on that page)
>
> *With* the backtrace information included in your report. You'll get
> much better help from that system with oddball issues like that.
--- End Message ---
--- Begin Message ---
* kancha ([EMAIL PROTECTED]) [Dec 15. 2001 02:59]:
> I did not get a core dump. I got following in my apache error log file
[...]
> On Saturday 15 December 2001 13:01, Brian Clark wrote:
> > (Be sure to take note of all the little comments on that page)
No time to read "all the little comments," eh? :-)
Go back here:
<http://bugs.php.net/bugs-generating-backtrace.php>
And read "If you can't get a core file"
I'm not a great speed reader either. <g>
--
-Brian Clark
--- End Message ---
--- Begin Message ---
i had also compiled php as cgi without the --with-apxs parameter. then i
executed php and core was dumped. the out is as follows.
[root@ispms html]# gdb /usr/local/bin/php /var/www/html/core
GNU gdb Red Hat Linux 7.x (5.0rh-15) (MI_OUT)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
Core was generated by `php snmp.php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /lib/libpam.so.0...done.
Loaded symbols for /lib/libpam.so.0
Reading symbols from /usr/lib/libsnmp-0.4.2.1.so...done.
Loaded symbols for /usr/lib/libsnmp-0.4.2.1.so
Reading symbols from /usr/lib/libpq.so.2...done.
Loaded symbols for /usr/lib/libpq.so.2
Reading symbols from /usr/lib/libgd.so.1.8...done.
Loaded symbols for /usr/lib/libgd.so.1.8
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /usr/kerberos/lib/libkrb5.so.3...done.
Loaded symbols for /usr/kerberos/lib/libkrb5.so.3
Reading symbols from /usr/kerberos/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/kerberos/lib/libk5crypto.so.3
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/kerberos/lib/libcom_err.so.3...done.
Loaded symbols for /usr/kerberos/lib/libcom_err.so.3
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libjpeg.so.62...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /usr/lib/libpng.so.2...done.
Loaded symbols for /usr/lib/libpng.so.2
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
#0 0x402c8c71 in strlen () from /lib/i686/libc.so.6
(gdb) bt
#0 0x402c8c71 in strlen () from /lib/i686/libc.so.6
#1 0x4017969f in bprintf () from /usr/lib/libsnmp-0.4.2.1.so
#2 0x4017a453 in sprint_object_identifier () from /usr/lib/libsnmp-0.4.2.1.so
#3 0x4017ce3a in sprint_value () from /usr/lib/libsnmp-0.4.2.1.so
#4 0x080a1ab5 in php_snmp (ht=3, return_value=0x81e358c, this_ptr=0x0,
return_value_used=1, st=2) at snmp.c:318
#5 0x080a1dbb in zif_snmpwalk (ht=3, return_value=0x81e358c, this_ptr=0x0,
return_value_used=1) at snmp.c:397
#6 0x08134376 in execute (op_array=0x81e368c) at ./zend_execute.c:1590
#7 0x08111788 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:814
#8 0x08067255 in php_execute_script (primary_file=0xbffff980) at main.c:1309
#9 0x08064e38 in main (argc=2, argv=0xbffffa24) at cgi_main.c:738
#10 0x4025e507 in __libc_start_main (main=0x8064648 <main>, argc=2,
ubp_av=0xbffffa24, init=0x8062760 <_init>, fini=0x813c500 <_fini>,
rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffffa1c)
at ../sysdeps/generic/libc-start.c:129
(gdb)
On Saturday 15 December 2001 12:59, Yasuo Ohgaki wrote:
> Kancha . wrote:
> > i had compiled php with following configure
> > parameters.
> >
> > ./configure --with-apxs=/usr/sbin/apxs
> > --enable-calendar --with-pgsql --with-snmp
> > --enable-ucd-snmp-hack --enable-wddx --enable-sysvsem
> > --with-sysvshm --enable-inline-optimization
> > --enable-ftp --with-gd --enable-gd-native-ttf
> > --with-openssl
>
> Rasmus is asking backtrace. Read following link to get
> one ;)
>
> http://bugs.php.net/bugs-generating-backtrace.php
--- End Message ---
--- Begin Message ---
hello all,
I have already posted this mail, Is there anyone to help me out?,
it's urgent plz.....!
I have designed a web page using php, as a security measure I have
kept it password protected. I have used Apache authentication, using
htpasswd file. Now I want to keep a logout in this web page, I tried to
send a header request "http/1.0 401 Unauthorized" to force it to
reauthenticate when the logout link is clicked in the form, but this dose
not work.
I tried using session_destroy() even that does not work.
To get the authenticated users name I have used GetEnv("REMOTE_USER") in
all the form and with that username I'am handling mysql and other requests.
I don't know where exactly the REMOTE_USER gets stored.
So please help me out in this problem. I want to remove the
window's authentication cache.
Please give me some ideas and suggestion to remove the user name and make
the page fresh for the other user to log in.
If possible please send me a sample script.
Thanks for sparing time on this mail.
with hope's,
- JFK
kishor
Nilgiri Networks
--- End Message ---