[PHP] Re: Basic Framework

2003-09-18 Thread rush
Lee Herron Qcs [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I'm not fond of the phrase framework, but for lack of any other term,
this
 is what I use ..

 Without going to a bloated framework such as fusebox or MVP, have any of
you
 put together a simple structure to allow very basic template and module
 inclusion with menuing?

Some of my users find framework around TemplateTamer very light and simple,
yet helpfull. You could consider trying it for yourself, and I will be happy
to help you out with questions.

rush
--
http://www.templatetamer.com/

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



[PHP] matching certain values

2003-09-18 Thread Louie Miranda
Im trying to match some words on the value that i have impost on php.
But i dont know why it doesnt seem to catch some certain fields.

if ($HTTP_USER_AGENT === 'MSIE ')


I know something is wrong :(


-
Louie

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



RE: [PHP] Session data getting lost

2003-09-18 Thread Rich Gray

 * Thus wrote Rich Gray ([EMAIL PROTECTED]):
  Well a functon that doesn't work under certain conditions should be
  deprecated IMO ... I haven't used it for a long time now...

 this makes absolutly no sense. So if I use a function improperly,
 it should become deprecated?

Er ...I'm not using it improperly I'm just not using it at all. Why? Because
it behaves differently in different operating conditions. Sure I could write
extra code to detect the operating conditions but what's the point? If
globals are off you can't use it as it doesn't work... The manual seems to
make it pretty obvious to me that it should be avoided and even mentions the
function is deprecated in a code example...


 session_register() is used in cases where you haver register_globals
 on; it is not useed when it is off.

So are you happy to use session_register() in your code?

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



[PHP] Help!!!

2003-09-18 Thread #meen shari-ah#

Hi,

I have some problem which php setting on windows platform,
Currently using Windows Xp Pro sp1, IIS 5 ,MySql 3.23

 The problem has occured such as

---
Notice: Use of undefined constant version - assumed 'version' in
C:\Documents and Settings\User\My Documents\meen\Web\log\install.php on
line 74

Notice: Use of undefined constant sitename - assumed 'sitename' in
C:\Documents and Settings\User\My
Documents\meen\Web\shariah_nuke\mainfile.php on line 88

Notice: Use of undefined constant nukeurl - assumed 'nukeurl' in
C:\Documents and Settings\User\My
Documents\meen\Web\shariah_nuke\mainfile.php on line 89

Notice: Use of undefined constant site_logo - assumed 'site_logo' in
C:\Documents and Settings\User\My
Documents\meen\Web\shariah_nuke\mainfile.php on line 90

Notice: Use of undefined constant slogan - assumed 'slogan' in
C:\Documents and Settings\User\My
Documents\meen\Web\shariah_nuke\mainfile.php on line 91

Notice: Use of undefined constant head - assumed 'head' in C:\Documents
and Settings\User\My Documents\meen\Web\log\login.php on line 10

Notice: Use of undefined constant login_title - assumed 'login_title' in
C:\Documents and Settings\User\My Documents\meen\Web\log\login.php on line
36
-

I guest my php scripts was not correct or inside error  then I tryed to
make the correction by editing appear line but the above notice still
remain.

I have used the scripts on internet such as from hotscripts.com
but error notice still appear including php-nuke script from phpnuke.org
I unsure  error notice has occured because scripts was not correct or php
setting was not correct.


Then please suggestion me

1. How I make its the correction ?
2. If this problem has occured from wrong setting of php configuration
(php.ini) please tell me the correction.


Thank you

meen

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



Re: [PHP] matching certain values

2003-09-18 Thread Jason Wong
On Thursday 18 September 2003 15:55, Louie Miranda wrote:
 Im trying to match some words on the value that i have impost on php.
 But i dont know why it doesnt seem to catch some certain fields.

 if ($HTTP_USER_AGENT === 'MSIE ')

 I know something is wrong :(

Did you *try* finding out what is wrong?

Simple things like 

  echo $HTTP_USER_AGENT 

to see what it really contains?

And if you're only matching part of a string you should be using things like 
strpos() or preg_match() etc.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A straw vote only shows which way the hot air blows.
-- O'Henry
*/

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



RE: [PHP] Session data getting lost

2003-09-18 Thread Rich Gray
 * Thus wrote Rich Gray ([EMAIL PROTECTED]):
  So your telling me that all variables defined in the global scope are
  automatically added to the $_SESSION array...?
  Not true I think
 

 no. read the documentation, in full.

you're right - I'm sorry I hadn't read it in full...


 The soluction to your problem was resolved from the first reply (by
 Chris Shiflett), but you rejected it because of it not making sense
 to you, which seems to be the problem.

Yes, however I was simply asking Chris to explain to me more as it didn't
make sense to me (because I hadn't read the manual fully). I mistakenly
expected the $_SESSION array to hold copies of assigned data not references
to the global namespace variable ... my expectations were based on PHP's
current default behaviour of pass by copy rather than by reference.

It seems with globals on it can become a minefield eg below where a script
happens to define and use a variable with the same name as an entry in the
$_SESSION array...

?
// script_a.php - developed by dev A
session_start();
$_SESSION['test'] = 'dev A saves some data';
header('Location : script_b.php');
?

?
// script_b.php - developed by dev B
session_start();
$test = 'I am another variable in the global scope that happens to have the
same name as a $_SESSION array entry';
print_r($_SESSION);  // dev B has just trashed dev A's saved data...
?

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



[PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Steve Jackson
I know a few have already done this on the list but I have read articles
on Zend tried other functions done everything I can, de-bugged till I'm
blue in the face and still haven't been able to solve this.

I need to protect files by leaving them outside the web root.
I call them up ok. (the link is get.php?file=EventNotifcation_01.pdf)
I can download the file fine by right clicking the link in the browser
and saving it to disk.
My problem is I can't view it inline. IE in the browser. It's a PDF file
so I should be able to.
This is the code that processes:

? 
// path to file outside of root.
define('FILEDIR', '/home/.sites/144/site281/downloads/'); 
$path = FILEDIR . $file; 
//check that this file exists and that it doesn't include 
//any special characters 
if(!is_file($path) OR !eregi('^[A-Z_0-9][A-Z_0-9.]*$', $file)) 
{ 
header(Location: error.php); 
exit(); 
} 

/* 
** //check that the user has permission to download file 
** if(user does not have permission) 
** { 
** //redirect to error page 
** header(Location: error.php); 
** exit(); 
** } 
*/ 

// get the extension of the file

$p = explode('.', $file);
$extension = $p[sizeof($p)-1];
switch ($extension)
{
// define headers depending on $extension variable.
case pdf :
header(Content-type: application/pdf);
header(Content-disposition: inline;
filename=\.basename($file));
break;
case txt :
header(Content-type: text/plain);
header(Content-disposition: inline;
filename=\.basename($file));
break;
default :
// force download dialog if no extension defined.
header(Content-type: application/octet-stream); 
header(Content-disposition: attachment; filename=\$file\);
break; 
}
header(Content-transfer-encoding: binary); 
  header(Content-length:  . filesize($path));
  header(Cache-control: must-revalidate); 
//send file contents 
  $fp=fopen($path, r); 
fpassthru($fp);
// debug - remove the headers and test output vars. 
/*echo Extension is $extension;
echo brFile is $file;
echo brp is $p;
echo brpath is $path;
echo brFP is $fp;*/
? 

Echoing the vars results in:
Extension is pdf
File is EventNotification_01.pdf
P is Array
Path is /home/.sites/144/site281/downloads/EventNotification_01.pdf
FP is Resource is #1

Has anyone got any clue what the problem is? 


Steve Jackson
Web Development and Marketing Manager
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159

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



[PHP] ANY ONE ANSWER ME PLEASE !

2003-09-18 Thread nabil
I m going to tear my hair off, I can not solve the problem.. with the stupid
IIS
i got the following error:

The specified CGI application misbehaved by not returning a complete set of
HTTP headers
in php.ini
cgi.rfc2616_headers = 1
cgi.force_redirect = 0

what should I do next ?

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



Re: [PHP] matching certain values

2003-09-18 Thread Louie Miranda
thanks for the reference. strpos will be good for my problem.


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 4:11 PM
Subject: Re: [PHP] matching certain values


 On Thursday 18 September 2003 15:55, Louie Miranda wrote:
  Im trying to match some words on the value that i have impost on php.
  But i dont know why it doesnt seem to catch some certain fields.
 
  if ($HTTP_USER_AGENT === 'MSIE ')
 
  I know something is wrong :(

 Did you *try* finding out what is wrong?

 Simple things like

   echo $HTTP_USER_AGENT

 to see what it really contains?

 And if you're only matching part of a string you should be using things
like
 strpos() or preg_match() etc.

 --
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 A straw vote only shows which way the hot air blows.
 -- O'Henry
 */

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


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



[PHP] [PHP - MSSQL]: Problem with mssql_connect

2003-09-18 Thread Ongart Wongsanupa
Please help!...
I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server
2003, but there are problem.

Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise,

Computer B: Windows XP Professional, Apache, php ( Web Server )

Computer A -- network - Computer B

I try to write php script such this..

mssql_connect('server','sa','');

but the result is:

***message: Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection. (severity 14) in ...***

Please help me find out the problem.. m(_ _)m
and sorry for my english language,

+ + + + + + + + + + + + + + + + + + +
[the thing that I did]...
1. I install client part from MSSQL Server CD Installer into Computer B
already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version
that I can find..
2. I set Authentication in MSSQL Server to be 'SQL Server and Windows'
already
+ + + + [ but the problem still happen ] + +

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



Re: [PHP] ANY ONE ANSWER ME PLEASE !

2003-09-18 Thread Larry_Li
try cgi.force_redirect = Off.






nabil [EMAIL PROTECTED]
09/18/2003 05:28 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] ANY ONE ANSWER ME PLEASE !
 


I m going to tear my hair off, I can not solve the problem.. with the 
stupid
IIS
i got the following error:

The specified CGI application misbehaved by not returning a complete set 
of
HTTP headers
in php.ini
cgi.rfc2616_headers = 1
cgi.force_redirect = 0

what should I do next ?

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




Re: [PHP] [PHP - MSSQL]: Problem with mssql_connect

2003-09-18 Thread Larry_Li
Change MS SQL SERVER Authentication's type to SQL Server and Windows 
instead of windows only.








Ongart Wongsanupa [EMAIL PROTECTED]
09/18/2003 04:25 PM
 
To: [EMAIL PROTECTED]
cc: 
Subject:[PHP] [PHP - MSSQL]: Problem with mssql_connect
 


Please help!...
I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server
2003, but there are problem.

Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise,

Computer B: Windows XP Professional, Apache, php ( Web Server )

Computer A -- network - Computer B

I try to write php script such this..

mssql_connect('server','sa','');

but the result is:

***message: Login failed for user 'sa'. Reason: Not associated with a
trusted SQL Server connection. (severity 14) in ...***

Please help me find out the problem.. m(_ _)m
and sorry for my english language,

+ + + + + + + + + + + + + + + + + + +
[the thing that I did]...
1. I install client part from MSSQL Server CD Installer into Computer B
already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version
that I can find..
2. I set Authentication in MSSQL Server to be 'SQL Server and Windows'
already
+ + + + [ but the problem still happen ] + +

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




[PHP] PHP image get.

2003-09-18 Thread Carles Xavier Munyoz Bald
Hi,
I would like to write a PHP script for request an image file to a TCP server.
The PHP script will receive as a paramter the name of the image, it will 
connect to the TCP server using a socket and request the image to it and 
store in memory.
Then the PHP script will send the in memory image to the web client that 
requested it.

Is it possible to do this with PHP ?
Any guidelines about it ?
Any example that do something like this ?

Greetings.
---
Carles Xavier Munyoz Baldó
[EMAIL PROTECTED]
http://www.unlimitedmail.net/
---

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



Re: [PHP] [PHP - MSSQL]: Problem with mssql_connect

2003-09-18 Thread Ongart Wongsanupa
I did it already,. but that's not help
thank for advice..


Larry Li [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
.
 Change MS SQL SERVER Authentication's type to SQL Server and Windows
 instead of windows only.








 Ongart Wongsanupa [EMAIL PROTECTED]
 09/18/2003 04:25 PM

 To: [EMAIL PROTECTED]
 cc:
 Subject:[PHP] [PHP - MSSQL]: Problem with mssql_connect



 Please help!...
 I have to use 'apache+php' connect to MSSQL Server 2000 in Windows Server
 2003, but there are problem.

 Computer A: Windows Server 2003 Enterprise, MSSQL Server 2000 Enterprise,

 Computer B: Windows XP Professional, Apache, php ( Web Server )

 Computer A -- network - Computer B

 I try to write php script such this..

 mssql_connect('server','sa','');

 but the result is:

 ***message: Login failed for user 'sa'. Reason: Not associated with a
 trusted SQL Server connection. (severity 14) in ...***

 Please help me find out the problem.. m(_ _)m
 and sorry for my english language,

 + + + + + + + + + + + + + + + + + + +
 [the thing that I did]...
 1. I install client part from MSSQL Server CD Installer into Computer B
 already and I'm sure for ntwdblib.dll or php_mssql.dll is newest version
 that I can find..
 2. I set Authentication in MSSQL Server to be 'SQL Server and Windows'
 already
 + + + + [ but the problem still happen ] + +

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




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



Re: [PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Jason Wong
On Thursday 18 September 2003 16:24, Steve Jackson wrote:
 I know a few have already done this on the list but I have read articles
 on Zend tried other functions done everything I can, de-bugged till I'm
 blue in the face and still haven't been able to solve this.

 I need to protect files by leaving them outside the web root.
 I call them up ok. (the link is get.php?file=EventNotifcation_01.pdf)
 I can download the file fine by right clicking the link in the browser
 and saving it to disk.
 My problem is I can't view it inline. IE in the browser. It's a PDF file
 so I should be able to.

[snip]

Have you tried the obvious, such as using browsers other than IE? Or a 
different version of IE? 

Fact is that there are versions of IE that have broken mime handling.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
modem, adj.:
Up-to-date, new-fangled, as in Thoroughly Modem Millie.  An
unfortunate byproduct of kerning.

[That's sic!]
*/

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



Re: [PHP] webhost --0T--

2003-09-18 Thread Ryan A
Hey David,

/#
% Let me explain, when the person registers they wont just recive permission
% to vote but also other things as a control panel will be created for them
to

Good enough.  Lots of bells and whistles; that's great.
#/

Yep, without the bells and whistles no challenge for me to program and it
will be like any other site...
and since i still dont really consider myself a good programmer in php,
still learning, this gives me a chance to work more and learn as i go along.




/#
% save their favourite packages from the differient hosts and even compare
the
Excellent!
/#
Thats only the half of it, will send you the link once i get a few hosts to
list their packages coz now there arnt enough test packages for you to
actually see most of the functionality. I made this after thinking of the
trouble i went thru to find some decient hosts, I think i went thru around 9
hosts in the last 2 years before kind of settling down.

I guess hosts are like women, you think you finally found the one but.
+ they are all GREAT when you start with them but
:-D

(Ladies am just kidding, dont curse me)

/#
% Nope, its not that you have limited votes, you can vote for each and every
Good.
% host on the site...but just one vote per host, dont you think thats fair?
Nope.  What if you have two users on a host?
#/

Of course, nearly every host has more than 2 users :-)) at least if they
want to stay in business but i kind of figured that the users would have
seperate client accounts with me (so seperate control panels) to
vote,add/compare packages etc, if i got the question wrong tell me.

/#
% Let users modify them? what do you mean? if users can modify a vote whats
% the use of a vote?
It depends; it might be a cast-it-once-in-stone kind of vote, or it might
be a running report that stays up to date.  Suppose I rank my current
provider very highly but next month they lay off half of their staff and
service goes down the drain; I should be able to change my vote to
reflect their new status if this is something that people will want to
see as worthwhile for more than just a short survey period.
#/

Hmmm, a new bell or whistle i didnt think of, but i think it could be easily
implempted, instead of giving a message you ahve already voted for this
host, only one vote allowed etc I can say  you have already voted for this
host on datetime, would you like to see your old vote or change it?
Good idea, i think i'll run with it.


/#Well, if you're going to keep my vote around so that I can change it you
now have to have an entire database record for me.  If I'm just throwing
my vote into the pile then you need only keep a running total.  The
latter is certainly easier.
#/
Yep, but the former is more intresting :-).
Thats pretty much the whole idea actually, I know i am not the only one in
the world with brilliant ideas (was quite a shock to me when i found out
-D  ) and thats why i wrote to the list...if anybody has an idea of what
they would like to see/havedrop me a few lines.

Thanks for the idea/suggestion.

Before i forget, dont get confused with my new /# and #/ to your messages, I
just thought i'll change them everytime to give curt a hard time :-)) lets
see him try to keep up with the variations i come up with.

Cheers,
-Ryan


We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com

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



Re: [PHP] Japanese on a page

2003-09-18 Thread - Edwin -

Chris W. Parker [EMAIL PROTECTED] wrote:

 - Edwin - mailto:[EMAIL PROTECTED]
 on Tuesday, September 16, 2003 5:53 PM said:
 
 This japanese page thing was a project I started at home so now that I'm
 at work I'll do my best to respond using my memory (good luck, me!).
 
  Did you check if the Japanese characters are readable inside
  html-kit? In other words, Japanese characters should appear as it is
  inside your editor...
 
 No the japanese characters did not appear correctly.  

Ok, there is/was an issue with html-kit not showing Japanese characters properly but 
they are *still* Japanese. Anyway,...

  7. Save the page
  
  Did you save it as euc-jp or shift_jis?
 
 No. I don't think there is that option in html-kit, but I think that
 this may be the key.

Maybe. But since I haven't used html-kit that much, and I don't really know how it 
saves the files, most probably it saves it shift_jis (sjis) so it worked when you used 
header().

...[snip]...

  A friend later figured out that the header() declaration at the top
  of the page was what made the difference.
  
  Did this one work for you?
 
 Yes, adding the header() made the page display correctly from my server.

Then, most likely, the correct charset wasn't properly defined inside the head tags.

...[snip]...

  Btw, iirc, phpedit on Win2k worked for me. Just make sure that you
  have Japanese fonts (and an IME) installed and you chose the correct
  (default) font for phpedit. This works even if you have on English
  version of Win2k (or XP).   
 
 Oh cool. I have that already so I'll try it out.

Great! but choosing the default font for phpedit is bit tricky. You won't see the 
names of the Japanese fonts inside the drop-down menu as they appear as blank lines or 
with an @ sign in front. Just do a trial-and-error and soon you'll find one that 
works.

And oh btw, there's Quanta for Windows available at thekompany.com. You have to pay 
for it though... But not much ;)

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: Re[2]: [PHP] MySQL timestamp to desired date function

2003-09-18 Thread - Edwin -
Hi,

Tom Rogers [EMAIL PROTECTED] wrote:

[snip]
 what database are you using?
[/snip]

See Subject line? Or, is this a trick question? :)

(Sorry, couldn't resist :) )

- E -
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



RE: [PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Steve Jackson
 Have you tried the obvious, such as using browsers other than 
 IE? Or a 
 different version of IE? 
 

So far I've tried IE 6.0.2, IE 5.0, Netscape 7 and they don't work. 

 Fact is that there are versions of IE that have broken mime handling.

This I didn't know, so I just tried it on Konqueror running on Linux and
it works. However where do I go from here? One thing that Konqueror
brought up is that get.php is the filename that it gives the file when
trying to save it. Could that be the problem? Get.php is the name of the
script that passes the file but not the name of the file itself.

Finally a step in the right direction but how do I go about solving
this?
Kind regards
Steve. 

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



[PHP] Re: Help!!!

2003-09-18 Thread DvDmanDT
My guess would be arrays, without quoted indexes... like $config[nukeurl]
instead of $config['nukeurl']... In php.ini, you would just turn off notices
to get rid of it (all hosts I know of has disabled notices so it works
without problems on hosts)... But the better idea is to just add quotes...
Although, it's not really errors, it's more just tips or something...
-- 
// DvDmanDT
MSN: [EMAIL PROTECTED]
Mail: [EMAIL PROTECTED]
#Meen Shari-Ah# [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]

 Hi,

 I have some problem which php setting on windows platform,
 Currently using Windows Xp Pro sp1, IIS 5 ,MySql 3.23

  The problem has occured such as

 ---
 Notice: Use of undefined constant version - assumed 'version' in
 C:\Documents and Settings\User\My Documents\meen\Web\log\install.php on
 line 74

 Notice: Use of undefined constant sitename - assumed 'sitename' in
 C:\Documents and Settings\User\My
 Documents\meen\Web\shariah_nuke\mainfile.php on line 88

 Notice: Use of undefined constant nukeurl - assumed 'nukeurl' in
 C:\Documents and Settings\User\My
 Documents\meen\Web\shariah_nuke\mainfile.php on line 89

 Notice: Use of undefined constant site_logo - assumed 'site_logo' in
 C:\Documents and Settings\User\My
 Documents\meen\Web\shariah_nuke\mainfile.php on line 90

 Notice: Use of undefined constant slogan - assumed 'slogan' in
 C:\Documents and Settings\User\My
 Documents\meen\Web\shariah_nuke\mainfile.php on line 91

 Notice: Use of undefined constant head - assumed 'head' in C:\Documents
 and Settings\User\My Documents\meen\Web\log\login.php on line 10

 Notice: Use of undefined constant login_title - assumed 'login_title' in
 C:\Documents and Settings\User\My Documents\meen\Web\log\login.php on line
 36
 -

 I guest my php scripts was not correct or inside error  then I tryed to
 make the correction by editing appear line but the above notice still
 remain.

 I have used the scripts on internet such as from hotscripts.com
 but error notice still appear including php-nuke script from phpnuke.org
 I unsure  error notice has occured because scripts was not correct or php
 setting was not correct.


 Then please suggestion me

 1. How I make its the correction ?
 2. If this problem has occured from wrong setting of php configuration
 (php.ini) please tell me the correction.


 Thank you

 meen

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



[PHP] SSO (Single Sign On) for multiple PHP apps

2003-09-18 Thread BENARD Jean-philippe
We have multiple PHP apps running on different servers. We have
an LDAP authentication based (today) on the apache .htpasswd file which
obliged users to log on. This solution is not very clean. Because we
have different PHP servers (physical and logical), users must
authenticate many times in order to log on some applications of the same
group.
Is there a solution for this situation? We are running PHP 4.3.1/4.3.3
over apache 1.3.27/1.3.28 on Sun systems (SunOS 5.6).
More over, there are some apps writed in JAVA (WebSphere  IBM HTTP SRV)
technologies which are in the same workgroup for political reason (We
can't imagine making them in PHP ...). If the first solution exist
(making a SSO for all PHP apps), is a second solution for PHP/JAVA SSO
could be imagined?

Many thanks in advance.

(o_   BENARD Jean-Philippe - Consultant STERIA Infogérance
(o_   (o_   //\ RENAULT DTSI/ODPS/[EMAIL PROTECTED] * ALO * API : MLB 02C 1 14
(/)_  (\)_  V_/_   2 Av du vieil étang * 78181 MONTIGNY-LE-BRETONNEUX
   Tél : 01-30-03-47-83 * Fax : 01-30-03-42-10

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



Re: [PHP] Session data getting lost

2003-09-18 Thread - Edwin -
Hi,

Rich Gray [EMAIL PROTECTED] wrote:

 Well a functon that doesn't work under certain conditions should be
 deprecated IMO

Interesting comment... However, there are TONS of functions that wouldn't work unless 
the module/extension were enabled during compilation/runtime.

A couple of examples:

  http://www.php.net/xslt
  http://www.php.net/mbstring

So, just because *those* functions don't work on certain conditions doesn't mean they 
should be deprecated. ;) Or, maybe I just missed your point :)

- E -

...[snip]...
__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



[PHP] Possible Bug With $_FILES Global

2003-09-18 Thread Nathan Taylor
Hey Guys,

I discovered a possible bug with the $_FILES super global and thought I'd pass it 
along to you guys to double check the accuracy of this being a bug before I reported 
it to the PHP team.   So here goes..

The default format for $_FILES is $_FILES['variable']['element'] which of course works 
fine, following this format I would assume that the format for a variable inside an 
array would be $_FILES['array']['variable']['element'] but on the contrary it is in 
fact $_FILES['array']['element']['variable'].  Somehow this doesn't seem quite right 
to me.  Granted, it still works just as well but it sort of breaks the traditional 
naming structure for an array and really jumbles the logical flow of things.  Do you 
think this is worth reporting?

Regards,
Nathan Taylor

[PHP] URL variables parsing error?

2003-09-18 Thread hiaer
Hi all,

I use RedHat9.0 with Apache 2.0.40  PHP 4.2.2
and I have problem with parsing URL variables...

I use this URL: http://my.domain.mine/index.php?var1=value1var2=value2

and this is my index.php

?php
  echo var1: $var1 ;
  echo var2: $var2 ;

  phpinfo();
?

Output of this page is without expansion of my variables var1, var2 at section echo
but phpinfo expand this:

_GET[var1]value1 
_GET[var2]value2

Any idea?

THANKS.

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



Re: [PHP] URL variables parsing error?

2003-09-18 Thread - Edwin -
Hi,

[EMAIL PROTECTED] wrote:

 Hi all,
 
 I use RedHat9.0 with Apache 2.0.40  PHP 4.2.2
 and I have problem with parsing URL variables...
 
 I use this URL: http://my.domain.mine/index.php?var1=value1var2=value2
 
 and this is my index.php
 
 ?php
   echo var1: $var1 ;
   echo var2: $var2 ;
 
   phpinfo();
 ?
 
 Output of this page is without expansion of my variables var1, var2 at section echo
 but phpinfo expand this:
 
 _GET[var1]value1 
 _GET[var2]value2
 
 Any idea?

Try this:

?php
  echo var1: {$_GET['var1']};
  echo var2: {$_GET['var2']};
  phpinfo();
?

or this:

?php
  echo 'var1: ' . $_GET['var1'];
  echo 'var2: ' . $_GET['var2'];
  phpinfo();
?

If it works, check for register_globals in the archives:

  http://marc.theaimsgroup.com/?l=php-general

HTH,

- E -

__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/

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



Re: [PHP] SSO (Single Sign On) for multiple PHP apps

2003-09-18 Thread Duncan Hill
On Thursday 18 Sep 2003 10:29, BENARD Jean-philippe wrote:
   We have multiple PHP apps running on different servers. We have
 an LDAP authentication based (today) on the apache .htpasswd file which
 obliged users to log on. This solution is not very clean. Because we

 More over, there are some apps writed in JAVA (WebSphere  IBM HTTP SRV)
 technologies which are in the same workgroup for political reason (We
 can't imagine making them in PHP ...). If the first solution exist

You could change to PHP sessions, and use an SQL backend to store the 
session data.  Writing a Java handler to read the PHP session data would 
not be too hard.

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



RE: [PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Steve Jackson
The simple things are the stupidest. One thing I didn't do well enough.
Testing on different machines. I ran numerous tests from my own PC and
numerous tests from a development server using different software. Only
when Jason mentioned Mimetypes did I think about doing more tests on
adifferent machine.
My problem wasn't with the PHP, the server or anything else but with my
fecking version of Adobe Acrobat. After trying to open a different PDF
file I realised my problem. So after a re-boot of my PC everything works
fine.
Thanks for the patience and hope this lesson in my stupidity can help
someone else!


Steve Jackson
Web Development and Marketing Manager
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159





 -Original Message-
 From: Steve Jackson [mailto:[EMAIL PROTECTED] 
 Sent: 18. syyskuuta 2003 12:19
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] This is my fourth day of hitting this 
 brick wall! Anyone...Purlese help!
 
 
  Have you tried the obvious, such as using browsers other than
  IE? Or a 
  different version of IE? 
  
 
 So far I've tried IE 6.0.2, IE 5.0, Netscape 7 and they don't work. 
 
  Fact is that there are versions of IE that have broken mime 
 handling.
 
 This I didn't know, so I just tried it on Konqueror running 
 on Linux and
 it works. However where do I go from here? One thing that Konqueror
 brought up is that get.php is the filename that it gives the file when
 trying to save it. Could that be the problem? Get.php is the 
 name of the
 script that passes the file but not the name of the file itself.
 
 Finally a step in the right direction but how do I go about solving
 this?
 Kind regards
 Steve. 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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



Re: [PHP] SSO (Single Sign On) for multiple PHP apps

2003-09-18 Thread hartmann
Hi Jean-Philippe, 

BENARD  Jean-philippe [EMAIL PROTECTED] wrote ..
 Is there a solution for this situation? We are running PHP 4.3.1/4.3.3
 over apache 1.3.27/1.3.28 on Sun systems (SunOS 5.6).
 More over, there are some apps writed in JAVA (WebSphere  IBM HTTP SRV)
 technologies which are in the same workgroup for political reason (We
 can't imagine making them in PHP ...). If the first solution exist
 (making a SSO for all PHP apps), is a second solution for PHP/JAVA SSO
 could be imagined?

We implemented something like this for Siemens based on SOAP (after wez fixed 
ext/soap). 
The first part, a single database for all user data is simple : 
a) all authentification data is hold in the session
b) authentification is done by just one server, the others are served via soap. 

The second part is a bit more complicated:
c) if you are already logged in on one server, you can switch to another server by 
clicking a special link who establishes a new session on the remote server and gives 
back a token. then the user gets redirected to a special url on the remote server - 
using the one-time-token - and he gets connected to the new session
d) if c) doesn't work: after b) the server does a redirect to the authentication 
server, the user gets a cookie there and redirected back. 
When he switches to another server, the redirect to the authentication server is done 
again, and, if a cookie exists, a session on the other server is established. 

Afaik Microsoft uses the d) workflow for passport.

Feel free to contact me by PM if you got any questions. 

best regards, 
johann
-- 
Johann-Peter Hartmannhttp://thinkphp.de

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

[PHP] PHP and SAP

2003-09-18 Thread php4
Hi,

I had a request if it is possible to access SAP data from PHP.

If it is, where can I get more info?

Thanks

Nico

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



[PHP] Re: template problems

2003-09-18 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 hi,
 
 I've got this problem when using templates on my localhost. The code works
 on my web server which i rent so the code is fine. I have ran php code for
 mysql functions and other for testing purposes.
 
 Below is the code i used in index.php.
 
 INDEX.PHP
 
 ?php
 
 switch ($page)
 
 { 
 default : include error.txt; 
 break; 
 case screenshots : include news.txt; 
 break; 
 
 } 
 
 
 
 
 ? 
 
 
 When i type say www.myrentedwebsite.com/index.php?page=main it will display the page 
 main.txt 
 
 When i try this on my localhost it displays the error.txt file instead. It doesn't 
 recognize the index.php??PAGE=MAIN i think !. 
 
 Could anybody help me with this problem because i wanted the localhost for testing 
 purposes. 

Is it possible that localhost has register_globals set off? In which case 
you need 

switch($_GET{'page}) {

-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



[PHP] Re: MySQL timestamp to desired date function

2003-09-18 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] 
says...
 Hi all,
 
 I have a a timestamp in a DB (14 digits) that I want to display like I
 want in my pages. I tried to use strtotime, mktime and date functions
 with no success... it always return the current timestamp instead of the
 one I have stored. This is what I've done so far:
 
   for ($x = 0; $x  $num_rows; $x++)
   {
   $row = mysql_fetch_array($result);
   $date1 = strtotime($row[lugar_lastinsert]);
   $date2 = date(d \de m \de Y \a \l\a\s H:i:s,
 mktime($date1));
   echo tr;
   echo td;
   echo $row[lugar_name]. - .$row[lugar_specific];
   echo /td;
   echo td align=\center\;
   echo $date2;
   echo /td;
   echo /tr;
   }
 
 How can I do this and make it work?
 
 Thanks in advanced,
 
 Cesar Aracena
 www.icaam.com.ar
 
Have you considered using MySQL's DATE_FORMAT function?

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



[PHP] Re: program_root in phpdoc

2003-09-18 Thread David Robley
In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 Hi there any phpdoc heads out there know how to set the program_root to
 show the exact path to the files, there is no setting for this in the
 config files, let me know cheers.
 
Not sure if this is what you mean - from php.ini:

; The root of the PHP pages, used only if nonempty.
doc_root =

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



[PHP] Re: PHP and SAP

2003-09-18 Thread David Robley
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says...
 Hi,
 
 I had a request if it is possible to access SAP data from PHP.
 
 If it is, where can I get more info?
 
 Thanks
 
 Nico
 
This google search _may_ be what you are looking for - if SAP is a 
database

http://www.google.com/search?q=sap+site:www.php.netl=en

Cheers
-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



[PHP] ODBC for MS Access

2003-09-18 Thread Muhammad Fikri
Dear All,

I use Linux box + PHP installed on it and want to
connect/access MS Access database installed on Windows
box. Below are my Questions:

1 What software/driver do I need in Linux box as well
as in Windows box? Where to find such a
software/driver?

2. Do I need compile PHP to be able to connect to MS
Access.

3. Is there manual available for PHP--Access 
function?

Hope to see your reply very soon.

Thanks,
M. Fikri



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[PHP] slightly OT e-commerce payments

2003-09-18 Thread Angelo Zanetti

Hi everyone,

Sorry for this slightly off topic post, however I think it will be an
interesting topic if people can shed more information about this subject.

Everyone is familiar that when one wants to make and e-commerce payment that
the webpage is usually secured (by SSL connection). however if one wanted to
offer something similiar to this type of e-commerce however on a cellphone,
how would one secure the transaction, like SSL does on webpages? Also are
there any companies that you know of that offer this?

thanx in advance.
Angelo

Angelo Zanetti

Cell No: +27 72 441 3355
Tel No: +27 21 464 1363
Fax No: +27 21 464 1371
e-Mail: [EMAIL PROTECTED]

Z Logic
e-Business Centre
Cape Technikon
P.O. BOX 652
Cape Town
South Africa
8000

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



RE: [PHP] URL variables parsing error?

2003-09-18 Thread Jay Blanchard
[snip]
and this is my index.php

?php
  echo var1: $var1 ;
  echo var2: $var2 ;

  phpinfo();
?

Output of this page is without expansion of my variables var1, var2 at
section echo
but phpinfo expand this:

_GET[var1]value1 
_GET[var2]value2
[/snip]

This is not an error. Register globals is off (which is a Good Thing
TM). var1 and var2 are in the $_GET array because they are passed via
a GET method of posting (using the URL). A perusing of the manual at
http://us4.php.net/variables will tell you all you need to know and
more. Please follow all of the links on the page so that the details
will become apparent.

Have a pleasant and productive day.

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



Re: [PHP] PHP and SAP

2003-09-18 Thread hartmann
Hi Nico, 

[EMAIL PROTECTED] wrote ..
 I had a request if it is possible to access SAP data from PHP.
Yep, you can request data and function calls in both directions via sap-rfc. 
 
 If it is, where can I get more info?

http://saprfc.sourceforge.net/

We use this extension at a customers site for a phprojekt-based crm solution and are 
happy with it regarding stability and ease of use. 

best regards, 

johann

-- 
Johann-Peter Hartmann   [EMAIL PROTECTED]

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

RE: [PHP] ODBC for MS Access

2003-09-18 Thread Jay Blanchard
[snip]
I use Linux box + PHP installed on it and want to
connect/access MS Access database installed on Windows
box. Below are my Questions:

1 What software/driver do I need in Linux box as well
as in Windows box? Where to find such a
software/driver?

2. Do I need compile PHP to be able to connect to MS
Access.

3. Is there manual available for PHP--Access 
function?
[/snip]

Start here http://us4.php.net/odbc and search for MyODBC on Google.

Have a pleasant and educational day.

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



[PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Jay Blanchard
I just had to get it out of my system this morning. No offense intended
to anyone, and not directly aimed at anyone. Just had to get it off of
my chest because there have been so many times that it could have been
used since we had that conversation a few weeks ago.

*grumble* more coffee needed, may need to start smoking again...

*weak smile* j/k of course...lighten up and as always

BTW, thanks to the guy who is periodically posting the newbie guide. It
may be paying dividends, but then again I did see a post with a title IN
ALL CAPS WITH NO DETAILS! and another that just said Help

Have a pleasant, productive, and educational day.

*snicker* feeling better already

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



Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Raditha Dissanayake
Jay,

Thank you very much for bringing this up. I think if people cannot be 
curteous and cannot obey maliling list rules and etiquette they don't 
deserve replies.



Jay Blanchard wrote:

I just had to get it out of my system this morning. No offense intended
to anyone, and not directly aimed at anyone. Just had to get it off of
my chest because there have been so many times that it could have been
used since we had that conversation a few weeks ago.
*grumble* more coffee needed, may need to start smoking again...

*weak smile* j/k of course...lighten up and as always

BTW, thanks to the guy who is periodically posting the newbie guide. It
may be paying dividends, but then again I did see a post with a title IN
ALL CAPS WITH NO DETAILS! and another that just said Help
Have a pleasant, productive, and educational day.

*snicker* feeling better already

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Possible Bug With $_FILES Global

2003-09-18 Thread Raditha Dissanayake
HI,

Te first time i switched from $userfile_** to $_FILES i spent hours 
pulling my hair out trying to figure out why my arrays were  not getting 
populated. I too felt like reporting it but decided against is because 
someone is sure to say 'this is a feature not a bug' :-))



Nathan Taylor wrote:

Hey Guys,

I discovered a possible bug with the $_FILES super global and thought I'd pass it along to you guys to double check the accuracy of this being a bug before I reported it to the PHP team.   So here goes..

The default format for $_FILES is $_FILES['variable']['element'] which of course works fine, following this format I would assume that the format for a variable inside an array would be $_FILES['array']['variable']['element'] but on the contrary it is in fact $_FILES['array']['element']['variable'].  Somehow this doesn't seem quite right to me.  Granted, it still works just as well but it sort of breaks the traditional naming structure for an array and really jumbles the logical flow of things.  Do you think this is worth reporting?

Regards,
Nathan Taylor
 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Verisign DNS Abuse Petition

2003-09-18 Thread Rodney Green
PHP Users - While this is not really on topic it is relevant for all PHP 
users. Sign the petition at the link below which will be presented to 
ICANN regarding the Verisign abuse of DNS.

http://www.PetitionOnline.com/icanndns/

Rod

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


Re: [PHP] CURL - SSL

2003-09-18 Thread Marek Kilimajer
You need php compiled with openssl support.
http://www.php.net/openssl
Rodrigo Nakahodo wrote:
Anyone knows how to get a simple(HTML) https response using CURL session.

Thanks a million!!

Rodrigo Nakahodo
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.518 / Virus Database: 316 - Release Date: 9/11/2003
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread esctoday.com | Wouter van Vliet
Quite Right !

So, since I'm not quite a newbie I did not read all the guides .. RTFM (Read
The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but
what does STFA stand for ;)..

Wouter

-Original Message-
From: Raditha Dissanayake [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 18, 2003 3:29 PM
To: Jay Blanchard; [EMAIL PROTECTED]
Subject: Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

Jay,

Thank you very much for bringing this up. I think if people cannot be 
curteous and cannot obey maliling list rules and etiquette they don't 
deserve replies.



Jay Blanchard wrote:

I just had to get it out of my system this morning. No offense intended
to anyone, and not directly aimed at anyone. Just had to get it off of
my chest because there have been so many times that it could have been
used since we had that conversation a few weeks ago.

*grumble* more coffee needed, may need to start smoking again...

*weak smile* j/k of course...lighten up and as always

BTW, thanks to the guy who is periodically posting the newbie guide. It
may be paying dividends, but then again I did see a post with a title IN
ALL CAPS WITH NO DETAILS! and another that just said Help

Have a pleasant, productive, and educational day.

*snicker* feeling better already

  



-- 
http://www.radinks.com/upload
Drag and Drop File Uploader.

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

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



[PHP] How can one find out what Headers have been sent by a script.

2003-09-18 Thread William Bailey
Hello all,

Does anybody know of a way that i can check to see if a header has already 
been sent by a script?

I am currently finishing a class that has a few functions registered with 
register_shutdown_function(). They take care of database updates and general 
clean up for that object and i want to be able to perform a different action 
depending on if, for example, a 'Location:' header has been sent.

Is there any way i can get a list of headers already sent from a script?

I know i could write a custom myHeader() type function that stores the sent 
headers in a variable and then read it back but i want something that i can 
add to my class and not have to make any changes to other scripts. The class 
im currently working on is just supposed to be dropped in and is then 
expected to run without the need to update anything else.

Thanks in advance.

-- 
Regards,
William Bailey.
Pro-Net Internet Services Ltd.
http://www.pro-net.co.uk/

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



Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread CPT John W. Holmes
From: esctoday.com | Wouter van Vliet [EMAIL PROTECTED]

 So, since I'm not quite a newbie I did not read all the guides .. RTFM
(Read
 The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but
 what does STFA stand for ;)..

Hi newbie. Why don't you search the archives to find out?

---John Holmes...

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



Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Curt Zirzow
* Thus wrote esctoday.com | Wouter van Vliet ([EMAIL PROTECTED]):
 Quite Right !
 
 So, since I'm not quite a newbie I did not read all the guides .. RTFM (Read
 The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but
 what does STFA stand for ;)..

Archives



Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



Re: [PHP] How can one find out what Headers have been sent by a script.

2003-09-18 Thread William Bailey
I have found something that seems to work:

?php
header('Location: woof.html');
$h = apache_response_headers();
if(isset($h['Location'])){
header('Location: moo.html');
}
die();
?

Typical i get stuck on something for ages and then as soon as i post to the 
list i figure something out :) oh well hope it helps somebody else.

:)

On Thursday 18 September 2003 15:10, William Bailey wrote:
 Hello all,

   Does anybody know of a way that i can check to see if a header has already
 been sent by a script?

   I am currently finishing a class that has a few functions registered with
 register_shutdown_function(). They take care of database updates and
 general clean up for that object and i want to be able to perform a
 different action depending on if, for example, a 'Location:' header has
 been sent.

   Is there any way i can get a list of headers already sent from a script?

   I know i could write a custom myHeader() type function that stores the
 sent headers in a variable and then read it back but i want something that
 i can add to my class and not have to make any changes to other scripts.
 The class im currently working on is just supposed to be dropped in and is
 then expected to run without the need to update anything else.

   Thanks in advance.

 --
 Regards,
   William Bailey.
   Pro-Net Internet Services Ltd.
   http://www.pro-net.co.uk/

-- 
Regards,
William Bailey.
Pro-Net Internet Services Ltd.
http://www.pro-net.co.uk/

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



[PHP] Another code check

2003-09-18 Thread James Johnson
Hello,

Can anyone see what's wrong with the following code? It produces the
following in the browser:

Warning: Cannot add header information - headers already sent by (output
started at /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php:11) in
/home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php on line 20

Which tells me that something is being written before the 
header(Location:  . AdPayment_MCSuccess.php);

However, I can't figure out what it may be.

*** code starts at line 1 of page ***
?php require_once('Connections/CCB.php'); ?
?php session_start();
$colname_GetMC = 1;
if (isset($_SESSION['svUserID'])) {
  $colname_GetMC = (get_magic_quotes_gpc()) ? $_SESSION['svUserID'] :
addslashes($_SESSION['svUserID']);
}
mysql_select_db($database_CCB, $CCB);
$query_GetMC = sprintf(SELECT subid, credit_total FROM member_credits WHERE
subid = %s, $colname_GetMC);
$GetMC = mysql_query($query_GetMC, $CCB) or die(mysql_error());
$row_GetMC = mysql_fetch_assoc($GetMC);
$totalRows_GetMC = mysql_num_rows($GetMC);
?

?php
if(isset($_POST['Submit'])){
if($_POST['Submit'] == Place my Ad){
include_once('inc_placeAd.php');
// remove 1 credit from member_credits table for each campus
selected
$crdt = $row_GetMC['credit_total'] -
$_SESSION['sv_CampusAdCount'];
$id = $row_GetMC['subid'];
$q = UPDATE member_credits SET credit_total = $crdt WHERE
subid = $id;
$rUpdate = mysql_query($q, $CCB) or die(mysql_error());
header(Location:  . Success.php);
exit;   
}
}
?

Thanks,
James

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



Re: [PHP] Another code check

2003-09-18 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED]

 Can anyone see what's wrong with the following code? It produces the
 following in the browser:

 Warning: Cannot add header information - headers already sent by (output
 started at /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php:11) in
 /home/.paco/campuscb/campuscorkboard.com/AdPay_MC.php on line 20

 Which tells me that something is being written before the
 header(Location:  . AdPayment_MCSuccess.php);

True. It even tells you it's being written (output) on line 11.

 However, I can't figure out what it may be.

 *** code starts at line 1 of page ***
 ?php require_once('Connections/CCB.php'); ?
 ?php session_start();

You're writing a line space between those two PHP blocks.

 $colname_GetMC = 1;
 if (isset($_SESSION['svUserID'])) {
   $colname_GetMC = (get_magic_quotes_gpc()) ? $_SESSION['svUserID'] :
 addslashes($_SESSION['svUserID']);
 }
 mysql_select_db($database_CCB, $CCB);
 $query_GetMC = sprintf(SELECT subid, credit_total FROM member_credits
WHERE
 subid = %s, $colname_GetMC);
 $GetMC = mysql_query($query_GetMC, $CCB) or die(mysql_error());
 $row_GetMC = mysql_fetch_assoc($GetMC);
 $totalRows_GetMC = mysql_num_rows($GetMC);
 ?

 ?php

You're writing a couple line breaks here...

 if(isset($_POST['Submit'])){
 if($_POST['Submit'] == Place my Ad){
 include_once('inc_placeAd.php');
 // remove 1 credit from member_credits table for each campus
 selected
 $crdt = $row_GetMC['credit_total'] -
 $_SESSION['sv_CampusAdCount'];
 $id = $row_GetMC['subid'];
 $q = UPDATE member_credits SET credit_total = $crdt WHERE
 subid = $id;
 $Update = mysql_query($q, $CCB) or die(mysql_error());
 header(Location:  . Success.php);
 exit;
 }
 }
 ?

All of this code needs to be in ONE php block...

---John Holmes...

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



Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Christophe Chisogne
Wouter van Vliet wrote:
So, since I'm not quite a newbie I did not read all the guides .. RTFM (Read
The F*ck!ng Manual) and STFW (Search The [EMAIL PROTECTED] Web) I already knew, but
what does STFA stand for ;)..
In a word : s/STFA/STFAQ/

From ESR's Jargon File v4.4.4 (some hacker culture, yes)
See links for more precise definitions...
RTFM Read The Fucking Manual
http://catb.org/~esr/jargon/html/R/RTFM.html
RTM, Read The Manual
http://catb.org/~esr/jargon/html/R/RTM.html
STFW Search The Fucking Web
http://catb.org/~esr/jargon/html/S/STFW.html
GIYF Google Is Your Friend
http://catb.org/~esr/jargon/html/G/GIYF.html
RTFAQ, Read the FAQ!
http://catb.org/~esr/jargon/html/R/RTFAQ.html
RTFS, Read The Fucking Source or Read The Fucking Standard
http://catb.org/~esr/jargon/html/R/RTFS.html
RTS, Read The Screen
http://catb.org/~esr/jargon/html/R/RTS.html
Perhaps we could add this link to the Newbie Guide
( found this in archives and with s/tuxedo/catb/ )
How To Ask Questions The Smart Way, by Eric Steven Raymond
http://www.catb.org/~esr/faqs/smart-questions.html
Yes, I like authoritative answers ;-)

Christophe

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


[PHP] configuring the php.ini file

2003-09-18 Thread Mark McCulligh
I have PHP on both a window and Linux box.

If I wanted to enable Sybase from the php.ini for windows I would uncomment
the extension=php_sybase_ct.dll line. But in Linux you don't use the dll
but the so files.  But inside of my extensions folder on the Linux box there
is nothing. For were are all the so files, on the windows box the extensions
folder is full of dlls. OR in Linux do you have to always recompile PHP to
enable any new database support.

Thanks,
Mark.

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



RE: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Jay Blanchard
[snip]
Perhaps we could add this link to the Newbie Guide
( found this in archives and with s/tuxedo/catb/ )

How To Ask Questions The Smart Way, by Eric Steven Raymond
http://www.catb.org/~esr/faqs/smart-questions.html
[/snip]

It is number 9 on the Newbie Guide

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



RE: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Jay Blanchard
[snip]
Perhaps we could add this link to the Newbie Guide
( found this in archives and with s/tuxedo/catb/ )

How To Ask Questions The Smart Way, by Eric Steven Raymond
http://www.catb.org/~esr/faqs/smart-questions.html
[/snip]

It is number 9 on the Newbie Guide which (I hit send too) leads me to
proudly announce a brand new thing

*TA DA!*

RTFNG!

For those of you who are acronym impaired

Read The F$^%$#^%ing Newbie Guide

Which should cover it all, no?

:)

Having a rainy, but better day, in Texas!

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



[PHP] embedding PHP in MySQL

2003-09-18 Thread Michael Winston
I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, 
displaying result to be: blah blah blah {executed php code} blah blah 
blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits 
of code, evaluate them, and put them back in.

Any ideas?

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


Re: [PHP] [Newbie Guide] RTFM, STFW, and STFA

2003-09-18 Thread Glenn E. Sieb
Jay Blanchard wrote:

[snip]
Perhaps we could add this link to the Newbie Guide
( found this in archives and with s/tuxedo/catb/ )
How To Ask Questions The Smart Way, by Eric Steven Raymond
http://www.catb.org/~esr/faqs/smart-questions.html
[/snip]
It is number 9 on the Newbie Guide which (I hit send too) leads me to
proudly announce a brand new thing
*TA DA!*

RTFNG!

For those of you who are acronym impaired

Read The F$^%$#^%ing Newbie Guide
 

Now now.. in polite company we  would say:

Read The Fine Newbie Guide :)

(I'd like to think we're pretty polite, in general ;) )

Glenn

--
Glenn E. Sieb
System Administrator
Lumeta Corporation
+1 732 357-3514 (V)
+1 732 564-0731 (Fax)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Another code check

2003-09-18 Thread James Johnson
Hi John,

Thanks, that was it.

James

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



RE: [PHP] embedding PHP in MySQL

2003-09-18 Thread Javier Tacon

Instead to eval the code, try to save the query result into a new file, then execute 
this file (require_once, include).

Something like:

function executeFromQuery($query) {
  global $DB;
  $file = /tmp/temp.php;
  $code = $DB-getOne($query);
  $fh = fopen($file,w);
  fwrite($fh,$code);
  fclose($fh);
  include($file);
}

It should work.

Javier Tacón Iglesias.


-Mensaje original-
De: Michael Winston [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 18 de septiembre de 2003 17:20
Para: [EMAIL PROTECTED]
Asunto: [PHP] embedding PHP in MySQL
Importancia: Baja


I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, 
displaying result to be: blah blah blah {executed php code} blah blah 
blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits 
of code, evaluate them, and put them back in.

Any ideas?

Thanks,
Michael

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

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



Re: [PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Jim Lucas
also, here is a good one to try.

build yourself an error document that gets called when a file that cannot
befound is looked for.

Then in this error document, you perform a check on the file/script name
that was called.  If it happens to end with .pdf, then you could assume that
it is going to be a pdf that needs to be displayed.  Then you get the name
of the file called and look for it in your directory that contains all your
pdf's.  If you find a file in there by the same name, then you can use
readfile or some other file reader to pass the file through.

This should take care of the problem.  You might also need to send back some
specific headers to tell the browser what you are sending it, but it should
work even without that being done.

Jim Lucas

- Original Message - 
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 2:01 AM
Subject: Re: [PHP] This is my fourth day of hitting this brick wall!
Anyone...Purlese help!


 On Thursday 18 September 2003 16:24, Steve Jackson wrote:
  I know a few have already done this on the list but I have read articles
  on Zend tried other functions done everything I can, de-bugged till I'm
  blue in the face and still haven't been able to solve this.
 
  I need to protect files by leaving them outside the web root.
  I call them up ok. (the link is get.php?file=EventNotifcation_01.pdf)
  I can download the file fine by right clicking the link in the browser
  and saving it to disk.
  My problem is I can't view it inline. IE in the browser. It's a PDF file
  so I should be able to.

 [snip]

 Have you tried the obvious, such as using browsers other than IE? Or a
 different version of IE?

 Fact is that there are versions of IE that have broken mime handling.

 -- 
 Jason Wong - Gremlins Associates - www.gremlins.biz
 Open Source Software Systems Integrators
 * Web Design  Hosting * Internet  Intranet Applications Development *
 --
 Search the list archives before you post
 http://marc.theaimsgroup.com/?l=php-general
 --
 /*
 modem, adj.:
 Up-to-date, new-fangled, as in Thoroughly Modem Millie.  An
 unfortunate byproduct of kerning.

 [That's sic!]
 */

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



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



Re: [PHP] embedding PHP in MySQL

2003-09-18 Thread Marek Kilimajer
By default the evaled code is php, so you need to escape first:
eval('?'.$your_code_pulled_from_db.'?php');
Michael Winston wrote:

I've been working on this for a few days and can't get it.

I would like to stick some php code into a sql databases and be able to 
evaluate it when it's called up.

Foe example, let's say there's some text in a table in MySql that says 
blah blah blah ? $mysql_query(SELECT * FROM X WHERE 1); 
$someothercode; ? blah blah blah blah blah.  I wan the end, displaying 
result to be: blah blah blah {executed php code} blah blah blah  blah.

Now, I know that eval() is involved, but I don't want it accidentally 
executing code outside the ?  ? so I need a way to pluck out bits of 
code, evaluate them, and put them back in.

Any ideas?

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


[PHP] Suppressing warning messages in file uploading though HTTP

2003-09-18 Thread Binay
Hi everybody!

I am uploading html,text etc files though HTTP upload form method. In my php.ini file 
value of upload_max_filesize is 2 MB. Now if the file size exceeds 2 MB i get warning 
messages saying size of the file exceeds upload_max_filesize value . I want to know 
how i can suppress this warning message and is there any method to get the file size 
before uploading so as to alert the clients accordingly?

Please help me out

Thanks in advance

Binay


Re: [PHP] This is my fourth day of hitting this brick wall! Anyone...Purleeeeese help!

2003-09-18 Thread Marek Kilimajer
Jim Lucas wrote:

 This should take care of the problem.  You might also need to send back some
 specific headers to tell the browser what you are sending it, but it should
 work even without that being done.

I think this works only in IE, always send Content-Type.

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



[PHP] Crash of PHP 4.3.x, having a big array

2003-09-18 Thread Martin Brenn
Servus,

I got a crash of 4.3.x under Apache and direct call of php.exe under
windows, when the script creates a huge array.

Source:
...

for ( $nCounter = 0; $nCounter  $nAmount;
$nCounter++ )
{

$aszExtracted [ $szPlayerID ] [ $nUnit ] [
'type' ] = $aszUnit [ 'type' ];
$aszExtracted [ $szPlayerID ] [ $nUnit ] [
'job' ] = $aszUnit [ 'job' ];

$nUnit++;
}
 ..

When $nAmount has a value between 100.000 and 1.500.000, PHP and Apache
crashes with an exception fault AFTER having processed it. I think it
crashes during the cleaning up of memory or internal variables.

Any suggestions or help, how to get a better description of this problem,

Thanks,
Martin Brenn

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



Re: [PHP] Suppressing warning messages in file uploading though HTTP

2003-09-18 Thread Raditha Dissanayake
Hi Binay,

The only way you can get the file size before upload is to use a Java 
applet or activex. If i am not mistaken you can remove the 'max size 
exceeded' warning only by recompiling php.

all the best

ps: appreciate if you could switch off return reciepts on your mail client.

Binay wrote:

Hi everybody!

I am uploading html,text etc files though HTTP upload form method. In my php.ini file value of upload_max_filesize is 2 MB. Now if the file size exceeds 2 MB i get warning messages saying size of the file exceeds upload_max_filesize value . I want to know how i can suppress this warning message and is there any method to get the file size before uploading so as to alert the clients accordingly?

Please help me out

Thanks in advance

Binay

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Suppressing warning messages in file uploading though HTTP

2003-09-18 Thread Binay
Hi Radhita!

Thanks for quick response.

- Original Message -
From: Raditha Dissanayake [EMAIL PROTECTED]
To: Binay [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, September 18, 2003 9:37 PM
Subject: Re: [PHP] Suppressing warning messages in file uploading though
HTTP


 Hi Binay,

 The only way you can get the file size before upload is to use a Java
 applet or activex.

Would you like to shade more light on how i can use java applet or activex i
mean bit coding/snippet as i am newbie .


If i am not mistaken you can remove the 'max size
 exceeded' warning only by recompiling php.
+
Which switch or options to use while recompiling php to suppress the warning
messages ?
+

 all the best

 ps: appreciate if you could switch off return reciepts on your mail
client.

 Binay wrote:

 Hi everybody!
 
 I am uploading html,text etc files though HTTP upload form method. In my
php.ini file value of upload_max_filesize is 2 MB. Now if the file size
exceeds 2 MB i get warning messages saying size of the file exceeds
upload_max_filesize value . I want to know how i can suppress this warning
message and is there any method to get the file size before uploading so as
to alert the clients accordingly?
 
 Please help me out
 
 Thanks in advance
 
 Binay
 
 
 


 --
 http://www.radinks.com/upload
 Drag and Drop File Uploader.


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



[PHP] Form CheckBox question

2003-09-18 Thread Yves Arsenault

Hello,

I have this in my form the checkUnCheck(this); will uncheck values 1,2,3
if None is chosen... Now when I submit this form, the output I get from
$Avail is the word Array and not the actual content ('1,2,3' if I choose
1,2,3)
td
input type=Checkbox name=Avail[] value=1
onclick=checkUnCheck(this);1nbsp;
input type=Checkbox name=Avail[] value=2
onclick=checkUnCheck(this);2nbsp;
input type=Checkbox name=Avail[] value=2
onclick=checkUnCheck(this);3nbsp;
input type=Checkbox name=Avail[] value=
onclick=checkUnCheck(this);Nonenbsp;
/td

Am I missing something??

And no, I'm not a very experienced PHP developer.

:-)

Yves Arsenault
Carrefour Infotech
5,promenade Acadian
Charlottetown, IPE
C1C 1M2
[EMAIL PROTECTED]
(902)368-1895 ext.242
ICQ #117650823

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

RE: [PHP] Help!!!

2003-09-18 Thread Chris W. Parker
#meen shari-ah# mailto:[EMAIL PROTECTED]
on Thursday, September 18, 2003 1:05 AM said:

Please do not post messages with Help!!! as the title. Everyone who
posts to this list needs help in some way. It's much better if you give
a short description of your problem. For example, can't connect to
database or need to optimize this code, etc.


thanks,
c.

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



Re: [PHP] Suppressing warning messages in file uploading though HTTP

2003-09-18 Thread Raditha Dissanayake
Hi

You are welcome

Binay wrote:


Would you like to shade more light on how i can use java applet or activex i
mean bit coding/snippet as i am newbie .


shameless plug : 

please try http://www.radinks.com/upload
it's such an uploader applet. The basic version is free.
If i am not mistaken you can remove the 'max size
 

exceeded' warning only by recompiling php.
   

+
Which switch or options to use while recompiling php to suppress the warning
messages ?
+
There aren't any options, you need to edit the source code and comment 
out the relevent sections. Obviously this solution does not work on 
shared hosting accounts and oyu need to be the owner of your web server 
if you choose this applet.

--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] email receipts

2003-09-18 Thread Roger Spears
and please, could we turn off the email receipt requested before 
sending messages to this list???  I find them most annoying and time 
consuming for a list this large.

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


[PHP] Returning FORM vars from popup

2003-09-18 Thread Rich Fox
(Sorry, I inadvertently sent an incomplete post)

I have a popup window, itemSelect.php, from which I would like to reload the
calling page. itemSelect.php has a form, and I want to reload the calling
page with these form variables. How can I do this? I can reload the page
easily enough, with this test code in itemSelect.php:

form
 input type=hidden value=mine name=newparam
 input type=button value=Close
onClick=window.opener.location.reload();window.close()
/form

Not surprisingly, this doesn't work. My calling page reloads and the popup
closes, but the onClick code bypasses the form and newparam doesn't get
passed. What, please, is a good way to  accomplish passing newparam (and
other form vars) back to the calling page?

Many thanks,

Rich

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



[PHP] Returning form vars from popup

2003-09-18 Thread Rich Fox
I have a popup window, itemSelect.php, from which I would like to reload the
calling page. itemSelect.php has a form, and I want to reload the calling
page with these form variables. How can I do this? I can reload the page
easily enough, with

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



Re: [PHP] Returning FORM vars from popup

2003-09-18 Thread Raditha Dissanayake
Hi,
use onSubmit() and if you have trouble with it please refer to the 
javascript manual, this list is for php

all the best



Rich Fox wrote:

(Sorry, I inadvertently sent an incomplete post)

I have a popup window, itemSelect.php, from which I would like to reload the
calling page. itemSelect.php has a form, and I want to reload the calling
page with these form variables. How can I do this? I can reload the page
easily enough, with this test code in itemSelect.php:
form
input type=hidden value=mine name=newparam
input type=button value=Close
onClick=window.opener.location.reload();window.close()
/form
Not surprisingly, this doesn't work. My calling page reloads and the popup
closes, but the onClick code bypasses the form and newparam doesn't get
passed. What, please, is a good way to  accomplish passing newparam (and
other form vars) back to the calling page?
Many thanks,

Rich

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] webhost --0T--

2003-09-18 Thread David T-G
Ryan, et al --

...and then Ryan A said...
% 
% Hey David,

Hiya!


% 
% Good enough.  Lots of bells and whistles; that's great.
% #/
% 
% Yep, without the bells and whistles no challenge for me to program and it
% will be like any other site...

Heh.


% and since i still dont really consider myself a good programmer in php,
% still learning, this gives me a chance to work more and learn as i go along.

Always a good thing :-)


% 
% 
% /#
% % save their favourite packages from the differient hosts and even compare
% the
% Excellent!
% /#
% Thats only the half of it, will send you the link once i get a few hosts to
% list their packages coz now there arnt enough test packages for you to

Tell me what you mean by hosts and packages.  If by 'host' you mean the
provider, I have real experience with DataPipe, Interland, and CIHost to
throw in the pot.


% actually see most of the functionality. I made this after thinking of the
% trouble i went thru to find some decient hosts, I think i went thru around 9
% hosts in the last 2 years before kind of settling down.

I looove my datapipe :-)


% 
% I guess hosts are like women, you think you finally found the one but.
% + they are all GREAT when you start with them but
% :-D

*snort*


% 
% (Ladies am just kidding, dont curse me)

Am I guilty just by association? :-)


% 
% /#
% % Nope, its not that you have limited votes, you can vote for each and every
% Good.
% % host on the site...but just one vote per host, dont you think thats fair?
% Nope.  What if you have two users on a host?
% #/
% 
% Of course, nearly every host has more than 2 users :-)) at least if they
% want to stay in business but i kind of figured that the users would have
% seperate client accounts with me (so seperate control panels) to
% vote,add/compare packages etc, if i got the question wrong tell me.

No, it's probably right...  You meant one vote-per-person regarding a
particular host==provider.  Right?  I thought that you were still
referring to the IP address.


% 
% service goes down the drain; I should be able to change my vote to
% reflect their new status if this is something that people will want to
% see as worthwhile for more than just a short survey period.
% #/
% 
% Hmmm, a new bell or whistle i didnt think of, but i think it could be easily

*grin*


% implempted, instead of giving a message you ahve already voted for this
% host, only one vote allowed etc I can say  you have already voted for this

Yep.


% host on datetime, would you like to see your old vote or change it?

All you have to do is store all of the vote info pertinent to the user.


% Good idea, i think i'll run with it.

Happy to help :-)


% 
% 
% /#Well, if you're going to keep my vote around so that I can change it you
% now have to have an entire database record for me.  If I'm just throwing
% my vote into the pile then you need only keep a running total.  The
% latter is certainly easier.
% #/
% Yep, but the former is more intresting :-).

Indeed!


% Thats pretty much the whole idea actually, I know i am not the only one in
% the world with brilliant ideas (was quite a shock to me when i found out

*grin*


% -D  ) and thats why i wrote to the list...if anybody has an idea of what
% they would like to see/havedrop me a few lines.

There ya go.


% 
% Thanks for the idea/suggestion.

Sure thing!


% 
% Before i forget, dont get confused with my new /# and #/ to your messages, I
% just thought i'll change them everytime to give curt a hard time :-)) lets
% see him try to keep up with the variations i come up with.

*grin*


% 
% Cheers,
% -Ryan


HTH  HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, Science and Health
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


[PHP] PHP and PDF

2003-09-18 Thread Paulo Nunes
I ve been trying to use the PDF function to create/read PDF files, but i ve
many problems.
Can anyone give a clue how can i create/read PDF files with PHP?
Thanks...

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



RE: [PHP] PHP and PDF

2003-09-18 Thread Jay Blanchard
[snip]
I ve been trying to use the PDF function to create/read PDF files, but i
ve
many problems.
Can anyone give a clue how can i create/read PDF files with PHP?
Thanks...
[/snip]

Look for clues here http://us4.php.net/PDF and here
http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=PHP+and+PDF then
if you still don't have a clue come back and we'll get you some more.

Have a pleasant and educational day.

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



RE: [PHP] PHP and PDF

2003-09-18 Thread Javier Tacon

Try with the pdf classes in http://www.ros.co.nz/pdf/


-Mensaje original-
De: Paulo Nunes [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 18 de septiembre de 2003 14:59
Para: [EMAIL PROTECTED]
Asunto: [PHP] PHP and PDF
Importancia: Baja


I ve been trying to use the PDF function to create/read PDF files, but i ve
many problems.
Can anyone give a clue how can i create/read PDF files with PHP?
Thanks...

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

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



Re: [PHP] Returning form vars from popup

2003-09-18 Thread R'twick Niceorgaw
Rich Fox said the following on 9/18/2003 12:24 PM

I have a popup window, itemSelect.php, from which I would like to reload the
calling page. itemSelect.php has a form, and I want to reload the calling
page with these form variables. How can I do this? I can reload the page
easily enough, with
you can use javascript to set form variables in the calling page like

window.opener.docuemnt.forms.your_element.value= whatever_value_you_want

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


[PHP] Murugesan

2003-09-18 Thread Chris Sherwood
Hey Muru your sending viruses disguised as a ms security update

either its accidental which you want to look for the Win32/NewMalware.gen

cause thats what is being sent

or its not which then you kinda want to be a little more inconspicious about it

[PHP] Re:Form CheckBox question

2003-09-18 Thread Rodrigo Webler
If you've echo-ed or printed an Array value, yes, you'll get 'Array' as 
result, try to var_dump the value, and check if it isn't all well.

Rodrigo

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



Re: [PHP] Form CheckBox question

2003-09-18 Thread CPT John W. Holmes
From: Yves Arsenault [EMAIL PROTECTED]

 I have this in my form the checkUnCheck(this); will uncheck values
1,2,3
 if None is chosen... Now when I submit this form, the output I get from
 $Avail is the word Array and not the actual content ('1,2,3' if I
choose
 1,2,3)
 td
 input type=Checkbox name=Avail[] value=1
 onclick=checkUnCheck(this);1nbsp;
 input type=Checkbox name=Avail[] value=2
 onclick=checkUnCheck(this);2nbsp;
 input type=Checkbox name=Avail[] value=2
 onclick=checkUnCheck(this);3nbsp;
 input type=Checkbox name=Avail[] value=
 onclick=checkUnCheck(this);Nonenbsp;
 /td

 Am I missing something??

Kind of. $Avail IS an array (because you named it correctly with [ and ]),
that's why you get that. If you check 2, then you should have

$Avail[0] = 2

in PHP. If you check more than one box, then you'll have $Avail[0],
$Avail[1], etc.

---John Holmes...

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



Re: [PHP] PHP and MYSQL don't shake hands

2003-09-18 Thread CPT John W. Holmes
From: Frank Tudor [EMAIL PROTECTED]

 The problem I am having is that when I try to pass values to the
 database the php fails.
 
 I think I have singled it down to the connection string but I am
 not sure.
[snip]
 function db_connect() {
global $dbhost, $dbusername, $dbuserpassword,
 $default_dbname;
global $MYSQL_ERRNO, $MYSQL_ERROR;
 
$link_id = mysql_connect($dbhost, $dbusername,
 $dbuserpassword);
if(!$link_id) {
   $MYSQL_ERRNO = 0;
   $MYSQL_ERROR = Connection failed to the host $dbhost.;
   return 0;
}
else if(empty($dbname)  !mysql_select_db($default_dbname))
 {
   $MYSQL_ERRNO = mysql_errno();
   $MYSQL_ERROR = mysql_error();
   return 0;
}
else return $link_id;
 }
 
 function sql_error() {
global $MYSQL_ERRNO, $MYSQL_ERROR;
 
if(empty($MYSQL_ERROR)) {
   $MYSQL_ERRNO = mysql_errno();
   $MYSQL_ERROR = mysql_error();
}
return $MYSQL_ERRNO: $MYSQL_ERROR;
 }
 ?
 
 My php sample code:::
 
 ?php
 //db_connect.php
 include common_db.inc;
 error_reporting(0);

Take this out or set it to E_ALL while debugging.

 $link_id = db_connect();
 if(!$link_id) die(sql_error());

Use

$link_id = db_connect() or die(sql_error());

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



[PHP] Flash Chat

2003-09-18 Thread Dan J. Rychlik
Hello, 

I was wondering if my solution would work in theory in providing a Flash chat 
application.  

I would use the AMFPHP to interface with the flash object.  I would use a class to 
describe the chat room and creat new objects for private rooms.  Do you think that 
this will truly work, In theory I mean.  

Has anyone accomplished this before?

-Dan

[PHP] [ANNOUNCEMENT] InterJinn Application Framework for PHP

2003-09-18 Thread Robert Cummings
I am pleased to announce the premier release of the InterJinn
Application Framework for PHP.

http://www.interjinn.com.

This has been a lengthy endeavour I undertook some time ago to
provide a useful framework for quickly creating powerful Web
(and shell) applications. InterJinn makes its debut at version
0.9.0 and is considered good for production, but as with any
new release, it is not expected to be perfect. Your feedback
can make a great difference. Some might wonder why a framework
is useful. That question is fairly loaded. For simple sites it
might not be as useful as large complex sites. With the
InterJinn framework you have a common API for many of the most
common tasks performed for any application. The nice thing is
that if the services that offer these APIs don't work quite like
you want, then you can rewrite the services and they will work
smoothly as long as you have maintained the API. This has
benefits when you are targeting a large audience, or when you
want the code you've written once to work in other situations or
contexts. For instance maybe you've written great management
system for real estate agents, and you want to re-market it to
other agents, but some are using Windows, some Linux, and yet
others Solaris -- to complicate the issue some are using MySQL,
other Oracle, etc. A framework helps to relieve the complexity
of compatibility across multiple systems whilst also
simplifying often used concepts. Following is a brief summary
of some of the features:

Features:

- Fully modular OO design.
- Database or Filesystem Session Service
- Database or Filesystem Profile Service
- Database or Filesystem Cache Service
- Database Service
  (default is MySQL but in 3 lines you can configure a PEAR DB Wrapper)
- Hierarchical and Inheritable Property Tier
- Powerful Form Engine
- Lazy and Efficient Loading Mechanism (ie Scalable)
- Pluggable Templating Engine
- Layered XML Compilers for Template Engine
- Any kind of compiler you can dream up for Template Engine

More info: 

- Almost every core service can be removed and replaced with a custom
  service, that is to say, if you don't like how sessions are handled,
  you can extend the sessions service objects and configure the
  framework to use your version.
- Property system for module/components allows declaration of complex
  properties which simplifies your development work. For instance
  session properties can be declared which will be bound to your
  component allowing transparent access to session data. Properties can
  be declared as queries, and the result set for the query will be
  bound to your component's member variable. There are many other
  property types that make configuring your application easy.
- Property system can transparently load contextual language values.
- Template engine supports content retrieval from filesystem, database,
  or both -- and you can add your own custom retrieval mechanisms.
- Template engine can indefinitely nest includes and supports
  multilingual localization almost transparently. Also supports
  inclusion of content via paths relative to the template in which the
  content is being included.
- Create your own template compiler, or better yet extend the provided
  base tag compiler to add support for your own custom tags.
- Template engine compiles templates and source files to pure PHP and
  HTML. There's no such thing as slowdown.
- Non invasive, minimal number of variable in global space, and works
  with or without register globals on.
- Works happily with any other code you might have or download from PHP
  Classes or anywhere else.
- Probably works with Smarty, but why would you use smarty when the
  included template engine is better (IMHO :)

Even more info:

It's hard to explain and point out all the great features of this
framework. You would be better served to head to the site and read up
on some of the documentation -- there is lots of documentation to
answer almost any questions you might have.

http://www.interjinn.com

Cheers, 
Rob. 
-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



RE: [PHP] Flash Chat

2003-09-18 Thread Jay Blanchard
[snip]
Do you think that this will truly work, In theory I mean.  
[/snip]

Sure.

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



[PHP] Best way to approach object construction errors?

2003-09-18 Thread Mike Zornek
I've created a class called university, it has a constructor which can
accept an id. If the id is sent during construction the constructor will
connect to a MySQL db to set all of the objects member variables to the
MySQl counterparts.

I'd like to include some error notification so if I send it an id and let's
say that record doesn't exist in the db I get some notification and can
write a message out to log (or screen). But what is the best way to do this?
Any recommendations? Tutorials? URLs?

~ Mike

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



[PHP] autocomplete not working all of a sudden

2003-09-18 Thread Chris W. Parker
Hi everyone.

Pardon the crosspost but I figure if I'm going to post the same question
to two lists anyway, why not get it over with in one shot?


Ok so in an attempt to lessen Windows2k pro memory footprint I just
turned off three services. (1) TCP/IP NetBIOS Helper Service, (2) IPSEC
Policy Agent, and (3) Distributed Link Tracking Client.

Now the autocomplete functionality of IE is not working. IE used to save
all the search terms for google, now they're not there. I'm also working
on a project that requires a simple login, all my test usernames used to
be stored with the form but now they are not there anymore either.

I have no idea if either of those services had anything to do with or
not (it seems very unlikely that they are related) but it's the only
connection I can see.

Here's what I've done so far:

1. Turned all those services back on and then tried both google and my
login form again. Didn't work.
2. Checked the IE settings for autocomplete. They are correct.


Any ideas on how to get it working again?


Thanks,
Chris.

p.s. IE's address bar is still working (must be a separate function).

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



[PHP] when clients go bad

2003-09-18 Thread Tim Thorburn
Hi,

I've done freelance web design for about 7 years now off and on.  Just 
recently I've found myself dealing with the worst clients in the history of 
the world - ok, maybe not, but they've been pretty awful.

After about a year of working together, the business relationship became so 
bad that we decided to part ways.  They have now found themselves a 
beginner designer who whipped together a quick template site for them, but 
would now like access to all my source code (PHP, Flash, MySQL, and a 
little ASP) - without really giving any specific reasons.

The site was hosted on a 3rd party shared server which the client had full 
access to, up until the point they terminated the hosting contract - now 
they're demanding the site on CD.

As there is a very small web market in my area, I do not feel at all 
comfortable about just handing someone my source code.  I know in the 
graphics realm, unless the contract specifically states that the original 
source files will be provided - they are not given.

Has anyone had to deal with a similar situation?  Any thoughts or opinions?

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


[PHP] Mathematical differences?!

2003-09-18 Thread Mario Werner

Hello all,

I ported a algorithm from JavaScript to PHP and noticed that PHP outputs a
different result than JS. For example:


t   = 0.6255264658909423
f   = 20.5
ln  = -6.983
d2r = 0.017453292519943295

$ra = (((6.6460656 + 2400.0513 * $t + 2.58e-5 * $t * $t + $f) * 15 - $ln) %
360) * $d2r;

PHP outputs 4.4156830075456535
JS outputs 4.42304792511156


I found out that ((...) % 360) returns in PHP 253.... whereas JS and a
Calculator return 253.6085
I also tried to use the bc...-functions but the result was the same.

This formular is only a part of a bigger calculation and I also noticed
further differences because when
I manually set $ra to 4.4230... (the JS result) then I still get a different
end-result than in JS but it is
100% EXACTLY the same algorithm, I checked it many times.

How could that be?! 1:1 the same code but different outputs? Is this a
PHP-bug?  :-?

Kindly regards,

Mario

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



RE: [PHP] when clients go bad

2003-09-18 Thread Jay Blanchard
[snip]
...
[/snip]

Work product for the customer belongs to the customer unless
specifically stated differently in the contract. It is their
intellectual property. I have coded both as an employee contractor for
several years and it is always understood (unless the contract states
differently) that the customer owns the work product. I have a couple of
tools which I have developed over time, and I specifically exclude these
from the work product in the contract if I expect to use them. If the
customer chooses to argue on those I just do not use them on their
project.

Have you done anything special with regards to their site that you
should have copyrighted?

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



Re: [PHP] when clients go bad

2003-09-18 Thread CPT John W. Holmes
From: Tim Thorburn [EMAIL PROTECTED]

 I've done freelance web design for about 7 years now off and on.  Just
 recently I've found myself dealing with the worst clients in the history
of
 the world - ok, maybe not, but they've been pretty awful.

 After about a year of working together, the business relationship became
so
 bad that we decided to part ways.  They have now found themselves a
 beginner designer who whipped together a quick template site for them, but
 would now like access to all my source code (PHP, Flash, MySQL, and a
 little ASP) - without really giving any specific reasons.

 The site was hosted on a 3rd party shared server which the client had full
 access to, up until the point they terminated the hosting contract - now
 they're demanding the site on CD.

 As there is a very small web market in my area, I do not feel at all
 comfortable about just handing someone my source code.  I know in the
 graphics realm, unless the contract specifically states that the original
 source files will be provided - they are not given.

 Has anyone had to deal with a similar situation?  Any thoughts or
opinions?

Just my personal opinion, of course, but  you wrote the code while working
for the business, right? It would seem like the code belongs to the business
then, unless the contract says something specific.

What reason do you have for retaining the code, other than just not wanting
to give it to them? You may not have parted in the best ways, but you
keeping the code is hurting the business. What's the reason for it?

I would say you both retain rights to the code. Provide them a copy and
nothing else. They need to sort it out on their own. You'll still retain
rights to it also to use on other projects, if you can. This would be the
honorable thing to do, in my opinion.

---John Holmes...

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



RE: [PHP] Mathematical differences?!

2003-09-18 Thread Jay Blanchard
[snip]
How could that be?! 1:1 the same code but different outputs? Is this a
PHP-bug?  :-?
[/snip]

*feelin' kinda' smart arsed today, if no one noticed*

Maybe it was a JavaScipt bug all along ? ;)

Actually I am worried about the order of operations and encapsulation in
the equation in $ra, mathematically speaking.

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



Re: [PHP] configuring the php.ini file

2003-09-18 Thread Jason Wong
On Thursday 18 September 2003 23:01, Mark McCulligh wrote:
 I have PHP on both a window and Linux box.

 If I wanted to enable Sybase from the php.ini for windows I would uncomment
 the extension=php_sybase_ct.dll line. But in Linux you don't use the dll
 but the so files.  But inside of my extensions folder on the Linux box
 there is nothing. For were are all the so files, on the windows box the
 extensions folder is full of dlls. OR in Linux do you have to always
 recompile PHP to enable any new database support.

In general, yes, you need to recompile. But it totally depends on what flavour 
of Linux you're using and how you installed PHP in the first place.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Mencken and Nathan's Fifteenth Law of The Average American:
The worst actress in the company is always the manager's wife.
*/

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



Re: Fw: [PHP] Problem sending HTML formated mail

2003-09-18 Thread Juan Carlos Borrero
Ok. Thank You

Juan Carlos
- Original Message -
From: Curt Zirzow [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 8:59 PM
Subject: Re: Fw: [PHP] Problem sending HTML formated mail


 * Thus wrote Juan Carlos Borrero ([EMAIL PROTECTED]):
 
  - Original Message -
  From: Juan Carlos Borrero [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, September 17, 2003 8:11 PM
  Subject: Re: [PHP] Problem sending HTML formated mail
 
 
  
   - Original Message -
   From: David T-G [EMAIL PROTECTED]
   To: Juan Carlos Borrero [EMAIL PROTECTED]
   Sent: Wednesday, September 17, 2003 7:48 PM
   Subject: Re: [PHP] Problem sending HTML formated mail
  
   Acording with David Instructios i am attaching the 2 examples of the
same
   mail generates with 5 seconds of difference producen this two results.
  
   Thanks
  
   Juan Carlos

 Your emails are an utter confusion.

 first, you original message (which I had to go digging for, to
 recall what your problem was) was posted in another thread.

 Second, this email content is quoting the wrong person with your
 text inside his quote.

 Third, Your attachments are all messed-up. I can't make heads or
 tails as to what is what. Besides that attachements are not suppose
 to be posted to the list.

 Fourth, I finally make something out of it and your code is very
 hard to read, you have commented out code here and there.

 Fifth, Your email attatchments are way to complicated to decipher,
 you have special headers and the like inside of them, and is very
 difficult to determain exactly what the problem is.

 Try to make things simple and go from there. I would also
 suggest using a class of some sort that works already, such as was
 suggested ealier (phpmailer.)


 Curt
 --
 I used to think I was indecisive, but now I'm not so sure.

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





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



RE: [PHP] Flash Chat

2003-09-18 Thread Craig Lonsbury
 -Original Message-
 From: Dan J. Rychlik [mailto:[EMAIL PROTECTED]
 Sent: Thursday, September 18, 2003 12:22 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Flash Chat


 Hello,

 I was wondering if my solution would work in theory in providing
 a Flash chat application.

 I would use the AMFPHP to interface with the flash object.  I
 would use a class to describe the chat room and creat new objects
 for private rooms.  Do you think that this will truly work, In
 theory I mean.

 Has anyone accomplished this before?

 -Dan

not a chat app, but www.chefs-hat.com has an all flash front-end,
and php doing all of the backend db work. it is pretty straightforward to
get
flash and php working together.

have fun,
Craig

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



RE: [PHP] Help!!!

2003-09-18 Thread Jay Blanchard
[snip]
Notice: Use of undefined constant {several times}
[/snip]

This means that several constants are undefined. You should have the
following for each of these constants...

define (constant-name, constant-value);

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



[PHP] Resizing a jpeg stored in a database

2003-09-18 Thread Donald Tyler
Hi,

 

I have a question that I hope you can answer. So far I have accomplished
the following:

 

Storing a jpeg in a MySQL database

Retrieving the jpeg from the database

Sending the jpeg to a browser and displaying it correctly

 

Creating dynamic PNG images in PHP

Resizing the dynamic PNG image in PHP

 

 

 

Now I need to combine the two processes. I am storing jpegs in a
database, and I want to write a script that can serve the image as
either a thumbnail view or a full view. How exactly would I go about
this? I was hoping I could just load the image from the database and
then insert it into an object I created with imagecreate(). However I
don't seem to be able to find any functions that will allow me to do
that.

 

I noticed there were functions to import images from files or URL's.
Does this mean that I will first have to save the image as a file on the
hard drive and THEN import it into the image object?

 

Thanks in advance for your help.

 

 

 

Donald Tyler



[PHP] Splice problem

2003-09-18 Thread Stevie D Peele
My problem is that I am splicing an array and then echoing the array
[code]
?php 
$input = array(red, green, blue, yellow); 
array_splice($input, 2); 

echo $input;
?
[/code]

and all that is echoed is Array. I want red green to be echoed.

Thanks


The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!

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



RE: [PHP] Splice problem

2003-09-18 Thread Jay Blanchard
[snip]
My problem is that I am splicing an array and then echoing the array
[code]
?php 
$input = array(red, green, blue, yellow); 
array_splice($input, 2); 

echo $input;
?
[/snip]

Shoulda kept readin', $input is now an array with red and green in it.
http://www.php.net/array_splice

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



Re: [PHP] Splice problem

2003-09-18 Thread CPT John W. Holmes
From: Stevie D Peele [EMAIL PROTECTED]


 My problem is that I am splicing an array and then echoing the array
 [code]
 ?php
 $input = array(red, green, blue, yellow);
 array_splice($input, 2);

 echo $input;
 ?
 [/code]

 and all that is echoed is Array. I want red green to be echoed.

That's because $input IS an array.

Try just displaying $input[0] and $input[1] for red and green.

You also need to assign the result of array_splice() to something...

$new_array = array_splice($input,2);

Maybe you should explain exactly what you're trying to accomplish with all
of this. There may be a better method.

---John Holmes...

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



Re: [PHP] Mathematical differences?!

2003-09-18 Thread Curt Zirzow
* Thus wrote Mario Werner ([EMAIL PROTECTED]):
 
 I ported a algorithm from JavaScript to PHP and noticed that PHP outputs a
 different result than JS. For example:
 
 
 t   = 0.6255264658909423
 f   = 20.5
 ln  = -6.983
 d2r = 0.017453292519943295
 
 $ra = (((6.6460656 + 2400.0513 * $t + 2.58e-5 * $t * $t + $f) * 15 - $ln) %
 360) * $d2r;
 
 PHP outputs 4.4156830075456535
 JS outputs 4.42304792511156
 
 
 I found out that ((...) % 360) returns in PHP 253.... whereas JS and a
 Calculator return 253.6085
 I also tried to use the bc...-functions but the result was the same.
 [...]
 How could that be?! 1:1 the same code but different outputs? Is this a
 PHP-bug?  :-?

Nope.

http://bugs.php.net/bug.php?id=12623

fmod() will do what you want.

Curt
-- 
I used to think I was indecisive, but now I'm not so sure.

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



  1   2   >