Re: [PHP] problem connecting php and mysql

2005-04-26 Thread Hegeds Balzs
Hi,
i'm not so good at running php on microsoft stuff, but it seems you dont 
have mysql support compiled in or not tuned php.ini properly. You can 
try php 4.3.11 zip package from http://php.net 'cause it said it has 
mysql support compiled in. Again, it's just a tip.

Balazs Hegedus
rahot man wrote:
I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
working in Macromedia Dreamweaver MX2004
i am unable to connect to the mysql server. but my php files are running
fine and my mysql server is also running fine.
i) i had changed the php.ini-dist file to php.ini.
ii)i uncommented the extensions of php_mysql.dll in php.ini file
iii)i set the extensions_dir to
 extension_dir = D:\PHP\php-5.0.3\ext\ in php.ini file
iv)i had copied the libmysql.dll in windows\system32 and windows\system
v)i also copied the php_mysql.dll to D:\PHP\
i wrote the following code:
?php
$dbhost = localhost;
$dbusername = root;
$dbpassword = admin;
$dbname = test;
$connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
die (Could not connect .mysql_error());
mysql_select_db($dbname,$connect) or
die(Could not select database.mysql_error());
?
but after all these i am still getting the error
Fatal error: Call to undefined function mysql_connect() in
D:\PHP\teknohub\new.php on line 14
please help me to solve this problem out
 

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


RE: [PHP] problem connecting php and mysql

2005-04-26 Thread Rob Agar
hi Rahot

From: rahot man 
 I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
 working in Macromedia Dreamweaver MX2004
 
 i am unable to connect to the mysql server. but my php files 
 are running
 fine and my mysql server is also running fine.
 
 i) i had changed the php.ini-dist file to php.ini.
 ii)i uncommented the extensions of php_mysql.dll in php.ini file
 iii)i set the extensions_dir to
   extension_dir = D:\PHP\php-5.0.3\ext\ in php.ini file
 iv)i had copied the libmysql.dll in windows\system32 and 
 windows\system
 v)i also copied the php_mysql.dll to D:\PHP\
 
 i wrote the following code:
 ?php
 $dbhost = localhost;
 $dbusername = root;
 $dbpassword = admin;
 $dbname = test;
 $connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
 die (Could not connect .mysql_error());
 mysql_select_db($dbname,$connect) or
 die(Could not select database.mysql_error());
 ?
 
 but after all these i am still getting the error
 Fatal error: Call to undefined function mysql_connect() in
 D:\PHP\teknohub\new.php on line 14
 
 please help me to solve this problem out

One thing to check is this: are you sure IIS is reading the php.ini file
you think it's reading?

You can find out by running ?php phpinfo() ?.  There will also be a
mysql section somewhere in the output if the extensions loaded.

hth
Rob

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



Re: [PHP] problem connecting php and mysql

2005-04-26 Thread Prathaban Mookiah
Hi,

I had this same problem and I followed the the following instructions found in 
the online manual on installing PHP for windows:



If you've run other versions of PHP in the past and are having trouble 
upgrading to PHP5, particularly in loading the dynamic link library 
'php_mysql.dll' (despite following all the guidance in this documentation), 
try the following:

1.)  REMOVE old copies of 'libmysql.dll' from your WINDOWS and 
WINDOWS\system32 folders (check BOTH places).

2.)  Verify that your System Path is correctly configured to search the 'C:
\PHP5' and 'C:\PHP5\ext'.  To do this on WinXP, go to your Control Panel, open 
System, click Advanced tab, click on Environment Variables, under (lower pane) 
'System variables', select 'Path', and then click Edit.  Your system path 
should look something like:

%SystemRoot%\system32;%SystemRoot%; C:\Program Files\MySQL\MySQL Server 4.
1\bin;C:\PHP5;C:\PHP5\ext;

Because the system path checks the Windows and System32 folders for dll's 
*before* checking the PHP folder, old copies of php_mysql.dll will load up 
first and foul your PHP initialization if you don't remove them.

===

Hope this helps.

Prathap

-- Original Message ---
From: rahot man [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tue, 26 Apr 2005 11:11:38 +0530
Subject: [PHP] problem connecting php and mysql

 I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
 working in Macromedia Dreamweaver MX2004
 
 i am unable to connect to the mysql server. but my php files are running
 fine and my mysql server is also running fine.
 
 i) i had changed the php.ini-dist file to php.ini.
 ii)i uncommented the extensions of php_mysql.dll in php.ini file
 iii)i set the extensions_dir to
   extension_dir = D:\PHP\php-5.0.3\ext\ in php.ini file
 iv)i had copied the libmysql.dll in windows\system32 and windows\system
 v)i also copied the php_mysql.dll to D:\PHP\
 
 i wrote the following code:
 ?php
 $dbhost = localhost;
 $dbusername = root;
 $dbpassword = admin;
 $dbname = test;
 $connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
 die (Could not connect .mysql_error());
 mysql_select_db($dbname,$connect) or
 die(Could not select database.mysql_error());
 ?
 
 but after all these i am still getting the error
 Fatal error: Call to undefined function mysql_connect() in
 D:\PHP\teknohub\new.php on line 14
 
 please help me to solve this problem out
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

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



Re: [PHP] Help outputting an array?

2005-04-26 Thread Petar Nedyalkov
On Tuesday 26 April 2005 06:55, Brian Dunning wrote:
 Hi all - it seems the longer I use PHP, the stupider my questions are
 getting. I finally got my XML parsed into an array, but perhaps my
 skills at dealing with the array are not where I thought they were.
 My array print_r's out like this:

 Array
 (
[PARAS] = Array
  (
[PARA] = Array
  (
[__multi] = 1
  [0] = Array
(
  [NOTE] = Here is my first note.
  [TITLE] = Here is my first title.
)
  [1] = Array
(
  [NOTE] = Here is my second note.
  [TITLE] = Here is my second title.
)
  )
  )
 )

 I just want to loop through the array and output it as a table. It
 would look something like this:

 tdHere is my first note./tdtdHere is my first title./td
 tdHere is my second note./tdtdHere is my second title./td

Use 'foreach' (http://www.php.net/foreach) to loop through the arrays and 
check each member of the array with the function 
'is_array' (http://www.php.net/is_array) to see if it's been a XML parameter 
or XML child element.


 What incredibly easy way to do this am I just missing? Thanks!  :)

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpWuEGmW6Scn.pgp
Description: PGP signature


[PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Mark Sargent
Hi All,
again, I'm following an example from webmonkey,
http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
and I'm changing only what's relevant to me. I haven't altered the code 
basics, though. But I get the error regarding else. I don't see what 
it is. Anyone..? Cheers.

Mark Sargent.
*Parse error*: parse error, unexpected T_ELSE in 
*/var/www/html/phpmysqltable.php* on line *41*

25 if ($myrow = mysql_fetch_array($result)); {
26
27 echo table border=1\n;
28
29 echo trtdProduct Name/tdtdProduct Model 
Number/tdtdProduct
30 Serial Number/td/tr\n;
31
32 do {
33
34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
$myrow[product_name], $myrow[product_model_number],
35 $myrow[product_serial_number]);
36
37 } while ($myrow = mysql_fetch_array($result));
38
39 echo /table\n;
40
41 } else {
42
43 echo Sorry, no data is available for that request;
44
45 }

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


Re: [PHP] array from folder

2005-04-26 Thread Petar Nedyalkov
On Monday 25 April 2005 20:24, Ed Dorsch wrote:
 Can PHP generate an array based on file names in a folder?

 For example, if I have a folder called photos that includes three files
 -- tree.jpg, house.jpg and boat.jpg -- can PHP look at the file and
 generate a variable $photos= array (tree, house,boat). Any ideas for
 how to sniff out a folder to determine how many files are in it and then
 create an array with the file names in it?

Have you tried the Iterator API functionality? It's part of the SPL extension 
and I'm pretty sure it'll help you unless you don't use PHP 5.

Check it, it's very feasible and handy:

http://www.php.net/~helly/php/ext/spl/annotated.html


 Thanks,
 Ed

 Ed Dorsch
 Development Communications
 University of Oregon
 541.346-0605 ?xml:namespace prefix = o ns =
 urn:schemas-microsoft-com:office:office /

 You can't wait for inspiration. You have to go after it with a club.
  -Jack London

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpt8SCtn0CaL.pgp
Description: PGP signature


Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Prathaban Mookiah
Mark,

Back to basics budy!!

  25 if ($myrow = mysql_fetch_array($result)); {

should be 

  25 if ($myrow = mysql_fetch_array($result)) {

Note that extra semicolon?


Prathap


-- Original Message ---
From: Mark Sargent [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tue, 26 Apr 2005 16:01:24 +0900
Subject: [PHP] Parse error: parse error, unexpected T_ELSE

 Hi All,
 
 again, I'm following an example from webmonkey,
 
 http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
 
  and I'm changing only what's relevant to me. I haven't altered the 
 code basics, though. But I get the error regarding else. I don't 
 see what it is. Anyone..? Cheers.
 
 Mark Sargent.
 
 *Parse error*: parse error, unexpected T_ELSE in 
 */var/www/html/phpmysqltable.php* on line *41*
 
  25 if ($myrow = mysql_fetch_array($result)); {
  26
  27 echo table border=1\n;
  28
  29 echo trtdProduct Name/tdtdProduct Model 
 Number/tdtdProduct
  30 Serial Number/td/tr\n;
  31
  32 do {
  33
  34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
 $myrow[product_name], $myrow[product_model_number],
  35 $myrow[product_serial_number]);
  36
  37 } while ($myrow = mysql_fetch_array($result));
  38
  39 echo /table\n;
  40
  41 } else {
  42
  43 echo Sorry, no data is available for that request;
  44
  45 }
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
--- End of Original Message ---

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



Re: [PHP] Re: Opera 8.0 cache ????

2005-04-26 Thread Thomas Goyne
On Mon, 25 Apr 2005 06:46:58 -0700, Jason Barnett  
[EMAIL PROTECTED] wrote:

William Stokes wrote:
...
This works fine in IE and Firefox but Opera remembers users previous
choice and prints wrong info to user. After pressin refresh button it's  
back
to normal.

So does Opera store variable values to a local cache so that unset()  
won't
clear them? Sounds odd? If this is the case how this can be fixed?

Thanks a lot
-Will
If anything Opera is probably caching up the pages in the browser.
Opera doesn't store local variable values as much as it can store the
output generated by your page.  One possible solution to this is to send
the no-cache header.
http://www.procata.com/cachetest/tests/pragma/index.php
This will not do anything, as Opera ignores the no-cache header on  
non-secure sites (greatly due to the abuse of it by php).

--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
http://www.smempire.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: 1 web site, 3 servers, 3 countries - best practises?

2005-04-26 Thread Jochem Maas
Richard Davey wrote:
Hello Jochem,
Friday, April 22, 2005, 8:13:15 AM, you wrote:
JM in a round about way he seems to be asking 'why'? which is not
JM totally invalid.
To be honest when I ask people why? I actually use that word (or at
least something closely related to it).
JM do you want/need a master/slave configuration
JM or true decentralisation and/or two way syncing?
See my reply to Drewcore for far more detail which answers the above.
JM sounds like a costly undertaking, not to be taken lightly... I'm
JM interested to understand the requirement that dictates such server
JM redundancy. Given the implied cost, planning/implementation should
JM probably left to a company who already knows the answers to your
JM questions :-/?
This isn't about redundancy, it's about enhancing the experience for
customers physically located thousands of miles away from the server
they are trying to access. So, bring the content closer to them and
drop their wait times massively. It's easy for those of us sat on the
end of cable connections to become complacent about this IMHO (i.e.
the Internet is fast enough now that you don't need to do this), but
in reality that's not really yet the case.
interesting problem you have. the first thing that jumps into my head is
Squid... http://www.squid-cache.org/
Squid is really powerful and a bitch to get to grips with ;-).
If you were to take the 'Squid' route you would only be replicating (caching)
you main servers output rather than having to replicate DBs/source-files etc.
good luck which ever route you take.
Best regards,
Richard Davey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] array from folder

2005-04-26 Thread Mark Sargent
Ed Dorsch wrote:
Can PHP generate an array based on file names in a folder?
 
For example, if I have a folder called photos that includes three 
files -- tree.jpg, house.jpg and boat.jpg -- can PHP look at the 
file and generate a variable $photos= array (tree, house,boat). 
Any ideas for how to sniff out a folder to determine how many files 
are in it and then create an array with the file names in it?
 
Thanks,
Ed

*Ed Dorsch*
Development Communications
University of Oregon
541.346-0605
You can't wait for inspiration. You have to go after it with a club.
 -Jack London
 
Hi All,
yep, basics are good, hence my following the tut at webmonkey(so I can 
learn the basics), which had the code like that. Cheers.

P.S. Some people are mailig me direct. That's great, but, I'd prefer you 
reply in here, so all can see/comment. Cheers, again.

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


Re: [PHP] Zend Certification Exam

2005-04-26 Thread M Saleh EG
M Saleh EG wrote:
 Any advice from the ones that passed?
 Thanks

Aaron Gould wrote:
What exactly are you after? Why does it matter if a person has passed
or not? As long as someone has taken the exam, that should be
sufficient enough to provide some advice.

I dont understand what's the problem if I asked? 
So why such a reply? I don't understand.

A couple tidbits of advice have already been given to you, including by me.

On 4/25/05, Aaron Gould [EMAIL PROTECTED] wrote:
 
 M Saleh EG wrote:
  Any advice from the ones that passed?
  Thanks
 
 What exactly are you after? Why does it matter if a person has passed
 or not? As long as someone has taken the exam, that should be
 sufficient enough to provide some advice.
 
 A couple tidbits of advice have already been given to you, including by 
 me.
 
 --
 Aaron Gould
 Programmer/Systems Administrator
 PARTS CANADA
 
 


-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] array from folder

2005-04-26 Thread Mark Sargent
Mark Sargent wrote:
Ed Dorsch wrote:
Can PHP generate an array based on file names in a folder?
 
For example, if I have a folder called photos that includes three 
files -- tree.jpg, house.jpg and boat.jpg -- can PHP look at the 
file and generate a variable $photos= array (tree, house,boat). 
Any ideas for how to sniff out a folder to determine how many files 
are in it and then create an array with the file names in it?
 
Thanks,
Ed

*Ed Dorsch*
Development Communications
University of Oregon
541.346-0605
You can't wait for inspiration. You have to go after it with a club.
 -Jack London
 

Hi All,
yep, basics are good, hence my following the tut at webmonkey(so I can 
learn the basics), which had the code like that. Cheers.

P.S. Some people are mailig me direct. That's great, but, I'd prefer 
you reply in here, so all can see/comment. Cheers, again.

Mark Sargent.
Hi All,
sincere apologies for posting, unintentionally, in the wrong thread. Cheers.
Mark Sargent.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Mark Sargent
Prathaban Mookiah wrote:
Mark,
Back to basics budy!!
 

25 if ($myrow = mysql_fetch_array($result)); {
   

should be 

 

25 if ($myrow = mysql_fetch_array($result)) {
   

Note that extra semicolon?
Prathap
-- Original Message ---
From: Mark Sargent [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Tue, 26 Apr 2005 16:01:24 +0900
Subject: [PHP] Parse error: parse error, unexpected T_ELSE
 

Hi All,
again, I'm following an example from webmonkey,
http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programming
and I'm changing only what's relevant to me. I haven't altered the 
code basics, though. But I get the error regarding else. I don't 
see what it is. Anyone..? Cheers.

Mark Sargent.
*Parse error*: parse error, unexpected T_ELSE in 
*/var/www/html/phpmysqltable.php* on line *41*

25 if ($myrow = mysql_fetch_array($result)); {
26
27 echo table border=1\n;
28
29 echo trtdProduct Name/tdtdProduct Model 
Number/tdtdProduct
30 Serial Number/td/tr\n;
31
32 do {
33
34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n, 
$myrow[product_name], $myrow[product_model_number],
35 $myrow[product_serial_number]);
36
37 } while ($myrow = mysql_fetch_array($result));
38
39 echo /table\n;
40
41 } else {
42
43 echo Sorry, no data is available for that request;
44
45 }

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

--- End of Original Message ---
 

Hi All,
yep, basics are good, hence my following the tut at webmonkey(so I can 
learn the basics), and I obviously missed that little error. Cheers.

P.S. Some people are mailig me direct. That's great, but, I'd prefer you 
reply in here, so all can see/comment. Cheers, again.

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


Re: [PHP] Zend Certification Exam

2005-04-26 Thread Chris Ramsay
snip
 I dont understand what's the problem if I asked?
 So why such a reply? I don't understand.
/snip

Perhaps it came across as a bit cheeky to Aaron - I kind of got the
impression that an answer from someone who has had a go but not passed
the exam was not good enough for you...

Really, I doubt whether there is any difference in doing the exam
whatever the outcome, seeing as what you wanted to know was about
taking the exam in the first place.

Chris

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



[PHP] Cache control

2005-04-26 Thread William Stokes
Hello,
I have an web application that checks users rights to specific parts of the 
apllication at the beginning of each page. However I noticed, with the help 
of Jason Barnett, that opera caches pages locally and the users rights check 
fails. The application works fine with Firefox and IE. So I think I need to 
prevent the pages from beeing cached. How this can be done? I'm totally 
inexperinced with this stuff.

The authentication is a 2 part task. First the username and password are 
checked and the user is given or denied access. This works ok with every 
browser. But once inside the user access rights check to differt parts of 
the application fails because of the Opera cache.

Thanks
-Will

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



[PHP] Re: PHP Designer 2005

2005-04-26 Thread Aidan Lister
Contact the company who wrote the software you're trying to use for support.


The Disguised Jedi [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
Some might consider this OT, but I need to figure this out somehow, and
google has been no help.

I downloaded and installed PHP Designer 2005, and I really like it so far,
but I'm having some problems. Any time it is running, my CPU Usage goes up
to 100% and the process phpDesignerPrg.exe is the culprit. My fan kicks
into overdrive, and my laptop gets really warm. The funny thing is, any time
another process tries to do something, phpDesigner shrinks into the
background, and uses almost no CPU, only to crawl back up to 100% after the
other process is finished.

Anyone here had this problem before? Anyone here know how to fix it?

Thanks for replying even if this is a little off-topic...

-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However,
I must say that the ENTIRE contents of this message are subject to other's
criticism, corrections, and speculations.

This message is Certified Virus Free

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



[PHP] Re: Help outputting an array?

2005-04-26 Thread Aidan Lister
Hi Brian,

Try this function,
http://aidan.dotgeek.org/lib/?file=function.array2table.php


Brian Dunning [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Hi all - it seems the longer I use PHP, the stupider my questions are 
 getting. I finally got my XML parsed into an array, but perhaps my  skills 
 at dealing with the array are not where I thought they were.  My array 
 print_r's out like this:

 Array
 (
   [PARAS] = Array
 (
   [PARA] = Array
 (
   [__multi] = 1
 [0] = Array
   (
 [NOTE] = Here is my first note.
 [TITLE] = Here is my first title.
   )
 [1] = Array
   (
 [NOTE] = Here is my second note.
 [TITLE] = Here is my second title.
   )
 )
 )
 )

 I just want to loop through the array and output it as a table. It  would 
 look something like this:

 tdHere is my first note./tdtdHere is my first title./td
 tdHere is my second note./tdtdHere is my second title./td

 What incredibly easy way to do this am I just missing? Thanks!  :) 

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



[PHP] Re: Cache control

2005-04-26 Thread William Stokes
Talkin' to myself...

does this solve the issue?

header (Cache-Control: no-cache);



-Will

William Stokes [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 Hello,
 I have an web application that checks users rights to specific parts of 
 the apllication at the beginning of each page. However I noticed, with the 
 help of Jason Barnett, that opera caches pages locally and the users 
 rights check fails. The application works fine with Firefox and IE. So I 
 think I need to prevent the pages from beeing cached. How this can be 
 done? I'm totally inexperinced with this stuff.

 The authentication is a 2 part task. First the username and password are 
 checked and the user is given or denied access. This works ok with every 
 browser. But once inside the user access rights check to differt parts of 
 the application fails because of the Opera cache.

 Thanks
 -Will 

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



RE: [PHP] Re: Cache control

2005-04-26 Thread Mark Rees
One rather brute force way to get round this is to append a unique (per-session 
at least) id to the querystring of each page, which means that the page will be 
requested from the server rather than the cache. I believe this works in Opera 
as well as other browsers.

There is more to cache-control and expiring pages than meets the eye, do a 
search on it or read the rfc. Ultimately it is down to how user agents 
interpret those commands, and there is no substitute for testing...

Mark

-Original Message-
From: William Stokes [mailto:[EMAIL PROTECTED] 
Sent: 26 April 2005 09:55
To: php-general@lists.php.net
Subject: [PHP] Re: Cache control


Talkin' to myself...

does this solve the issue?

header (Cache-Control: no-cache);



-Will

William Stokes [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 Hello,
 I have an web application that checks users rights to specific parts 
 of
 the apllication at the beginning of each page. However I noticed, with the 
 help of Jason Barnett, that opera caches pages locally and the users 
 rights check fails. The application works fine with Firefox and IE. So I 
 think I need to prevent the pages from beeing cached. How this can be 
 done? I'm totally inexperinced with this stuff.

 The authentication is a 2 part task. First the username and password 
 are
 checked and the user is given or denied access. This works ok with every 
 browser. But once inside the user access rights check to differt parts of 
 the application fails because of the Opera cache.

 Thanks
 -Will

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

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

EOE

**
**


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



[PHP] Some Question

2005-04-26 Thread Khorosh Irani
Hello I have some questions:
1.How I can make a optional argument in function that if I dont
mention it in my code does not make problem?
2.How I can see apache or IIS headers?
Thanks

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



Re: [PHP] Re: Opera 8.0 cache ????

2005-04-26 Thread William Stokes
I just tested this on a normal http site

header (Cache-Control: no-cache);

with Opera 8.0 and it seems to me that the browser respects the no-cache 
header.

-Will

Thomas Goyne [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 On Mon, 25 Apr 2005 06:46:58 -0700, Jason Barnett 
 [EMAIL PROTECTED] wrote:

 William Stokes wrote:
 ...
 This works fine in IE and Firefox but Opera remembers users previous
 choice and prints wrong info to user. After pressin refresh button it's 
 back
 to normal.

 So does Opera store variable values to a local cache so that unset() 
 won't
 clear them? Sounds odd? If this is the case how this can be fixed?

 Thanks a lot
 -Will

 If anything Opera is probably caching up the pages in the browser.
 Opera doesn't store local variable values as much as it can store the
 output generated by your page.  One possible solution to this is to send
 the no-cache header.

 http://www.procata.com/cachetest/tests/pragma/index.php

 This will not do anything, as Opera ignores the no-cache header on 
 non-secure sites (greatly due to the abuse of it by php).

 -- 
 Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

 http://www.smempire.org 

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



RE: [PHP] Some Question

2005-04-26 Thread Mark Rees

Hello I have some questions:
1.How I can make a optional argument in function that if I dont mention
it in my code does not make problem? 

Start here
http://www.php.net/manual/en/functions.arguments.php#functions.variable-
arg-list

2.How I can see apache or IIS headers? Thanks

http://www.google.co.uk/search?q=view+http+headerssourceid=mozilla-sear
chstart=0start=0ie=utf-8oe=utf-8client=firefox-arls=org.mozilla:en
-GB:official

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

Gamma Global : Suppliers of HPCompaq, IBM, Acer, EPI, APC, Cyclades, D-Link, 
Cisco, Sun Microsystems, 3Com

GAMMA GLOBAL (UK) LTD IS A RECOGNISED 'INVESTOR IN PEOPLE' AND AN 'ISO 9001 
2000' REGISTERED COMPANY

**

CONFIDENTIALITY NOTICE:

This Email is confidential and may also be privileged. If you are not the
intended recipient, please notify the sender IMMEDIATELY; you should not
copy the email or use it for any purpose or disclose its contents to any
other person.

GENERAL STATEMENT:

Any statements made, or intentions expressed in this communication may not
necessarily reflect the view of Gamma Global (UK) Ltd. Be advised that no 
content
herein may be held binding upon Gamma Global (UK) Ltd or any associated company
unless confirmed by the issuance of a formal contractual document or
Purchase Order,  subject to our Terms and Conditions available from 
http://www.gammaglobal.com

EOE

**
**


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



Re: [PHP] Some Question

2005-04-26 Thread Khorosh Irani
Hello
1.I dont have this mean I want this:
for example I write this function :myfunction ($para1, $para2,
$para3=123) .And I want to make $para1 optional that If I didnt write
it (for example:myfunction(1,123) )
It does not make problem
2.I want to see all of header not HTTP_USER_AGENT?
Thanks
On 4/26/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I'm no authority, but I'm going to have a punt at this one
 
  1.How I can make a optional argument in function that if I dont
  mention it in my code does not make problem?
 
 You can pass fewer arguments than specified in a function, so just
 make the optional ones to the right of the required ones. Also if you,
 say myfunction ($para1, $para2, $para3=123) it makes $para3 hold a
 default value if nothing's passed
 
  2.How I can see apache or IIS headers?
 
 Look for $HTTP_ followed by the header name in upper case and with any
 -s replaced by _, eg. HTTP_USER_AGENT
 
 hth
 J


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



[PHP] want to take credit card payments (novice)?

2005-04-26 Thread AndreaD
Does anyone have any handy links/tip/tutorials for a newbee who wants to 
take credit card payments?

Using php never set up a SSL or anything.

thanks

Ross 

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



Re: [PHP] Parse error: parse error, unexpected T_ELSE

2005-04-26 Thread Petar Nedyalkov
On Tuesday 26 April 2005 11:10, Mark Sargent wrote:
 Prathaban Mookiah wrote:
 Mark,
 
 Back to basics budy!!
 
  25 if ($myrow = mysql_fetch_array($result)); {
 
 should be
 
  25 if ($myrow = mysql_fetch_array($result)) {
 
 Note that extra semicolon?
 
 
 Prathap
 
 
 -- Original Message ---
 From: Mark Sargent [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Tue, 26 Apr 2005 16:01:24 +0900
 Subject: [PHP] Parse error: parse error, unexpected T_ELSE
 
 Hi All,
 
 again, I'm following an example from webmonkey,
 
 http://webmonkey.wired.com/webmonkey/99/21/index3a_page2.html?tw=programm
 ing
 
  and I'm changing only what's relevant to me. I haven't altered the
 code basics, though. But I get the error regarding else. I don't
 see what it is. Anyone..? Cheers.
 
 Mark Sargent.
 
 *Parse error*: parse error, unexpected T_ELSE in
 */var/www/html/phpmysqltable.php* on line *41*
 
  25 if ($myrow = mysql_fetch_array($result)); {
  26
  27 echo table border=1\n;
  28
  29 echo trtdProduct Name/tdtdProduct Model
 Number/tdtdProduct
  30 Serial Number/td/tr\n;
  31
  32 do {
  33
  34 printf(trtd%s/tdtd%s/tdtd%s/td/tr\n,
 $myrow[product_name], $myrow[product_model_number],
  35 $myrow[product_serial_number]);
  36
  37 } while ($myrow = mysql_fetch_array($result));
  38
  39 echo /table\n;
  40
  41 } else {
  42
  43 echo Sorry, no data is available for that request;
  44
  45 }
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 --- End of Original Message ---

 Hi All,

 yep, basics are good, hence my following the tut at webmonkey(so I can
 learn the basics), and I obviously missed that little error. Cheers.

 P.S. Some people are mailig me direct. That's great, but, I'd prefer you
 reply in here, so all can see/comment. Cheers, again.

Some people have intelligent mail agents that rely on mailing list headers. 
And since you use Reply-To header that's not been overwritten by the 
mainling-list daemon, we replied (me too) directly to you. Remove the 
Reply-To and you'll have no worries.


 Mark Sargent.

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpiM6dmv3CQl.pgp
Description: PGP signature


Re: [PHP] want to take credit card payments (novice)?

2005-04-26 Thread Chris Ramsay
Personally, I avoid it at all costs - let a large organisation with
all the associated security, insurance etc such as Worldpay handle
these things...also, search the archives of this list - I believe
there was a protracted discussion of this a few weeks ago...

Chris

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



[PHP] Line feed in a echo

2005-04-26 Thread Mario de Frutos Dieguez
How can i make a line feed in a echo instruction? like printf(foo\n);
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] want to take credit card payments (novice)?

2005-04-26 Thread Angelo Zanetti
you need another IP address for the SSL certificate on your server. Its
best to let the payment gateway handle the credit card processing.

AndreaD wrote:

Does anyone have any handy links/tip/tutorials for a newbee who wants to 
take credit card payments?

Using php never set up a SSL or anything.

thanks

Ross 

  


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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Andri Heryandi
Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:
How can i make a line feed in a echo instruction? like printf(foo\n);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: problem connecting php and mysql

2005-04-26 Thread rahot man
i have installed php 4.3.10.exe and now the previous error that
mysql_connect() function undefined is not there now. Also i have got
the service of mysql. i checked it with phpinfo()

But now one more problem is coming
that is

Warning: mysql_connect(): Client does not support authentication
protocol requested by server; consider upgrading MySQL client in
D:\PHP\teknohub\new.php on line 13
Could not connect Client does not support authentication protocol
requested by server; consider upgrading MySQL client

what to do for that

Thank you


On 4/26/05, Prathaban Mookiah [EMAIL PROTECTED] wrote:
 Hi,
 
 I had this same problem and I followed the the following instructions found
 in 
 the online manual on installing PHP for windows:
 
 
 
 If you've run other versions of PHP in the past and are having trouble 
 upgrading to PHP5, particularly in loading the dynamic link library 
 'php_mysql.dll' (despite following all the guidance in this documentation),
 
 try the following:
 
 1.)  REMOVE old copies of 'libmysql.dll' from your WINDOWS and 
 WINDOWS\system32 folders (check BOTH places).
 
 2.)  Verify that your System Path is correctly configured to search the 'C:
 \PHP5' and 'C:\PHP5\ext'.  To do this on WinXP, go to your Control Panel,
 open 
 System, click Advanced tab, click on Environment Variables, under (lower
 pane) 
 'System variables', select 'Path', and then click Edit.  Your system path 
 should look something like:
 
 %SystemRoot%\system32;%SystemRoot%; C:\Program Files\MySQL\MySQL Server 4.
 1\bin;C:\PHP5;C:\PHP5\ext;
 
 Because the system path checks the Windows and System32 folders for dll's 
 *before* checking the PHP folder, old copies of php_mysql.dll will load up 
 first and foul your PHP initialization if you don't remove them.
 
 ===
 
 Hope this helps.
 
 Prathap
 
 -- Original Message ---
 From: rahot man [EMAIL PROTECTED]
 To: php-general@lists.php.net
 Sent: Tue, 26 Apr 2005 11:11:38 +0530
 Subject: [PHP] problem connecting php and mysql
 
  I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
  working in Macromedia Dreamweaver MX2004
  
  i am unable to connect to the mysql server. but my php files are running
  fine and my mysql server is also running fine.
  
  i) i had changed the php.ini-dist file to php.ini.
  ii)i uncommented the extensions of php_mysql.dll in php.ini file
  iii)i set the extensions_dir to
extension_dir = D:\PHP\php-5.0.3\ext\ in php.ini file
  iv)i had copied the libmysql.dll in windows\system32 and windows\system
  v)i also copied the php_mysql.dll to D:\PHP\
  
  i wrote the following code:
  ?php
  $dbhost = localhost;
  $dbusername = root;
  $dbpassword = admin;
  $dbname = test;
  $connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
  die (Could not connect .mysql_error());
  mysql_select_db($dbname,$connect) or
  die(Could not select database.mysql_error());
  ?
  
  but after all these i am still getting the error
  Fatal error: Call to undefined function mysql_connect() in
  D:\PHP\teknohub\new.php on line 14
  
  please help me to solve this problem out
  
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 --- End of Original Message ---


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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Chris Ramsay
Like echo foo\n

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Andri Heryandi [EMAIL PROTECTED] wrote:
 Use echo something br;
 
 is that what you mean?
 
 
 Mario de Frutos Dieguez wrote:
 
  How can i make a line feed in a echo instruction? like printf(foo\n);
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

you can do it by using echo as well:

echo This is a line feed\n;
or a carriage return
echo this is a carriage return\r;

check out http://www.php.net/strings

Hope this helps

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Ken [EMAIL PROTECTED] wrote:
 On 4/26/05, Andri Heryandi [EMAIL PROTECTED] wrote:
  Use echo something br;
 
  is that what you mean?
 
 
  Mario de Frutos Dieguez wrote:
 
   How can i make a line feed in a echo instruction? like printf(foo\n);
  
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 you can do it by using echo as well:
 
 echo This is a line feed\n;
 or a carriage return
 echo this is a carriage return\r;
 
 check out http://www.php.net/strings
 
 Hope this helps
 

i meant this URI:
http://se2.php.net/manual/en/language.types.string.php

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



[PHP] Re: want to take credit card payments (novice)?

2005-04-26 Thread AndreaD
Been looking into and and you  both are right.

All I have to do is sort out the SSL!!


AndreaD [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Does anyone have any handy links/tip/tutorials for a newbee who wants to 
 take credit card payments?

 Using php never set up a SSL or anything.

 thanks

 Ross 

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread Mario de Frutos Dieguez
Andri Heryandi escribió:
Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:
How can i make a line feed in a echo instruction? like printf(foo\n);

yes that's it thx
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Show data in two columns

2005-04-26 Thread Amir Mohammad Saied
Hi,
i want to extract the data from my DB (it's an articles database) and 
want to show them in 2 columns way, like zend.com's articles section,
could any one help me?

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


[PHP] Re: problem connecting php and mysql

2005-04-26 Thread rahot man
i have also solved this problem i found the help from mysql website in
the following address
http://dev.mysql.com/doc/mysql/en/old-client.html

i executed the queries as given in this website and now it is all set
and now the mysql and php connection is working properly.



Thank you all for helping in solving the problem.

Rahotman

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



[PHP] Problems with HPHP on AIX and Solaris

2005-04-26 Thread Markus Mayer
Hi All,

I have interesting problems with PHP/Hardened PHP 4.3.11 on Apache 2.0.54 on 
AIX 5.1 and 5.2, and on Solaris 9.

I have a directory permissions scheme which has the absolute minimum of rights 
for the web server to work, that is a directory gets the permissions 
drwx--s--x (711) with the suid bit set.  This is done because many users have 
ftp access to the system and for some directories in the system it should not 
be possible for those users to do a directory listing.  Changing the 
permissions to include read permission is one solution that works, but in 
this environment it is unacceptable for us.  It's also unacceptable because 
this was working with previous versions of HPHP.

My first problem is the behaviour of Hardened PHP in PHP 4.3.10 and 4.3.11 on 
AIX.  This was built using gcc 3.3.3 from the AIX toolbox.  Everything was 
fine with Hardened PHP 4.3.9.  For what ever reason, with the above directory 
permissions, HPHP is not able to read files within that directory structure 
if they are included relative to the working directory of a script running 
within a subdirectory (see the example scripts and associated directory 
structure I have given later on).  If I run this on Linux with HPHP, it works 
fine, as does the normal PHP on AIX.  Strangely enough, if I use the absolute 
path to the included file, the file is included without problems.

My second problem is HPHP on Solaris 9 on a Blade 1500 - it just doesn't work 
with the apache process seg faulting aparently during the initialisation 
stage.  If I use the normal PHP everything runs fine.  These were built using 
gcc 3.3.2 from sunfreeware.com.  I have tried running it in gdb, but gdb 
itself seg faults.  So then (genius here) I ran apache inside gdb inside gdb 
which caught gdb's own seg fault and indicated a problem with libc.so.1.  
Applying the latest Solaris 9 patch cluster from Sun and rebuilding apache 
and HPHP did not change anything.  At the moment I'm one step away from 
opening a bug report at Sun.

I would like to know if any one else with similar systems has similar problems 
and maybe a solution.  I would bother Steffan Esser, the creator of HPHP, 
with this problem but I've bothered him enough already and really need to 
know if I'm the only one with such problems.  I also don't want to open a bug 
report at Sun if the problem is somewhere else.

If anyone has any questions about this problem, please ask.  I will be most 
grateful for any help anyone can give me.

Markus


A test directory structure to recreate this is as follows:
htdocs/test:
drws--S--x   3 user users512 Dec 28 17:37 .
drwxr-xr-x  14 user users   1536 Apr 20 12:27 ..
drwxr-xr-x   2 user users512 Dec 28 17:39 subdir
-rw-r--r--   1 user users 48 Dec 28 17:37 includeme.inc

htdocs/test/subdir:
drwxr-xr-x   2 user users512 Dec 28 17:39 .
drws--S--x   3 user users512 Dec 28 17:37 ..
-rw-r--r--   1 user users511 Apr 20 11:37 scripttest.php

the file htdocs/test/includeme.inc contains the script
?php

echo I am the included file!br;

?

the file htdocs/test/subdir/scripttest.php contains the script
?php

echo I will now try to include the file ../includeme.inc.brbr;

include '../includeme.inc';

echo brDone...brbr;

$included_files = get_included_files();

echo These are the included files as returned by get_included_files():br;

foreach ($included_files as $included_file)
{
echo  $included_filebr;
}

echo br;

echo Now I will try to get my current working directory using getcwd()br;

$cwd = getcwd();

echo getcwd() returned $cwd br;

echo brTest end.br;

?



Solaris Hardened PHP seg faults.
Solaris  PHP 4.3.11 standard and AIX PHP 4.3.11 standard output the 
following:

I will now try to include the file ../includeme.inc.

I am the included file!
 
Done...

These are the included files as returned by get_included_files():
 /usr/local/htdocs/test/subdir/scripttest.php
 ../includeme.inc

Now I will try to get my current working directory using getcwd()
getcwd() returned 

Test end.



AIX PHP 4.3.11 with Hardened PHP Patches 0.2.7 for PHP 4.3.11 outputs the 
following:

I will now try to include the file ../includeme.inc.


 Warning: main(../includeme.inc): failed to open stream: Permission denied 
in /usr/local/htdocs/test/subdir/scripttest.php on line 5
 
 Warning: main(): Failed opening '../includeme.inc' for inclusion 
(include_path='.:/usr/local/lib/php') 
in /usr/local/htdocs/test/subdir/scripttest.php on line 5
 
Done...

These are the included files as returned by get_included_files():
 /usr/local/htdocs/test/subdir/scripttest.php

Now I will try to get my current working directory using getcwd()
getcwd() returned 

Test end.



Linux: The output of the scripts on both standard PHP 4.3.11 and PHP 4.3.11 
with Hardened PHP patches version 0.2.7 for PHP 4.3.11 is the same:

I will now try to include the file ../includeme.inc.

I am the included file!
 

Re: [PHP] Show data in two columns

2005-04-26 Thread Chris Ramsay
Looks like they've done something like the following:

while (row = data output from db) {
print the following:
tabletr
td width=50%
tabletrtdrow1/td/tr/table
tabletrtdrow2/td/tr/table
tabletrtdrow3/td/tr/table
/td
td width=50%
tabletrtdrow4/td/tr/table
tabletrtdrow5/td/tr/table
tabletrtdrow6/td/tr/table
/td
/tr
/table
}

Check out their source html as a start...

Chris

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



[PHP] number of cookies and if there are any cookies set?

2005-04-26 Thread AndreaD
I need two bits of info...

(i) Are there ANY cookies set?

(ii) How many cookies are set?


how do I find this information out?


AD 

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



[PHP] strtotime() lost precision?

2005-04-26 Thread Mario de Frutos Dieguez
Hi!
I'm back hahaha :D
I'm making functions to calculate the duration (only laboral days) 
between 2 dates and the initial and final date between a duration give 
me in laboral days.

I use the following function to make the diference between 2 dates:
function fecDiferenciaFechas($fecFechaInicio,$fecFechaFin)
   {
   $fecFechaInicio=strtotime($fecFechaInicio);
   $fecFechaFin=strtotime($fecFechaFin);
  
   if ($fecFechaFin == -1 || $fecFechaInicio == -1)
   {
   return false;
   }
  
   $iDiferencia = $fecFechaFin - $fecFechaInicio;
  
   //Inicializamos la variable
   $iDias = 0;
  
   //Devolvemos la diferencia en dias
   return ($iDiferencia/86400);
   }

The problem is that with a duration of 220 the return is 219.958333, 
where im losing precision?

(Sorry for my home english :P)
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones  

CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Line feed in a echo

2005-04-26 Thread Ken
On 4/26/05, Mario de Frutos Dieguez [EMAIL PROTECTED] wrote:
 Andri Heryandi escribió:
 
  Use echo something br;
 
  is that what you mean?
 
 
  Mario de Frutos Dieguez wrote:
 
  How can i make a line feed in a echo instruction? like printf(foo\n);
 
 
 yes that's it thx
 
 --
 Mario de Frutos Dieguez
 
 División de Ingeniería del Software
 y Comunicaciones
 
 CARTIF -Parque Tecnológico Boecillo
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

in that case i suggest using br / instead as that is valid xhtml 1.0.

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



Re: [PHP] number of cookies and if there are any cookies set?

2005-04-26 Thread Ken
On 4/26/05, AndreaD [EMAIL PROTECTED] wrote:
 I need two bits of info...
 
 (i) Are there ANY cookies set?
 
 (ii) How many cookies are set?
 
 how do I find this information out?
 
 AD
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 

you can access cookies by using the superglobal variable (as an array) $_COOKIE.

if ( isset($_COOKIE['cookiename']) )
{
   // do some stuff. cookie with cookiename is set.
}

i don't know the best method to check how many cookies are set but i
guess you count the array $_COOKIE.

$number = count($_COOKIE)

hope this helps.

Ken

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



Re: [PHP] Line feed in a echo

2005-04-26 Thread M. Sokolewicz
Ken wrote:
On 4/26/05, Mario de Frutos Dieguez [EMAIL PROTECTED] wrote:
Andri Heryandi escribió:

Use echo something br;
is that what you mean?
Mario de Frutos Dieguez wrote:

How can i make a line feed in a echo instruction? like printf(foo\n);

yes that's it thx
--
Mario de Frutos Dieguez
División de Ingeniería del Software
y Comunicaciones
CARTIF -Parque Tecnológico Boecillo
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


in that case i suggest using br / instead as that is valid xhtml 1.0.
that would depend on the DTD header you provide. If you provide an HTML 
= 4.01 line, then br / is syntactically incorrect. However, when 
using XHTML 1.0+ or XML, it's correct.

Remember that the internal closing of a tag is something that is an 
add-on to SGML, and part of XML. Since HTML is derived from SGML, and 
not XML it doesn't have that ability natively; as for XHTML, which is 
based on both, it's possible to use it; and advised obviously ;)

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


[PHP] Re: number of cookies and if there are any cookies set?

2005-04-26 Thread M. Sokolewicz
AndreaD wrote:
I need two bits of info...
(i) Are there ANY cookies set?
if(count($_COOKIES)  0) {
	echo 'cookies are set';
} else {
	echo 'no cookies set, or to be more precise, no cookies are set which 
are available to this site';
}
(ii) How many cookies are set?
echo count($_COOKIES);
how do I find this information out?
AD 
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Zend Certification Exam

2005-04-26 Thread Aaron Gould
Chris Ramsay wrote:
Perhaps it came across as a bit cheeky to Aaron - I kind of got the
impression that an answer from someone who has had a go but not passed
the exam was not good enough for you...
Really, I doubt whether there is any difference in doing the exam
whatever the outcome, seeing as what you wanted to know was about
taking the exam in the first place.
That's exactly the impression I got too Chris.  Glad I'm not the only 
one to see it that way!  I felt a bit inadequate there for a moment.  :)

Regardless, my advice still stands (if it still matters coming from a 
unsuccessful exam taker) -- don't rush the exam and take your time. 
Some of the questions are tricky in their wording.

As an aside -- for those who are unsuccessful with the exam, don't 
worry, it doesn't mean your a bad programmer. I've been programming PHP 
for five years now, and there's very little I can't do with it.

I just stink at exams; I get antsy when sitting for 30-60 minutes with 
just a pencil and paper in a quiet room.

--
Aaron Gould
Programmer/Systems Administrator
PARTS CANADA
Proudly underperforming in exams for years...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] encrypting pwds using blowfish encryption

2005-04-26 Thread Bosky, Dave
Does anyone have a simple code example of encrypting passwords using the
blowfish encryption method?

I've only used blowfish with Java and I'm unsure of the syntax. 

 

Thanks,

Dave



HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.


Re: [PHP] Zend Certification Exam

2005-04-26 Thread M Saleh EG
Well glad that now u put it this way!
For me all that matter is jus knowing wat's gonna be up at the exam. 

When I said someone who passed it realy wanned to know how to tackel the 
whole thing... u might fail once n pass the second time. 
I still dont get/understand the negative way of looking at my question. In 
all the cases thanks for your replies. Will never put such a question up 
here.

On 4/26/05, Aaron Gould [EMAIL PROTECTED] wrote:
 
 Chris Ramsay wrote:
  Perhaps it came across as a bit cheeky to Aaron - I kind of got the
  impression that an answer from someone who has had a go but not passed
  the exam was not good enough for you...
 
  Really, I doubt whether there is any difference in doing the exam
  whatever the outcome, seeing as what you wanted to know was about
  taking the exam in the first place.
 
 That's exactly the impression I got too Chris. Glad I'm not the only
 one to see it that way! I felt a bit inadequate there for a moment. :)
 
 Regardless, my advice still stands (if it still matters coming from a
 unsuccessful exam taker) -- don't rush the exam and take your time.
 Some of the questions are tricky in their wording.
 
 As an aside -- for those who are unsuccessful with the exam, don't
 worry, it doesn't mean your a bad programmer. I've been programming PHP
 for five years now, and there's very little I can't do with it.
 
 I just stink at exams; I get antsy when sitting for 30-60 minutes with
 just a pencil and paper in a quiet room.
 
 --
 Aaron Gould
 Programmer/Systems Administrator
 PARTS CANADA
 
 Proudly underperforming in exams for years...
 



-- 
M.Saleh.E.G
97150-4779817


Re: [PHP] Re: Cache control

2005-04-26 Thread The Disguised Jedi
 I think I need to prevent the pages from beeing cached. How this can  be 
done? I'm totally inexperinced with this stuff.
 Look at the examples and user notes in the header statement in the manual.
 http://php.net/function.header

That should help you, they have a whole section on how to stop caching.

-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm 
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However, 
I must say that the ENTIRE contents of this message are subject to other's 
criticism, corrections, and speculations.

This message is Certified Virus Free


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread The Disguised Jedi
 Contact the company who wrote the software you're trying to use for  
support.
 Already done. They haven't responded in more than a week.

-- 
The Disguised Jedi
[EMAIL PROTECTED]

Now you have my $0.02. Or .01 Pounds, .014 Euros, or $0.025 CAN. I'm 
world-wide BABY!
PHP rocks!
Knowledge is Power. Power Corrupts. Go to school, become evil

Disclaimer: Any disclaimer attached to this message may be ignored. However, 
I must say that the ENTIRE contents of this message are subject to other's 
criticism, corrections, and speculations.

This message is Certified Virus Free


[PHP] step by step learning

2005-04-26 Thread Paul Kain
Hi there

are there any sites online that show one how to learn php in a step by
step fashion?

I am really lost and would need to start at the very beginning

I already know and understand html

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



[PHP] Re: encrypting pwds using blowfish encryption

2005-04-26 Thread M. Sokolewicz
$encrypted_data = mcrypt_ecb(MCRYPT_BLOWFISH, $key, $input, MCRYPT_ENCRYPT);
http://www.php.net/mcrypt
Dave Bosky wrote:
Does anyone have a simple code example of encrypting passwords using the
blowfish encryption method?
I've only used blowfish with Java and I'm unsure of the syntax. 

 

Thanks,
Dave

HTC Disclaimer:  The information contained in this message may be privileged 
and confidential and protected from disclosure. If the reader of this message 
is not the intended recipient, or an employee or agent responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.  If you have received this communication in error, please notify us 
immediately by replying to the message and deleting it from your computer.  
Thank you.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] step by step learning

2005-04-26 Thread Petar Nedyalkov
On Tuesday 26 April 2005 16:16, Paul Kain wrote:
 Hi there

 are there any sites online that show one how to learn php in a step by
 step fashion?

 I am really lost and would need to start at the very beginning

Get a book, there are thousands LAMP (Linux, Apache, MySQL, PHP) oriented 
books on the market.


 I already know and understand html

-- 

Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)

PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436


pgpKimLdelkny.pgp
Description: PGP signature


RE: [PHP] step by step learning

2005-04-26 Thread Mike
 Hi there
 
 are there any sites online that show one how to learn php in 
 a step by step fashion?
 
 I am really lost and would need to start at the very beginning
 
 I already know and understand html
 
 --

I'm not sure of any sites, but there's plenty of books. 

I started with the SAMs Teach Yourself PHP4 book (which may be dated now,
who knows) and then switched to a more robust book after getting the
language basics (I think the SAMs series are great for getting a cursory
look at a language if you're completely fresh).

PHP certainly has a TON of books available though - poke around Amazon or a
local bookstore.

-M

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



Re: [PHP] step by step learning

2005-04-26 Thread Joseph Connolly
hey paul,
  php is not like html. HTML is a markup language and PHP is a 
scripting languange. Once you get through installing PHP, it is not like 
HTML where you start with the basic tags and learn them one by one. PHP 
has functions and you need to know which funcitons you need for the 
right job. I would recommend phpfreaks.com. That is where I started and 
probably a beginners book or a reference book. If you do not have any 
programming experience, you are best off getting a beginners guide which 
will explain concepts along with the code. PHP is easy to use, but not 
quite as easy as HTML and CSS.
   PHP also has an online manual with examples which is on par with no 
other manual that I have found (with the exceptionn of maybe MySQL). So 
looking up functions online on their site is also a good starting place.

jzf
Paul Kain wrote:
Hi there
are there any sites online that show one how to learn php in a step by
step fashion?
I am really lost and would need to start at the very beginning
I already know and understand html
 

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


Re: [PHP] encrypting pwds using blowfish encryption

2005-04-26 Thread John Nichel
Bosky, Dave wrote:
Does anyone have a simple code example of encrypting passwords using the
blowfish encryption method?
I've only used blowfish with Java and I'm unsure of the syntax. 
http://us4.php.net/mcrypt
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Error en PHP

2005-04-26 Thread Jason Barnett
Pedro Luis Cruz Riguetti wrote:
como puedo salir de sta lista q esta llenando mi correo.
http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] step by step learning

2005-04-26 Thread Jay Blanchard
[snip]
I'm not sure of any sites, but there's plenty of books. 

I started with the SAMs Teach Yourself PHP4 book (which may be dated
now,
who knows) and then switched to a more robust book after getting the
language basics (I think the SAMs series are great for getting a cursory
look at a language if you're completely fresh).

PHP certainly has a TON of books available though - poke around Amazon
or a
local bookstore.
[/snip]

There is a free book here
http://www.free-itebooks.com/php-mysql-free-itebooks/ I am unsure of the
quality, but hey...it's free!

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



[PHP] PHP safe_mode

2005-04-26 Thread kioto
Hi all i have problem with safe_mode i don't understand the logic to 
apply to avoid owners
problem with script.
Can you step by step ho to solve ?
Thanks so much in advice.

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


Re: [PHP] step by step learning

2005-04-26 Thread [EMAIL PROTECTED]
try webmonkey.com
my first tutorial was this
http://webmonkey.wired.com/webmonkey/programming/php/tutorials/tutorial4.html
little bit out of date (1999), but it's good one. maybe will be helpful 
for you.
:)

-afan
Paul Kain wrote:
Hi there
are there any sites online that show one how to learn php in a step by
step fashion?
I am really lost and would need to start at the very beginning
I already know and understand html
 

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


[PHP] Re: PHP Designer 2005

2005-04-26 Thread Jason Barnett
The Disguised Jedi wrote:
Some might consider this OT, but I need to figure this out somehow, and 
google has been no help.

I downloaded and installed PHP Designer 2005, and I really like it so far, 
but I'm having some problems. Any time it is running, my CPU Usage goes up 
to 100% and the process phpDesignerPrg.exe is the culprit. My fan kicks 
into overdrive, and my laptop gets really warm. The funny thing is, any time 
I've never used this program and no offense to you but I'm not going to 
download it if it's going to eat my CPU.  ;)

If the vendor doesn't provide the customer support that you need then it 
might be time to get another vendor.  What does PHP Designer 2005 do? 
If it's just an IDE then there are other (well supported) options out 
there including VIM, Zend, Crimson...

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


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Ryan A

On 4/26/2005 3:12:10 PM, The Disguised Jedi ([EMAIL PROTECTED])
wrote:
  Contact the company who wrote the software
 you're trying to use for 
 support.
 Already done. They haven't
 responded in more than a week.


Keep pestering theman email every day or maybe 2+ emails everyday.

-Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



[PHP] Re: step by step learning

2005-04-26 Thread Jason Barnett
Paul Kain wrote:
Hi there
are there any sites online that show one how to learn php in a step by
step fashion?
I am really lost and would need to start at the very beginning
I already know and understand html
Googling PHP Tutorial will give you more, but here's a few:
PHPFreaks.com
Zend.com
devshed.com
phppatterns.com (for OOP)
php.net (what else?  :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Joseph Connolly
Sorry, but i have had NO problems with PHP Designer 2005 I have it 
running on 3 machines...never a problem with memory usagei think it 
is the greatest thing since sliced bread.

Jason Barnett wrote:
The Disguised Jedi wrote:
Some might consider this OT, but I need to figure this out somehow, 
and google has been no help.

I downloaded and installed PHP Designer 2005, and I really like it so 
far, but I'm having some problems. Any time it is running, my CPU 
Usage goes up to 100% and the process phpDesignerPrg.exe is the 
culprit. My fan kicks into overdrive, and my laptop gets really warm. 
The funny thing is, any time 

I've never used this program and no offense to you but I'm not going 
to download it if it's going to eat my CPU.  ;)

If the vendor doesn't provide the customer support that you need then 
it might be time to get another vendor.  What does PHP Designer 2005 
do? If it's just an IDE then there are other (well supported) options 
out there including VIM, Zend, Crimson...

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


Re[2]: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Richard Davey
Hello Ryan,

Tuesday, April 26, 2005, 3:11:31 PM, you wrote:

 Already done. They haven't responded in more than a week.

RA Keep pestering theman email every day or maybe 2+ emails
RA everyday.

No - sorry but this advice isn't fair. PHP Designer 2005 is a FREE
product, even if the original poster had made a donation to the
developers that still doesn't qualify as getting priority support (or
any support at all). You get what you pay for, 'n all that jazz.

(if you weren't talking about PHP Designer 2005 and the topic had
moved onto another package then accept my apologies and ignore this)

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

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



Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Jason Barnett
Joseph Connolly wrote:
Sorry, but i have had NO problems with PHP Designer 2005 I have it 
running on 3 machines...never a problem with memory usagei think it 
is the greatest thing since sliced bread.


Then perhaps you can help out the OP?  Do you have any idea why it's 
eating up CPU?

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


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread John Nichel
Joseph Connolly wrote:
Sorry, but i have had NO problems with PHP Designer 2005 I have it 
running on 3 machines...never a problem with memory usagei think it 
is the greatest thing since sliced bread.
That doesn't exactly help the OP does it?
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] modify array data

2005-04-26 Thread Jon Aston
I am wanting to rotate the array  45 degrees.


Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Fri, April 22, 2005 8:46 am, Jon Aston said:
  Is there a way to easily rotate array data?
 
  what I want to do is
  change from
 
  bob | bill | frank
  joe | jose | sam
  sally | jim | kim
 
  to
  |  | | frank||  |
  |  |bill | | sam|  |
  |bob| | jose  |   | kim|
  |  |joe| |jim   |  |
  |  | | sally || |
 
  is there an easy way to do this?
  the data and arraysize will vary so I was looking for a way that I could
  have php do it without having to make script for different array sizes.

 http://php.net/array

 Look at array_pop and array_push and count and array_slice and
 array_splice and array_shift.

 I really don't understand your BEFORE/AFTER diagrams at all, since it
 pretty much looks random to me...  In which case you want
 http://php.net/shuffle

 -- 
 Like Music?
 http://l-i-e.com/artists.htm

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



[PHP] Any clever ideas on how to find some random records?

2005-04-26 Thread Brian Dunning
I have a MySQL database with about a million records. I'd like to use  
the SQL command order by RAND() but my ISP won't let me: whenever  
the server gets spidered, Google overloads their MySQL server because  
of all the overhead of that command. I can't just cloak the spiders  
because I need them to find the random pages.

So...what I've been doing for small sets of records is to use PHP to  
generate a bunch of random record ID's, then I construct a long SQL  
statement to find all the matching records. This works, but if I want  
to generate a big index page to list a hundred or a thousand records,  
it could get pretty clunky.

Anyone have any better suggestions?   :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: want to take credit card payments (novice)?

2005-04-26 Thread Angelo Zanetti
yes actually I started the post but I cant remember the subject...but if
you can find that thread it will be beneficial to what you want to do...
HTH

AndreaD wrote:

Been looking into and and you  both are right.

All I have to do is sort out the SSL!!


AndreaD [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
  

Does anyone have any handy links/tip/tutorials for a newbee who wants to 
take credit card payments?

Using php never set up a SSL or anything.

thanks

Ross 



  



RE: [PHP] modify array data

2005-04-26 Thread Jay Blanchard
[snip]
I am wanting to rotate the array  45 degrees.

Richard Lynch [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Fri, April 22, 2005 8:46 am, Jon Aston said:
  Is there a way to easily rotate array data?
 
  what I want to do is
  change from
 
  bob | bill | frank
  joe | jose | sam
  sally | jim | kim
 
  to
  |  | | frank||  |
  |  |bill | | sam|  |
  |bob| | jose  |   | kim|
  |  |joe| |jim   |  |
  |  | | sally || |
 
  is there an easy way to do this?
[/snip]

To rotate an array 45 degrees (to the left) would be a difficult thing.
You could write a script that could do it and it would not matter your
array size. Consider the following as a thought experiment...

How many rows in the array? Is the number even or odd?
How many columns in the array? Is the number even or odd?
Does the number of rows match the number of columns?

Take the number of rows and divide in half. 
If the number is not an integer round it up to get the mid row.
If the number is an integer, add 1 to get a mid row. 
Take data in (0,0) and place in (0, mid row#) of new array
Take data in (0,1) and place it in (1, mid row#-1) of new array
And so on

Can it be done? Yes, it can. Is it going to take a while to figure
out.yes, it will. Good luck and let us know your results!

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



Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Joseph Connolly
Well, it does help to know that pther people are using the product on 
multiple machines and are not having problems. It may be that there is 
something conflicting with the program. HE may have not yet looked into 
that? He also may have a memory problem. PHPD2005 does not seem to eat 
up resources. If he likes the program, knowing other people use it fine 
in many settings may lead him to look for other root causes

John Nichel wrote:
Joseph Connolly wrote:
Sorry, but i have had NO problems with PHP Designer 2005 I have it 
running on 3 machines...never a problem with memory usagei think 
it is the greatest thing since sliced bread.

That doesn't exactly help the OP does it?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Any clever ideas on how to find some random records?

2005-04-26 Thread Jason Barnett
Brian Dunning wrote:
I have a MySQL database with about a million records. I'd like to use  
the SQL command order by RAND() but my ISP won't let me: whenever  the 
server gets spidered, Google overloads their MySQL server because  of 
all the overhead of that command. I can't just cloak the spiders  
because I need them to find the random pages.

So...what I've been doing for small sets of records is to use PHP to  
generate a bunch of random record ID's, then I construct a long SQL  
statement to find all the matching records. This works, but if I want  
to generate a big index page to list a hundred or a thousand records,  
it could get pretty clunky.

Anyone have any better suggestions?   :)
Not sure that this would work (since I've never done it :) but perhaps 
you could create a static page specifically for the web spiders.  The 
basic plan is this:
- Create a web page with the record set (as you're already doing it)
- Save this web page to your server's cache (either roll your own or you 
can use Cache_lite or whatever)
  - Use an 8 day expiration on this file
- Then once a week you update this cache file from a cron job
- Now the key part: you alter your robots.txt file so that the spiders 
will not go to the dynamically created page, but rather they follow to 
the cached / static page.

Oh and it this actually works for you... it would be nice to get some 
feedback.

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


[PHP] problem with array diff, need to reindex array according to key

2005-04-26 Thread Angelo Zanetti
HI all,

I am using the array_diff function.
The problem im having is the array that gets returned. Well here's an
example:

this is where i assign the values to two different arrays

$a[]=0;
$a[]=1;
$a[]=2;
$a[]=3;


$b[]=1;
$b[]=4;
$b[]=0;


$diff = array_diff_assoc($a, $b);

then compare the arrays

print_r ($diff);

then print the difference between array $a and $b


Array ( [2] = 2 [3] = 3 )

now my problem is that  although the values are correct the array it
returns, they values have the same keys as the origional array.
Now my problem is that I need to get the return array to be reindexed
because I want to loop through it from element 0 till count($diff).

How do I reindex the returned array by key, to accomplish the above.

thanks in advance

-- 

Angelo Zanetti

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



Re: [PHP] Problems reading a DOMDocument out of a session

2005-04-26 Thread Jochem Maas
Cas wrote:
Tried the newest libXML stable release (2.6.19) and recompiled mod_php with it
but I still have get the error:
Warning: Couldn't fetch DOMDocument in
/var/www/localhost/htdocs/pluxbox/test.php on line 20
foo
May I ask what your system specs are? (OS, PHP and libXML version).
sure, I only ran the code locally yesterday:
WinXPHome + latest WAMP release (php5.0.4) (no idea what version of libxml2 
that contains)
you keep mentioning libxml but I was pretty sure that php5's xml stuff is
all based on libxml2.
sorry I can't be of more help right now.
Greetings, 
Cas

On 4/25/05, Cas [EMAIL PROTECTED] wrote:
On both systems i use libxml 2.6.18, both Gentoo (2005.0) machines. I
asked in the irc channels if more people could run my script to be
sure it wasn't my system and two of the two people also had the
problem (dunno what their systems are, but one runned PHP 5.0.4). I
think it's weird I get different errors on my both systems what indeed
does suggest (at least one of) my system(s) are/is borked cause both
are PHP 5.0.3 and libXML 2.6.18.
I'm now updating to libXML 2.6.19 to see if it will fix my problem,
otherwise i will indeed work around the problem. My best suggestion is
to write the DOMDocument to a random filename and pass the name
through the sessions instead of the real dom object.
Any better solutions are more then welcome!
Greetings,
Cas
On 4/25/05, Jochem Maas [EMAIL PROTECTED] wrote:
Cas wrote:
Hi,
I'm trying to read a (XML object) DOMDocument from an session but when I
try to do this from another page then where it's declared, it can't be read it.
I _can_ read the DOMDocument on the same page out of the session.
and also print_r(_SESSION); shows it still is a DOMDocument on all pages.
The attached file shows the problem. I get different results running
the script on
PHP 5.0.3 and 5.0.4 servers (all linux).
My expected result is that the DOMDocument is printed out when submit is hit,
but instead it gives different results:
Fatal error: Call to a member function saveXML() on a non-object in
/var/www/localhost/htdocs/dom_session.php on line 21
and
Warning: Couldn't fetch DOMDocument in
/var/www/localhost/htdocs/dom_session.php on line 21
I had a look at you problem... and I found it impossible to reproduce the
errors or warnings - this leads me to believe that something on your system(s)
is ed, libxml2 would a good place to start looking
BUT,
even though I managed to retrieve the DomDocument object from the session
on the second/subsequent requests the object stored in the session did not
contain the XML string that was originally loaded so that
$_SESSION['dom']-saveXML() return NULL. which is not what I would expect but 
maybe
its correct behaviour.
anyway if you get so far as to see the same behaviour as I do you may have 
something
solid to report as a bug (or at least post a question here, or possibly on 
internals)
otherwise you're looking at refactoring you code to work around the problem

I thought it was a bug in PHP and opened a bug report allready but it's closed.
http://bugs.php.net/?id=32825
Does anyone has an idea what could be wrong with it?
Thanks in advance,
Caspar Adriani


--
http://www.getfirefox.com/


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


[PHP] Re: problem with array diff, need to reindex array according to key

2005-04-26 Thread Jason Barnett
Angelo Zanetti wrote:
HI all,
I am using the array_diff function.
The problem im having is the array that gets returned. Well here's an
example:
this is where i assign the values to two different arrays
$a[]=0;
$a[]=1;
$a[]=2;
$a[]=3;
$b[]=1;
$b[]=4;
$b[]=0;
$diff = array_diff_assoc($a, $b);
/* Get the diff of the arrays, but re-index to 0 */
$diff = array_values(array_diff_assoc($a, $b));
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: step by step learning

2005-04-26 Thread Lancer Emotion 16
you can go to www.w3schools.com,too

On 4/26/05, Jason Barnett [EMAIL PROTECTED] wrote:
 Paul Kain wrote:
  Hi there
 
  are there any sites online that show one how to learn php in a step by
  step fashion?
 
  I am really lost and would need to start at the very beginning
 
  I already know and understand html
 
 Googling PHP Tutorial will give you more, but here's a few:
 
 PHPFreaks.com
 Zend.com
 devshed.com
 phppatterns.com (for OOP)
 php.net (what else?  :)
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
lancer emotion 16

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



Re: [PHP] Persistent Database Connections

2005-04-26 Thread Michael Phillipson
Thanks, Philip (and Richard also), for offering your impressions.

Per Philip's suggestion, I ran ab (Apache Benchmark) to stress test the 
page that loads my persistent connection.  Depending on the parameters I set 
for ab, I was able to increase the number of connections from my initial 9 
to anywhere between 15 and 25.  This number varied from one test to 
another - even if I left the ab parameters the same.  I probably could have 
boosted the total connections even further by raising the number of 
connections/requests initiated by ab.

So, while I still don't have a rock-solid way to predict just how many 
connections will be opened for a given number of users, at least I'm not 
stuck at 9 :-)  I guess it took using an automated approach to simulating 
server load (e.g., ab) to force Apache to open additional connections to 
the database.

Interestingly, I also observed during my testing that some connections 
opened by Apache were subsequently closed.  So, this seems to answer my 
other question re. whether persistent connections stay open forever.  I 
guess they don't.  What seems clear is that Apache decides when to terminate 
active connections, not the database.

Thanks again.

Mike

Philip Hallstrom [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 What I am baffled by is the fact that the total nunber of connections
 between the web server and my database seems to max out at 9.  Why 9? 
 Not
 that I have a problem with this number.  I just want to understand how 
 this
 limit was reached so that I might predict how the application will 
 perform
 in a production capacity.

 I can't think of a reason it would max out at 9 other than perhaps you 
 really don't have more than 9 connections open.  My understanding is that 
 Apache will open a connection per child, per database connection where a 
 connection is made up of the host, user, and database.

 How many apache processes are running when you take this measurement? 
 There's no gaurantee that each of them will have hit your web app and 
 start up there own connection.

 You might use something like ab (apache benchmark) to hit a page that 
 initiates a persistent connection to see what happens as the number of 
 apache processes grows. 

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



Re: [PHP] Re: problem with array diff, need to reindex array according to key

2005-04-26 Thread Angelo Zanetti
sorry I'm not using array_diff_assoc just array_diff...

Jason Barnett wrote:

 Angelo Zanetti wrote:

 HI all,

 I am using the array_diff function.
 The problem im having is the array that gets returned. Well here's an
 example:

 this is where i assign the values to two different arrays

 $a[]=0;
 $a[]=1;
 $a[]=2;
 $a[]=3;


 $b[]=1;
 $b[]=4;
 $b[]=0;


 $diff = array_diff_assoc($a, $b);


 /* Get the diff of the arrays, but re-index to 0 */
 $diff = array_values(array_diff_assoc($a, $b));


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



RE: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Chris W. Parker
Joseph Connolly mailto:[EMAIL PROTECTED]
on Tuesday, April 26, 2005 8:12 AM said:

 Well, it does help to know that pther people are using the product on
 multiple machines and are not having problems. It may be that there is
 something conflicting with the program. HE may have not yet looked
 into that? He also may have a memory problem. PHPD2005 does not seem
 to eat up resources. If he likes the program, knowing other people
 use it fine in many settings may lead him to look for other root
 causes 

One thing to note is that he's not having a problem with memory. It's
CPU usage he's talking about.



Chris.

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



Re: Re[2]: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Ryan A
 Hello Ryan,

Hey Rich,

  Already done. They
 haven't responded in more than a week.

 RA Keep pestering theman email every day or maybe 2+ emails
 RA everyday.

 No - sorry but this advice isn't
 fair. PHP Designer 2005 is a FREE
 product, even if the original poster had made a donation to the developers
that still
 doesn't qualify as getting priority support (or
 any support at all). You get what you pay for, 'n
 all that jazz.

 (if you weren't talking about PHP Designer 2005 and the topic had
 moved onto another package then accept my apologies and ignore this)

Actually, I think I have to apoligise, I didnt know of PHP Designer 2005 and
assumed
it was commercial software...and thought their support dept was not
responding... I
dont think I can put it better than you...You get what you pay for

Cheers,
Ryan A



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



Re: [PHP] Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource

2005-04-26 Thread Chris Shiflett
Mark Sargent wrote:
*Warning*: mysql_fetch_row(): supplied argument is not a valid MySQL
result resource in */var/www/html/phpmysqltable.php* on line *36*
Below are snippets of my code,
Line 22: $result = mysql_query(SELECT product_name,
product_model_number, product_serial_number FROM Products,$db);
Line 36: while ($myrow = mysql_fetch_row($result)) {
mysql_query() returns false on failure, and false isn't a valid MySQL 
result resource. A quick and dirty way to alert yourself to the problem 
is to change line 22 to this:

$result = mysql_query('SELECT product_name, product_model_number, 
product_serial_number FROM Products', $db) or exit(mysql_error());

Hope that helps.
Chris
--
Chris Shiflett
Brain Bulb, The PHP Consultancy
http://brainbulb.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Any clever ideas on how to find some random records?

2005-04-26 Thread David Tucker
[OP]
I have a MySQL database with about a million records. I'd like to use the
SQL command order by RAND() but my ISP won't let me: whenever the server
gets spidered, Google overloads their MySQL server because of all the
overhead of that command. I can't just cloak the spiders because I need them
to find the random pages.

So...what I've been doing for small sets of records is to use PHP to
generate a bunch of random record ID's, then I construct a long SQL
statement to find all the matching records. This works, but if I want to
generate a big index page to list a hundred or a thousand records, it could
get pretty clunky.

Anyone have any better suggestions?   :)
[/OP]

Well, not knowing what the random records are used for and not really
knowing how random they need to be ;) I might suggest just selecting a
random number and then select all the records after it until you have the
amount you need.  Probably not the best solution, but might work for you.

--Codefox

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



Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Lester Caine
The Disguised Jedi wrote:
Contact the company who wrote the software you're trying to use for  
support.
 Already done. They haven't responded in more than a week.
Just as an aside - I have had exactly the same problem with a number of 
home brew applications. Built using Builder5 and 6. It is just a matter 
that some library (in my case the COM port library) sits listening in 
place of the idle process. It is a matter of sorting out just what is 
not 'playing fair', but the overall performance of the machine is not 
affected since the 'rogue idle loop' simply gives up control when 
something more pressing comes along.
I eventually got the COM driver replaced with one from another source, 
and the problem went away, but it was not really a problem - more an 
annoyance ;)

--
Lester Caine
-
L.S.Caine Electronic Services
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread Greg Donald
On 4/26/05, Lester Caine [EMAIL PROTECTED] wrote:
 I have had exactly the same problem with a number of
 home brew applications.

What's that mean, 'home brew' ?

The application seems very professional to me, even if it is free.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



[PHP] Can this code go faster?

2005-04-26 Thread René Fournier
I've looked in the docs and don't see anything for this per se...
I need to convert a binary number of arbitrary length to a signed 
integer.
This is how I'm doing it now:

CODE

function bin2int ($bin) {
if (substr($bin,0,1) == 1) {
$val = 0 - bindec(substr($bin,1));  // NEGATIVE
} else {
$val = bindec(substr($bin,1));  // POSITIVE
}
}
echo bin2int(1101).'br /';
echo bin2int(10001101);
OUTPUT

13
-13
As you can see, if the most-significant bit is 1, then the rest of the 
value is negative. If the first bit is 0, then the rest is positive. Is 
there a better, faster (execution-wise) way of doing this? Maybe a more 
built-in function of PHP I missed? It's something that my script will 
be doing thousands of times, so I am concerned about speed.

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


Re: [PHP] Re: PHP Designer 2005

2005-04-26 Thread John Hinton
Greg Donald wrote:
On 4/26/05, Lester Caine [EMAIL PROTECTED] wrote:
 

I have had exactly the same problem with a number of
home brew applications.
   

What's that mean, 'home brew' ?
The application seems very professional to me, even if it is free.
 

Home brew... like free stuff... stuff you don't spend money for is only 
equal in value to the amount spent...

Free stuff is no good for instance... PHP tongue in cheek
John Hinton
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: problem with array diff, need to reindex array according

2005-04-26 Thread Jason Barnett
Angelo Zanetti wrote:
sorry I'm not using array_diff_assoc just array_diff...
/* Should also be able to re-index the diff of two arrays */
$diff = array_values(array_diff($a, $b));
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Timetables

2005-04-26 Thread Jared Williams
 
 On Mon, April 25, 2005 3:14 pm, Richard Collyer said:
  This is probably more of a db question but...
 
 Probably.
 
  I am writing an employee database for work. The majority of it is 
  simple enough however I am stuck on the timetabling. It has 
 to be done 
  in PHP as there are 40 plus team leaders whose computers 
 are all old 
  and have IE on them as one similarity. Also any changes I 
 make to the 
  program are repllicated over those machines instantly.
 
 Hr.
 
  We have ~1500 Employees. There are 4 shifts which overlap.
 
  My idea of doing this was to have a database with each 
 record being a 
  day for a particular employee. Recording ID, Start Time, 
 Finish Time 
  in TimeStamp.
 
 Okay.
 
  So I could then do a search for the number of employees whose shift 
  start or finished in that particular day. If there is a start and a 
  finish left add up the hours, if only a start do start - 
 midnight and 
  if only a finish do midnight - finish.
 
  Is this a sensible way to do it? Or can anyone suggest a 
 better tried 
  and tested way.
 
 Doing what, exactly?
 
 I mean, it kinda depends on what you want to *DO* other than 
 the search you give as an example...
 
 Which, by the way, I would recommend coding more like this:
 
 1. Find everybody whose shift STARTED on date (D).
 2. Subtract their finish time from start time for their hours 
 (H) on that date (D).
 
 You then don't have to muck around with midnight and shifts 
 that start/end on different days.
 
 You just pretend that their shift happend on the date of the 
 start time, and that's the day you associate with that shift, 
 no matter when it ended.
 
 This simplifies everything else you're going to do with the 
 data/queries immensely.

Just have to make sure DST doesn't cause any problems.

Jared

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



[PHP] Re: Can this code go faster?

2005-04-26 Thread Jason Barnett
René Fournier wrote:
I've looked in the docs and don't see anything for this per se...
I need to convert a binary number of arbitrary length to a signed integer.
This is how I'm doing it now:
CODE

function bin2int ($bin) {
if (substr($bin,0,1) == 1) {
$val = 0 - bindec(substr($bin,1));// NEGATIVE
} else {
$val = bindec(substr($bin,1));// POSITIVE
}
}
echo bin2int(1101).'br /';
echo bin2int(10001101);
http://php.net/manual/en/function.bindec.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Can this code go faster?

2005-04-26 Thread Jason Barnett
Well that was retarded of me... I missed that you said you needed 
negative integers... in which case I don't know of anything better than 
what you've already coded.

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


[PHP] logical advise

2005-04-26 Thread Ryan A
Hey,
am a bit stumped as to how to do this:

We are allowing users to make categories , then they upload their pics to
one of these categories.

Should I have two tables:
user_categories
pic_details

or should I use one table for both?

Seems silly , but my heads feeling loopy :-p

Thanks,
Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



[PHP] Re: phpclasses formerly Flash integration

2005-04-26 Thread Ryan A
Hi,

 several classes that provide different kinds of Flash integration:
 http://www.phpclasses.org/browse/class/102.html

  True, but going there has become a real pain in the ...you know where
  coz you get a crapload of popups,

snip
 I understand you do not like ads. I do not like them either, but the
 truth is that if the site had no ads, it would had been closed by now
 because it takes money and all my time to keep the site up and running.
/snip
Nobody really likes ads but we have all come to accept them to a certain
degree,
I just feel it is very unresponsible and greedy of site owners to empty a
cartload of
ads onto their site once it gets popularthe page becomes 10% of content
and 90%
advertisments.

snip
I am sure that most users that care about this site would not like this
site to be closed. So, think about the ads as a better solution then
having no site at all.
/snip
I like the site too and wouldnt want it closed down, but lowering the number
of ads per
page would still keep the site running quite peacefully and money in your
pocket, with the
number of ads right now I'm betting you're looking more to saving up to buy
a Ferrari asap
than getting enough dough to run the site and a bit in your pocket.

/snip
The good news for users that really care is that, if all goes well, in
the second semesters the site subscribers will have the option to access
the site with ads by adhereing to the paid subscriptions plan.
/snip
Sounds good, will the developers who contributed to the site too have to pay
5$ per month
or do they get an account for free? after all, without them the number of
classes on your site
would probably be less than the number of cousins I have :-)

snip
Subscribers that do not want to adhere to the paid subscriptions will
still be able to access the same site resources as before, only with ads
though.
/snip
Of course, those ads are never going to go less even after you run a paying
service, right?

snip
Nobody will be required to pay anything, but people that want to get rid
of the ads and benefit from other services will still have an option. I
don't know how to make it more fair than this, but I am always open to
suggestions.
/snip
Cool, heres one: when you open your paid service lower the number of ads on
the pages
for non paying subscribers, you are making money off the paying clients...so
why not?

As for expenses...last time I checked bandwidht and hosting charges are
wayyy down,
so even if you are on a dual xion 2.8ghz with a 100mbps connection and
1000gb bandwidth
per month...it shouldnt cost you more than $337 per month
BUT, since your site is so popular and related to computing and hosting,
making a deal with the
hosting companies shouldnt be a problem at all.which is good for you,
but still does not explain
the bonanza of ads per page.
Bandwidth shouldnt be all that much of a problem either as you have more
mirrors than a funny house
at a carnival.

snip
I appreciate the time and patience of people that bother to make
criticisms, especially if they show they are concerned with presenting
viable solutions for the problems that they face.
/snip
And I appreciate you taking the time to answer my criticisms, I hope my
suggestions are viable to you
although i somehow dont think you would think so.

snip
 I recommended the site to a pal of mine who is starting on
 php (with just a book and a few web links, i told him to join the list if
he has probs) and he downloaded
 that cursorware or whatever from phpclasses...then i had to help him get
the crap off his machine

I am so sorry that your friend clicked on those ads and downloaded that
software, but for the record the PHP Classes does not serve any of those
downloads. As a matter of fact those ads are intermediate pages served
by the advertising agency company.
/snip

I think thats a pretty poor excuse because you know quite well what the ad
company is going to be serving
on YOUR sites pages, those full page ads are *only* displaying the
screensavers or icons from those junk
companies that are installing spyware.
Would you say the same thing if they were serveing _hardcore porn_ pictures
from there?

The bottom line is this:
you can easily reduce the number of ads on that site without hurting
yourself in any way,
but you have decided to take the RIAA way and thump the very people who made
your product a success
just because you can and greedyness..

but please correct me if I am wrong.anybody?

Regards,
Ryan A



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



RE: [PHP] Re: phpclasses formerly Flash integration

2005-04-26 Thread Jay Blanchard
[snip]
The bottom line is this:
you can easily reduce the number of ads on that site without hurting
yourself in any way,
but you have decided to take the RIAA way and thump the very people who
made
your product a success
just because you can and greedyness..

but please correct me if I am wrong.anybody?
[/snip]


I think that your entire response was out of line Ryan. Anyone who wants
to make a profit deserves to do so. I would have to bet that the margin
is not nearly high enough to 'buy a Ferrari'. He has worked hard for any
success he has gained and for you to take him on over it is beyond
comprehension. What is the motivation for your site, coinpass.com? Is it
to make a profit?

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



RE: [PHP] Re: phpclasses formerly Flash integration

2005-04-26 Thread Ryan A
Hey Jay,

 I think that your entire response was out of line Ryan. Anyone who wants
 to make a profit deserves to do so. I would have to bet that the margin
 is not nearly high enough to 'buy a Ferrari'. He has worked hard for any
 success he has gained and for you to take him on over it is beyond
 comprehension. What is the motivation for your site, coinpass.com? Is it
 to make a profit?

I have absolutly nothing against a developer or site making money if the
person worked
hard or not is not the issue at allI mentioned this in my very first
mail. If he indeed buys
a Ferrari I would still be happy for the guy, he has a very good site and i
used to frequent it
quite often.
The part that irritates me is the amount of ads per page and those big ads
that install spyware
on a persons computerisnt it all of us who helped make the site popular
by using it as often
that we did (because we gained from it of course) and recommending it to
other people (which
we didnt gain at all...we jsut felt good about it)...and now we get screwed
with a ton of ads.
All I say is, he can still do very well while at the same time reducing the
ads so its not such a PITA
per page.

Regards
-Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



Re: [PHP] Re: phpclasses formerly Flash integration

2005-04-26 Thread Jason Barnett
I would normally prefer to not get involved at all, but in this case I 
would ask that we *just let this thread die*.

All of the people that have responded to this thread are regular / 
helpful contributors to this group.  If you take personal offense to ads 
or whatever then make this a private discussion instead of eating up the 
PHP news server's resources.

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


[PHP] handling a user pressing browser's back button

2005-04-26 Thread James
Currently I have an application with PHP scripts that passes POST 
variables to keep track of ID's of records, the processing mode and 
such.

I totally didn't design it to handle when a user hits the Back button 
in the browser...everything is tightly controlled...The user clicks 
on links/buttons to take actions.

So far the database updates are fine and almost everything behaves 
correctly when the user hits the back button.  However, I do have one 
page that shows a list of records.  The user clicks Edit and the 
list is shown again, but this time with the selected record as 
Editable fields.  If the user presses the Browser's Back button, the 
record still appears as Editable.  This is just one of those cases.

What have people done in the past to deal with states and such and 
keeping these things straight when the user hits the BACK button?

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


Re: [PHP] handling a user pressing browser's back button

2005-04-26 Thread Greg Donald
On 4/26/05, James [EMAIL PROTECTED] wrote:
 What have people done in the past to deal with states and such and
 keeping these things straight when the user hits the BACK button?

Use GET instead of POST for your form method.  And if you need both
methods just handle the incoming requests from the $_REQUEST array.


-- 
Greg Donald
Zend Certified Engineer
http://destiney.com/

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



Re: [PHP] Re: phpclasses formerly Flash integration

2005-04-26 Thread Ryan A

 I would normally prefer to not get involved at all, but in this case I
 would ask that we *just let this thread die*.



 All of the people that have responded to this thread are regular /

 helpful contributors to this group.  If you take personal offense to ads

 or whatever then make this a private discussion instead of eating up the

 PHP news server's resources.

Makes sense, no good can come of it anyway, it IS his site and if he want to
have a big
fu** you on the first page..., he can...its his site.
Like I said above, no good can come from this and so this will be my last
response to this matter,
on or offlist.
Most of you guys help me and i try to repay whenever i can (which is
unfortunatly...rarely) makeing
enemies over a silly difference of opinion on someone elses site is quite
stupid...so..the end.

Cheers,
Ryan



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.10.2 - Release Date: 4/21/2005

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



Re: [PHP] Re: Opera 8.0 cache ????

2005-04-26 Thread Thomas Goyne
On Tue, 26 Apr 2005 02:03:28 -0700, William Stokes [EMAIL PROTECTED]  
wrote:

I just tested this on a normal http site
header (Cache-Control: no-cache);
with Opera 8.0 and it seems to me that the browser respects the no-cache
header.
-Will
Load the page, then navigate away and hit the back button.  Barring bugs,  
the browser will not check the server for the page again.  When no-cache  
is sent, it will cache it less aggressivly, but Opera does still cache the  
page.  I suppose ignores is incorrect, but Opera does not fully respect  
the header.


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
http://www.smempire.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


  1   2   >