Re: [PHP] Preventing Access to Private Files

2007-09-13 Thread Chris

tedd wrote:

At 4:24 PM -0400 9/6/07, TG wrote:
The web server software has access to certain directories, but PHP 
itself can

have access to things outside the main web folders.


That's good advice, but what do you do when safe_mode is ON?

My experience is that PHP can't access folders out of the web root.


Safe-mode shouldn't affect this particular problem, but open_basedir would.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [EMAIL PROTECTED]

2007-09-13 Thread Teo Mattiozzi

[EMAIL PROTECTED]




Re: [PHP] blocking exec() silently

2007-09-13 Thread Chris

Samuel Vogel wrote:

Hey,

Thanks for the replies!
safe-mode is not an option unfortunately!
But changing the Error reporting, is the first thing I wanted to do, but 
when I asked if this was possible on this list, somebody replied, that 
it this is not possible!


Could you point me to a way, how I can achieve, that the "this function 
is disabled" error, without suppressing other error messages?


You'll need to overwrite the set_error_handler (see 
http://php.net/set_error_handler) and use auto_prepend_file - see 
http://www.php.net/manual/en/ini.core.php .


--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-13 Thread mike
warning: this is VERY UGLY CODE. i wrote it 3-4 years ago now i think
and it just keeps working.

you call it this way:

# pagination.
if(isset($_GET['pg'])) {
$page = intval($_GET['pg']);
} else {
$page = 1;
}
$page = sprintf("%02d",$page);

$query = Array(
'query' => "SELECT foo FROM bar",
'itemsperpage'  => 50,
'maxdisplay'=> 20,
'linkprefix'=> "$_SERVER[PHP_SELF]?f=$forum_id&pg="
);
list($pages,$numpages,$items,$threads) = paginate_sql($page,$query);

$pages is the html formatted links
$numpages is the total number of pages
i dont actually use $items much but i think it just tells you how many
items (which is the same as itemsperpage... i believe)
$threads is the mysql rows resource (you can use mysql_fetch_rows on it)



function paginate_sql(&$thispage,$options) {
$offset = $options['itemsperpage'] * ($thispage - 1);
if(isset($options['server'])) {
$results = db_query(eregi_replace("^SELECT","SELECT
SQL_CALC_FOUND_ROWS",$options['query'])."LIMIT
$offset,$options[itemsperpage]",$options['server']);
$rows = db_query("SELECT FOUND_ROWS()",$options['server']);
} else {
$results = db_query(eregi_replace("^SELECT","SELECT
SQL_CALC_FOUND_ROWS",$options['query'])."LIMIT
$offset,$options[itemsperpage]");
$rows = db_query("SELECT FOUND_ROWS()");
}
list($totalitems) = db_rows($rows);
db_free($rows);
$html = "";
$numpages = ceil($totalitems / $options['itemsperpage']);
if(isset($options['maxpages']) && $numpages >
$options['maxpages']) { $numpages = $options['maxpages']; }
if($thispage < 1 || $totalitems < $options['itemsperpage']) {
$thispage = sprintf("%02d",1); }
if($thispage > $numpages && $numpages > 0) {
header(sprintf("Location: %s01",
str_replace("&","&",$options['linkprefix'])));
exit();
}
$start = (ceil($thispage / $options['maxdisplay'])-1) *
$options['maxdisplay'] + 1;
if($start == 1) {
$html .= "«";
} else {
$html .= sprintf("«",
$options['linkprefix'], $start-1);
}
if(isset($options['maxdisplay']) && $options['maxdisplay'] !=
0 && $numpages > $options['maxdisplay']) {
$numlist = $options['maxdisplay'] + $start - 1;
} else {
$numlist = $numpages + $start - 1;
}
if($numlist > $numpages) { $numlist = $numpages; }
for($x=$start; $x<=$numlist; $x++) {
if($x == $thispage) {
$html .= sprintf(" %02d", $x);
} else {
$html .= sprintf(" %02d", $options['linkprefix'], $x, $x);
}
}
if($numlist == $numpages) {
$html .= " »";
} else {
$html .= sprintf(" »",
$options['linkprefix'], $numlist+1);
}
if($totalitems <= $options['itemsperpage']) { $html = ""; }
return Array($html,sprintf("%02d",$numpages),$totalitems,$results);
}

On 9/13/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> I am intrested for the solution you gave me. But I am confused of the way in 
> implementing "select FOUND_ROWS()".
>
> I wrote another very simple codes as the first step for understanding this 
> threat:
>  $konek=mysql_connect("127.0.0.1","root","mypassword");
> if ($konek){
>for ($i=0;$i<2;$i++){
>$sqlku="select SQL_CALC_FOUND_ROWS id_iklan from lowongan limit 5;";
>$sqlkupage="select FOUND_ROWS()";
>$mybd=mysql_select_db("headhunter",$konek);
>$kueri=mysql_query($sqlku,$konek) or die('MYSQL QUERY ERROR 
> ['.mysql_errno($konek).'] '.mysql_error($konek));
>$kueri=mysql_query($sqlkupage,$konek) or die('MYSQL QUERY ERROR 
> ['.mysql_errno($konek).'] '.mysql_error($konek));
>while($brs=mysql_fetch_row($kueri)){
>list($idiklan)=$brs;
>echo "FirstItem  href=\"showit.php?id=$idiklan\">$idiklan";
>}
>}
> }else{
>echo "I can't talk to the server";
>exit();
> }
> ?>
>
> I've put nine records into the table of "lowongan", idiklan 1 to 9.
> Look I get of course only one record, namely the: '9'.
>
> This is the output of my codes in my internet browser.
> ===
> FirstItem 9
> FirstItem 9
> ===
> The output what I am expecting suppose to be:
> on the $i=0
> "
> FirstItem 1
> FirstItem 2
> FirstItem 3
> FirstItem 4
> FirstItem 5
> "
> and on the $i=1
> "
> FirstItem 6
> FirstItem 7
> FirstItem 8
> FirstItem 9
> FirstItem 9
> "
>
> I read on the documentation of MySQL but I couldn't find any code of sample 
> also in the php.net.
>
> Would be so kind to give me a very simple code of sample?
>
> Thank you very much in advance.
> On Wed, 12 Sep 2007 11:58:04 -0700
> mike <[EMAIL PROTECTED]> wrote:
>
> > On 9/12/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote:
> > > 

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-13 Thread Patrik Hasibuan
Hi Mike,

I am intrested for the solution you gave me. But I am confused of the way in 
implementing "select FOUND_ROWS()".

I wrote another very simple codes as the first step for understanding this 
threat:
$idiklan";
}
}
}else{
echo "I can't talk to the server";
exit();
}
?>

I've put nine records into the table of "lowongan", idiklan 1 to 9.
Look I get of course only one record, namely the: '9'.

This is the output of my codes in my internet browser.
===
FirstItem 9
FirstItem 9
===
The output what I am expecting suppose to be:
on the $i=0
"
FirstItem 1
FirstItem 2
FirstItem 3
FirstItem 4
FirstItem 5
"
and on the $i=1
"
FirstItem 6
FirstItem 7
FirstItem 8
FirstItem 9
FirstItem 9
"

I read on the documentation of MySQL but I couldn't find any code of sample 
also in the php.net.

Would be so kind to give me a very simple code of sample?

Thank you very much in advance.
On Wed, 12 Sep 2007 11:58:04 -0700
mike <[EMAIL PROTECTED]> wrote:

> On 9/12/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote:
> > Dear my friends...
> >
> > I am trying to display the content of a table. Each page must content only 
> > 5 records maximum. Each page has "Previous" and "Next" buttons (made from 
> > anchor).
> >
> > I dump the primary of the working table and keep it in a cookie. So than 
> > the paging task work with the index of cookie array. But the 
> > $curguruescomidiklan stays "0" each time I click "Next" button.
> 
> yeah there is no reason to be using cookies for this.
> 
> just using query string parameters should work. for pagination you need to 
> know:
> 
> total number of items
> number of items per page
> 
> after that you know how many pages (numitems / itemsperpage) and work
> out the links appropriately (i.e. page1 has no previous, $maxpage has
> no next) and you can put the number of pages down how you want (if you
> want to do prev 3 4 5 next, or next 1 2 3 4 5 6 7 8 9 prev, there's a
> ton of strategies to print out what pages to show, and next, previous,
> jump to end, jump to beginning, etc)
> 
> i've never used the PEAR class or anything else, i made a function a
> long time ago that actually works in conjunction with mysql's SELECT
> FOUND_ROWS() and uses a LIMIT offset,number to save the overhead of
> fetching every row from the database to only show the ones for that
> page. it's actually worked well for 4 years now without a single
> change...
> 
> at some point perhaps i'll clean it up and post it somewhere, and
> someone might be able to make it even better.
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Patrik Hasibuan <[EMAIL PROTECTED]>
Junior Programmer

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel
Actually in this example, there is an error handling function provided 
in the comments.
I can't test it right now, but would it be possible that a functions 
emulates the built-in error handling of php? Or would that need much 
more lines of code?
If this would be the case, then I could modifiy that functions just to 
not throw the "disabled functions" exceptions!


Regards,
Samy

Nathan Nobbe schrieb:

hmm; you can define you own error handler via
set_error_handler()
this would be something like overriding the stock session_handler, or
maybe a little similar to extending the stock exception handler.
anyway, i think that would be a lot of work just to suppress error output
for
a single function.  i say this because if you define you own error handler
you have
to support everything  in the new handler; you dont get to just change some
things
and not others.
Note: this from the handbook:
It is important to remember that the standard PHP error handler is
completely bypassed.

-nathan


On 9/13/07, Samuel Vogel <[EMAIL PROTECTED]> wrote:
  

Hey,

Thanks for the replies!
safe-mode is not an option unfortunately!
But changing the Error reporting, is the first thing I wanted to do, but
when I asked if this was possible on this list, somebody replied, that
it this is not possible!

Could you point me to a way, how I can achieve, that the "this function
is disabled" error, without suppressing other error messages?

Regards,
Samy

Instruct ICC schrieb:


I was going to mentionn
http://php.he.net/manual/en/features.safe-mode.functions.php and ask
you if you need any of those functions, but I prefer Nathan's answer.
You may be able to set the error reporting in conjunction with
disable_functions and be done.
  

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] blocking exec() silently

2007-09-13 Thread Nathan Nobbe
hmm; you can define you own error handler via
set_error_handler()
this would be something like overriding the stock session_handler, or
maybe a little similar to extending the stock exception handler.
anyway, i think that would be a lot of work just to suppress error output
for
a single function.  i say this because if you define you own error handler
you have
to support everything  in the new handler; you dont get to just change some
things
and not others.
Note: this from the handbook:
It is important to remember that the standard PHP error handler is
completely bypassed.

-nathan


On 9/13/07, Samuel Vogel <[EMAIL PROTECTED]> wrote:
>
> Hey,
>
> Thanks for the replies!
> safe-mode is not an option unfortunately!
> But changing the Error reporting, is the first thing I wanted to do, but
> when I asked if this was possible on this list, somebody replied, that
> it this is not possible!
>
> Could you point me to a way, how I can achieve, that the "this function
> is disabled" error, without suppressing other error messages?
>
> Regards,
> Samy
>
> Instruct ICC schrieb:
> > I was going to mentionn
> > http://php.he.net/manual/en/features.safe-mode.functions.php and ask
> > you if you need any of those functions, but I prefer Nathan's answer.
> > You may be able to set the error reporting in conjunction with
> > disable_functions and be done.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] blocking exec() silently

2007-09-13 Thread Samuel Vogel

Hey,

Thanks for the replies!
safe-mode is not an option unfortunately!
But changing the Error reporting, is the first thing I wanted to do, but 
when I asked if this was possible on this list, somebody replied, that 
it this is not possible!


Could you point me to a way, how I can achieve, that the "this function 
is disabled" error, without suppressing other error messages?


Regards,
Samy

Instruct ICC schrieb:
I was going to mentionn 
http://php.he.net/manual/en/features.safe-mode.functions.php and ask 
you if you need any of those functions, but I prefer Nathan's answer.  
You may be able to set the error reporting in conjunction with 
disable_functions and be done.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD Library

2007-09-13 Thread Samuel Vogel

I would point you to MAMP:
http://www.mamp.info/

It's like Xampp but designed all for a Mac... Easy to install, to 
configure and to user ;)


Regards,
Samy

Greg Donald schrieb:

On Thu, 13 Sep 2007, Steve Marquez wrote:
 

I am running PHP 4.4.7 without the GD Library and need it to run.
I am very novice on PHP, and am using a Mac with 10.3.9.
Can anyone point me in the right direction?




http://destiney.com/blog/php-4-5-macos-x

Hopefully those configs aren't totally outdated.


  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] GD Library

2007-09-13 Thread Greg Donald
On Thu, 13 Sep 2007, Steve Marquez wrote:
> I am running PHP 4.4.7 without the GD Library and need it to run.
> I am very novice on PHP, and am using a Mac with 10.3.9.
> Can anyone point me in the right direction?


http://destiney.com/blog/php-4-5-macos-x

Hopefully those configs aren't totally outdated.


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Any way to turn off daylight savings time in PHP5?

2007-09-13 Thread David Giragosian
Is there anyway to get PHP (v5.1.6) to use the OS time for date functions as
PHP4 did?

phpinfo() lists something called  "Timezone Database: internal" under the
date section, so I'm guessing that's where the data is originating.

Here's the background:

We have a LAMP server that has a special rule created that ignores daylight
savings time, and MySQL will 'defer' to system time so that:

shell> date
Thu Sep 13 11:52:43 CST 2007

and

mysql> select now();
+-+
 | now() |
+-+
 | 2007-09-13 11:52:43 |
+-+
1 row in set (0.00 sec)

give the same result.

However, echo date('Y-m-d H:i:s') produces the time in Daylight Savings
time, i.e., an hour ahead.

I've resorted to testing whether we are in DST with date('I'), then
adjusting displays for the hour difference, but PHP4 just pulled the
date/time straight from the OS.

Seems like being able to set date.timezone=system so that PHP will follow
the OS rule would be a good idea. But doing this, or leaving
date.timezone blank
in php.ini,
causes PHP to grab the correct timezone data from the OS, but it adds the
hour for DST.

Just wondering... I've spent half a day trying different approaches and
nothing has worked.

Thanks,

David


RE: [PHP] GD Library

2007-09-13 Thread Jay Blanchard
[snip]
I am running PHP 4.4.7 without the GD Library and need it to run.
I am very novice on PHP, and am using a Mac with 10.3.9.
Can anyone point me in the right direction?
[/snip]

http://www.php.net/gd tells you how to get and install the libraries.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] GD Library

2007-09-13 Thread Steve Marquez
Greetings,

I am running PHP 4.4.7 without the GD Library and need it to run.
I am very novice on PHP, and am using a Mac with 10.3.9.
Can anyone point me in the right direction?

Thank you so much,

--
Steve M.



RE: [PHP] Getting line count of a text file

2007-09-13 Thread Greg Donald
On Wed, 12 Sep 2007, bruce wrote:
> while you are correct in your assertion that the shell cmds provided are
> specific to linux,

What assertions?  I didn't know I made one.  It's common sense but I
don't recall making an assertion and then asking you if it was correct.

> your assertion/statement that the functions might be 'turned off' are
> fud... basic bash functions are inherently part of the shell

You must be smoking crack dude, I never said anything about any PHP
functions being turned off.  I said 'renamed'.

> and yes, you are correct in your statement that php is relatively
> cross platform,

What statement?

> however, i imagine that you can quite easily get into situations
> where your php code has to have different branches based upon the
> platform that it's running on...

Bt!  Wrong.  When the prospective employer asks me if I have any
questions, I always ask if I'll be forced to use or develop against or
touch any M$ products.  If they say yes I get up and leave.  It's quite
humorous the three times I've done it.

> every other language i've ever written for has required me to have
> subtle differences based upon the underlying platform, i'm pretty sure
> php would/can as well the assumption here, is that you're getting
> into complex stuff..

I haven't made any assumptions.  Seems the other way around entirely.


-- 
Greg Donald
Cyberfusion Consulting
http://cyberfusionconsulting.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP/XML/XSLT

2007-09-13 Thread Mikey
For better (or in my view worse) the company I work for uses the above 
combination for rendering it's XHTML.  Recent we upgraded our version of 
libxslt from 1.1.9 to 1.1.17 and for some reason we have lost our error 
reporting.  Unfortunately we have not lost the errors and so are forced 
with commenting out sections of XSLT until we get the page back.


Has anyone else encountered this problem (google was reticent) and do 
they know of any workarounds/fixes for this?


TIA,

Mikey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] PHP WAP Resources?

2007-09-13 Thread Vo, Lance
and books too :)

-Original Message-
From: Vo, Lance [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 13, 2007 11:07 AM
To: php-general@lists.php.net
Subject: [PHP] PHP WAP Resources? 


hi
can you guys please suggest some good resources for PHP and WAP? 

either urls or websites would be great

tia,
Lance

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP WAP Resources?

2007-09-13 Thread Vo, Lance
hi
can you guys please suggest some good resources for PHP and WAP? 

either urls or websites would be great

tia,
Lance


Re: [PHP] blocking exec() silently

2007-09-13 Thread Instruct ICC

On 9/12/07, Samuel Vogel <[EMAIL PROTECTED]> wrote:
>
> Hey guys,
>
> Actually I'm still looking for a way to block for example the exec()
> function without throwing an error!



From: "Nathan Nobbe" <[EMAIL PROTECTED]>
i dont know why you wouldnt just use the
disable_functions directive in php.ini

disable_functions = "exec"


I was going to mentionn 
http://php.he.net/manual/en/features.safe-mode.functions.php and ask you if 
you need any of those functions, but I prefer Nathan's answer.  You may be 
able to set the error reporting in conjunction with disable_functions and be 
done.


_
Can you find the hidden words?  Take a break and play Seekadoo! 
http://club.live.com/seekadoo.aspx?icid=seek_hotmailtextlink1


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Preventing Access to Private Files

2007-09-13 Thread tedd

At 4:24 PM -0400 9/6/07, TG wrote:

The web server software has access to certain directories, but PHP itself can
have access to things outside the main web folders.


That's good advice, but what do you do when safe_mode is ON?

My experience is that PHP can't access folders out of the web root.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MIME type

2007-09-13 Thread Angelo Zanetti

GOt it working by adding the MIME type to the .htaccess file on the server.



Angelo Zanetti wrote:

Thanks heavyccasey

Im not sure which comment you are referring to, perhaps this one? 
There are many posts.


||

[EMAIL PROTECTED] wrote:

Look up readfile();

Make sure you read the comments.

On 9/11/07, Angelo Zanetti <[EMAIL PROTECTED]> wrote:
 

Hi guys.

I am linking to a file on a WAP site. the backend is written in PHP.
However I need to link to a file but set the content type. I've done 
the

following and am wondering if this is correct:




So basically I set the HREF to the file above (filename .php).

Let me know if there is anything that im doing incorrectly.

Thanks

--
 


Angelo Zanetti
Systems developer
 



*Telephone:* +27 (021) 552 9799
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





  




--

Angelo Zanetti
Systems developer


*Telephone:* +27 (021) 552 9799
*Mobile:*   +27 (0) 72 441 3355
*Fax:*+27 (0) 86 681 5885
*
Web:* http://www.zlogic.co.za
*E-Mail:* [EMAIL PROTECTED] 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] MySQL upload problem (solved)

2007-09-13 Thread tedd

tedd wrote:
I was thinking that I could ftp the sql file to the clients server 
and then run a php script on his server, something like:


$sql = "mysql  -h$dbhost -u$dbuser -p$dbpass $dbname < $filename";
system($sql);

But, that didn't work -- however -- using mysqldump did download the 
file. So, I'm close.


I know that safe_mode is ON, but I'm not sure if that's what's 
causing the failure or something else.



We got the host to install a newer version of phpMyAdmin. It worked 
by breaking the dB into tables and then doing the transfer.


Thanks to all.

Cheers,

tedd
--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: Re: [PHP] PHP 5.2.3 - Segmentation fault (core dumped)

2007-09-13 Thread Jay Blanchard
[snip]
I beg to differ.  In the past 20 years, I've spent plenty of time
working with core dumps, stand-alone dumps, slip traps and system
traces debugging my own software (running at customer sites) without
the remotest possibility of reproducing a problem on-demand.
If you think a problem must be reproducable for "any development team"
to solve it, you need to try working in a real one.  No offence, just
my opinion.
[/snip]

I agree, sometimes you cannot get the actions that caused the issue from
a customer, but in this case we are developers...we are (or should be)
smarter than the average user and should be able to take code that we
are running when the segfault occurs and provide that to the PHP
development team.

It is much easier for any development team when the problem is
reproducible. I have worked and led "real ones" for nearly 30 years (and
several languages) and one of the troubleshooting techniques is to
attempt to reproduce the error.
 
[snip]
A core dump or an strace or some debug output at the right time will
have 99% of the information you need - provided you understand how to
read it. 
I submit there is generally no need to reproduce a problem in order to
diagnose it.  To fix it, yes, it will undoubtedly help if you can
reproduce it, but once you've diagnosed it, reproducing it is a
lot easier.
[/snip]

Wouldn't it be nice to have 100% of the information? That last 1% may be
the code that caused the problem.
 
[snip]
> You see that time and again on this list as wellwithout the
> offending action all we can do is attempt to guess at what was going
> on at the time of the failure. Diligent trouble-shooting on your part
> would have gotten a much better response. You could have likely
> isolated the code that caused the core dump (just as we isolate
> problem code on this list...

Jay, this is the same kind of c... that PHP developers have responded
with in the past.  I'm sorry, but IMO that is entirely unprofessional.
OK, so maybe one isn't being paid to write open source software, but
that's no excuse for not being professional about it.  IMHO.
[/snip]

So given just a clue you can surmise what code the developer wrote, how
s/he used it and how it failed from a general description? As developers
we have a responsibility as well; we must do our part and if that
includes troubleshooting and isolating code that causes a segfault then
so be it. I understand that we sometimes do not do this, and we should
expect that solutions will be more difficult to come by.

[snip]
What's the purpose of a core dump if it does not provide the key
information for solving a problem?  If I still have to isolate and
reproduce the issue in user code, there seems to be very little need for
the core dump, right?
[/snip]

Not so. A core dump, as you stated before, gives you most of the
information. Having the code that appeared to have caused the problem is
definitely welcomed. It helps to see what was occurring when the
segfault happened. Would you not agree?

I want to make a note here; only if I run the same code over and over
and it causes a segfault every time do I have code that may cause the
issue. If the developer is not the only one testing on the same box then
there could be multiple reasons for the core dump. I would never send a
one-time core dump to the dev team. I would isolate and test my code
again and again to see if the segfault occurred each time. At that point
I would submit the info if there was nothing in the core dump that gave
me a clue as to what was going on.

If you have multiple developers testing on the same platform and
experience a segfault you may never be able to reproduce the problem
because it could be a combination of things that caused the problem to
occur. Giving the core dump data to the development team provides them
valuable information but it may not be a problem easily solved because
there are too many variables to account for.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fw: [PHP] PHP Installer on Vista

2007-09-13 Thread dcastillo




 there is a web page somewhere where there are instruction and a bat file to
 help you install it. (google it)
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "M. Sokolewicz" <[EMAIL PROTECTED]>
> Sent: Thursday, September 13, 2007 1:11 PM
> Subject: Re: [PHP] PHP Installer on Vista
>
>
> >
> > its true, I had to install it manually
> > - Original Message - 
> > From: "M. Sokolewicz" <[EMAIL PROTECTED]>
> > To: "Rahul Sitaram Johari" <[EMAIL PROTECTED]>
> > Cc: "PHP" 
> > Sent: Wednesday, September 12, 2007 4:56 PM
> > Subject: Re: [PHP] PHP Installer on Vista
> >
> >
> > > Rahul Sitaram Johari wrote:
> > > > Ave,
> > > >
> > > > Is it true that the PHP Installer does not work on Windows Vista?
And
> if
> > it
> > > > does, it only installs the CGI version?
> > > >
> > > > ~~~
> > > > Rahul Sitaram Johari
> > > > CEO, Twenty Four Seventy Nine Inc.
> > > >
> > > > W: http://www.rahulsjohari.com
> > > > E: [EMAIL PROTECTED]
> > > >
> > > > ³I morti non sono piu soli ... The dead are no longer lonely²
> > >
> > > Did you try it? Easiest way to find out...
> > >
> > > -- 
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php