|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Tue Aug 06 2002 - 00:45:27 CDT
php-general Digest 6 Aug 2002 05:45:27 -0000 Issue 1508
Topics (messages 111232 through 111340):
Re: picture editing
111232 by: Nicholas Mercier
111287 by: Richard Lynch
Configuring cron on ensim servers?
111233 by: Leif K-Brooks
111247 by: Patrick Lynch
111290 by: Richard Lynch
Re: session problems
111234 by: Maxim Maletsky
Re: PERL to PHP problem
111235 by: Analysis & Solutions
111241 by: Andy Woolley
111329 by: CC Zona
sort output of while
111236 by: Jim Long
111237 by: Jim Long
111239 by: Andy Woolley
111240 by: Andy Woolley
111242 by: Jim Long
Update creating a new record?
111238 by: Wm
111245 by: Analysis & Solutions
111291 by: Richard Lynch
111300 by: 1LT John W. Holmes
disable serial port.
111243 by: Anil Garg
111254 by: Damian Harouff
HTTP_POST_VARS['var'] displayed but not $var
111244 by: Lee P. Reilly
111246 by: Matt
111292 by: Richard Lynch
PHP Classes Tutorials
111248 by: Blaine D. Dinsmore
111250 by: B i g D o g
sort scores
111249 by: Jim Long
PHP and excel, through BiffWriter
111251 by: LeTortorec, Jean-Louis
Re: May i?
111252 by: Monty
111255 by: Andy Woolley
111269 by: Monty
111323 by: ::: Flavio Bastos Amiel::::::
111331 by: César Aracena
111332 by: 1LT John W. Holmes
111340 by: Monty
Re: mkdir in safe-mode
111253 by: Joel Boonstra
111258 by: Monty
111262 by: Peter Janett
111267 by: Monty
querystring question?
111256 by: Mark McCulligh
Re: Help needed after upgrading to PHP4
111257 by: David Freeman
Re: Protect PHP coding
111259 by: Manuel Lemos
111265 by: Zeev Suraski
111324 by: Manuel Ochoa
111325 by: Maxim Maletsky
Cookies detect and $_SESSION
111260 by: Andre Dubuc
111266 by: Jim Dam
111282 by: 1LT John W. Holmes
111293 by: Richard Lynch
111302 by: Andre Dubuc
111306 by: 1LT John W. Holmes
111313 by: Andre Dubuc
apache configure dies with php + imap support
111261 by: Rick Kukiela
111294 by: Richard Lynch
Re: PHP Hosting
111263 by: Richard Lynch
Re: RegEx (back referencing)
111264 by: Richard Lynch
Pay (Am I getting screwed)
111268 by: Liam MacKenzie
111270 by: Monty
111272 by: Kevin Diffily
111273 by: Liam MacKenzie
111274 by: Rija
111275 by: Scott
111276 by: Damian Harouff
111279 by: Jason Soza
111280 by: Bob Lockie
111281 by: Jason Soza
111283 by: Peter Houchin
111295 by: Bob Irwin
111296 by: Martin Towell
111298 by: Bob Irwin
111299 by: Justin French
111304 by: David Freeman
111305 by: David Freeman
111307 by: Danny Shepherd
111308 by: Miles Thompson
111309 by: Aaron
111326 by: CC Zona
111333 by: César Aracena
Re: simplify statement
111271 by: Monty
111289 by: Richard Lynch
Session_register ()
111277 by: Varsha Agarwal
111314 by: Mike Mannakee
unserialize()'ing session data
111278 by: RJ
Re: file uploads problem
111284 by: Richard Lynch
Re: Here's the workaround to assign data from XML tag into array!
111285 by: Richard Lynch
Re: Sessions
111286 by: Richard Lynch
Re: String parsing and Array sorting
111288 by: Richard Lynch
Re: PHP4 and MS Excel?
111297 by: Justin French
Help with upload && error message
111301 by: Rija
111303 by: Bob Lockie
111327 by: Jason Wong
GET CHARS???
111310 by: Jason Caldwell
111311 by: Larry Rosenman
Apache error_log
111312 by: Bob Lockie
building a search engine
111315 by: Justin French
111317 by: Maxim Maletsky
111319 by: Pushkar Pradhan
111322 by: Maxim Maletsky
directory timestamps - limiting by date
111316 by: Diver8
111318 by: Martin Towell
111320 by: Maxim Maletsky
111328 by: Diver8
111330 by: Jason Wong
apache/php/ssl under Redhat 7.x system
111321 by: EdwardSPL.ita.org.mo
Two version of php in the same system
111334 by: Breno Cardoso Perucchi
111335 by: Tyler Longren
111337 by: Peter Houchin
111338 by: Analysis & Solutions
Session question
111336 by: Alex Shi
111339 by: Jason Reid
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
At 08:30 AM 8/5/2002 -0700, you wrote:
>Hello Gurus.
>Any good links from where I can find how to edit pictures in PHP.
>I want to generate a text (like 01,02,03 etc.)on every picture after the
>customer loads the picture in to my database.How to do it.
>Thanks
>Olev
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
If you are looking for a really good source for pretty much exactly what
you want check out "PHP and MySQL Web Development" by Luke Welling and
Laura Thomson, Published by SAMS, Copyright 2001, ISBN 0-672-31784-2.
This book has been a wonderful resource for me and contains tons of
practical applications. It not a function reference, but a series of
projects that are applicable to almost any major website, things like,
bookmarks, mailing systems, shopping carts, etc. Specifically what you are
looking for can be found on pages 401-429.
Even if you don't feel like buying the book head to a local book store
(Like Borders) and if they have it check it out there.
Hope that is some help,
Nicholas D. Mercier
attached mail follows:
>Hello Gurus.
>Any good links from where I can find how to edit pictures in PHP.
>I want to generate a text (like 01,02,03 etc.)on every picture after the
>customer loads the picture in to my database.How to do it.
A Google for "PHP and GD and Tutorial" should also be fruitful.
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
I just got a dedicated server from rackshack (www.rackshack.net). It has ensim on it. Does anyone know how to use cron to run php on an ensim server? The support won't help.
attached mail follows:
Hi,
I use wget to a web address with no problems.
Best Regards, Patrick Lynch.
Optip Ltd, Internet & Mobile Development Co. Clare, Ireland. http://www.optip.com/
-----Original Message-----
From: Leif K-Brooks [mailto:eurleif
buyer-brokerage.com]
Sent: 05 August 2002 19:16
To: php-general
Subject: [PHP] Configuring cron on ensim servers?
I just got a dedicated server from rackshack (www.rackshack.net). It has ensim on it. Does anyone know how to use cron to run php on an ensim server? The support won't help.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
>I just got a dedicated server from rackshack (www.rackshack.net). It >has ensim on it. Does anyone know how to use cron to run php on an >ensim server? The support won't help.
I got no idea what "ensim" is, and have never heard of "rackshack"...
But...
1. First, you need to find out if they bothered to compile PHP as a stand-alone binary (aka CGI) (and recently also known as CLI, though CGI and CLI may be subtly different... I ain't quite figured that out yet...)
Start simple:
whereis php
If this has one of:
/bin/php /usr/bin/php /usr/local/bin/php . . .
in the output, you can do:
file /whatever/path/to/php
to be sure it's an "ELF binary blah blah blah"
If it is, then you can just do:
/whatever/path/to/php -f /full/path/to/your/script.php
in your cron job.
If you need an alternate php.ini file, you can use:
/whatever/path/to/php -c /full/path/to/alternate/php.ini -f /full/path/to/your/script.php
Now, just because 'whereis' didn't find 'php', doesn't mean it's not there...
So if that fails, don't despair. Whip out 'locate':
locate php | grep -e "/php$"
The locate will generate *FAR* too many answers, since *EVERY* file *under* a directory named *anything* like 'php' including every damn file that ends in .php on the server...
So, like the grep thingie says to snag only the ones that actually *END* in '/php'
That will still show some directories that are useless, but should get rid of most of the junk you don't.
To actually understand cron, use:
man 5 crontab
That makes it about as clear as it gets...
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
No, Ray, I just upgrated my testing enviroment the other day and all my code perfectly worked.
Can you point us to more details? It could possibly result to be a bug though...
Take care :) Maxim Maletsky
B i g D o g writes:
> Has anyone had any problems with session data not unsetting with the unset > command with 4.2.2? > > I am using sessions and much of the data is not unsetting. > > > > .: B i g D o g :. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
On Mon, Aug 05, 2002 at 05:48:21PM +0100, Andy Woolley wrote: > > I'm trying to convert this snippet of Perl to PHP and it just wont populate > the $oid and $status variables... > ... snip ... > The problem is that $oid and $transactionid are just not there.
Do you have register_globals on in your php.ini file?
Examine the manual on this subject: http://www.php.net/manual/en/configuration.php#ini.register-globals http://www.php.net/manual/en/security.registerglobals.php
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
My thinking is that it has to be something to do with the way PHP has been changed security wise over the last few months.
Does anyone know of anything that will NOT work in PHP that works in Perl? -Ii can't think of anything but colleagues seem to have given up on the idea but I'm not convinced.
-- Andy
----- Original Message -----
From: "Analysis & Solutions" <danielc
analysisandsolutions.com>
To: "PHP List" <php-general
lists.php.net>
Sent: Monday, August 05, 2002 7:33 PM
Subject: Re: [PHP] PERL to PHP problem
> On Mon, Aug 05, 2002 at 05:48:21PM +0100, Andy Woolley wrote: > > > > I'm trying to convert this snippet of Perl to PHP and it just wont populate > > the $oid and $status variables... > > ... snip ... > > The problem is that $oid and $transactionid are just not there. > > Do you have register_globals on in your php.ini file? > > Examine the manual on this subject: > http://www.php.net/manual/en/configuration.php#ini.register-globals > http://www.php.net/manual/en/security.registerglobals.php > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
In article <016b01c23c9f$eb0eaf70$0200a8c0
andypc>,
andy
milonic.com (Andy Woolley) wrote:
> I'm trying to convert this snippet of Perl to PHP and it just wont populate > the $oid and $status variables. Does anyone know if Perl can do things that > PHP can't? - Personally I wouldn't have thought so but you live & learn I > suppose. > > > <Perl code starts here> > #!/usr/bin/perl > use CGI; > use DBI; > > my $qs = new CGI(); > > #- Print MIME header > print $qs->header(); > print "<b>Doing Transaction </b><br />\n"; > > my $oid = $qs->param("oid"); > my $status = $qs->param("transactionstatus"); > <Perl code ends> > > > The problem is that $oid and $transactionid are just not there. I'm unsure > what method the sending server is using. I'm told Java but I have my > doubts - It's a banks credit card transaction server so it's kinda secret > and it's https which could be the problem.
What is the PHP code you're using to replicate the above? And where is there a $transactionid in it? FWIW, if your PHP version is 4.1.0 or above, then the nearest equivalent of $qs->param() would be the $_REQUEST array. Otherwise, the variables should be automatically populated if register_globals is turned on, or else you can populate the variables yourself by checking the contents of $HTTP_GET_VARS and $HTTP_POST_VARS arrays.
<b>Doing Transaction </b><br /> <?php $oid= $_REQUEST['oid']; $status= $_REQUEST['transactionstatus']; ?>
-- CC
attached mail follows:
Hi, Thanks to everyone who has helped me.. Just a golf coach trying to make my life simpler with this little program.. I got the pages built that load and edit the db. Now I'm working on the display for the team members...
BTW: The db is loaded with 15 0's where there are no scores updated yet, that's why I have the $i loop.
Sor far I have made it work, but can't figure out how to sort it by the $rounded_ave
// Get the Name and Scores from the db $result = mysql_query( "SELECT * FROM scores"); if (!$result) { echo("<P>Error performing query: " . mysql_error() . "</P>"); exit(); }
// Loop -- organize the db output while ( $row = mysql_fetch_array($result) ) {
$last_name=$row["last_name"]; $first_name=$row["first_name"];
// Sets the value of $i with the number of scores that have been updated // BTW: Could not get your simplification to work yet $i=0; $s1=$row[s1]; if ($s1!= 0){ $i++; } $s2=$row[s2]; if ($s2!= 0){ $i++; } $s3=$row[s3]; if ($s3!= 0){ $i++; } $s4=$row[s4]; if ($s4!= 0){ $i++; } $s5=$row[s5]; if ($s5!= 0){ $i++; } $s6=$row[s6]; if ($s6!= 0){ $i++; } $s7=$row[s7]; if ($s7!= 0){ $i++; } $s8=$row[s8]; if ($s8!= 0){ $i++; } $s9=$row[s9]; if ($s9!= 0){ $i++; } $s10=$row[s10]; if ($s10!= 0){ $i++; } $s11=$row[s11]; if ($s11!= 0){ $i++; } $s12=$row[s12]; if ($s12!= 0){ $i++; } $s13=$row[s13]; if ($s13!= 0){ $i++; } $s14=$row[s14]; if ($s14!= 0){ $i++; } $s15=$row[s15]; if ($s15!= 0){ $i++; }
// get the average score and round it using $i for the number of scores $available_scores = array($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14,$s15); $gross_score = array_sum($available_scores); $ave_score = ($gross_score / $i); $rounded_ave = number_format($ave_score, 2);
// end loop -- varibles $last_name, $first_name, $available, $ave_score // I could just print everthing here but it would not be sorted by $rounded_ave // I need to extract these varibles (each loop) and put them in an ordered list with a sorted output }
How do I do that?
I appreciate the help from this list! Thanks Again, Coach Jim Long
attached mail follows:
The varibles I want to extract from the loop should read: $last_name, $first_name, $available_scores, $rounded_ave
Jim Long
attached mail follows:
You can sort arrays with the sort($arrayname); command
Not sure if it will sort arrays from MySQL thought, but I don't see why not.
Cheers Andy
----- Original Message -----
From: "Jim Long" <jim
jimlong.net>
To: "php" <php-general
lists.php.net>
Sent: Monday, August 05, 2002 8:39 PM
Subject: [PHP] sort output of while
> Hi, > Thanks to everyone who has helped me.. Just a golf coach trying to make > my life simpler with this little program.. I got the pages built that > load and edit the db. Now I'm working on the display for the team members... > > BTW: The db is loaded with 15 0's where there are no scores updated yet, > that's why I have the $i loop. > > Sor far I have made it work, but can't figure out how to sort it by the $rounded_ave > > > // Get the Name and Scores from the db > $result = mysql_query( > "SELECT * FROM scores"); > if (!$result) { > echo("<P>Error performing query: " . > mysql_error() . "</P>"); > exit(); > } > > // Loop -- organize the db output > while ( $row = mysql_fetch_array($result) ) { > > $last_name=$row["last_name"]; > $first_name=$row["first_name"]; > > // Sets the value of $i with the number of scores that have been updated > // BTW: Could not get your simplification to work yet > $i=0; > $s1=$row[s1]; > if ($s1!= 0){ > $i++; > } > $s2=$row[s2]; > if ($s2!= 0){ > $i++; > } > $s3=$row[s3]; > if ($s3!= 0){ > $i++; > } > $s4=$row[s4]; > if ($s4!= 0){ > $i++; > } > $s5=$row[s5]; > if ($s5!= 0){ > $i++; > } > $s6=$row[s6]; > if ($s6!= 0){ > $i++; > } > $s7=$row[s7]; > if ($s7!= 0){ > $i++; > } > $s8=$row[s8]; > if ($s8!= 0){ > $i++; > } > $s9=$row[s9]; > if ($s9!= 0){ > $i++; > } > $s10=$row[s10]; > if ($s10!= 0){ > $i++; > } > $s11=$row[s11]; > if ($s11!= 0){ > $i++; > } > $s12=$row[s12]; > if ($s12!= 0){ > $i++; > } > $s13=$row[s13]; > if ($s13!= 0){ > $i++; > } > $s14=$row[s14]; > if ($s14!= 0){ > $i++; > } > $s15=$row[s15]; > if ($s15!= 0){ > $i++; > } > > // get the average score and round it using $i for the number of scores > $available_scores = array($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14,$s15); > $gross_score = array_sum($available_scores); > $ave_score = ($gross_score / $i); > $rounded_ave = number_format($ave_score, 2); > > // end loop -- varibles $last_name, $first_name, $available, $ave_score > // I could just print everthing here but it would not be sorted by $rounded_ave > // I need to extract these varibles (each loop) and put them in an > ordered list with a sorted output > } > > How do I do that? > > I appreciate the help from this list! > Thanks Again, > Coach Jim Long > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Or better still - why not just sort the query.
"SELECT * FROM scores order by fieldname"
-- Andy
----- Original Message -----
From: "Andy Woolley" <andy
milonic.com>
To: <jim
jimlong.net>; "php" <php-general
lists.php.net>
Sent: Monday, August 05, 2002 7:50 PM
Subject: Re: [PHP] sort output of while
> You can sort arrays with the sort($arrayname); command
>
> Not sure if it will sort arrays from MySQL thought, but I don't see why
not.
>
> Cheers
> Andy
>
>
>
> ----- Original Message -----
> From: "Jim Long" <jim
jimlong.net>
> To: "php" <php-general
lists.php.net>
> Sent: Monday, August 05, 2002 8:39 PM
> Subject: [PHP] sort output of while
>
>
> > Hi,
> > Thanks to everyone who has helped me.. Just a golf coach trying to make
> > my life simpler with this little program.. I got the pages built that
> > load and edit the db. Now I'm working on the display for the team
> members...
> >
> > BTW: The db is loaded with 15 0's where there are no scores updated yet,
> > that's why I have the $i loop.
> >
> > Sor far I have made it work, but can't figure out how to sort it by the
> $rounded_ave
> >
> >
> > // Get the Name and Scores from the db
> > $result = mysql_query(
> > "SELECT * FROM scores");
> > if (!$result) {
> > echo("<P>Error performing query: " .
> > mysql_error() . "</P>");
> > exit();
> > }
> >
> > // Loop -- organize the db output
> > while ( $row = mysql_fetch_array($result) ) {
> >
> > $last_name=$row["last_name"];
> > $first_name=$row["first_name"];
> >
> > // Sets the value of $i with the number of scores that have been updated
> > // BTW: Could not get your simplification to work yet
> > $i=0;
> > $s1=$row[s1];
> > if ($s1!= 0){
> > $i++;
> > }
> > $s2=$row[s2];
> > if ($s2!= 0){
> > $i++;
> > }
> > $s3=$row[s3];
> > if ($s3!= 0){
> > $i++;
> > }
> > $s4=$row[s4];
> > if ($s4!= 0){
> > $i++;
> > }
> > $s5=$row[s5];
> > if ($s5!= 0){
> > $i++;
> > }
> > $s6=$row[s6];
> > if ($s6!= 0){
> > $i++;
> > }
> > $s7=$row[s7];
> > if ($s7!= 0){
> > $i++;
> > }
> > $s8=$row[s8];
> > if ($s8!= 0){
> > $i++;
> > }
> > $s9=$row[s9];
> > if ($s9!= 0){
> > $i++;
> > }
> > $s10=$row[s10];
> > if ($s10!= 0){
> > $i++;
> > }
> > $s11=$row[s11];
> > if ($s11!= 0){
> > $i++;
> > }
> > $s12=$row[s12];
> > if ($s12!= 0){
> > $i++;
> > }
> > $s13=$row[s13];
> > if ($s13!= 0){
> > $i++;
> > }
> > $s14=$row[s14];
> > if ($s14!= 0){
> > $i++;
> > }
> > $s15=$row[s15];
> > if ($s15!= 0){
> > $i++;
> > }
> >
> > // get the average score and round it using $i for the number of scores
> > $available_scores =
> array($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14,$s15);
> > $gross_score = array_sum($available_scores);
> > $ave_score = ($gross_score / $i);
> > $rounded_ave = number_format($ave_score, 2);
> >
> > // end loop -- varibles $last_name, $first_name, $available, $ave_score
> > // I could just print everthing here but it would not be sorted by
> $rounded_ave
> > // I need to extract these varibles (each loop) and put them in an
> > ordered list with a sorted output
> > }
> >
> > How do I do that?
> >
> > I appreciate the help from this list!
> > Thanks Again,
> > Coach Jim Long
> >
> > --
> > 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
attached mail follows:
I must admit.. This seem to be the best idea.. Thanks.
> Or better still - why not just sort the query. > > "SELECT * FROM scores order by fieldname"
Jim Long
Andy Woolley wrote:
>
> Or better still - why not just sort the query.
>
> "SELECT * FROM scores order by fieldname"
>
> -- Andy
>
> ----- Original Message -----
> From: "Andy Woolley" <andy
milonic.com>
> To: <jim
jimlong.net>; "php" <php-general
lists.php.net>
> Sent: Monday, August 05, 2002 7:50 PM
> Subject: Re: [PHP] sort output of while
>
> > You can sort arrays with the sort($arrayname); command
> >
> > Not sure if it will sort arrays from MySQL thought, but I don't see why
> not.
> >
> > Cheers
> > Andy
> >
> >
> >
> > ----- Original Message -----
> > From: "Jim Long" <jim
jimlong.net>
> > To: "php" <php-general
lists.php.net>
> > Sent: Monday, August 05, 2002 8:39 PM
> > Subject: [PHP] sort output of while
> >
> >
> > > Hi,
> > > Thanks to everyone who has helped me.. Just a golf coach trying to make
> > > my life simpler with this little program.. I got the pages built that
> > > load and edit the db. Now I'm working on the display for the team
> > members...
> > >
> > > BTW: The db is loaded with 15 0's where there are no scores updated yet,
> > > that's why I have the $i loop.
> > >
> > > Sor far I have made it work, but can't figure out how to sort it by the
> > $rounded_ave
> > >
> > >
> > > // Get the Name and Scores from the db
> > > $result = mysql_query(
> > > "SELECT * FROM scores");
> > > if (!$result) {
> > > echo("<P>Error performing query: " .
> > > mysql_error() . "</P>");
> > > exit();
> > > }
> > >
> > > // Loop -- organize the db output
> > > while ( $row = mysql_fetch_array($result) ) {
> > >
> > > $last_name=$row["last_name"];
> > > $first_name=$row["first_name"];
> > >
> > > // Sets the value of $i with the number of scores that have been updated
> > > // BTW: Could not get your simplification to work yet
> > > $i=0;
> > > $s1=$row[s1];
> > > if ($s1!= 0){
> > > $i++;
> > > }
> > > $s2=$row[s2];
> > > if ($s2!= 0){
> > > $i++;
> > > }
> > > $s3=$row[s3];
> > > if ($s3!= 0){
> > > $i++;
> > > }
> > > $s4=$row[s4];
> > > if ($s4!= 0){
> > > $i++;
> > > }
> > > $s5=$row[s5];
> > > if ($s5!= 0){
> > > $i++;
> > > }
> > > $s6=$row[s6];
> > > if ($s6!= 0){
> > > $i++;
> > > }
> > > $s7=$row[s7];
> > > if ($s7!= 0){
> > > $i++;
> > > }
> > > $s8=$row[s8];
> > > if ($s8!= 0){
> > > $i++;
> > > }
> > > $s9=$row[s9];
> > > if ($s9!= 0){
> > > $i++;
> > > }
> > > $s10=$row[s10];
> > > if ($s10!= 0){
> > > $i++;
> > > }
> > > $s11=$row[s11];
> > > if ($s11!= 0){
> > > $i++;
> > > }
> > > $s12=$row[s12];
> > > if ($s12!= 0){
> > > $i++;
> > > }
> > > $s13=$row[s13];
> > > if ($s13!= 0){
> > > $i++;
> > > }
> > > $s14=$row[s14];
> > > if ($s14!= 0){
> > > $i++;
> > > }
> > > $s15=$row[s15];
> > > if ($s15!= 0){
> > > $i++;
> > > }
> > >
> > > // get the average score and round it using $i for the number of scores
> > > $available_scores =
> > array($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14,$s15);
> > > $gross_score = array_sum($available_scores);
> > > $ave_score = ($gross_score / $i);
> > > $rounded_ave = number_format($ave_score, 2);
> > >
> > > // end loop -- varibles $last_name, $first_name, $available, $ave_score
> > > // I could just print everthing here but it would not be sorted by
> > $rounded_ave
> > > // I need to extract these varibles (each loop) and put them in an
> > > ordered list with a sorted output
> > > }
> > >
> > > How do I do that?
> > >
> > > I appreciate the help from this list!
> > > Thanks Again,
> > > Coach Jim Long
> > >
> > > --
> > > 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
attached mail follows:
I've noticed that every time I "update" a record, mySQL is actually adding a new record (highest number ID, at the end) and deleting the original record. I don't understand this. For example, if I edit a phone number in the listing for ID=023, the next time I view a complete listing of members I'll see that person's link now showing ID=128 (or a similar much higher record number, 1 higher than the last highest record number). My PHP code uses "upate photographers" to update rather than insert a new record. I can post the actual code tonight if needed, but I was hoping that someone might have an idea of whether or not this was normal. It DOES pull up the right data after I update mySQL, but it's the change in the link that bites me on one other page with hard-coded links.
Wm
attached mail follows:
On Mon, Aug 05, 2002 at 11:46:53AM -0700, Wm wrote: > I've noticed that every time I "update" a record, mySQL is actually adding a > new record (highest number ID, at the end) and deleting the original record.
Sounds like you're using a REPLACE query rather than an UPDATE query.
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#REPLACE
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
>I've noticed that every time I "update" a record, mySQL is actually adding a >new record (highest number ID, at the end) and deleting the original record. >I don't understand this. For example, if I edit a phone number in the >listing for ID=023, the next time I view a complete listing of members I'll >see that person's link now showing ID=128 (or a similar much higher record >number, 1 higher than the last highest record number). My PHP code uses >"upate photographers" to update rather than insert a new record. I can post >the actual code tonight if needed, but I was hoping that someone might have >an idea of whether or not this was normal. It DOES pull up the right data >after I update mySQL, but it's the change in the link that bites me on one >other page with hard-coded links.
Show us source.
Update should not alter their ID, unless, like, you actually *ASKED* it to...
UPDATE foo set ID = 128 where ID = 023
would do exactly what you describe...
Try echo-ing out your query before you send it to the database, and see what you are actually saying to MySQL, as opposed to what you *think* you are saying to MySQL... :-)
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
> >I've noticed that every time I "update" a record, mySQL is actually adding a > >new record (highest number ID, at the end) and deleting the original record. > >I don't understand this. For example, if I edit a phone number in the > >listing for ID=023, the next time I view a complete listing of members I'll > >see that person's link now showing ID=128 (or a similar much higher record > >number, 1 higher than the last highest record number). My PHP code uses > >"upate photographers" to update rather than insert a new record. I can post > >the actual code tonight if needed, but I was hoping that someone might have > >an idea of whether or not this was normal. It DOES pull up the right data > >after I update mySQL, but it's the change in the link that bites me on one > >other page with hard-coded links. > > Show us source. > > Update should not alter their ID, unless, like, you actually *ASKED* it > to... > > UPDATE foo set ID = 128 where ID = 023 > > would do exactly what you describe... > > Try echo-ing out your query before you send it to the database, and see what > you are actually saying to MySQL, as opposed to what you *think* you are > saying to MySQL... :-)
Maybe you are UPDATING your column to NULL? The only way I could possibly imagine this happening is if you were doing something like
UPDATE your_table SET ID = NULL, ...
On an INSERT, that would get you the next auto_incremented ID, but I don't know about an UPDATE.
Odds are it's something really stupid and easy to figure out...but a lot of times we get caught up in the code and miss it. :)
---John Holmes...
attached mail follows:
hi,
m reaaly sorry to put this quesion here but its important..
When i disable serial port from SETUP it also disables my keyboard :(
Can someone help me by telling how can i avoid it and if there is some other way??
I am on a unix machine( i cant find boot.ini as in windows nt)
hope to get a solution of my problem
thanx and regards anil
php
attached mail follows:
Don't disable the serial port from "setup".
AG> hi,
AG> m reaaly sorry to put this quesion here but its important..
AG> When i disable serial port from SETUP it also disables my keyboard :(
AG> Can someone help me by telling how can i avoid it and if there is some other way??
AG> I am on a unix machine( i cant find boot.ini as in windows nt)
AG> hope to get a solution of my problem
AG> thanx and regards AG> anil
AG> php
attached mail follows:
Hi,
I recently installed the php-4.2.2-Win32 cgi and have come across a problem. When I have form variables, I can only read them via $HTTP_POST_VARS['var'] and *not* simply via $var.
i.e. echo $HTTP_POST_VARS['Qmin']; // works a charm echo "<br><br>$Qmin"; // doesn't work
I've installed PHP many times and have never encountered this problem. I'm guessing (hoping) that this is controlled in php.ini or can be fixed, but a search for a solution has proved unsuccessful thus far.
Does anyone know what the problem is?
Cheers, Lee
attached mail follows:
> From: "Lee P. Reilly" <lreilly
lanl.gov>
> Sent: Monday, August 05, 2002 3:03 PM
> Subject: [PHP] HTTP_POST_VARS['var'] displayed but not $var
>
> I recently installed the php-4.2.2-Win32 cgi and have come across a
> problem. When I have form variables, I can only read them via
> $HTTP_POST_VARS['var'] and *not* simply via $var.
>
> i.e.
> echo $HTTP_POST_VARS['Qmin']; // works a charm
> echo "<br><br>$Qmin"; // doesn't work
>
> Does anyone know what the problem is?
PHP 4 out of the box has register_globals off now. You should now use $_POST['var'] instead --or-- you could turn register_globals back on.
You can read about why register_globals is now default off under Security at: http://www.php.net/release_4_1_0.php
attached mail follows:
>Hi, > >I recently installed the php-4.2.2-Win32 cgi and have come across a >problem. When I have form variables, I can only read them via >$HTTP_POST_VARS['var'] and *not* simply via $var. > >i.e. > echo $HTTP_POST_VARS['Qmin']; // works a charm > echo "<br><br>$Qmin"; // doesn't work > >I've installed PHP many times and have never encountered this problem. >I'm guessing (hoping) that this is controlled in php.ini or can be >fixed, but a search for a solution has proved unsuccessful thus far. > >Does anyone know what the problem is?
There are a zillion emails talking about 'register_globals' on this topic...
The short answer is: Stop using $Qmin, start using $_POST['Qmin']
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
I was wondering if anyone has any good tutorial links on PHP classes.
Thanks,
Blaine
attached mail follows:
.: B i g D o g :.
----- Original Message -----
From: "Blaine D. Dinsmore" <dinsmoreb
surfbest.net>
To: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 1:50 PM
Subject: [PHP] PHP Classes Tutorials
> I was wondering if anyone has any good tutorial links on PHP classes. > > > Thanks, > > Blaine > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Andy Woolley wrote: > > Or better still - why not just sort the query. > > "SELECT * FROM scores order by fieldname" > > -- Andy
This worked well... Made things much simpler. I should have realized it earlier.
THANKS ANDY
Jim Long
attached mail follows:
Hello everyone!
I've started using BiffWriter to write an excel file. It works fine, pretty easy to do coding.
Does someone else use it? I need to create several spreadsheets within the same file, or workbook.
Any help on that would be appreciate.
Thanks a lot.
Jean-Louis
attached mail follows:
There doesn't appear to be any way to reset the internal MySQL auto-numbering sequence. Only way I know to do this is re-create your table and re-import any data you want into the new table after testing is done.
If you are storing data in other tables linked by the ID field, then you simply have to write the code that will automatically delete any related records from all tables to keep your database in-sync.
Monty
> From: flavinho
cantv.net (::: Flavio Bastos Amiel::::::>)
> Newsgroups: php.general
> Date: Tue, 3 Sep 2002 21:08:57 -0400
> To: php-general
lists.php.net
> Subject: Re: [PHP] Re: May i?
>
> well....... yes, then maybe i made a mistake.... there was data related to
> the id ..... then i delete that row.... and the data that was related to the
> comments are gone away, because the row id has changed....so i would have to
> put then manually again....
>
> Flavio Bastos Amiel
>
>
> "Maxim Maletsky" <subscriptions
phpbeginner.com> wrote in message
> news:000c01c23b50$050fcfe0$1113fe17
dominanta...
>>
>> Why do you need it anyway?
>>
>> auto_increment is a mySQL functionality to (listen this carefully) KEEP
>> UNICITY WITHIN A TABLE. This is what they are needed for. I agree - it
>> would look prettier having them even sequential, but that is behind the
>> real point and it is not a "problem".
>>
>> You should make your application independent from "id" value - "id"
>> should only serve you as a key to relate the data within
>> application/database.
>>
>>
>> Sincerely,
>>
>> Maxim Maletsky
>>
>> PHP Beginner
>> www.phpbeginner.com
>>
>>
>>> -----Original Message-----
>>> From: ::: Flavio Bastos Amiel::::::> [mailto:flavinho
cantv.net]
>>> Sent: Wednesday, September 04, 2002 2:28 AM
>>> To: php-general
lists.php.net
>>> Subject: [PHP] Re: May i?
>>>
>>> let's see if i can do it...
>>>
>>> i got a news site..... everything was going OK....sometimes i made few
>>> testing and then i delete the content from the db... the problem is
>> next:
>>>
>>> the item "id" is an auto_increment element .. so the id's wasn't going
>>> allright....because they where not true... sometimes they make jumps
>> like
>>> id
>>> #25 and the id #30 (because of the testing i've done and then delete)
>>>
>>> i tried to delete that cell (id) and then i recreate it. thinking the
>> id
>>> was
>>> going to count it all over and make the item id TRUE.....but it wasn't
>>> like
>>> that, the "new" id was counting since the last id then if the last id
>> was
>>> 100, the new id was counting from 100 to 200 .... do i explain
>> myself?...
>>> does anyone have an answer to this problem (PLEASE Dont tell me i have
>> to
>>> do
>>> i manually!! )
>>>
>>> thanks,
>>> Flavio Bastos Amiel
>>>
>>>
>>>
>>>
>>>
>>> "George Nicolae" <geomasterweb
hotmail.com> wrote in message
>>> news:20020804001037.31489.qmail
pb1.pair.com...
>>>> ask.
>>>>
>>>> --
>>>>
>>>>
>>>> Best regards,
>>>> George Nicolae
>>>> IT Manager
>>>> ___________________
>>>> PaginiWeb.com - Professional Web Design
>>>> www.PaginiWeb.com
>>>>
>>>>
>>>> "::: Flavio Bastos Amiel::::::>" <flavinho
cantv.net> wrote in
>> message
>>>> news:20020803224811.95593.qmail
pb1.pair.com...
>>>>> May i ask for help about a subejct on MySQL here?
>>>>>
>>>>> thanks,
>>>>> Flavio Bastos Amiel
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
attached mail follows:
Try this
ALTER TABLE tbl_name AUTO_INCREMENT=1;
This should reset the auto_inc pri_key field but be very careful with this, Maxim's theory on id continuity is an important factor as your data may not have the sequence it needs for left joins etc.
Hope this helps Andy.
----- Original Message -----
From: "Monty" <monty3
hotmail.com>
To: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 9:13 PM
Subject: Re: [PHP] Re: May i?
> There doesn't appear to be any way to reset the internal MySQL
> auto-numbering sequence. Only way I know to do this is re-create your
table
> and re-import any data you want into the new table after testing is done.
>
> If you are storing data in other tables linked by the ID field, then you
> simply have to write the code that will automatically delete any related
> records from all tables to keep your database in-sync.
>
> Monty
>
> > From: flavinho
cantv.net (::: Flavio Bastos Amiel::::::>)
> > Newsgroups: php.general
> > Date: Tue, 3 Sep 2002 21:08:57 -0400
> > To: php-general
lists.php.net
> > Subject: Re: [PHP] Re: May i?
> >
> > well....... yes, then maybe i made a mistake.... there was data related
to
> > the id ..... then i delete that row.... and the data that was related to
the
> > comments are gone away, because the row id has changed....so i would
have to
> > put then manually again....
> >
> > Flavio Bastos Amiel
> >
> >
> > "Maxim Maletsky" <subscriptions
phpbeginner.com> wrote in message
> > news:000c01c23b50$050fcfe0$1113fe17
dominanta...
> >>
> >> Why do you need it anyway?
> >>
> >> auto_increment is a mySQL functionality to (listen this carefully) KEEP
> >> UNICITY WITHIN A TABLE. This is what they are needed for. I agree - it
> >> would look prettier having them even sequential, but that is behind the
> >> real point and it is not a "problem".
> >>
> >> You should make your application independent from "id" value - "id"
> >> should only serve you as a key to relate the data within
> >> application/database.
> >>
> >>
> >> Sincerely,
> >>
> >> Maxim Maletsky
> >>
> >> PHP Beginner
> >> www.phpbeginner.com
> >>
> >>
> >>> -----Original Message-----
> >>> From: ::: Flavio Bastos Amiel::::::> [mailto:flavinho
cantv.net]
> >>> Sent: Wednesday, September 04, 2002 2:28 AM
> >>> To: php-general
lists.php.net
> >>> Subject: [PHP] Re: May i?
> >>>
> >>> let's see if i can do it...
> >>>
> >>> i got a news site..... everything was going OK....sometimes i made few
> >>> testing and then i delete the content from the db... the problem is
> >> next:
> >>>
> >>> the item "id" is an auto_increment element .. so the id's wasn't going
> >>> allright....because they where not true... sometimes they make jumps
> >> like
> >>> id
> >>> #25 and the id #30 (because of the testing i've done and then delete)
> >>>
> >>> i tried to delete that cell (id) and then i recreate it. thinking the
> >> id
> >>> was
> >>> going to count it all over and make the item id TRUE.....but it wasn't
> >>> like
> >>> that, the "new" id was counting since the last id then if the last id
> >> was
> >>> 100, the new id was counting from 100 to 200 .... do i explain
> >> myself?...
> >>> does anyone have an answer to this problem (PLEASE Dont tell me i have
> >> to
> >>> do
> >>> i manually!! )
> >>>
> >>> thanks,
> >>> Flavio Bastos Amiel
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> "George Nicolae" <geomasterweb
hotmail.com> wrote in message
> >>> news:20020804001037.31489.qmail
pb1.pair.com...
> >>>> ask.
> >>>>
> >>>> --
> >>>>
> >>>>
> >>>> Best regards,
> >>>> George Nicolae
> >>>> IT Manager
> >>>> ___________________
> >>>> PaginiWeb.com - Professional Web Design
> >>>> www.PaginiWeb.com
> >>>>
> >>>>
> >>>> "::: Flavio Bastos Amiel::::::>" <flavinho
cantv.net> wrote in
> >> message
> >>>> news:20020803224811.95593.qmail
pb1.pair.com...
> >>>>> May i ask for help about a subejct on MySQL here?
> >>>>>
> >>>>> thanks,
> >>>>> Flavio Bastos Amiel
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> 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
attached mail follows:
> ALTER TABLE tbl_name AUTO_INCREMENT=1;
OMG, it works! If only you had seen my question about the very same thing I posted last week. No one else could answer it and I wasted hours looking for it on that horrible MySQL online manual site, which I never found so I thought it wasn't possible.
THANKS!
attached mail follows:
well, the query wasn't sucessfull for me
i'm using MySQL 3.23.37 :s is what my hosting serves.....
well..... i woul try doing something else...... think it's time to let this discussion apart, :)
Thanks everybody for the help!
Flavio Bastos Amiel
"Manuel" <manuel
ochoa-usa.com> wrote in message
news:20020804171944.18522.qmail
web20707.mail.yahoo.com...
>
> You can reset the id with this command:
> ALTER TABLE $tablename AUTO_INCREMENT = 242
>
> : : Flavio Bastos Amiel: : : : : :
INVALID_ADDRESS_IN_GROUP
.SYNTAX-ERROR.;;;;;;;;, "::: Flavio Bastos
Amiel::::::>" wrote:let's see if i can do it...
>
> i got a news site..... everything was going OK....sometimes i made few
> testing and then i delete the content from the db... the problem is next:
>
> the item "id" is an auto_increment element .. so the id's wasn't going
> allright....because they where not true... sometimes they make jumps like
id
> #25 and the id #30 (because of the testing i've done and then delete)
>
> i tried to delete that cell (id) and then i recreate it. thinking the id
was
> going to count it all over and make the item id TRUE.....but it wasn't
like
> that, the "new" id was counting since the last id then if the last id was
> 100, the new id was counting from 100 to 200 .... do i explain myself?...
> does anyone have an answer to this problem (PLEASE Dont tell me i have to
do
> i manually!! )
>
> thanks,
> Flavio Bastos Amiel
>
>
>
>
>
> "George Nicolae" wrote in message
> news:20020804001037.31489.qmail
pb1.pair.com...
> > ask.
> >
> > --
> >
> >
> > Best regards,
> > George Nicolae
> > IT Manager
> > ___________________
> > PaginiWeb.com - Professional Web Design
> > www.PaginiWeb.com
> >
> >
> > "::: Flavio Bastos Amiel::::::>" wrote in message
> > news:20020803224811.95593.qmail
pb1.pair.com...
> > > May i ask for help about a subejct on MySQL here?
> > >
> > > thanks,
> > > Flavio Bastos Amiel
> > >
> > >
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> ~ Manuel Ochoa ~
> Seven days is too long to wait for a gun!
>
>
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
attached mail follows:
Monty, I did answer not your e-mail, but this very one last week with
the same answer. This is not to reprehend you, but to tell you that you
could have your question answered before only by reading over the
weekend ;) Try to subscribe to the MySQL list (mysql
lists.mysql.com)
which is where I got this answer long time ago.
Cheers, C.
> -----Original Message-----
> From: Monty [mailto:monty3
hotmail.com]
> Sent: Monday, August 05, 2002 7:46 PM
> To: php-general
lists.php.net
> Subject: Re: [PHP] Re: May i?
>
> > ALTER TABLE tbl_name AUTO_INCREMENT=1;
>
> OMG, it works! If only you had seen my question about the very same
thing
> I
> posted last week. No one else could answer it and I wasted hours
looking
> for
> it on that horrible MySQL online manual site, which I never found so I
> thought it wasn't possible.
>
> THANKS!
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Can we just drop this subject? It has nothing to do with PHP. And, most of all, if your script requires that the IDs be sequential, or if holes in the IDs break your script, then you have a very poor database and code design. Period.
---John Holmes...
----- Original Message -----
From: "César Aracena" <icaam
icaam.com.ar>
To: "'Monty'" <monty3
hotmail.com>; <php-general
lists.php.net>
Sent: Tuesday, August 06, 2002 12:01 AM
Subject: RE: [PHP] Re: May i?
> Monty, I did answer not your e-mail, but this very one last week with
> the same answer. This is not to reprehend you, but to tell you that you
> could have your question answered before only by reading over the
> weekend ;) Try to subscribe to the MySQL list (mysql
lists.mysql.com)
> which is where I got this answer long time ago.
>
> Cheers, C.
>
> > -----Original Message-----
> > From: Monty [mailto:monty3
hotmail.com]
> > Sent: Monday, August 05, 2002 7:46 PM
> > To: php-general
lists.php.net
> > Subject: Re: [PHP] Re: May i?
> >
> > > ALTER TABLE tbl_name AUTO_INCREMENT=1;
> >
> > OMG, it works! If only you had seen my question about the very same
> thing
> > I
> > posted last week. No one else could answer it and I wasted hours
> looking
> > for
> > it on that horrible MySQL online manual site, which I never found so I
> > thought it wasn't possible.
> >
> > THANKS!
> >
> >
> >
> > --
> > 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
>
attached mail follows:
Cesar, I apologize, I didn't see your e-mail until I saw your reply here. To be honest, I wasn't checking that hotmail account because it's basically a major spam swamp, however, I now see that some people choose to reply privately by e-mail which I didn't realize was happening. I'll check it regularly now as a result.
Thanks a lot for your e-mail and help.
Monty.
> From: icaam
icaam.com.ar (César aracena)
> Newsgroups: php.general
> Date: Tue, 6 Aug 2002 01:01:38 -0300
> To: "'Monty'" <monty3
hotmail.com>, <php-general
lists.php.net>
> Subject: RE: [PHP] Re: May i?
>
> Monty, I did answer not your e-mail, but this very one last week with
> the same answer. This is not to reprehend you, but to tell you that you
> could have your question answered before only by reading over the
> weekend ;) Try to subscribe to the MySQL list (mysql
lists.mysql.com)
> which is where I got this answer long time ago.
>
> Cheers, C.
>
attached mail follows:
> sorry, my english isn't the best. > > I have a problem to dynamically create directorystructures using > php 4.2.2 running as modul in safe-mode. > > the ftp- and apache user (for the virtual-hosts) are identical, but the > user, the apache-daemon > in runnung under, is a different, so that directory-access ist only > possible to the owner. > > if now using the mkdir-function, php creates a directory owned by the > user, the apache-daemon is > started with, not by the user, the virtual-host is running under. > > the first directory can be created, if the permissions are the to. but > in the created directory i > can't create other directories or files.
I, too, have noticed this same problem. Correct me if I'm wrong, but shouldn't PHP running under safe_mode create directories and files to be owned by the same owner as the currently-running PHP script? If my webserver runs as user 'apache', but safe_mode is enabled, and a script owned by user 'joel' creates a directory in my home directory, the directory is still owned by 'apache', rather than 'joel'.
This seems to be misbehavior, since, as Kai pointed out, creating files within that directory won't work, since the safe_mode user ('joel') doesn't have permissions to create files in a directory owned by user 'apache', even though joel just created the directory with PHP!
Any help on how to get around this, or fix it?
-- [ joel boonstra | jboonstragospelcom.net ]
attached mail follows:
I'm also trying to figure this out right now. I have permissions for my directories set to 755, but when I want to create a new directory within PHP, I'm told I don't have permission to do so. This happens even when I use umask('0000') before the mkdir() function. chmod() doesn't work either because I get the same "don't have permission" error.
Only way to make it work is to change the permissions for all directories on my web server to 777 which I don't really want to do. So, I'd also like to know if it's possible to have a PHP script make, delete and rename directories without having to set all directories to 777 permissions on the server.
> From: jboonstra
gospelcom.net (Joel Boonstra)
> Newsgroups: php.general
> Date: Mon, 5 Aug 2002 16:17:35 -0400 (EDT)
> To: Kai <eisbrenner
gidn.de>
> Cc: "php-general
lists.php.net" <php-general
lists.php.net>
> Subject: Re: mkdir in safe-mode
>
> I, too, have noticed this same problem. Correct me if I'm wrong, but
> shouldn't PHP running under safe_mode create directories and files to be
> owned by the same owner as the currently-running PHP script? If my
> webserver runs as user 'apache', but safe_mode is enabled, and a script
> owned by user 'joel' creates a directory in my home directory, the
> directory is still owned by 'apache', rather than 'joel'.
>
> This seems to be misbehavior, since, as Kai pointed out, creating files
> within that directory won't work, since the safe_mode user ('joel')
> doesn't have permissions to create files in a directory owned by user
> 'apache', even though joel just created the directory with PHP!
>
> Any help on how to get around this, or fix it?
>
> --
> [ joel boonstra | jboonstra
gospelcom.net ]
>
attached mail follows:
Here's my understanding based on experience, which is only that, so don't take this a proven fact or anything. :)
Lets assume Apache is running as user Apache. You are user websiteowner. When you FTP into the server and create a directory, that directory is owned by user websiteowner. User Apache can read that directory (or really files in that directory), as user Apache has read only access to those files, but it can't write those files, because Apache does not have write access. (I'm skipping execute permissions for now).
IN other words, PHP runs as user Apache, and you ask it to create a directory in a folder owned by websiteowner. Since Apache doesn't have write access, it can't create that directory (it lacks write access.)
I think that's really the bottom line, and what you need to know.
The assumption made in this post is that a php script owned by websiteowner will run as websiteowner, which is not correct. Any php script run will run as Apache, regardless or who owns it. (This is where executable permission come in.)
All this assumes that php is running as an Apache DSO, not cgi. If php is run as a cgi instead of a DSO, and SuExe is used with Apache, then the PHP scripts can run as separate users.
HTH,
Peter Janett
New Media One Web Services ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ New Upgrades Are Now Live!!! Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1 Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25, Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PostgreSQL coming soon!
http://www.newmediaone.net
webmaster
newmediaone.net
(303)828-9882
----- Original Message -----
From: "Joel Boonstra" <jboonstra
gospelcom.net>
To: "Kai" <eisbrenner
gidn.de>
Cc: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 2:17 PM
Subject: [PHP] Re: mkdir in safe-mode
> > sorry, my english isn't the best.
> >
> > I have a problem to dynamically create directorystructures using
> > php 4.2.2 running as modul in safe-mode.
> >
> > the ftp- and apache user (for the virtual-hosts) are identical, but the
> > user, the apache-daemon
> > in runnung under, is a different, so that directory-access ist only
> > possible to the owner.
> >
> > if now using the mkdir-function, php creates a directory owned by the
> > user, the apache-daemon is
> > started with, not by the user, the virtual-host is running under.
> >
> > the first directory can be created, if the permissions are the to. but
> > in the created directory i
> > can't create other directories or files.
>
> I, too, have noticed this same problem. Correct me if I'm wrong, but
> shouldn't PHP running under safe_mode create directories and files to be
> owned by the same owner as the currently-running PHP script? If my
> webserver runs as user 'apache', but safe_mode is enabled, and a script
> owned by user 'joel' creates a directory in my home directory, the
> directory is still owned by 'apache', rather than 'joel'.
>
> This seems to be misbehavior, since, as Kai pointed out, creating files
> within that directory won't work, since the safe_mode user ('joel')
> doesn't have permissions to create files in a directory owned by user
> 'apache', even though joel just created the directory with PHP!
>
> Any help on how to get around this, or fix it?
>
> --
> [ joel boonstra | jboonstra
gospelcom.net ]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
So, it appears that unless you set all your directories in your HTTP folders to 777 permissions, there's just no way to make a PHP script create or remove directories, is that right?
If there is a way, could someone please share how it's done? I've been searching online for hours for a solution and can't find anything. Maybe because PHP can't do this unless you make the server a little less secure?
Thanks.
> From: phplist
newmediaone.com (Peter Janett)
> Organization: New Media One Web Services, LLC
> Reply-To: "Peter Janett" <phplist
newmediaone.com>
> Newsgroups: php.general
> Date: Mon, 5 Aug 2002 15:46:53 -0600
> To: "Joel Boonstra" <jboonstra
gospelcom.net>
> Cc: <php-general
lists.php.net>
> Subject: Re: [PHP] Re: mkdir in safe-mode
>
> Here's my understanding based on experience, which is only that, so don't
> take this a proven fact or anything. :)
>
> Lets assume Apache is running as user Apache. You are user websiteowner.
> When you FTP into the server and create a directory, that directory is owned
> by user websiteowner. User Apache can read that directory (or really files
> in that directory), as user Apache has read only access to those files, but
> it can't write those files, because Apache does not have write access. (I'm
> skipping execute permissions for now).
>
> IN other words, PHP runs as user Apache, and you ask it to create a
> directory in a folder owned by websiteowner. Since Apache doesn't have
> write access, it can't create that directory (it lacks write access.)
>
attached mail follows:
I was on a php site the other day they had links like this: www.??.com/somepage.php?variable=value but when you clicked on the link the address bar only had the page, not the querystring www.??.com/somepage.php
How did them remove the querystring from the address bar. The only idea I had was they load the page, saved the querystring variables into session variables then used the header function to call itself again without the querystring. Thus to the eye, the querystring disappears from the address bar.
Is there any other ways of doing this. Other then the way I explained above or by using a form with a POST method.
Thanks, Mark.
attached mail follows:
> After upgrading from PHP3 I now get the following > information displayed > > Warning: mysql_query(): supplied argument is not a valid > MySQL-Link resource > Warning: mysql_fetch_array(): supplied argument is not a > valid MySQL result > resource
Assuming that you've included mysql support and so on, you might check your php.ini to see what register_globals is set to. If this is off (the default in the current version) you may be losing a variable that you are using in your sql query and this would certainly result in the sort of error you're seeing.
CYA, Dave
attached mail follows:
Hello,
On 08/05/2002 11:29 AM, Jim Jagielski wrote: >>>>Not you, I meant Zeev presents lame excuses to avoid the subject of accepting an Open Source cache extension in PHP. At that time, other PHP Group core developers remain conviniently quiet. >>> >>>Maybe, just maybe, the whole history of how APC came about would be >>>illuminating to people... especially how it relates to the Zend >>>Cache (as it was called then). At the core is the question, how well >>>and how much should you trust someone who ignores a NDA? Do people >>>know that CC was actually *beta testing* the Zend Cache, under NDA. >>>And less than 1 month after they stopped testing the Cache, APC was >>>announced and released to the world? Does that sound like a weird >>>thing to people? Using a sneak peak in such a devious way? And then >>>to wrap such behavior up in the cloak of "Open Source" and "free for >>>all." >>> >>>And I better not hear anyone question by standing on Open Source in >>>all this... I will ignore such clueless responses. >> >>Jim, just one question, if somebody broke a NDA, where is the lawsuit that would have happened? APC code is public. Did anybody demonstrate that it was developed with code or knowledge acquired during Zend Cache beta-testing? >> > > > Maybe because such a (justified) suit would have looked very very bad
Jim, look what you are saying, you say that made a company sign a NDA to decide later to not enforce it with a law suit? Something is not very well explained here.
> to Zend, and clueless boneheads would have seen it as an attempt to > "stop an open source alternative" rather than a cut-and-dried legal > matter. Zend always knew and expected that open source alternatives would > exist (if not, then there's no "market" for a product). > > But if you think that whereas the 2 main authors and architects of > the Zend Engine took *several* months to create the Cache, developing, > testing, tuning, and some "other guys" were able to do the same thing > in a month makes logical sense, well,... so be it.
Jim, that is a ridiculous claim, I know very well that a cache engine is basically just serialization of Zend OPCodes to shared memory. That does not take more than a month for *ONE* good C developer to write. I know because I studied the problem.
Nick Lindrige even claimed that his cache only took a week to develop. What came after was just tuning. You do not need to beta test Zend Cache to know that. Zend engine sources are public and that is all that you need to study the problem.
Either you don't know that it does not take a month to write a cache engine or you are trying to deceive everybody without real evidence that APC people really broke the NDA.
Anyway, what advantage APC people gained by beta testing Zend Cache that they would not have just by looking at Zend engine sources?
--Regards, Manuel Lemos
attached mail follows:
PHP is licensed under an extremely non restrictive license, which cannot change retroactively. Even if Bill Gates himself took over Zend he wouldn't be able to charge for PHP. There's really no need to start wondering about what-if situation which just cannot exist.
attached mail follows:
Sorry to bring this up again but if anybody really wants to get a copy of Zend and thinks the price is to high, all you have to do is win a PHP programming contest and you get a copy of Zend Studio for free (along with other stuff).
You can read about the contest at http://codewalkers.com/php-contest.php
I've looked at the contests and the programming is much too complex for my skills!
Good Luck
attached mail follows:
And think, that I even proposed there to be the beginner's version :-)
Thanks, Manuel OCHOA.
Sincerely,
Maxim Maletsky
PHP Beginner www.phpbeginner.com
> -----Original Message-----
> From: Manuel Ochoa [mailto:manuel
ochoa-usa.com]
> Sent: Tuesday, August 06, 2002 5:09 AM
> To: php-general
lists.php.net
> Subject: Re: [PHP] Re: Protect PHP coding
>
>
> Sorry to bring this up again but if anybody really wants to get a copy
of
> Zend and thinks the price is to high, all you have to do is win a PHP
> programming contest and you get a copy of Zend Studio for free (along
with
> other stuff).
>
> You can read about the contest at
http://codewalkers.com/php-contest.php
>
> I've looked at the contests and the programming is much too complex
for my
> skills!
>
> Good Luck
attached mail follows:
I'm trying to detect whether the user has cookies enabled on my opening page.
Only as I neared the end of coding, have I discovered that my site is totally dependent upon cookies since $_SESSION['whatever_has_been_set] uses cookies!
So far, I've tried setting <?php $_SESSION['cookie'] = "yes"; session_write_close(); ?> in the first lines before the headers are set (with <?php session_start(); ob_start(); ?>). Later in the code, I've tried to pick up the empty Array that $_SESSION produces if the user has cookies disabled: <?php if ($_SESSION['cookie'] == "yes") { } else { print ("<h2>Cookies must be enabled to use this site</h2>"); } ?> I've also tried (instead of 'else') elseif ($_SESSION['cookie'] == "") { print ("<h2>Cookies must be enabled to use this site</h2>"); } and elseif (is_null($_SESSION['cookie'] ) { print ("<h2>Cookies must be enabled to use this site</h2>"); } These do not work. Any ideas where I'm going wrong? Any help greatly appreciated. Regards, Andre
attached mail follows:
if (isset($_SESSION['cookie'])) { print error_message; }
----- Original Message -----
From: "Andre Dubuc" <aajdubuc
webhart.net>
To: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 5:09 PM
Subject: [PHP] Cookies detect and $_SESSION
> I'm trying to detect whether the user has cookies enabled on my opening page. > > Only as I neared the end of coding, have I discovered that my site is totally > dependent upon cookies since $_SESSION['whatever_has_been_set] uses cookies! > > So far, I've tried setting <?php $_SESSION['cookie'] = "yes"; > session_write_close(); ?> in the first lines before the headers are set (with > <?php session_start(); ob_start(); ?>). > > Later in the code, I've tried to pick up the empty Array that $_SESSION > produces if the user has cookies disabled: > > <?php > > if ($_SESSION['cookie'] == "yes") { } > else { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > ?> > > I've also tried (instead of 'else') > elseif ($_SESSION['cookie'] == "") { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > and > elseif (is_null($_SESSION['cookie'] ) { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > These do not work. Any ideas where I'm going wrong? Any help greatly > appreciated. > > Regards, Andre > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Shouldn't you be using $_COOKIE instead of $_SESSION. Yes, sessions rely on cookies, but not always.
You don't say _how_ it "doesn't work" but I assume it always tells you the "cookie" was set.
You're not setting any cookie values at all. Look at what you're actually doing:
$_SESSION['cookie'] = "yes"; if($_SESSION['cookie'] == "yes")
Umm..that's _always_ going to be true.
If you want to set a cookie value, you got to have a page refresh. Cookies are not set until the next page is requested... So, you could have something like this:
//set cookie $_COOKIE['test'] = "test"; //redirect to new page header("Location: http://www.example.com/index2.php");
Then, on index2.php
//see if cookie is not set if(!isset($_COOKIE['test'])) { echo "Cookies must be enabled!"; }
Hope that helps...
---John Holmes...
----- Original Message -----
From: "Andre Dubuc" <aajdubuc
webhart.net>
To: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 5:09 PM
Subject: [PHP] Cookies detect and $_SESSION
> I'm trying to detect whether the user has cookies enabled on my opening page. > > Only as I neared the end of coding, have I discovered that my site is totally > dependent upon cookies since $_SESSION['whatever_has_been_set] uses cookies! > > So far, I've tried setting <?php $_SESSION['cookie'] = "yes"; > session_write_close(); ?> in the first lines before the headers are set (with > <?php session_start(); ob_start(); ?>). > > Later in the code, I've tried to pick up the empty Array that $_SESSION > produces if the user has cookies disabled: > > <?php > > if ($_SESSION['cookie'] == "yes") { } > else { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > ?> > > I've also tried (instead of 'else') > elseif ($_SESSION['cookie'] == "") { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > and > elseif (is_null($_SESSION['cookie'] ) { > print ("<h2>Cookies must be enabled to use this site</h2>"); > } > > These do not work. Any ideas where I'm going wrong? Any help greatly > appreciated. > > Regards, Andre > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
>I'm trying to detect whether the user has cookies enabled on my opening page.
You can *NEVER* be sure they have Cookies on the *FIRST* page.
The Browser only sends *back* Cookie data you sent, and they can't have gotten it yet.
You can use your *SECOND* page to determine if they have Cookies.
Or, you can get rid of the dependency on cookies using enable_trans_id in php.ini
All your URLs and such-like will then have the SID in them.
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
Hi John,
That makes sense. I guess it's brain-bloat. I've never bothered using $_COOKIE simply because I thought I wasn't using them. So I'll give that a try.
But getting back to my earlier question, when I switch off cookies in Opera or Konqueror browser, and print_r($_SESSION); the result is Array(). Now, that's telling me that the 'yes' was not passed to the $_SESSION. How come I cannot set a condition of 'null' or "" to determine/use this condition? I've tried switch, and if. They don't detectt it. Why? I've added some comments below as well.
Regards, Andre
On Monday 05 August 2002 07:38 pm, 1LT John W. Holmes wrote:
> You don't say _how_ it "doesn't work" but I assume it always tells you the > "cookie" was set.
Correct. > > You're not setting any cookie values at all. Look at what you're actually > doing: > > $_SESSION['cookie'] = "yes"; > if($_SESSION['cookie'] == "yes") > > Umm..that's _always_ going to be true.
Not always. If $_SESSION['cookie'] does not get 'passed' to $_SESSION (which it doesn't when I view it wih print_r($_SESSION);).
> > If you want to set a cookie value, you got to have a page refresh. Cookies > are not set until the next page is requested... So, you could have > something like this: > > //set cookie > $_COOKIE['test'] = "test"; > //redirect to new page > header("Location: http://www.example.com/index2.php"); > > Then, on index2.php > > //see if cookie is not set > if(!isset($_COOKIE['test'])) > { echo "Cookies must be enabled!"; } > > Hope that helps... > > ---John Holmes... >
attached mail follows:
> Hi John, > > That makes sense. I guess it's brain-bloat. I've never bothered using > $_COOKIE simply because I thought I wasn't using them. So I'll give that a > try. > > But getting back to my earlier question, when I switch off cookies in Opera > or Konqueror browser, and print_r($_SESSION); the result is Array(). Now, > that's telling me that the 'yes' was not passed to the $_SESSION. How come I > cannot set a condition of 'null' or "" to determine/use this condition? I've > tried switch, and if. They don't detectt it. Why? I've added some comments > below as well.
It's kind of hard to follow that without seeing your actual code. Are you doing print_r on the second page?
---John Holmes...
> Regards, Andre > > On Monday 05 August 2002 07:38 pm, 1LT John W. Holmes wrote: > > > You don't say _how_ it "doesn't work" but I assume it always tells you the > > "cookie" was set. > > Correct. > > > > You're not setting any cookie values at all. Look at what you're actually > > doing: > > > > $_SESSION['cookie'] = "yes"; > > if($_SESSION['cookie'] == "yes") > > > > Umm..that's _always_ going to be true. > > Not always. If $_SESSION['cookie'] does not get 'passed' to $_SESSION (which > it doesn't when I view it wih print_r($_SESSION);). > > > > > > If you want to set a cookie value, you got to have a page refresh. Cookies > > are not set until the next page is requested... So, you could have > > something like this: > > > > //set cookie > > $_COOKIE['test'] = "test"; > > //redirect to new page > > header("Location: http://www.example.com/index2.php"); > > > > Then, on index2.php > > > > //see if cookie is not set > > if(!isset($_COOKIE['test'])) > > { echo "Cookies must be enabled!"; } > > > > Hope that helps... > > > > ---John Holmes... > >
attached mail follows:
Hi John,
This is done on the first page:
<?php session_start(); ob_start(); ?> /* html . . head stuff . . . .
<?php if ($_SESSION['cookie'] == "") { print("<h2>Please 'Enable Cookies' to use this site</h2>"); $_SESSION['cookie'] = "1"; session_write_close(); } if($_SESSION['cookie'] != "") {} ?>
This code sort of works. When I first load the page with cookies enabled, I get the 'Enable Cookies please' message. However, if I reload or move to another page, and return, it disappears because of the '$_SESSION['cookie'] = "1" '. With cookies disabled, it works as it should.
Perhaps this is the best it will get without further fancy footwork, but it would be nice not to have the 'error' message display for those who do have cookies enabled.
Any suggestions?
Thnaks again for your help, Regards, Andre . . .
On Monday 05 August 2002 08:36 pm, 1LT John W. Holmes wrote: > > Hi John, > > > > That makes sense. I guess it's brain-bloat. I've never bothered using > > $_COOKIE simply because I thought I wasn't using them. So I'll give that > > a try. > > > > But getting back to my earlier question, when I switch off cookies in > > Opera > > > or Konqueror browser, and print_r($_SESSION); the result is Array(). Now, > > that's telling me that the 'yes' was not passed to the $_SESSION. How > > come > > I > > > cannot set a condition of 'null' or "" to determine/use this condition? > > I've > > > tried switch, and if. They don't detectt it. Why? I've added some > > comments below as well. > > It's kind of hard to follow that without seeing your actual code. Are you > doing print_r on the second page? > > ---John Holmes... > > > Regards, Andre > > > > On Monday 05 August 2002 07:38 pm, 1LT John W. Holmes wrote: > > > You don't say _how_ it "doesn't work" but I assume it always tells you > > the > > > > "cookie" was set. > > > > Correct. > > > > > You're not setting any cookie values at all. Look at what you're > > actually > > > > doing: > > > > > > $_SESSION['cookie'] = "yes"; > > > if($_SESSION['cookie'] == "yes") > > > > > > Umm..that's _always_ going to be true. > > > > Not always. If $_SESSION['cookie'] does not get 'passed' to $_SESSION > > (which > > > it doesn't when I view it wih print_r($_SESSION);). > > > > > If you want to set a cookie value, you got to have a page refresh. > > Cookies > > > > are not set until the next page is requested... So, you could have > > > something like this: > > > > > > //set cookie > > > $_COOKIE['test'] = "test"; > > > //redirect to new page > > > header("Location: http://www.example.com/index2.php"); > > > > > > Then, on index2.php > > > > > > //see if cookie is not set > > > if(!isset($_COOKIE['test'])) > > > { echo "Cookies must be enabled!"; } > > > > > > Hope that helps... > > > > > > ---John Holmes...
attached mail follows:
When i install my webserver setup, these are the steps i follow:
Configure Apache.
# cd apache_1.3.26 # ./configure --prefix=/usr/local/apache
Build mod_perl.
# cd ../mod_perl-1.27 # perl Makefile.PL APACHE_SRC=../apache_1.3.26/src NO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 # make
Build mod_php.
# cd ../php-4.2.2 # ./configure --with-imap=/usr/local --with-xml --with-mysql --enable-track-va rs --with-mm=/usr/local --with-gettext --with-mcrypt=/usr/local --enable-ftp --enable-sockets --with-apache=../apache_1.3.26 # make # make install
Build mod_ssl. # cd ../mod_ssl-2.8.10-1.3.26 # ./configure --with-apache=../apache_1.3.26
Build Apache:
# cd ../apache_1.3.xxx # ./configure --prefix=/usr/local/apache --activate-module=src/modules/perl/li bperl.a --activate-module=src/modules/php4/libphp4.a --enable-module=ssl --e nable-module=rewrite --enable-module=so # make
Test and install mod_perl
# cd ../mod_perl-1.xx # make test # make install.
Complete the Apache installation.
# cd ../apache_1.3.xxx # make install
I have all the prerequisites installed to prefix /usr/local (including c-client)
Ok when i configure apache the second time it dies with this error:
======== Error Output for sanity check ======== cd ..; cc -funsigned-char -DMOD_SSL=208110 -DMOD_PERL -DUSE_PERL_SSI -I/us r/local/src/php-4.2.2 -I/usr/local/src/php-4.2.2/main -I/usr/local/src/php-4 . 2.2/main -I/usr/local/src/php-4.2.2/Zend -I/usr/local/src/php-4.2.2/Zend -I/ u sr/local/src/php-4.2.2/TSRM -I/usr/local/src/php-4.2.2/TSRM -I/usr/local/src / php-4.2.2 -DEAPI -DUSE_EXPAT -I./lib/expat-lite `./apaci` -I. -I/usr/libdata/ perl/5.00503/mach/CORE -L/usr/lib -o helpers/dummy lpers/dummy.c -R/usr /local/lib -rdynamic -L/usr/local/lib -Lmodules/php4 -L../modules/php4 -L.. / ../modules/php4 -lmodphp4 -lpam -lc-client4 -lmm -lmcrypt -lltdl -lcrypt - l pam -lintl -lcrypt -lm -lcrypt -lcrypt -lssl -lcrypto -Wl,-R/usr/lib - W l,-E -lperl -lm /usr/libdata/perl/5.00503/mach/auto/DynaLoader/DynaLoader.a -L/usr/libdata/perl/5.00503/mach/CORE -lperl -lm -lc -lcrypt -lperl -lm /usr/libexec/elf/ld: warning: libltdl.so.4, needed by /usr/local/lib/libmcryp t.so, may conflict with libltdl.so.3 /usr/local/lib/libc-client4.so: undefined reference to `mm_expunged' /usr/local/lib/libc-client4.so: undefined reference to `mm_diskerror' /usr/local/lib/libc-client4.so: undefined reference to `mm_lsub' /usr/local/lib/libc-client4.so: undefined reference to `mm_flags' /usr/local/lib/libc-client4.so: undefined reference to `mm_fatal' /usr/local/lib/libc-client4.so: undefined reference to `mm_nocritical' /usr/local/lib/libc-client4.so: undefined reference to `mm_notify' /usr/local/lib/libc-client4.so: undefined reference to `mm_searched' /usr/local/lib/libc-client4.so: undefined reference to `mm_status' /usr/local/lib/libc-client4.so: undefined reference to `mm_login' /usr/local/lib/libc-client4.so: undefined reference to `mm_list' /usr/local/lib/libc-client4.so: undefined reference to `mm_critical' /usr/local/lib/libc-client4.so: undefined reference to `mm_exists' /usr/local/lib/libc-client4.so: undefined reference to `mm_log' /usr/local/lib/libc-client4.so: undefined reference to `mm_dlog' *** Error code 1
Anyone know whats happening?
attached mail follows:
> # cd ../php-4.2.2 > # >./configure --with-imap=/usr/local --with-xml --with-mysql --enable-track-va >rs --with-mm=/usr/local --with-gettext --with-mcrypt=/usr/local --enable-ftp > --enable-sockets --with-apache=../apache_1.3.26
Relative path to Apache sometimes won't work.
Dunno why.
Use full path.
Ditto for all the rest of these ./configure thingies.
>-L/usr/libdata/perl/5.00503/mach/CORE -lperl -lm -lc -lcrypt -lperl -lm >/usr/libexec/elf/ld: warning: libltdl.so.4, needed by >/usr/local/lib/libmcryp >t.so, may conflict with libltdl.so.3
After every "make install" do "ldconfig"
Also search your hard drive for libltdl.so -- Almost for sure you've got an old one with .3 hanging around from an RPM install, and it's screwing you up.
Copy it some place safe, remove it, do ldconfig, and start over.
If it breaks something else, you can move the .3 back and keep digging for info.
I got no idea what and libltdl.so is, mind you, but I've seen the same thing with all kinds of other .so files...
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
>If any PHP hosts are out there I have a question: > >How do you keep users from erasing / altering files out side of their >web folder with PHP? Doesn't PHP run in the system user context? Is is >possible to prevent a user from using PHP to alter anything but in their >Web folder?
First, PHP runs as the User defined in httpd.conf, which should be 'nobody' or a similarly under-powered user.
It's true, though, that any files that 'nobody' can erase can also be erased by PHP...
But they can also be erased by Perl, Ruby, shell scripts, and, well, just about anything really...
So the problem is in the file's permissions, not that PHP can do the same things any other program can do.
The preceding all assumes you are using Apache. If you're using IIS you have much bigger security problems than PHP erasing junk.
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
>Yeah the « & » are correct. Sorry did not post all of the thread, this is >being done so I can diferentiate between what should be displayed on screen >and what should actually remain HTML. So after doing all the changes for >color coding the various elements of the script, the following lines of code >are used...
They might be what's in your string, but Ereg probably doesn't support those funky characters...
And they certainly aren't valid HTML characters.
Maybe try str_replace, which is much simpler in nature. It might "work" with those invalid characters, though you'll be relying on undocumented behaviour probably...
Where the heck are the funky « and » coming from anyway? Is that some weird ColdFusion thing or what?
You might have better luck starting with http://php.net/htmlentities and then inserting your FONT color codes after that...
Or, look at the PHP source for http://php.net/syntax-highlight and see how the PHP Group did it for PHP itself. Odds are really good you could "steal" their code and get it correct faster than starting from scratch.
>
>// allow script tags to display
>$fcontent = eregi_replace("<", "<", $fcontent);
>$fcontent = eregi_replace(">", ">", $fcontent);
>$fcontent = eregi_replace("«", "<", $fcontent);
>$fcontent = eregi_replace("»", ">", $fcontent);
>
>This allows all font tags to be HTML and actually display the colour while
>everything that is actually part of the script displays.
>
>
>Phil.
>> -----Original Message-----
>> From: Richard Lynch [mailto:rich
phpbootcamp.com]
>> Sent: 05 August 2002 07:43
>> To: phil
n-igma.net
>> Cc: php-general
lists.php.net
>> Subject: [PHP] Re: RegEx (back referencing)
>>
>>
>> >Hi,
>> >
>> >I am am writing a function to color code and indent JavaScript
>> source using
>> >regular expressions and cannot seem to get back referencing working. The
>> >pattern match is successful but the output is a single unrecognised
>> >character (a square).
>> >
>> >$string = eregi_replace("<(/?)(scr[^>]*)>", "«font
>> color=maroon»\1«/font»",
>> >$string);
>> >
>> >This results in opening and closing <script></script> tags being replaced
>> >with a square being wrapped in font tags. I have this working in
>> Cold Fusion
>> >but cannot seem to convert my scripts to PHP. Can anyone help?
>>
>> If the « you posted is actually in your source code instead of << it ain't
>> gonna work...
>> ^
>> / \
>> This is not a valid ASCII character.
>>
>>
>>
>> --
>> Like Music? http://l-i-e.com/artists.htm
>> I'm looking for a PRO QUALITY two-input sound card supported by Linux (any
>> major distro). Need to record live events (mixed already) to stereo
>> CD-quality. Soundcard Recommendations?
>> Software to handle the recording? Don't need fancy mixer stuff. Zero (0)
>> post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo
>> audio-to-disk.
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
Hey guys,
I got a question about pay for PHP work...
I'm employed by a small business setting up unix servers and scripting a webhosting system for them. I'm only 17 years old, but I've finished year 11 and I have my MCSE (Not that it means a lot)
I'm getting paid $150 Australian per week, working from 9-5 on Mondays, Tuesdays and Thursdays.
Personally I think this is a 'screwover' situation. I've tried talking to my boss about it but he's the 'I know everything' and 'you're only 17' type...
What do you guys think of this? What's a reasonable pay for this amount of PHP coding, for a 17 year old? Do bear in mind that I'm scripting an entire webhosting businesses site.
Thanks!!! Liam
attached mail follows:
Not sure what $150/Australian translates to in US$, but, it sounds like you are getting screwed. You should be making double that per day at least if you're doing a lot of heavy-duty programming.
> From: phplist
operationenigma.com (Liam Mackenzie)
> Newsgroups: php.general
> Date: Tue, 6 Aug 2002 08:42:28 +1000
> To: <php-general
lists.php.net>
> Subject: Pay (Am I getting screwed)
>
> Hey guys,
>
> I got a question about pay for PHP work...
>
> I'm employed by a small business setting up unix servers and scripting a
> webhosting system for them. I'm only 17 years old, but I've finished year
> 11 and I have my MCSE (Not that it means a lot)
>
> I'm getting paid $150 Australian per week, working from 9-5 on Mondays,
> Tuesdays and Thursdays.
>
> Personally I think this is a 'screwover' situation.
> I've tried talking to my boss about it but he's the 'I know everything' and
> 'you're only 17' type...
>
> What do you guys think of this?
> What's a reasonable pay for this amount of PHP coding, for a 17 year old?
> Do bear in mind that I'm scripting an entire webhosting businesses site.
>
> Thanks!!!
> Liam
>
>
>
attached mail follows:
If you are not getting paid at least $20/hour US , and that is very low, you are getting screwed.
on 8/5/02 6:42 PM, Liam MacKenzie at phplist
operationenigma.com wrote:
> Hey guys, > > I got a question about pay for PHP work... > > I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > > Personally I think this is a 'screwover' situation. > I've tried talking to my boss about it but he's the 'I know everything' and > 'you're only 17' type... > > What do you guys think of this? > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site. > > Thanks!!! > Liam > > >
attached mail follows:
$150 AU is about $75 US
:-|
----- Original Message -----
From: "Monty" <monty3
hotmail.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 06, 2002 8:52 AM
Subject: [PHP] Re: Pay (Am I getting screwed)
Not sure what $150/Australian translates to in US$, but, it sounds like you are getting screwed. You should be making double that per day at least if you're doing a lot of heavy-duty programming.
> From: phplist
operationenigma.com (Liam Mackenzie)
> Newsgroups: php.general
> Date: Tue, 6 Aug 2002 08:42:28 +1000
> To: <php-general
lists.php.net>
> Subject: Pay (Am I getting screwed)
>
> Hey guys,
>
> I got a question about pay for PHP work...
>
> I'm employed by a small business setting up unix servers and scripting a
> webhosting system for them. I'm only 17 years old, but I've finished year
> 11 and I have my MCSE (Not that it means a lot)
>
> I'm getting paid $150 Australian per week, working from 9-5 on Mondays,
> Tuesdays and Thursdays.
>
> Personally I think this is a 'screwover' situation.
> I've tried talking to my boss about it but he's the 'I know everything'
and
> 'you're only 17' type...
>
> What do you guys think of this?
> What's a reasonable pay for this amount of PHP coding, for a 17 year old?
> Do bear in mind that I'm scripting an entire webhosting businesses site.
>
> Thanks!!!
> Liam
>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Hi little brother,
I'm from a poor country, and I am a very good php developper. I work to help my family, to give some money to my parents, and to help my brother and sister. I studied for 5 years after my baccalaureat (french system) equal to DESS diploma, in my origin country. Now I am in Vanuatu in order to training, and last month, I worked for an ecommerce site to white french person, and he was very satisfied about my work, you can see my site in www.vanua2.net, and he give me only around 166 australian dollars (105 USD) for more than 1 month working, 5 days per week and 9 hours per day. To be able to understand how big I worked for this site, you might to view the backoffice site, accessible with this URL www.vanua2.net/_admin/admin.php . In this URL you can add, modify and delete products, plus a statistic page view, plus compta and finally you can setting up manually the site. And also, I have conceive by myself all his site, because he doesn't know anything about internet.
Guy, thanks God for giving you a chance like this. You are only 17, you just need this money for your hobbies, to??? Think about someone like me, though I hardworking guy, though I do something good, just according to my passport, I worth nothing. Because I' from a poor country. That's all.
Can you tell my what's wrong about your situation?
Ranaivo Rija
rija
vatu.com
BP 1528 Port Vila
Vanuatu
----- Original Message -----
From: "Liam MacKenzie" <phplist
operationenigma.com>
To: <php-general
lists.php.net>
Sent: Tuesday, August 06, 2002 9:42 AM
Subject: [PHP] Pay (Am I getting screwed)
> Hey guys, > > I got a question about pay for PHP work... > > I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > > Personally I think this is a 'screwover' situation. > I've tried talking to my boss about it but he's the 'I know everything' and > 'you're only 17' type... > > What do you guys think of this? > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site. > > Thanks!!! > Liam > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
attached mail follows:
For what you are doing you should be getting that hourly, since you are 17 though I would settle for half that for now until you have a track record with them.
On Tue, 6 Aug 2002, Liam MacKenzie wrote:
> $150 AU is about $75 US
>
> :-|
>
>
>
> ----- Original Message -----
> From: "Monty" <monty3
hotmail.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 06, 2002 8:52 AM
> Subject: [PHP] Re: Pay (Am I getting screwed)
>
>
> Not sure what $150/Australian translates to in US$, but, it sounds like you
> are getting screwed. You should be making double that per day at least if
> you're doing a lot of heavy-duty programming.
>
>
> > From: phplist
operationenigma.com (Liam Mackenzie)
> > Newsgroups: php.general
> > Date: Tue, 6 Aug 2002 08:42:28 +1000
> > To: <php-general
lists.php.net>
> > Subject: Pay (Am I getting screwed)
> >
> > Hey guys,
> >
> > I got a question about pay for PHP work...
> >
> > I'm employed by a small business setting up unix servers and scripting a
> > webhosting system for them. I'm only 17 years old, but I've finished year
> > 11 and I have my MCSE (Not that it means a lot)
> >
> > I'm getting paid $150 Australian per week, working from 9-5 on Mondays,
> > Tuesdays and Thursdays.
> >
> > Personally I think this is a 'screwover' situation.
> > I've tried talking to my boss about it but he's the 'I know everything'
> and
> > 'you're only 17' type...
> >
> > What do you guys think of this?
> > What's a reasonable pay for this amount of PHP coding, for a 17 year old?
> > Do bear in mind that I'm scripting an entire webhosting businesses site.
> >
> > Thanks!!!
> > Liam
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
>
attached mail follows:
You would be getting screwed, even in USD.
I too, am 17 years old. I also have my MCSE, and am starting on the CCNA chain. I could speak conversations in PHP, and Linux is my main operating system. I charge $22.50/hour USD to setup *nix systems/windows networks for corporations local to me, which I have heard is both cheap, and expensive.
I can't offer a good baseline for the pay for your coding, but I do have this advice: Never let "you're only 17" win. Experience wins out over education (usually). Experience also wins out, if the other side's argument is merely age.
Hope this helps..
LM> Hey guys,
LM> I got a question about pay for PHP work...
LM> I'm employed by a small business setting up unix servers and scripting a LM> webhosting system for them. I'm only 17 years old, but I've finished year LM> 11 and I have my MCSE (Not that it means a lot)
LM> I'm getting paid $150 Australian per week, working from 9-5 on Mondays, LM> Tuesdays and Thursdays.
LM> Personally I think this is a 'screwover' situation. LM> I've tried talking to my boss about it but he's the 'I know everything' and LM> 'you're only 17' type...
LM> What do you guys think of this? LM> What's a reasonable pay for this amount of PHP coding, for a 17 year old? LM> Do bear in mind that I'm scripting an entire webhosting businesses site.
LM> Thanks!!! LM> Liam
attached mail follows:
I'm curious as to how you came to being paid that amount? In other words, did the company advertise in the paper saying "Part-Time Programmer wanted, $150AU weekly"? Or did they ask if you wanted to work for them on this project and you came to a price that way?
I just want to know if you agreed at anytime to being paid that much, knowing what you would be doing. If you did, no offense, but take this as a learning opportunity and be glad you're being paid at all. If you didn't know what you'd be doing, but still agreed on that wage, you still may want to take it as a learning opportunity, i.e. next time ask what you'll be doing for a prospective employer and set your wage expectations accordingly.
You're 17 - I was getting paid crap at 17 too. Not saying that YOU should be paid what you are, but if you were aware of the circumstances beforehand or just didn't ask and you weren't deceived by the company you're working for, I'd focus mainly on gaining experience and when you're done there, put together a resume and look for a better paying job elsewhere.
Another way to look at it is if the business is small, as you say, and they're just getting started, they may not even -have- much money to pay their employees. With your help, maybe they'll be able to grow and expand and eventually pay you more. You never know...
Just my $.02US
Jason Soza
----- Original Message -----
From: "Liam MacKenzie" <phplist
operationenigma.com>
Date: Monday, August 5, 2002 3:00 pm
Subject: Re: [PHP] Re: Pay (Am I getting screwed)
> $150 AU is about $75 US
>
> :-|
>
>
>
> ----- Original Message -----
> From: "Monty" <monty3
hotmail.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 06, 2002 8:52 AM
> Subject: [PHP] Re: Pay (Am I getting screwed)
>
>
> Not sure what $150/Australian translates to in US$, but, it sounds
> like you
> are getting screwed. You should be making double that per day at
> least if
> you're doing a lot of heavy-duty programming.
>
>
> > From: phplist
operationenigma.com (Liam Mackenzie)
> > Newsgroups: php.general
> > Date: Tue, 6 Aug 2002 08:42:28 +1000
> > To: <php-general
lists.php.net>
> > Subject: Pay (Am I getting screwed)
> >
> > Hey guys,
> >
> > I got a question about pay for PHP work...
> >
> > I'm employed by a small business setting up unix servers and
> scripting a
> > webhosting system for them. I'm only 17 years old, but I've
> finished year
> > 11 and I have my MCSE (Not that it means a lot)
> >
> > I'm getting paid $150 Australian per week, working from 9-5 on
> Mondays,> Tuesdays and Thursdays.
> >
> > Personally I think this is a 'screwover' situation.
> > I've tried talking to my boss about it but he's the 'I know
> everything'and
> > 'you're only 17' type...
> >
> > What do you guys think of this?
> > What's a reasonable pay for this amount of PHP coding, for a 17
> year old?
> > Do bear in mind that I'm scripting an entire webhosting
> businesses site.
> >
> > Thanks!!!
> > Liam
> >
> >
> >
attached mail follows:
>Hey guys, > >I got a question about pay for PHP work... > >I'm employed by a small business setting up unix servers and scripting a >webhosting system for them. I'm only 17 years old, but I've finished year >11 and I have my MCSE (Not that it means a lot) > >I'm getting paid $150 Australian per week, working from 9-5 on Mondays, >Tuesdays and Thursdays. > >Personally I think this is a 'screwover' situation. >I've tried talking to my boss about it but he's the 'I know everything' and >'you're only 17' type... > >What do you guys think of this? >What's a reasonable pay for this amount of PHP coding, for a 17 year old? >Do bear in mind that I'm scripting an entire webhosting businesses site.
I don't live in Australia. Before you started working for them did you agree to write a webhosting system for them? Is it a summer job that ends soon? A lot of companies DO take advantage of students. It sounds like they are taking advantage of you BUT if it's a summer job and you agreed to it before then I would finish it. If it is full time then I would start looking for a new job. Do you have any benefits if it is full time? Is that minimum wage there? Is that even legal? That wage in Canada would be illegal. The fact that you're 17 is not relevant.
attached mail follows:
Sorry, I DO have to say that $75US for three 8-hour (assuming lunches) days per week is EXTREMELY crappy pay. That works out to $3.13US per hour. Does that even meet your minimum wage laws?
Jason Soza
----- Original Message -----
From: "Liam MacKenzie" <phplist
operationenigma.com>
Date: Monday, August 5, 2002 3:00 pm
Subject: Re: [PHP] Re: Pay (Am I getting screwed)
> $150 AU is about $75 US
>
> :-|
>
>
>
> ----- Original Message -----
> From: "Monty" <monty3
hotmail.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 06, 2002 8:52 AM
> Subject: [PHP] Re: Pay (Am I getting screwed)
>
>
> Not sure what $150/Australian translates to in US$, but, it sounds
> like you
> are getting screwed. You should be making double that per day at
> least if
> you're doing a lot of heavy-duty programming.
>
>
> > From: phplist
operationenigma.com (Liam Mackenzie)
> > Newsgroups: php.general
> > Date: Tue, 6 Aug 2002 08:42:28 +1000
> > To: <php-general
lists.php.net>
> > Subject: Pay (Am I getting screwed)
> >
> > Hey guys,
> >
> > I got a question about pay for PHP work...
> >
> > I'm employed by a small business setting up unix servers and
> scripting a
> > webhosting system for them. I'm only 17 years old, but I've
> finished year
> > 11 and I have my MCSE (Not that it means a lot)
> >
> > I'm getting paid $150 Australian per week, working from 9-5 on
> Mondays,> Tuesdays and Thursdays.
> >
> > Personally I think this is a 'screwover' situation.
> > I've tried talking to my boss about it but he's the 'I know
> everything'and
> > 'you're only 17' type...
> >
> > What do you guys think of this?
> > What's a reasonable pay for this amount of PHP coding, for a 17
> year old?
> > Do bear in mind that I'm scripting an entire webhosting
> businesses site.
> >
> > Thanks!!!
> > Liam
> >
> >
> >
>
>
> --
> 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
>
>
attached mail follows:
> Hey guys, > > I got a question about pay for PHP work... > > I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > > Personally I think this is a 'screwover' situation. > I've tried talking to my boss about it but he's the 'I know > everything' and > 'you're only 17' type... > > What do you guys think of this? > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site. > > Thanks!!! > Liam > > Liam,
The fact that your 17 should not have anything to do with how much your earning ... especially in this industry... the only thing that should matter in this is the quality of your work... yeah sure you may not be able to ask for as much as an older & more experienced person how ever i think you still should be getting more for your work... what I think it comes down to and the way i look at it when i do jobs for other companies other than my own is: what their aim of the end result is, and how much does it involve to reach their aim. I am young as well (although not as young) and know what your going though, what you will find is the more experience you have the better the rates you should receive. While your starting out in this sort of work it's better in some ways to start out not getting as much, how ever unhappy you maybe with what your getting paid, and then as your portfolio gathers some bulk in it then you can ask for more $$$.
Cheers
Peter
attached mail follows:
> > >Hey guys, > > > >I got a question about pay for PHP work... > > > >I'm employed by a small business setting up unix servers and scripting a > >webhosting system for them. I'm only 17 years old, but I've finished year > >11 and I have my MCSE (Not that it means a lot) > > > >I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > >Tuesdays and Thursdays. > > > >Personally I think this is a 'screwover' situation. > >I've tried talking to my boss about it but he's the 'I know everything' and > >'you're only 17' type... > > > >What do you guys think of this? > >What's a reasonable pay for this amount of PHP coding, for a 17 year old? > >Do bear in mind that I'm scripting an entire webhosting businesses site. > > I don't live in Australia. > Before you started working for them did you agree to write a webhosting system for them? > Is it a summer job that ends soon? > A lot of companies DO take advantage of students. > It sounds like they are taking advantage of you BUT if it's a summer job and you agreed to it before > then I would finish it. > If it is full time then I would start looking for a new job. > Do you have any benefits if it is full time? > Is that minimum wage there? > Is that even legal? > That wage in Canada would be illegal. > The fact that you're 17 is not relevant.
It is actually - we don't have an award in australia for IT personnell, so we get lumped in the clerical award. 17 year old secretaries don't get paid much. Unless Liam does the wheeling and dealing, he will get offered crap money legally.
Australia doesn't have 'benifits' as such, we have a pretty good public health system (The only major downside is that you have to wait to be patched up - but aside from that it is very good). You do get superannuation, but that's taxed when it goes in and when it comes out (basically a sham) ;)
Believe me because I'm in the industry here and have been for quite a few years, he is getting shafted, but it is probably legal.
To the guy who said he should be getting paid $150 bucks and hour... well - maybe if you were a team leader on a major IT project. Not if you're 17 and trying to get your foot in the door. To get paid the big money in australia, companies want EVERYTHING - (C++/ SQL/ ASP/ PHP/ JAVA/ PERL/ DHTML/ XML) - don't ask me why you'd bother to use all of these technologies (probably to support their old crappy systems and build them new ones) - but that's what they are offering big money for.
Look at the facts... He is 17 and there are a helluva a lot of PHP/ASP/PERL programmers looking for work. If he was exceptional at programming and was super quick and clean skill wise, he might be looking at 60 -70 grand a year (around $35-40 an hour) - which is soooo unlikely. There isn't this massive dot com agenda in Australia. And unlike a bunch of companies that went under, aussies won't pay crazy amounts of money (they don't have) to their staff when they don't have to. Hell - there are hardly any companies in australia that are actually making money from the net. Even the ISPs don't (trust me - I work for one! :)) make massive profits.
Bobski
attached mail follows:
Unfortunately, the IT industry in Oz (AFIAK) doesn't have a minimum pay :(
AU$150/wk, so that's AU$7/hr - maybe a job at MacDonalds would be better ?
-----Original Message-----
From: Jason Soza [mailto:solja
gci.net]
Sent: Tuesday, August 06, 2002 9:36 AM
To: Liam MacKenzie
Cc: php-general
lists.php.net
Subject: Re: [PHP] Re: Pay (Am I getting screwed)
Sorry, I DO have to say that $75US for three 8-hour (assuming lunches) days per week is EXTREMELY crappy pay. That works out to $3.13US per hour. Does that even meet your minimum wage laws?
Jason Soza
----- Original Message -----
From: "Liam MacKenzie" <phplist
operationenigma.com>
Date: Monday, August 5, 2002 3:00 pm
Subject: Re: [PHP] Re: Pay (Am I getting screwed)
> $150 AU is about $75 US
>
> :-|
>
>
>
> ----- Original Message -----
> From: "Monty" <monty3
hotmail.com>
> To: <php-general
lists.php.net>
> Sent: Tuesday, August 06, 2002 8:52 AM
> Subject: [PHP] Re: Pay (Am I getting screwed)
>
>
> Not sure what $150/Australian translates to in US$, but, it sounds
> like you
> are getting screwed. You should be making double that per day at
> least if
> you're doing a lot of heavy-duty programming.
>
>
> > From: phplist
operationenigma.com (Liam Mackenzie)
> > Newsgroups: php.general
> > Date: Tue, 6 Aug 2002 08:42:28 +1000
> > To: <php-general
lists.php.net>
> > Subject: Pay (Am I getting screwed)
> >
> > Hey guys,
> >
> > I got a question about pay for PHP work...
> >
> > I'm employed by a small business setting up unix servers and
> scripting a
> > webhosting system for them. I'm only 17 years old, but I've
> finished year
> > 11 and I have my MCSE (Not that it means a lot)
> >
> > I'm getting paid $150 Australian per week, working from 9-5 on
> Mondays,> Tuesdays and Thursdays.
> >
> > Personally I think this is a 'screwover' situation.
> > I've tried talking to my boss about it but he's the 'I know
> everything'and
> > 'you're only 17' type...
> >
> > What do you guys think of this?
> > What's a reasonable pay for this amount of PHP coding, for a 17
> year old?
> > Do bear in mind that I'm scripting an entire webhosting
> businesses site.
> >
> > Thanks!!!
> > Liam
> >
> >
> >
>
>
> --
> 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
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Yeah - but at least he is getting experience and has a job!
The leap to another (better paying) job is not so hard when you already have a job doing the same thing.
Best Regards
Bob Irwin
Server Admin & Web Programmer
Planet Netcom
----- Original Message -----
From: "Martin Towell" <martin.towell
world.net>
To: "'Jason Soza'" <solja
gci.net>; "Liam MacKenzie"
<phplist
operationenigma.com>
Cc: <php-general
lists.php.net>
Sent: Tuesday, August 06, 2002 9:52 AM
Subject: RE: [PHP] Re: Pay (Am I getting screwed)
> Unfortunately, the IT industry in Oz (AFIAK) doesn't have a minimum pay :(
>
> AU$150/wk, so that's AU$7/hr - maybe a job at MacDonalds would be better ?
>
> -----Original Message-----
> From: Jason Soza [mailto:solja
gci.net]
> Sent: Tuesday, August 06, 2002 9:36 AM
> To: Liam MacKenzie
> Cc: php-general
lists.php.net
> Subject: Re: [PHP] Re: Pay (Am I getting screwed)
>
>
> Sorry, I DO have to say that $75US for three 8-hour (assuming lunches)
> days per week is EXTREMELY crappy pay. That works out to $3.13US per
> hour. Does that even meet your minimum wage laws?
>
> Jason Soza
>
> ----- Original Message -----
> From: "Liam MacKenzie" <phplist
operationenigma.com>
> Date: Monday, August 5, 2002 3:00 pm
> Subject: Re: [PHP] Re: Pay (Am I getting screwed)
>
> > $150 AU is about $75 US
> >
> > :-|
> >
> >
> >
> > ----- Original Message -----
> > From: "Monty" <monty3
hotmail.com>
> > To: <php-general
lists.php.net>
> > Sent: Tuesday, August 06, 2002 8:52 AM
> > Subject: [PHP] Re: Pay (Am I getting screwed)
> >
> >
> > Not sure what $150/Australian translates to in US$, but, it sounds
> > like you
> > are getting screwed. You should be making double that per day at
> > least if
> > you're doing a lot of heavy-duty programming.
> >
> >
> > > From: phplist
operationenigma.com (Liam Mackenzie)
> > > Newsgroups: php.general
> > > Date: Tue, 6 Aug 2002 08:42:28 +1000
> > > To: <php-general
lists.php.net>
> > > Subject: Pay (Am I getting screwed)
> > >
> > > Hey guys,
> > >
> > > I got a question about pay for PHP work...
> > >
> > > I'm employed by a small business setting up unix servers and
> > scripting a
> > > webhosting system for them. I'm only 17 years old, but I've
> > finished year
> > > 11 and I have my MCSE (Not that it means a lot)
> > >
> > > I'm getting paid $150 Australian per week, working from 9-5 on
> > Mondays,> Tuesdays and Thursdays.
> > >
> > > Personally I think this is a 'screwover' situation.
> > > I've tried talking to my boss about it but he's the 'I know
> > everything'and
> > > 'you're only 17' type...
> > >
> > > What do you guys think of this?
> > > What's a reasonable pay for this amount of PHP coding, for a 17
> > year old?
> > > Do bear in mind that I'm scripting an entire webhosting
> > businesses site.
> > >
> > > Thanks!!!
> > > Liam
> > >
> > >
> > >
> >
> >
> > --
> > 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
> >
> >
>
>
> --
> 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
>
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
>
> Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
attached mail follows:
It's not based on age, it's based on skills. He has a *reasonable* argument to assume that a 17 year-old cannot have the same refined set of skills as a programmer with more experience, but as we all know, there are exceptions to the rule -- and you may be really good!
$150 for 3 days is $250/week. So to answer your question, YES, depending on your skills, you are getting getting screwed.
I'm not about to tell everyone what I charge (I'm in Aust too), but it's more per hour than you make per day.
However, there's a lot of supply-vs-demand issues, experience issues, business knowledge issues, client liason issues, etc etc. It's not as simple as "he gets paid this, so should I" at all.
My thoughts are that you won't get blood out of a stone, and you should continue to use your time with him to refine your skills, and then move on to someone who will value what you're offering more.
Justin French
on 06/08/02 8:42 AM, Liam MacKenzie (phplist
operationenigma.com) wrote:
> Hey guys, > > I got a question about pay for PHP work... > > I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > > Personally I think this is a 'screwover' situation. > I've tried talking to my boss about it but he's the 'I know everything' and > 'you're only 17' type... > > What do you guys think of this? > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site. > > Thanks!!! > Liam > > >
attached mail follows:
Hi Liam
I'll start by saying that I'm in Australia and an employer (running a small business).
> I'm employed by a small business setting up unix servers and > scripting a webhosting system for them. I'm only 17 years old, but I've > finished year 11 and I have my MCSE (Not that it means a lot)
On what basis were you employed? Full-time? Part-time? Casual? Traineeship? What were your duties listed as being when you took on the job? What experience do you have? Just because you are tasked with doing something does not mean that you have the requisite skills to do it well.
> I'm getting paid $150 Australian per week, working from 9-5 > on Mondays, Tuesdays and Thursdays.
I tend to think that is a little low. You are almost certainly covered by an award of one sort or another and you could probably get some information starting a search at http://www.wagenet.gov.au/.
If I recall, the adult minimum wage is around $550 per week (gross). A junior between 17 to 18 is entitled to 70% of the adult wage which would make it around $385 per week (gross). You're working three days per week instead of five so that would make it around $231 per week. Take out tax, and I don't have PAYG tax tables handy, and you'd probably drop between $30 and $50 or so which would take you down to around $170 to $190 per week.
Now, this is based on adult minimum wage so it's not necessarily an appropriate base rate for these calculations. It also does not take into account the basis under which you are employed - for example, if you're employed on a casual basis then your rate should be higher to take into account leave entitlements and so on.
Using this as a starting point you then need to take into account the whole situation. Is this a job that will lead to better things? Are you able to build a portfolio based on this job? Is it a growing business where you stand to earn far more in the future by being in at the "ground floor"?
In the end, this is based on legal obligations. It doesn't take into account many other factors for which we have no information. Feel free to email me privately if you want more information or want to discuss this stuff.
-- ---------------------------------------------------------------------- Outback Queensland Internet P: 07 4658 3937 Longreach F: 07 4658 1612 Queensland M: 0428 583 937 Australia W: www.outbackqld.net.au
attached mail follows:
> It is actually - we don't have an award in australia for IT > personnell, so we get lumped in the clerical award.
Business Equipment Industry - Technical
It's a federal award and you should be able to locate it on Osiris (http://www.osiris.gov.au/). As to how appropriate it is to your particular business and employees is another question but it's certainly appropriate to aspects of our business.
> Believe me because I'm in the industry here and have been > for quite a few years, he is getting shafted, but it is probably legal.
Assuming he is experienced and can prove it. If this is his first project and he is learning as he goes then it's a slightly different story. We don't know that (yet).
CYA, Dave
attached mail follows:
The best thing to do would be to find out what everyone else's getting - look around on job search & freelancing site to get a feel for the current rate is - you might even find a better job while you're there :)
Danny.
----- Original Message -----
From: "Liam MacKenzie" <phplist
operationenigma.com>
To: <php-general
lists.php.net>
Sent: Monday, August 05, 2002 11:42 PM
Subject: [PHP] Pay (Am I getting screwed)
> Hey guys, > > I got a question about pay for PHP work... > > I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > > Personally I think this is a 'screwover' situation. > I've tried talking to my boss about it but he's the 'I know everything' and > 'you're only 17' type... > > What do you guys think of this? > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site. > > Thanks!!! > Liam > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Liam,
I can't remember the exchange rate on the Aus$, but I hope it's better than the Cdn$. You're presently being paid $6.25/hr, here in Nova Scotia, Canada, that's just above minimum wage and is what a part time clerk is paid for stocking grocery store shelves, working at McDonalds, etc. Yes, you are definitely getting the shaft.
Age doesn't enter into it - skill and productivity does. So, where to start?
What is a skilled auto mechanic paid? skilled secretary? You should be above the secretary and v. close to the auto mechanic. What is the going rate for MSCE's in your region? What is the rate for entry level programmers? Does your state or national department of labour or statistics have information on prevailing wage rates?
If the project was put out to a consultant the firm would be charged anywhere from $50 to $75 per hour. Normal markup on salaries is 100%, so that translates to $25~$38/hr.
For a little more background, consider that Newton, et. al. did their finest work when they were very young.
And finally, don't negate the MSCE. It did take a fair amount of effort to earn, and no matter what feelings our Linux/Unix crowd has towards it, it is recognizable.
Very best of luck - Miles Thompson
PS Start looking for another job. /mt
At 08:42 AM 8/6/2002 +1000, Liam MacKenzie wrote: >Hey guys, > >I got a question about pay for PHP work... > >I'm employed by a small business setting up unix servers and scripting a >webhosting system for them. I'm only 17 years old, but I've finished year >11 and I have my MCSE (Not that it means a lot) > >I'm getting paid $150 Australian per week, working from 9-5 on Mondays, >Tuesdays and Thursdays. > >Personally I think this is a 'screwover' situation. >I've tried talking to my boss about it but he's the 'I know everything' and >'you're only 17' type... > >What do you guys think of this? >What's a reasonable pay for this amount of PHP coding, for a 17 year old? >Do bear in mind that I'm scripting an entire webhosting businesses site. > >Thanks!!! >Liam > > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
yes you are.
You should be getting at least $10 an hour. unless you have no idea what you are doing
taking into consideration your lack of experience and age that is. And assumeing you arent doing anything really complicated.
>>$150 AU is about $75 US
>>
>>:-|
>>
>>
>>
>>----- Original Message -----
>>From: "Monty" <monty3
hotmail.com>
>>To: <php-general
lists.php.net>
>>Sent: Tuesday, August 06, 2002 8:52 AM
>>Subject: [PHP] Re: Pay (Am I getting screwed)
>>
>>
>>Not sure what $150/Australian translates to in US$, but, it sounds like you
>>are getting screwed. You should be making double that per day at least if
>>you're doing a lot of heavy-duty programming.
>>
>>
>>
>>
>>>From: phplist
operationenigma.com (Liam Mackenzie)
>>>Newsgroups: php.general
>>>Date: Tue, 6 Aug 2002 08:42:28 +1000
>>>To: <php-general
lists.php.net>
>>>Subject: Pay (Am I getting screwed)
>>>
>>>Hey guys,
>>>
>>>I got a question about pay for PHP work...
>>>
>>>I'm employed by a small business setting up unix servers and scripting a
>>>webhosting system for them. I'm only 17 years old, but I've finished year
>>>11 and I have my MCSE (Not that it means a lot)
>>>
>>>I'm getting paid $150 Australian per week, working from 9-5 on Mondays,
>>>Tuesdays and Thursdays.
>>>
>>>Personally I think this is a 'screwover' situation.
>>>I've tried talking to my boss about it but he's the 'I know everything'
>>>
>>>
>>and
>>
>>
>>>'you're only 17' type...
>>>
>>>What do you guys think of this?
>>>What's a reasonable pay for this amount of PHP coding, for a 17 year old?
>>>Do bear in mind that I'm scripting an entire webhosting businesses site.
>>>
>>>Thanks!!!
>>>Liam
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>
attached mail follows:
In article <001701c23cd1$61252190$0b00a8c0
ENIGMA>,
phplist
operationenigma.com (Liam Mackenzie) wrote:
> I'm employed by a small business setting up unix servers and scripting a > webhosting system for them. I'm only 17 years old, but I've finished year > 11 and I have my MCSE (Not that it means a lot) > > I'm getting paid $150 Australian per week, working from 9-5 on Mondays, > Tuesdays and Thursdays. > <snip> > What's a reasonable pay for this amount of PHP coding, for a 17 year old? > Do bear in mind that I'm scripting an entire webhosting businesses site.
Your age shouldn't be the determining factor in how you get paid. Your *experience*, however, and the *value* you deliver are critical. Here are a few things to consider:
1) Do you bring to this company a proven record of experience delivering a valuable result, or is the company taking a big gamble that some complete novice will deliver as promise? Are they investing significant resources in you, for instance by paying for your schooling or on-the-job training, or are you the only one in this deal who is giving up something?
2) Someone else raised the issue of minimum wage; do check with a government employment agency to confirm that this very low pay meet minimum standards set by law.
3) If your boss is unwilling to consider a raise, try negotiating for something else that is valuable to you. For instance, if your code would be applicable for other contexts/companies, negotiate to retain the copyright on it, or for a licence to re-use/re-sell the code to any 3rd party you choose. If they insist that there isn't money available now, or that you haven't proven yourself enough, get him to commit to a reasonable benchmark--and that your compensation will increase to X amount as soon as the benchmark is reached. Etc.
4) Never underestimate the value of a good portfolio piece. If you've written clean, modular code and have a complete, working application to demonstrate your ability to implement complex projects, you'll be in a great position to negotiate for much better compensation on the next job.
5) Get a letter of reference now. Have your boss sign a letter that is *glowing*, and specifically lists your skills. Then at least later if you feel shafted or the relationship sours, or they drop the project half-way through, etc., you've still got proof that: while you may be young, you *are* experienced, and you *are* a valuable asset to any company.
6) I know this last thought doesn't help much with your present employer, but just note that not every employer looks at a 17 year old programmer as someone to exploit as dirt-cheap labor. The flip side is that there are also some managers who are convinced that just because they personally don't have a clue about technology and their neighbor's kids do, then clearly tech must be something that young people are naturally better at. LOL.
Good luck!
-- CC
attached mail follows:
Hi pal.
I think no one outside Australia can really tell you how much you might be earning and that’s because every place has it's own costs for living. Anyway, and supporting what Rija already told you, I must tell you my story to make you feel good about yourself. I am a 25 Argentinean who graduated as an Computer Engineer back in on of the most respected private colleges in Venezuela, and also got my MCSE+I here in my natal Country. Now, I support one child of mine, two parents and also have a girlfriend who I help by paying her studies. Now, Until last February I used to work as a IT Manager for the most respectful Oil Company around the World which was the job that triggered my interest in PHP and serious Web development. Right before I loose my job, my Country entered into a very serious economic crisis, in which the dollar lifted off from the 1 = 1 equity and right now is 1 = 3.60 (aprox). Now the basic earning one family should get every month just to eat should be of U$D400 and the average salary here is approximately of U$D 70. I even have 2 PHP jobs unpaid to me, because those companies went broke before I had the chance of getting to the bank and cashing the checks... Do you really need more than U$D300 per month to live? Please let me know if you don't want that job anymore and I will consider going there and taking it... seriously.
Did I mention I work 15 - 18 hours a day, 7 days a week? Also that I teach English and make simultaneous translations every time I can? Also that I repair computers to have SOME earnings?
Think about it and offer me a job... or do you want one here?
Bye. C.
> -----Original Message-----
> From: Liam MacKenzie [mailto:phplist
operationenigma.com]
> Sent: Monday, August 05, 2002 7:42 PM
> To: php-general
lists.php.net
> Subject: [PHP] Pay (Am I getting screwed)
>
> Hey guys,
>
> I got a question about pay for PHP work...
>
> I'm employed by a small business setting up unix servers and scripting
a
> webhosting system for them. I'm only 17 years old, but I've finished
year
> 11 and I have my MCSE (Not that it means a lot)
>
> I'm getting paid $150 Australian per week, working from 9-5 on
Mondays,
> Tuesdays and Thursdays.
>
> Personally I think this is a 'screwover' situation.
> I've tried talking to my boss about it but he's the 'I know
everything'
> and
> 'you're only 17' type...
>
> What do you guys think of this?
> What's a reasonable pay for this amount of PHP coding, for a 17 year
old?
> Do bear in mind that I'm scripting an entire webhosting businesses
site.
>
> Thanks!!!
> Liam
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
$i=0; foreach($row as $val) { if ($val != 0) $i++; }
$row is your array. Not sure what's in this array or how/where it's defined, but, the above will cycle through every value in the $row array comparing it to zero.
Monty
> From: jim
jimlong.net (Jim Long)
> Organization: Jim Long Network/MDO/Music/Web
> Reply-To: jim
jimlong.net
> Newsgroups: php.general
> Date: Mon, 05 Aug 2002 12:03:15 -0600
> To: php <php-general
lists.php.net>
> Subject: simplify statement
>
> Anyone know how to simplify this statment:
>
> $i=0;
> $s1=$row[s1];
> if ($s1!= 0){
> $i++;
> }
> $s2=$row[s2];
> if ($s2!= 0){
> $i++;
> }
> $s3=$row[s3];
> if ($s3!= 0){
> $i++;
> }
> $s4=$row[s4];
> if ($s4!= 0){
> $i++;
> }
> $s5=$row[s5];
> if ($s5!= 0){
> $i++;
> }
> $s6=$row[s6];
> if ($s6!= 0){
> $i++;
> }
> $s7=$row[s7];
> if ($s7!= 0){
> $i++;
> }
> $s8=$row[s8];
> if ($s8!= 0){
> $i++;
> }
> $s9=$row[s9];
> if ($s9!= 0){
> $i++;
> }
> $s10=$row[s10];
> if ($s10!= 0){
> $i++;
> }
> $s11=$row[s11];
> if ($s11!= 0){
> $i++;
> }
> $s12=$row[s12];
> if ($s12!= 0){
> $i++;
> }
> $s13=$row[s13];
> if ($s13!= 0){
> $i++;
> }
> $s14=$row[s14];
> if ($s14!= 0){
> $i++;
> }
> $s15=$row[s15];
> if ($s15!= 0){
> $i++;
> }
>
> Thanks In Advance,
> Jim Long
attached mail follows:
>Anyone know how to simplify this statment:
It would be easier if you used an array like:
$row[1] $row[2] $row[3] . . .
>$i=0;
for ($x = 1; $x <= 15; $x++){ if ($row["s$x"] != 0){ $i++; } }
Actually, you could get rid of the "!= 0" part as well. It's kinda silly.
> $s1=$row[s1]; > if ($s1!= 0){ > $i++; > } > $s2=$row[s2]; > if ($s2!= 0){ > $i++; > } > $s3=$row[s3]; > if ($s3!= 0){ > $i++; > } > $s4=$row[s4]; > if ($s4!= 0){ > $i++; > } > $s5=$row[s5]; > if ($s5!= 0){ > $i++; > } > $s6=$row[s6]; > if ($s6!= 0){ > $i++; > } > $s7=$row[s7]; > if ($s7!= 0){ > $i++; > } > $s8=$row[s8]; > if ($s8!= 0){ > $i++; > } > $s9=$row[s9]; > if ($s9!= 0){ > $i++; > } > $s10=$row[s10]; > if ($s10!= 0){ > $i++; > } > $s11=$row[s11]; > if ($s11!= 0){ > $i++; > } > $s12=$row[s12]; > if ($s12!= 0){ > $i++; > } > $s13=$row[s13]; > if ($s13!= 0){ > $i++; > } > $s14=$row[s14]; > if ($s14!= 0){ > $i++; > } > $s15=$row[s15]; > if ($s15!= 0){ > $i++; > } > >Thanks In Advance, >Jim Long
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
Hi, I am creating an array mysession, and trying to register it with Session_register("mysession");
But when I try to read that array using foreach($GLOBALS['mysession'] as $ele) { }
it gives me parse error as invalid argument for foreach. Can anyone tell me whats wrong with it?
-Varsha
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
attached mail follows:
Yeah, unless that variable (mysession) is an array, that won't work. You need to use
foreach($GLOBALS as $ele)
and your mysession variable should show up there as one of the items.
Mike
"Varsha Agarwal" <agarwal_varsha
yahoo.com> wrote in message
news:20020805232641.62249.qmail
web40206.mail.yahoo.com...
> Hi,
> I am creating an array mysession, and trying to
> register it with
> Session_register("mysession");
>
> But when I try to read that array using
> foreach($GLOBALS['mysession'] as $ele)
> {
> }
>
> it gives me parse error as invalid argument for
> foreach.
> Can anyone tell me whats wrong with it?
>
> -Varsha
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
attached mail follows:
Good day,
I was writting a user-level storage function for my sessions using: session_set_save_handler (). I'm just storing them in a MySQL db instead of in flat files. My sessions work perfectly and the site continues to function normally.
I want to pull the serialized() data from the db and use it outside of the session application. Basically, I want to be able to have a 'watchdog' script that shows an admin what all his users are doing on the site (so I'd store all data in the session variable as they navigate the site).
When I try to unserialize() the data I always get 'unserialize() failed at offset 0'. If I echo my serialize()'d $_SESSION variable to browser as I navigate my site, the string doesn't match what is stored in the db, or in the flat files (I tried both). So it makes sense that unserialize() fails because it looks like what's in stored by the session system isn't the same as what would be created by serialize(). They are very similiar, however, the only difference is that the serialized string in the db/files has pipe's (|) in it. Would you mind taking a momment to direct me to a page with the answer (I can't find it anywhere) or explain what they represent? Are they operators? Do I need to preprocess this string before I unserialize it? Any help here would be greatly appreciated.
If I take out the 'xxxx|' from the 'xxxx|restofserializedstring' then unserialize will, in fact, work. Well, it doesn't fail that is, but I doubt the result is exactly what I'm expecting.
Thanks for your time,
RJ
attached mail follows:
>Hi there: > I wonder if somebody can help me with this. > I am able to upload only files generated by "notepad" or >"wordpad"...that's to say..plain txt files. > When I try to upload any files, such as ms-word, ms-excel, the parameter: > $_FILES["userfile"]["tmp_name"] would be "none".... > > I'm wondering if this is a problem with Apache_1.3.23 server setup or >with php.ini?
"none" might mean the file was too big...
I forget which is which, but a blank means one thing, and 'none' another, and there's a user that didn't pick a file at all, and a user that tried to upload too big of a file...
Try a really large NotePad file, check your php.ini settings and the limit you may have placed in your HTML.
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
> After a few days, I came to the conclusion that the workaround to the >PHP code for parsing XML and stuff like that are not going to work. Due to >the fact that the data have to be put into a file which is illegal for me to >store the credit bureau inquiry data. Again, due to the fact that that
Either SAX or DOM (or both?) will cheerfully accept a string argument instead of a file...
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
>Hi Guys! > >I am having trouble with my sessions. Basically I have a php script from >which I register a session variable: > >session_register("myVar"); >$myVar = "hello"; > >My problem arises when I try to output the variables further down the page >using $HTTP_SESSION_VARS['myVar'] it just doesn't display anything unless I >refresh the page then it works ok. > >I have tried using the ob_start() and ob_end_flush() functions to buffer the >output, these seem to work great with cookies but not so great with session >variables. > >Does anybody have any ideas how I should be tackling this?
In slow-motion:
Your browser surfs to the URL. You register variables. (They are *NOT* put into the _SESSION var yet...) Your script ends. The variables are stored. You surf again. You start the session. The variables are loaded *into* _SESSION at this point.
You may find it easier in recent versions of PHP to use the documented technique of:
start_session(); $_SESSION['myVar'] = 'hello';
Then the variables will be there because you put them there. :-)
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
>I am having trouble conceptualizing a solution to a fairly complicated (for >me) string parsing exercise. > >The problem is I need to work with "fields" in a text string which is >essentially a profile of a professional person (doctor, lawyer , etc...) > >So say the profile is this: >John Doe the best in the world. >Education: School of hard Knocks 2000 >Admitted: 2001. >Employment History: John Doe Inc, 2000- present >Professional Associations: PTA >Representative Clients: My dog > >Obviously this is a simplified, ficticious example. This profile will come >from a database but here I'l just stuff it in a string variable for >simplicity. >$bio = "Me \n Education: School of hard Knocks 2000. \n Admitted: 2001. \n >Employment History: none \n Professional Associations: PTA \n Representative >Clients: My dog"; > >The "delimiters" of the text field can be put into an array as follows: > $keywords[0]="Education:"; > $keywords[1]="Admitted:"; > $keywords[2]="Employment History:"; > $keywords[3]="Professional Associations:"; > $keywords[4]="Representative Clients:"; > $keywords[5]="Community Involvement:"; > $keywords[6]="Firm:"; > >Now I can loop through the text field ($bio) looking for each keyword and >its position and add it to another array >as follows: >$i=0; > $j=-1; > for ($i=0;$i<=count($keywords);$i++) { > $keypos = strpos($bio, $keywords[$i]); > > if (!$keypos === false ) > { > $j++; > $biofields[$j][0] = $keypos; > $biofields[$j][1] = $keywords[$j]; > } > } > >I can now output this and get this (in position keyword format): > > 3 Education: >45 Admitted: >66 Employment History: >93 Professional Associations: >126 Representative Clients: > >With this information I can parse through the "bio" and get each "field" if >they are always in the same, static order, but in reality this is not the >case. So I need to sort the array somehow or use some other method to make >this flexible enough to account for any order of "keyword delimiters".
<?php asort($biofields); # http://php.net/asort Now you know which keys come first. reset($biofields); $laststart = 0; $lastfield = ''; while (list($offset, $field) = each($biofields)){ # Get the chunk starting at the current field: $values[$field] = substr($bio, $laststart + strlen($lastfield)); # In our *last* field, chop off all the stuff from our current field forward: if ($lastfield){ $values[$lastfield] = substr($values[$lastfield], 0, $laststart + $offset - 1); } # Play 'leapfrog' for the next field: $laststart = $offset; $lastfield = $field; } ?>
-- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.
attached mail follows:
Or get the user(s) to save the Excel file as a CSV, which is heaps easier to work with... but I guess that defeats the need to convert it to tab delimited :)
Justin French
on 06/08/02 1:28 AM, Sameh Attia (sameh.attia
tedata.net) wrote:
> Jason Caldwell wrote: >> I would like to give my users the ability to send (to my website) a >> Microsoft Excel file, and then have my server (PHP code) extract that data >> and turn it into a TAB Delimited Text file -- is this possible with PHP? >> >> Thanks. >> Jason >> >> >> > > sc.openoffice.org they have a pdf document that describes Excel sheet > file format > Regards
attached mail follows:
Hi all,
I'd like to hide this message I've get when I upload big file more than 2 Mo, because I want to warn the user using my script.
Does anyone know how to do this ?
In my form I include - <FORM ACTION="index.php" METHOD="POST" ENCTYPE="multipart/form-data"> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000">
This is the message I don't want to have:
PHP Warning: Max file size of 2097152 bytes exceeded - file [file] not saved in Unknown on line 0 PHP Warning: Cannot send session cache limiter - headers already sent in c:\inetpub\wwwroot\ohabolana\index.php on line 2
Ranaivo Rija
rija
vatu.com
BP 1528 Port Vila
Vanuatu
attached mail follows:
>Hi all, > >I'd like to hide this message I've get when I upload big file more than 2 Mo, because I want to warn the user using my script. > >Does anyone know how to do this ? > >In my form I include - ><FORM ACTION="index.php" METHOD="POST" ENCTYPE="multipart/form-data"> ><INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> > >This is the message I don't want to have: > >PHP Warning: Max file size of 2097152 bytes exceeded - file [file] not saved in Unknown on line 0 PHP Warning: Cannot send session cache limiter - headers already sent in c:\inetpub \wwwroot\ohabolana\index.php on line 2
There is a directive in php.ini to increase the max file size. I have no idea how to check the size of the file in PHP but you could do that and then write out whatever you want.
attached mail follows:
On Tuesday 06 August 2002 08:14, Rija wrote: > Hi all, > > I'd like to hide this message I've get when I upload big file more than 2 > Mo, because I want to warn the user using my script. > > Does anyone know how to do this ? > > In my form I include - > <FORM ACTION="index.php" METHOD="POST" ENCTYPE="multipart/form-data"> > <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000000"> > > This is the message I don't want to have: > > PHP Warning: Max file size of 2097152 bytes exceeded - file [file] not > saved in Unknown on line 0 PHP Warning: Cannot send session cache limiter - > headers already sent in c:\inetpub\wwwroot\ohabolana\index.php on line 2
Look at the error reporting settings in php.ini. Specifically disable "display_errors".
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* [Crash programs] fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. -- Wernher von Braun */
attached mail follows:
I remember seeing a PHP function that will convert a string to the special GET string format --
for example:
"Jason Was Here"
Jason%20Was%20Here
But don't remember what it was -- anyone?
Jason
attached mail follows:
urlencode
On Mon, 2002-08-05 at 20:11, Jason Caldwell wrote: > I remember seeing a PHP function that will convert a string to the special > GET string format -- > > for example: > > "Jason Was Here" > > Jason%20Was%20Here > > But don't remember what it was -- anyone? > > Jason > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: lerlerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
attached mail follows:
What does the following mean?
PHP Warning: imap: Unable to initialize module Module compiled with module API=20001222, debug=0, thread-safety=0 PHP compiled with module API=20020429, debug=0, thread-safety=0 These options need to match in Unknown on line 0 PHP Warning: ldap: Unable to initialize module Module compiled with module API=20001222, debug=0, thread-safety=0 PHP compiled with module API=20020429, debug=0, thread-safety=0 These options need to match in Unknown on line 0
attached mail follows:
Hi,
I've done a bit of a google on building a search engine, and found some nice stuff, but a helluva lot of crap (the guy on phpbuilder.com storing text in BLOBs was the funniest!!).
Basically I'm at the very humble beginnings of being able to search a single table column for a single word or phrase.
eg:
<? $search_phrase = "foo" (or "foo bah")
$sql = "SELECT * FROM whateverTable WHERE whateverCol LIKE '%{$search_phrase}%'"; ?>
That's all fine, but I want to be able to deal with multiple words [splitting on space] and exact phrases [wrapped in quotes] (and combinations of the two) eg:
1. 'foo bah' split into two words, documents containing both get higher relevance
2. '"foo bah"' search for exact phrase (already have that working)
3. 'foo "foo bah"' combination of 1 and 2
I'm also keen to learn about grading relevance across multiple tables, multiple columns, etc etc.
It seems like a HUGE task, but I'm probably missing some key MySQL feature, or some trick that makes everything easier.
If someone could point me to the RIGHT tutorials/articles or manual pages, or drop a few hints I'd be greatful -- but i'm not after a huge chunk of code at all -- just the theory.
Justin French
attached mail follows:
I think you could look for such a library already designed. Lots of people tried and many succeeded. If you do it for learning then it is one thing, but if you need this quality feature then start looking for searching systems and cut their codes without reinventing the wheels.
One suggestion - PostgreSQL will probably do this job slightly better as it supports a rather more complex SQL.
Sincerely,
Maxim Maletsky
PHP Beginner www.phpbeginner.com
> -----Original Message-----
> From: Justin French [mailto:justin
indent.com.au]
> Sent: Tuesday, August 06, 2002 4:33 AM
> To: php
> Subject: [PHP] building a search engine
>
> Hi,
>
> I've done a bit of a google on building a search engine, and found
some
> nice
> stuff, but a helluva lot of crap (the guy on phpbuilder.com storing
text
> in
> BLOBs was the funniest!!).
>
> Basically I'm at the very humble beginnings of being able to search a
> single
> table column for a single word or phrase.
>
> eg:
>
> <?
> $search_phrase = "foo" (or "foo bah")
>
> $sql = "SELECT * FROM whateverTable WHERE whateverCol LIKE
> '%{$search_phrase}%'";
> ?>
>
> That's all fine, but I want to be able to deal with multiple words
> [splitting on space] and exact phrases [wrapped in quotes] (and
> combinations
> of the two) eg:
>
> 1. 'foo bah'
> split into two words, documents containing both get higher
relevance
>
> 2. '"foo bah"'
> search for exact phrase (already have that working)
>
> 3. 'foo "foo bah"'
> combination of 1 and 2
>
>
> I'm also keen to learn about grading relevance across multiple tables,
> multiple columns, etc etc.
>
>
> It seems like a HUGE task, but I'm probably missing some key MySQL
feature,
> or some trick that makes everything easier.
>
>
> If someone could point me to the RIGHT tutorials/articles or manual
pages,
> or drop a few hints I'd be greatful -- but i'm not after a huge chunk
of
> code at all -- just the theory.
>
>
> Justin French
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I am also interested in building similar feature, what type of database
would you suggest? Isn't MySQL good enough? Is PostgreSQL better, does PHP
work with it?
> I think you could look for such a library already designed. Lots
of > people tried and many succeeded. If you do it for learning then it is
> one thing, but if you need this quality feature then start looking for
> searching systems and cut their codes without reinventing the wheels.
>
> One suggestion - PostgreSQL will probably do this job slightly better as
> it supports a rather more complex SQL.
>
>
> Sincerely,
>
> Maxim Maletsky
>
> PHP Beginner
> www.phpbeginner.com
>
>
> > -----Original Message-----
> > From: Justin French [mailto:justin
indent.com.au]
> > Sent: Tuesday, August 06, 2002 4:33 AM
> > To: php
> > Subject: [PHP] building a search engine
> >
> > Hi,
> >
> > I've done a bit of a google on building a search engine, and found
> some
> > nice
> > stuff, but a helluva lot of crap (the guy on phpbuilder.com storing
> text
> > in
> > BLOBs was the funniest!!).
> >
> > Basically I'm at the very humble beginnings of being able to search a
> > single
> > table column for a single word or phrase.
> >
> > eg:
> >
> > <?
> > $search_phrase = "foo" (or "foo bah")
> >
> > $sql = "SELECT * FROM whateverTable WHERE whateverCol LIKE
> > '%{$search_phrase}%'";
> > ?>
> >
> > That's all fine, but I want to be able to deal with multiple words
> > [splitting on space] and exact phrases [wrapped in quotes] (and
> > combinations
> > of the two) eg:
> >
> > 1. 'foo bah'
> > split into two words, documents containing both get higher
> relevance
> >
> > 2. '"foo bah"'
> > search for exact phrase (already have that working)
> >
> > 3. 'foo "foo bah"'
> > combination of 1 and 2
> >
> >
> > I'm also keen to learn about grading relevance across multiple tables,
> > multiple columns, etc etc.
> >
> >
> > It seems like a HUGE task, but I'm probably missing some key MySQL
> feature,
> > or some trick that makes everything easier.
> >
> >
> > If someone could point me to the RIGHT tutorials/articles or manual
> pages,
> > or drop a few hints I'd be greatful -- but i'm not after a huge chunk
> of
> > code at all -- just the theory.
> >
> >
> > Justin French
> >
> >
> >
> > --
> > 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
>
-Pushkar S. Pradhan
attached mail follows:
It does and even very well. I am afraid of triggering a new pathetic thread here on what is better MySQL or PgSQL (read archives if interested on news.php.net), but in opinion pgSQL will be more of a use for such a complex relation logic that you are trying to implement.
Sincerely,
Maxim Maletsky
PHP Beginner www.phpbeginner.com
> -----Original Message-----
> From: Pushkar Pradhan [mailto:pushkar
ERC.MsState.Edu]
> Sent: Tuesday, August 06, 2002 4:47 AM
> To: php-general
lists.php.net
> Subject: RE: [PHP] building a search engine
>
> I am also interested in building similar feature, what type of
database
> would you suggest? Isn't MySQL good enough? Is PostgreSQL better, does
PHP
> work with it?
> > I think you could look for such a library already designed. Lots
> of > people tried and many succeeded. If you do it for learning then
it is
> > one thing, but if you need this quality feature then start looking
for
> > searching systems and cut their codes without reinventing the
wheels.
> >
> > One suggestion - PostgreSQL will probably do this job slightly
better as
> > it supports a rather more complex SQL.
> >
> >
> > Sincerely,
> >
> > Maxim Maletsky
> >
> > PHP Beginner
> > www.phpbeginner.com
> >
> >
> > > -----Original Message-----
> > > From: Justin French [mailto:justin
indent.com.au]
> > > Sent: Tuesday, August 06, 2002 4:33 AM
> > > To: php
> > > Subject: [PHP] building a search engine
> > >
> > > Hi,
> > >
> > > I've done a bit of a google on building a search engine, and found
> > some
> > > nice
> > > stuff, but a helluva lot of crap (the guy on phpbuilder.com
storing
> > text
> > > in
> > > BLOBs was the funniest!!).
> > >
> > > Basically I'm at the very humble beginnings of being able to
search a
> > > single
> > > table column for a single word or phrase.
> > >
> > > eg:
> > >
> > > <?
> > > $search_phrase = "foo" (or "foo bah")
> > >
> > > $sql = "SELECT * FROM whateverTable WHERE whateverCol LIKE
> > > '%{$search_phrase}%'";
> > > ?>
> > >
> > > That's all fine, but I want to be able to deal with multiple words
> > > [splitting on space] and exact phrases [wrapped in quotes] (and
> > > combinations
> > > of the two) eg:
> > >
> > > 1. 'foo bah'
> > > split into two words, documents containing both get higher
> > relevance
> > >
> > > 2. '"foo bah"'
> > > search for exact phrase (already have that working)
> > >
> > > 3. 'foo "foo bah"'
> > > combination of 1 and 2
> > >
> > >
> > > I'm also keen to learn about grading relevance across multiple
tables,
> > > multiple columns, etc etc.
> > >
> > >
> > > It seems like a HUGE task, but I'm probably missing some key MySQL
> > feature,
> > > or some trick that makes everything easier.
> > >
> > >
> > > If someone could point me to the RIGHT tutorials/articles or
manual
> > pages,
> > > or drop a few hints I'd be greatful -- but i'm not after a huge
chunk
> > of
> > > code at all -- just the theory.
> > >
> > >
> > > Justin French
> > >
> > >
> > >
> > > --
> > > 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
> >
>
> -Pushkar S. Pradhan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
hiya - i've been thinking about this problem for over a week now & haven't come up with anything solid. thought i'd see if anyone more knowledgeable than i could share suggestions.
i inherited a website written in php, using mysql, running on iis5 (ick). one of the pages of the site lists the various departments in the site. the directory structure looks something like this:
departments (directory) -- department 1 (subdirectory) -- department 2 (subdirectory) -- department 3 (subdirectory)
when someone goes to www.whatever.com/departments/ , they are presented with a simple page containing links to each of the departmental subdirectories. the index page in departments directory is written in php, as it includes a few other files for navigation / etc, however, the links to the subdirectories are hard-coded on the page - just href's to each subdirectory.
what i'd like to do is to be able to add a little blurb to the departments/index.php page indicating that a particular department web page was updated within say the past 30 days. for instance if department 1 updated their page yesterday, beside their link it would say (Updated August 03, 2002). after 30 days, assuming they hadn't done any more updating, the little 'Updated' blurb would disappear. if a department hadn't updated anything in 30 days, nothing would appear beside their link.
i assume that in order to do this, i would need to write a script that basically says "look at the timestamp on the directory. if the timestamp is less than 30 days old, include xyz on the index page. if it is older than 30 days, include nothing"
so... any ideas as to how this would be implemented? i'm assuming it's going to be a nightmare because the script would need to look at a windows timestamp instead of a unix timestamp. also, since the links are hard-coded on the index page, i'm assuming that would have to be re-written?? the only example i've found similar to what i'm trying to do was at php.resourceindex.com. unfortunately, the link lead to a dead page.
any suggestions greatly appreciated.
UPDATE:
i've gotten the timestamp thing down, or so i think. i'm using this code:
<?php $filemod = filemtime(department 1); $filemodtime = date("F j, Y", $filemod); Print("Updated $filemodtime"); ?>
which outputs the following:
Updated August 5, 2002
so, what i need to find out now, is whether it's possible to limit this script to only print output if the directory modification date was less than 30 days before today. for instance, if the script runs & sees that the timestamp on the directory is August 1, 2002, it would output:
Updated August 1, 2002
otherwise, if it saw that the timestamp was March 1, 2002, it would output nothing at all.
does that make sense? is something like that possible?
thanks!
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
attached mail follows:
I think something like this could help (pseudo-code)
function get_last_modified(directory) mtime = 0 fp = opendir(directory) while (fname = readdir(fp)) !== false new_mtime = mtime(directory + fname) if new_mtime > mtime then mtime = new_mtime end while if now - mtime < 30 days return time2string(mtime) else return "" end function
I'll leave the conversion from pseudo-code to php as an exercise for you to do.... :)
HTH Martin
-----Original Message-----
From: Diver8 [mailto:diver_8_iam
yahoo.com]
Sent: Tuesday, August 06, 2002 12:36 PM
To: php-general
lists.php.net
Subject: [PHP] directory timestamps - limiting by date
hiya - i've been thinking about this problem for over a week now & haven't come up with anything solid. thought i'd see if anyone more knowledgeable than i could share suggestions.
i inherited a website written in php, using mysql, running on iis5 (ick). one of the pages of the site lists the various departments in the site. the directory structure looks something like this:
departments (directory) -- department 1 (subdirectory) -- department 2 (subdirectory) -- department 3 (subdirectory)
when someone goes to www.whatever.com/departments/ , they are presented with a simple page containing links to each of the departmental subdirectories. the index page in departments directory is written in php, as it includes a few other files for navigation / etc, however, the links to the subdirectories are hard-coded on the page - just href's to each subdirectory.
what i'd like to do is to be able to add a little blurb to the departments/index.php page indicating that a particular department web page was updated within say the past 30 days. for instance if department 1 updated their page yesterday, beside their link it would say (Updated August 03, 2002). after 30 days, assuming they hadn't done any more updating, the little 'Updated' blurb would disappear. if a department hadn't updated anything in 30 days, nothing would appear beside their link.
i assume that in order to do this, i would need to write a script that basically says "look at the timestamp on the directory. if the timestamp is less than 30 days old, include xyz on the index page. if it is older than 30 days, include nothing"
so... any ideas as to how this would be implemented? i'm assuming it's going to be a nightmare because the script would need to look at a windows timestamp instead of a unix timestamp. also, since the links are hard-coded on the index page, i'm assuming that would have to be re-written?? the only example i've found similar to what i'm trying to do was at php.resourceindex.com. unfortunately, the link lead to a dead page.
any suggestions greatly appreciated.
UPDATE:
i've gotten the timestamp thing down, or so i think. i'm using this code:
<?php $filemod = filemtime(department 1); $filemodtime = date("F j, Y", $filemod); Print("Updated $filemodtime"); ?>
which outputs the following:
Updated August 5, 2002
so, what i need to find out now, is whether it's possible to limit this script to only print output if the directory modification date was less than 30 days before today. for instance, if the script runs & sees that the timestamp on the directory is August 1, 2002, it would output:
Updated August 1, 2002
otherwise, if it saw that the timestamp was March 1, 2002, it would output nothing at all.
does that make sense? is something like that possible?
thanks!
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Try this function:
strtotime()
http://www.php.net/manual/en/function.strtotime.php
feels like it could actually help you.
Sincerely,
Maxim Maletsky
PHP Beginner www.phpbeginner.com
> -----Original Message-----
> From: Diver8 [mailto:diver_8_iam
yahoo.com]
> Sent: Tuesday, August 06, 2002 4:36 AM
> To: php-general
lists.php.net
> Subject: [PHP] directory timestamps - limiting by date
>
> hiya - i've been thinking about this problem for over
> a week now & haven't come up with anything solid.
> thought i'd see if anyone more knowledgeable than i
> could share suggestions.
>
> i inherited a website written in php, using mysql,
> running on iis5 (ick). one of the pages of the site
> lists the various departments in the site. the
> directory structure looks something like this:
>
> departments (directory)
> -- department 1 (subdirectory)
> -- department 2 (subdirectory)
> -- department 3 (subdirectory)
>
> when someone goes to www.whatever.com/departments/ ,
> they are presented with a simple page containing links
> to each of the departmental subdirectories.
> the index page in departments directory is written in
> php, as it includes a few other files for navigation /
> etc, however, the links to the
> subdirectories are hard-coded on the page - just
> href's to each subdirectory.
>
> what i'd like to do is to be able to add a little
> blurb to the departments/index.php page indicating
> that a particular department web page was updated
> within say the past 30 days. for instance if
> department 1 updated their page yesterday, beside
> their link it would say (Updated August 03, 2002).
> after 30 days, assuming they hadn't done any more
> updating, the little 'Updated' blurb would disappear.
> if a department hadn't updated anything in 30 days,
> nothing would appear beside their link.
>
> i assume that in order to do this, i would need to
> write a script that basically says "look at the
> timestamp on the directory. if the timestamp is
> less than 30 days old, include xyz on the index page.
> if it is older than 30 days, include nothing"
>
> so... any ideas as to how this would be implemented?
> i'm assuming it's going to be a nightmare because the
> script would need to look at a windows timestamp
> instead of a unix timestamp. also, since the links are
> hard-coded on the index page, i'm assuming that would
> have to be re-written?? the only example i've found
> similar to what i'm trying to do was at
> php.resourceindex.com. unfortunately, the link lead to
> a dead page.
>
> any suggestions greatly appreciated.
>
> UPDATE:
>
> i've gotten the timestamp thing down, or so i think.
> i'm using this code:
>
> <?php
> $filemod = filemtime(department 1);
> $filemodtime = date("F j, Y", $filemod);
> Print("Updated $filemodtime");
> ?>
>
> which outputs the following:
>
> Updated August 5, 2002
>
> so, what i need to find out now, is whether it's
> possible to limit this script to only print output if
> the directory modification date was less than
> 30 days before today. for instance, if the script runs
> & sees that the timestamp on the directory is August
> 1, 2002, it would output:
>
> Updated August 1, 2002
>
> otherwise, if it saw that the timestamp was March 1,
> 2002, it would output nothing at all.
>
> does that make sense? is something like that possible?
>
> thanks!
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
--- Martin Towell <martin.towell
world.net> wrote:
> I think something like this could help (pseudo-code)
>
> function get_last_modified(directory)
> mtime = 0
> fp = opendir(directory)
> while (fname = readdir(fp)) !== false
> new_mtime = mtime(directory + fname)
> if new_mtime > mtime then mtime = new_mtime
> end while
> if now - mtime < 30 days
> return time2string(mtime)
> else
> return ""
> end function
>
> I'll leave the conversion from pseudo-code to php as
> an exercise for you to
> do.... :)
>
> HTH
> Martin
>
hey thanks a bunch for the quick reply & helpful pointer! i'll admit though, while i do want to do this myself, i am slightly confused by parts of what you've posted.... i'm just getting started with php, so i guess a lot of things don't make sense yet (but i am trying!).... here's the code i've come up with so far:
<?php $directory = './xyz'; function get_last_modified($directory) { $mtime = 0; $fp = opendir("$directory"); while (($fname = readdir($fp)) !== false) { $new_mtime = $mtime("$directory" + "$fname"); if ($new_mtime > $mtime) then ($mtime = $new_mtime); } #end while if now - mtime < 30 day { return time2string(mtime); else return "" end function ?>
from the 'end while' bit down, i'm lost. i don't see anything about 'end while', 'now', or 'time2string' in the php manual. what are they exactly & how am i supposed to generate them? i mean, i understand what an 'end while' is supposed to be... the only syntax i could find for it for php is what i have above. i don't really know if it's right or not. anyway, the other things i have no idea at all about.
any further pointers greatly appreciated.
__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com
attached mail follows:
On Tuesday 06 August 2002 11:36, Diver8 wrote:
> hey thanks a bunch for the quick reply & helpful > pointer! i'll admit though, while i do want to do this > myself, i am slightly confused by parts of what you've > posted.... i'm just getting started with php, so i > guess a lot of things don't make sense yet (but i am > trying!).... here's the code i've come up with so > far: > > <?php > $directory = './xyz'; > function get_last_modified($directory) { > $mtime = 0; > $fp = opendir("$directory"); > while (($fname = readdir($fp)) !== false) { > $new_mtime = $mtime("$directory" + "$fname"); > if ($new_mtime > $mtime) then ($mtime = > $new_mtime); > } #end while > if now - mtime < 30 day { > return time2string(mtime); > else > return "" > end function > ?> > > from the 'end while' bit down, i'm lost. i don't see > anything about 'end while',
end while is a comment (note it is preceeded by #)
> 'now',
now is a pseudo-name for a function which returns the current time (look at the date-time functions in the manual for the exact function).
> or 'time2string' in
time2string is a pseudo-name for a function which returns a string in a human readable format (eg 12th May 2002 3:15pm) representing the given time. Look at the date-time functions in the manual for the exact function.
-- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development */* The Heineken Uncertainty Principle: You can never be sure how many beers you had last night. */
attached mail follows:
Hello,
Is there are default about apache, php and ssl under Redhat 7.x system ?
If so, how to create a new ( customized ) CA ( SSL ) ? Does php support imp, MySQL by default ?
Thank for your help !
Edward.
attached mail follows:
Exists some way of to have 2 different versions in the same system ? I am trying to running the version 4.2.2 and 4.0.3 .
Thanks
--Breno Cardoso Perucchi breno
omegatec.net Consultor - Omega Tecnologia http://www.omegatec.net/
attached mail follows:
Install them to different locations:
./configure --prefix=/path/to/php422 and ./configure --prefix=/path/to/php403
tyler
On Tue, 6 Aug 2002 02:20:19 -0300
"Breno Cardoso Perucchi" <breno
omegatec.net> wrote:
> Exists some way of to have 2 different versions in the same system ?
> I am trying to running the version 4.2.2 and 4.0.3 .
>
> Thanks
>
> --
>
> Breno Cardoso Perucchi
> breno
omegatec.net
> Consultor - Omega Tecnologia
> http://www.omegatec.net/
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
> -----Original Message-----
> From: Breno Cardoso Perucchi [mailto:breno
omegatec.net]
> Sent: Tuesday, 6 August 2002 3:20 PM
> To: php-general
lists.php.net
> Subject: [PHP] Two version of php in the same system
>
>
> Exists some way of to have 2 different versions in the same system ?
> I am trying to running the version 4.2.2 and 4.0.3 .
>
> Thanks
As far as i've come across so far the answer that is yes and no it will require you to change php.ini files when you want to use the different version so while you can have t vers of php complied on the one machine you can only use one version at a time.
Cheers Peter
attached mail follows:
Hi Breno:
On Tue, Aug 06, 2002 at 02:20:19AM -0300, Breno Cardoso Perucchi wrote: > Exists some way of to have 2 different versions in the same system ? > I am trying to running the version 4.2.2 and 4.0.3 .
Sure. Install them in separate directories. In this example, /usr/local/bin/php has two sub directories, ver403 and ver422.
Then, in httpd.conf, put:
Action application/x-httpd-php403 "/php403/php.exe" ScriptAlias /php403/ "/usr/local/bin/php/ver403"
Action application/x-httpd-php "/php422/php.exe" ScriptAlias /php422/ "/usr/local/bin/php/ver422"
Now, in your various directories, use .htaccess files to control which version is to be called:
AddType application/x-httpd-php403 .html AddType application/x-httpd-php .php
Modify everything above to suit your real needs.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
attached mail follows:
Hi,
In php is it possible to use session to protect a directory? Usually I use session control to protect php files, but this time application requires different thing. Here are the requirments:
- In the diretory, which will be protected by uid/pw session control, all the files are .htm or .htm static web pages. - Use logout but not closing browser to close a session.
Thanks for help in advance!
Alex
-- --------------------------- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029
attached mail follows:
Yes, there is a way using .htaccess files (action directive) to have any request for a certain type of file passed to a script (perl, php, etc).] ex:
Action image/gif /secure.php?t=g&p= Action image/jpeg /secure.php?t=j&p= Action image/png /secure.php?t=p&p=
that makes all requests to standard image file types be passed to the secure.php script, which then checks the sessions, and if its what it needs to be in order to view the image, shows it, otherwise redirects to a login.
Jason Reid
jason
achost.ca
-- AC Host Canada www.achost.ca----- Original Message ----- From: "Alex Shi" <chpshi
eol.ca> To: <php-general
lists.php.net>; <php-lang
lists.php.net> Sent: Monday, August 05, 2002 11:22 PM Subject: [PHP] Session question
> Hi, > > In php is it possible to use session to protect a directory? > Usually I use session control to protect php files, but this time > application requires different thing. Here are the requirments: > > - In the diretory, which will be protected by uid/pw session > control, all the files are .htm or .htm static web pages. > - Use logout but not closing browser to close a session. > > Thanks for help in advance! > > Alex > > > > -- > --------------------------- > TrafficBuilder Network: > http://www.bestadv.net/index.cfm?ref=7029 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]